| OLD | NEW |
| 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/model/process_base.html"> | 8 <link rel="import" href="/tracing/model/process_base.html"> |
| 9 <link rel="import" href="/tracing/model/process_memory_dump.html"> | 9 <link rel="import" href="/tracing/model/process_memory_dump.html"> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 throw new Error('model must be provided'); | 30 throw new Error('model must be provided'); |
| 31 if (pid === undefined) | 31 if (pid === undefined) |
| 32 throw new Error('pid must be provided'); | 32 throw new Error('pid must be provided'); |
| 33 tr.model.ProcessBase.call(this, model); | 33 tr.model.ProcessBase.call(this, model); |
| 34 this.pid = pid; | 34 this.pid = pid; |
| 35 this.name = undefined; | 35 this.name = undefined; |
| 36 this.labels = []; | 36 this.labels = []; |
| 37 this.instantEvents = []; | 37 this.instantEvents = []; |
| 38 this.memoryDumps = []; | 38 this.memoryDumps = []; |
| 39 this.frames = []; | 39 this.frames = []; |
| 40 this.activities = []; |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 /** | 43 /** |
| 43 * Comparison between processes that orders by pid. | 44 * Comparison between processes that orders by pid. |
| 44 */ | 45 */ |
| 45 Process.compare = function(x, y) { | 46 Process.compare = function(x, y) { |
| 46 var tmp = tr.model.ProcessBase.compare(x, y); | 47 var tmp = tr.model.ProcessBase.compare(x, y); |
| 47 if (tmp) | 48 if (tmp) |
| 48 return tmp; | 49 return tmp; |
| 49 | 50 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 shiftTimestampsForward: function(amount) { | 128 shiftTimestampsForward: function(amount) { |
| 128 for (var id in this.instantEvents) | 129 for (var id in this.instantEvents) |
| 129 this.instantEvents[id].start += amount; | 130 this.instantEvents[id].start += amount; |
| 130 | 131 |
| 131 for (var i = 0; i < this.frames.length; i++) | 132 for (var i = 0; i < this.frames.length; i++) |
| 132 this.frames[i].shiftTimestampsForward(amount); | 133 this.frames[i].shiftTimestampsForward(amount); |
| 133 | 134 |
| 134 for (var i = 0; i < this.memoryDumps.length; i++) | 135 for (var i = 0; i < this.memoryDumps.length; i++) |
| 135 this.memoryDumps[i].shiftTimestampsForward(amount); | 136 this.memoryDumps[i].shiftTimestampsForward(amount); |
| 136 | 137 |
| 138 for (var i = 0; i < this.activities.length; i++) |
| 139 this.activities[i].shiftTimestampsForward(amount); |
| 140 |
| 137 tr.model.ProcessBase.prototype | 141 tr.model.ProcessBase.prototype |
| 138 .shiftTimestampsForward.apply(this, arguments); | 142 .shiftTimestampsForward.apply(this, arguments); |
| 139 }, | 143 }, |
| 140 | 144 |
| 141 updateBounds: function() { | 145 updateBounds: function() { |
| 142 tr.model.ProcessBase.prototype.updateBounds.apply(this); | 146 tr.model.ProcessBase.prototype.updateBounds.apply(this); |
| 143 | 147 |
| 144 for (var i = 0; i < this.frames.length; i++) | 148 for (var i = 0; i < this.frames.length; i++) |
| 145 this.frames[i].addBoundsToRange(this.bounds); | 149 this.frames[i].addBoundsToRange(this.bounds); |
| 146 | 150 |
| 147 for (var i = 0; i < this.memoryDumps.length; i++) | 151 for (var i = 0; i < this.memoryDumps.length; i++) |
| 148 this.memoryDumps[i].addBoundsToRange(this.bounds); | 152 this.memoryDumps[i].addBoundsToRange(this.bounds); |
| 153 |
| 154 for (var i = 0; i < this.activities.length; i++) |
| 155 this.activities[i].addBoundsToRange(this.bounds); |
| 149 }, | 156 }, |
| 150 | 157 |
| 151 sortMemoryDumps: function() { | 158 sortMemoryDumps: function() { |
| 152 this.memoryDumps.sort(function(x, y) { | 159 this.memoryDumps.sort(function(x, y) { |
| 153 return x.start - y.start; | 160 return x.start - y.start; |
| 154 }); | 161 }); |
| 155 tr.model.ProcessMemoryDump.hookUpMostRecentVmRegionsLinks( | 162 tr.model.ProcessMemoryDump.hookUpMostRecentVmRegionsLinks( |
| 156 this.memoryDumps); | 163 this.memoryDumps); |
| 157 } | 164 } |
| 158 }; | 165 }; |
| 159 | 166 |
| 160 return { | 167 return { |
| 161 Process: Process | 168 Process: Process |
| 162 }; | 169 }; |
| 163 }); | 170 }); |
| 164 </script> | 171 </script> |
| 165 | 172 |
| OLD | NEW |