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

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

Issue 2635023002: [tracing] Support new heap dump format (Closed)
Patch Set: remove it again Created 3 years, 9 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2015 The Chromium Authors. All rights reserved. 3 Copyright 2015 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/base.html"> 8 <link rel="import" href="/tracing/base/base.html">
9 9
10 <script> 10 <script>
11 'use strict'; 11 'use strict';
12 12
13 tr.exportTo('tr.model', function() { 13 tr.exportTo('tr.model', function() {
14 /** 14 /**
15 * HeapEntry represents a single value describing the state of the heap of an 15 * HeapEntry represents a single value describing the state of the heap of an
16 * allocator in a single process. 16 * allocator in a single process.
17 * 17 *
18 * An entry specifies how much space (e.g. 19 MiB) was allocated in a 18 * An entry specifies how much space (e.g. 19 MiB) was allocated in a
19 * particular context, which consists of a codepath (e.g. drawQuad <- draw <- 19 * particular context, which consists of a codepath (e.g. drawQuad <- draw <-
20 * MessageLoop::RunTask) and an object type (e.g. HTMLImportLoader). 20 * MessageLoop::RunTask) and an object type (e.g. HTMLImportLoader).
21 * 21 *
22 * @{constructor} 22 * @{constructor}
23 */ 23 */
24 function HeapEntry(heapDump, leafStackFrame, objectTypeName, size, count) { 24 function HeapEntry(
25 heapDump, leafStackFrame, objectTypeName, size, count, valuesAreSelf) {
fmeawad 2017/03/23 20:43:57 nit: valuesAreSelf is not very descriptive, can yo
25 this.heapDump = heapDump; 26 this.heapDump = heapDump;
26 27
27 // The leaf stack frame of the associated backtrace (e.g. drawQuad for the 28 // The leaf stack frame of the associated backtrace (e.g. drawQuad for the
28 // drawQuad <- draw <- MessageLoop::RunTask backtrace). If undefined, the 29 // drawQuad <- draw <- MessageLoop::RunTask backtrace). If undefined, the
29 // backtrace is empty. 30 // backtrace is empty.
30 this.leafStackFrame = leafStackFrame; 31 this.leafStackFrame = leafStackFrame;
31 32
32 // The name of the allocated object type (e.g. 'HTMLImportLoader'). If 33 // The name of the allocated object type (e.g. 'HTMLImportLoader'). If
33 // undefined, the entry represents the sum over all object types. 34 // undefined, the entry represents the sum over all object types.
34 this.objectTypeName = objectTypeName; 35 this.objectTypeName = objectTypeName;
35 36
36 this.size = size; 37 this.size = size;
37 this.count = count; 38 this.count = count;
39 this.valuesAreSelf = valuesAreSelf;
38 } 40 }
39 41
40 /** 42 /**
41 * HeapDump represents a dump of the heap of an allocator in a single process 43 * HeapDump represents a dump of the heap of an allocator in a single process
42 * at a particular timestamp. 44 * at a particular timestamp.
43 * 45 *
44 * @{constructor} 46 * @{constructor}
45 */ 47 */
46 function HeapDump(processMemoryDump, allocatorName) { 48 function HeapDump(processMemoryDump, allocatorName, isComplete) {
47 this.processMemoryDump = processMemoryDump; 49 this.processMemoryDump = processMemoryDump;
48 this.allocatorName = allocatorName; 50 this.allocatorName = allocatorName;
51 this.isComplete = isComplete;
49 this.entries = []; 52 this.entries = [];
50 } 53 }
51 54
52 HeapDump.prototype = { 55 HeapDump.prototype = {
53 addEntry: function(leafStackFrame, objectTypeName, size, count) { 56 addEntry: function(
57 leafStackFrame, objectTypeName, size, count, opt_valuesAreSelf) {
58 var valuesAreSelf = opt_valuesAreSelf || false;
54 var entry = new HeapEntry( 59 var entry = new HeapEntry(
55 this, leafStackFrame, objectTypeName, size, count); 60 this, leafStackFrame, objectTypeName, size, count, valuesAreSelf);
56 this.entries.push(entry); 61 this.entries.push(entry);
57 return entry; 62 return entry;
58 } 63 }
59 }; 64 };
60 65
61 return { 66 return {
62 HeapEntry, 67 HeapEntry,
63 HeapDump, 68 HeapDump,
64 }; 69 };
65 }); 70 });
66 </script> 71 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698