blob: 6e5f80cf10453cf477baefd225b8781a444bddf4 [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/model/slice.html">
<script>
'use strict';
/**
* @fileoverview Provides the Thread class.
*/
tr.exportTo('tr.model', function() {
var Slice = tr.model.Slice;
/**
* A ThreadSlice represents an interval of time on a thread resource
* with associated nestinged slice information.
*
* ThreadSlices are typically associated with a specific trace event pair on a
* specific thread.
* For example,
* TRACE_EVENT_BEGIN1("x","myArg", 7) at time=0.1ms
* TRACE_EVENT_END0() at time=0.3ms
* This results in a single slice from 0.1 with duration 0.2 on a
* specific thread.
*
* @constructor
*/
function ThreadSlice(cat, title, colorId, start, args, opt_duration,
opt_cpuStart, opt_cpuDuration) {
Slice.call(this, cat, title, colorId, start, args, opt_duration,
opt_cpuStart, opt_cpuDuration);
// Do not modify this directly.
// subSlices is configured by SliceGroup.rebuildSubRows_.
this.subSlices = [];
}
ThreadSlice.prototype = {
__proto__: Slice.prototype
};
tr.model.EventRegistry.register(
ThreadSlice,
{
name: 'slice',
pluralName: 'slices',
singleViewElementName: 'tr-c-a-single-thread-slice-sub-view',
multiViewElementName: 'tr-c-a-multi-thread-slice-sub-view'
});
return {
ThreadSlice: ThreadSlice
};
});
</script>