Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: tracing/tracing/model/process_base.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tracing/tracing/model/process.html ('k') | tracing/tracing/model/process_memory_dump_test.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/guid.html"> 8 <link rel="import" href="/tracing/base/guid.html">
9 <link rel="import" href="/tracing/base/range.html"> 9 <link rel="import" href="/tracing/base/range.html">
10 <link rel="import" href="/tracing/model/counter.html"> 10 <link rel="import" href="/tracing/model/counter.html">
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 return x.sortIndex - y.sortIndex; 45 return x.sortIndex - y.sortIndex;
46 }; 46 };
47 47
48 ProcessBase.prototype = { 48 ProcessBase.prototype = {
49 __proto__: tr.model.EventContainer.prototype, 49 __proto__: tr.model.EventContainer.prototype,
50 50
51 get stableId() { 51 get stableId() {
52 throw new Error('Not implemented'); 52 throw new Error('Not implemented');
53 }, 53 },
54 54
55 findTopmostSlicesInThisContainer: function(eventPredicate, callback,
56 opt_this) {
57 },
58
59 childEventContainers: function*() { 55 childEventContainers: function*() {
60 yield * tr.b.dictionaryValues(this.threads); 56 yield * tr.b.dictionaryValues(this.threads);
61 yield * tr.b.dictionaryValues(this.counters); 57 yield * tr.b.dictionaryValues(this.counters);
62 yield this.objects; 58 yield this.objects;
63 }, 59 },
64 60
65 childEvents: function*(eventTypePredicate, opt_this) {
66 },
67
68 iterateAllPersistableObjects: function(cb) { 61 iterateAllPersistableObjects: function(cb) {
69 cb(this); 62 cb(this);
70 for (var tid in this.threads) 63 for (var tid in this.threads)
71 this.threads[tid].iterateAllPersistableObjects(cb); 64 this.threads[tid].iterateAllPersistableObjects(cb);
72 }, 65 },
73 66
74 /** 67 /**
75 * Gets the number of threads in this process. 68 * Gets the number of threads in this process.
76 */ 69 */
77 get numThreads() { 70 get numThreads() {
78 var n = 0; 71 var n = 0;
79 for (var p in this.threads) { 72 for (var p in this.threads) {
80 n++; 73 n++;
81 } 74 }
82 return n; 75 return n;
83 }, 76 },
84 77
85 /** 78 /**
86 * Shifts all the timestamps inside this process forward by the amount 79 * Shifts all the timestamps inside this process forward by the amount
87 * specified. 80 * specified.
88 */ 81 */
89 shiftTimestampsForward: function(amount) { 82 shiftTimestampsForward: function(amount) {
90 this.iterateAllChildEventContainers(function(child) { 83 for (var child of this.childEventContainers())
91 child.shiftTimestampsForward(amount); 84 child.shiftTimestampsForward(amount);
92 });
93 }, 85 },
94 86
95 /** 87 /**
96 * Closes any open slices. 88 * Closes any open slices.
97 */ 89 */
98 autoCloseOpenSlices: function() { 90 autoCloseOpenSlices: function() {
99 for (var tid in this.threads) { 91 for (var tid in this.threads) {
100 var thread = this.threads[tid]; 92 var thread = this.threads[tid];
101 thread.autoCloseOpenSlices(); 93 thread.autoCloseOpenSlices();
102 } 94 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 for (var tid in this.threads) 227 for (var tid in this.threads)
236 this.threads[tid].createSubSlices(); 228 this.threads[tid].createSubSlices();
237 } 229 }
238 }; 230 };
239 231
240 return { 232 return {
241 ProcessBase: ProcessBase 233 ProcessBase: ProcessBase
242 }; 234 };
243 }); 235 });
244 </script> 236 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/model/process.html ('k') | tracing/tracing/model/process_memory_dump_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698