| 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/model/container_memory_dump.html"> | 8 <link rel="import" href="/tracing/model/container_memory_dump.html"> |
| 9 <link rel="import" href="/tracing/model/global_memory_dump.html"> | 9 <link rel="import" href="/tracing/model/global_memory_dump.html"> |
| 10 <link rel="import" href="/tracing/model/memory_dump_test_utils.html"> | 10 <link rel="import" href="/tracing/model/memory_dump_test_utils.html"> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 addOwnershipLink(ownerDump, ownedDump); | 72 addOwnershipLink(ownerDump, ownedDump); |
| 73 } | 73 } |
| 74 | 74 |
| 75 return tr.b.dictionaryValues(allocatorDumps); | 75 return tr.b.dictionaryValues(allocatorDumps); |
| 76 } | 76 } |
| 77 | 77 |
| 78 function addProcessMemoryDumpWithFields(globalMemoryDump, process, start, | 78 function addProcessMemoryDumpWithFields(globalMemoryDump, process, start, |
| 79 opt_pssValues, opt_dumpData) { | 79 opt_pssValues, opt_dumpData) { |
| 80 var pmd = addProcessMemoryDump(globalMemoryDump, process, {ts: start}); | 80 var pmd = addProcessMemoryDump(globalMemoryDump, process, {ts: start}); |
| 81 if (opt_pssValues !== undefined) | 81 if (opt_pssValues !== undefined) { |
| 82 pmd.vmRegions = createVMRegions(opt_pssValues); | 82 pmd.vmRegions = createVMRegions(opt_pssValues); |
| 83 if (opt_dumpData !== undefined) | 83 } |
| 84 if (opt_dumpData !== undefined) { |
| 84 pmd.memoryAllocatorDumps = createAllocatorDumps(pmd, opt_dumpData); | 85 pmd.memoryAllocatorDumps = createAllocatorDumps(pmd, opt_dumpData); |
| 86 } |
| 85 } | 87 } |
| 86 | 88 |
| 87 function createModelWithDumps(withVMRegions, withAllocatorDumps) { | 89 function createModelWithDumps(withVMRegions, withAllocatorDumps) { |
| 88 var maybePssValues = function(pssValues) { | 90 var maybePssValues = function(pssValues) { |
| 89 return withVMRegions ? pssValues : undefined; | 91 return withVMRegions ? pssValues : undefined; |
| 90 }; | 92 }; |
| 91 var maybeDumpData = function(dumpData) { | 93 var maybeDumpData = function(dumpData) { |
| 92 return withAllocatorDumps ? dumpData : undefined; | 94 return withAllocatorDumps ? dumpData : undefined; |
| 93 }; | 95 }; |
| 94 return tr.c.TestUtils.newModel(function(model) { | 96 return tr.c.TestUtils.newModel(function(model) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 dumps[1].selectionState = SelectionState.HIGHLIGHTED; | 143 dumps[1].selectionState = SelectionState.HIGHLIGHTED; |
| 142 return dumps; | 144 return dumps; |
| 143 } | 145 } |
| 144 | 146 |
| 145 return { | 147 return { |
| 146 createTestGlobalMemoryDumps, | 148 createTestGlobalMemoryDumps, |
| 147 createTestProcessMemoryDumps, | 149 createTestProcessMemoryDumps, |
| 148 }; | 150 }; |
| 149 }); | 151 }); |
| 150 </script> | 152 </script> |
| OLD | NEW |