| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 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/iteration_helpers.html'> | 8 <link rel='import' href='/tracing/base/iteration_helpers.html'> |
| 9 <link rel='import' href='/tracing/base/multi_dimensional_view.html'> | 9 <link rel='import' href='/tracing/base/multi_dimensional_view.html'> |
| 10 <link rel='import' href='/tracing/core/test_utils.html'> | 10 <link rel='import' href='/tracing/core/test_utils.html'> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 var process = model.getOrCreateProcess(1); | 48 var process = model.getOrCreateProcess(1); |
| 49 | 49 |
| 50 function addHeapEntry(heapDump, stackFrames, objectTypeName, size, count) { | 50 function addHeapEntry(heapDump, stackFrames, objectTypeName, size, count) { |
| 51 var leafStackFrame = stackFrames === undefined ? undefined : | 51 var leafStackFrame = stackFrames === undefined ? undefined : |
| 52 tr.c.TestUtils.newStackTrace(model, stackFrames); | 52 tr.c.TestUtils.newStackTrace(model, stackFrames); |
| 53 heapDump.addEntry(leafStackFrame, objectTypeName, size, | 53 heapDump.addEntry(leafStackFrame, objectTypeName, size, |
| 54 withCount ? count : undefined); | 54 withCount ? count : undefined); |
| 55 } | 55 } |
| 56 | 56 |
| 57 // First timestamp. | 57 // First timestamp. |
| 58 var gmd1 = addGlobalMemoryDump(model, -10); | 58 var gmd1 = addGlobalMemoryDump(model, {ts: -10}); |
| 59 var pmd1 = addProcessMemoryDump(gmd1, process, -11); | 59 var pmd1 = addProcessMemoryDump(gmd1, process, {ts: -11}); |
| 60 var hd1 = new HeapDump(pmd1, 'partition_alloc'); | 60 var hd1 = new HeapDump(pmd1, 'partition_alloc'); |
| 61 | 61 |
| 62 addHeapEntry(hd1, undefined /* sum over all traces */, | 62 addHeapEntry(hd1, undefined /* sum over all traces */, |
| 63 undefined /* sum over all types */, 4194304 /* 4 MiB */, 1000); | 63 undefined /* sum over all types */, 4194304 /* 4 MiB */, 1000); |
| 64 addHeapEntry(hd1, undefined /* sum over all traces */, 'v8::Context', | 64 addHeapEntry(hd1, undefined /* sum over all traces */, 'v8::Context', |
| 65 1048576 /* 1 MiB */, 200); | 65 1048576 /* 1 MiB */, 200); |
| 66 addHeapEntry(hd1, undefined /* sum over all traces */, 'blink::Node', | 66 addHeapEntry(hd1, undefined /* sum over all traces */, 'blink::Node', |
| 67 331776 /* 324 KiB */, 10); | 67 331776 /* 324 KiB */, 10); |
| 68 addHeapEntry(hd1, ['MessageLoop::RunTask'], | 68 addHeapEntry(hd1, ['MessageLoop::RunTask'], |
| 69 undefined /* sum over all types */, 4194304 /* 4 MiB */, 1000); | 69 undefined /* sum over all types */, 4194304 /* 4 MiB */, 1000); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 undefined /* sum over all types */, 2097152 /* 2 MiB */, 99); | 117 undefined /* sum over all types */, 2097152 /* 2 MiB */, 99); |
| 118 addHeapEntry(hd1, | 118 addHeapEntry(hd1, |
| 119 ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall', 'V8.Execute', | 119 ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall', 'V8.Execute', |
| 120 'V8.Execute'], | 120 'V8.Execute'], |
| 121 undefined /* sum over all types */, 2097152 /* 2 MiB */, 99); | 121 undefined /* sum over all types */, 2097152 /* 2 MiB */, 99); |
| 122 addHeapEntry(hd1, | 122 addHeapEntry(hd1, |
| 123 ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall', '<self>'], | 123 ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall', '<self>'], |
| 124 undefined /* sum over all types */, 307200 /* 300 KiB */, 300); | 124 undefined /* sum over all types */, 307200 /* 300 KiB */, 300); |
| 125 | 125 |
| 126 // Second timestamp. | 126 // Second timestamp. |
| 127 var gmd2 = addGlobalMemoryDump(model, 10); | 127 var gmd2 = addGlobalMemoryDump(model, {ts: 10}); |
| 128 var pmd2 = addProcessMemoryDump(gmd2, process, 11); | 128 var pmd2 = addProcessMemoryDump(gmd2, process, {ts: 11}); |
| 129 var hd2 = new HeapDump(pmd2, 'partition_alloc'); | 129 var hd2 = new HeapDump(pmd2, 'partition_alloc'); |
| 130 | 130 |
| 131 addHeapEntry(hd2, undefined /* sum over all traces */, | 131 addHeapEntry(hd2, undefined /* sum over all traces */, |
| 132 undefined /* sum over all types */, | 132 undefined /* sum over all types */, |
| 133 3145728 /* 3 MiB, lower than the actual sum (should be ignored) */, | 133 3145728 /* 3 MiB, lower than the actual sum (should be ignored) */, |
| 134 900 /* the allocation count should, however, NOT be ignored */); | 134 900 /* the allocation count should, however, NOT be ignored */); |
| 135 addHeapEntry(hd2, undefined /* sum over all traces */, | 135 addHeapEntry(hd2, undefined /* sum over all traces */, |
| 136 'v8::Context', 1258291 /* 1.2 MiB */, 520); | 136 'v8::Context', 1258291 /* 1.2 MiB */, 520); |
| 137 addHeapEntry(hd2, undefined /* sum over all traces */, | 137 addHeapEntry(hd2, undefined /* sum over all traces */, |
| 138 'blink::Node', 1048576 /* 1 MiB */, 5); | 138 'blink::Node', 1048576 /* 1 MiB */, 5); |
| (...skipping 3945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4084 dimension: ROOT, | 4084 dimension: ROOT, |
| 4085 title: 'partition_alloc', | 4085 title: 'partition_alloc', |
| 4086 size: [4194304, undefined, 4954521], | 4086 size: [4194304, undefined, 4954521], |
| 4087 defined: [true, false, true], | 4087 defined: [true, false, true], |
| 4088 children: 5 // No need to check the full structure again. | 4088 children: 5 // No need to check the full structure again. |
| 4089 } | 4089 } |
| 4090 ]); | 4090 ]); |
| 4091 }); | 4091 }); |
| 4092 }); | 4092 }); |
| 4093 </script> | 4093 </script> |
| OLD | NEW |