OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 /** | 6 /** |
7 * @fileoverview TimelineModel is a parsed representation of the | 7 * @fileoverview TimelineModel is a parsed representation of the |
8 * TraceEvents obtained from base/trace_event in which the begin-end | 8 * TraceEvents obtained from base/trace_event in which the begin-end |
9 * tokens are converted into a hierarchy of processes, threads, | 9 * tokens are converted into a hierarchy of processes, threads, |
10 * subrows, and slices. | 10 * subrows, and slices. |
11 * | 11 * |
12 * The building block of the model is a slice. A slice is roughly | 12 * The building block of the model is a slice. A slice is roughly |
13 * equivalent to function call executing on a specific thread. As a | 13 * equivalent to function call executing on a specific thread. As a |
14 * result, slices may have one or more subslices. | 14 * result, slices may have one or more subslices. |
15 * | 15 * |
16 * A thread contains one or more subrows of slices. Row 0 corresponds to | 16 * A thread contains one or more subrows of slices. Row 0 corresponds to |
17 * the "root" slices, e.g. the topmost slices. Row 1 contains slices that | 17 * the "root" slices, e.g. the topmost slices. Row 1 contains slices that |
18 * are nested 1 deep in the stack, and so on. We use these subrows to draw | 18 * are nested 1 deep in the stack, and so on. We use these subrows to draw |
19 * nesting tasks. | 19 * nesting tasks. |
20 * | 20 * |
21 */ | 21 */ |
22 cr.define('gpu', function() { | 22 cr.define('tracing', function() { |
23 /** | 23 /** |
24 * A TimelineSlice represents an interval of time on a given thread | 24 * A TimelineSlice represents an interval of time on a given thread |
25 * associated with a specific trace event. For example, | 25 * associated with a specific trace event. For example, |
26 * TRACE_EVENT_BEGIN1("x","myArg", 7) at time=0.1ms | 26 * TRACE_EVENT_BEGIN1("x","myArg", 7) at time=0.1ms |
27 * TRACE_EVENT_END() at time=0.3ms | 27 * TRACE_EVENT_END() at time=0.3ms |
28 * Results in a single timeline slice from 0.1 with duration 0.2. | 28 * Results in a single timeline slice from 0.1 with duration 0.2. |
29 * | 29 * |
30 * All time units are stored in milliseconds. | 30 * All time units are stored in milliseconds. |
31 * @constructor | 31 * @constructor |
32 */ | 32 */ |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 | 410 |
411 }; | 411 }; |
412 | 412 |
413 return { | 413 return { |
414 TimelineSlice: TimelineSlice, | 414 TimelineSlice: TimelineSlice, |
415 TimelineThread: TimelineThread, | 415 TimelineThread: TimelineThread, |
416 TimelineProcess: TimelineProcess, | 416 TimelineProcess: TimelineProcess, |
417 TimelineModel: TimelineModel | 417 TimelineModel: TimelineModel |
418 }; | 418 }; |
419 }); | 419 }); |
OLD | NEW |