| Index: tools/perf/perf_tools/memory_measurement.py
|
| diff --git a/tools/perf/perf_tools/memory_measurement.py b/tools/perf/perf_tools/memory_measurement.py
|
| index 8d1724d146681d588c7afa23d47ff1dd287cef09..37e14a21b5290d75695125aa752be47bb4b8bace 100644
|
| --- a/tools/perf/perf_tools/memory_measurement.py
|
| +++ b/tools/perf/perf_tools/memory_measurement.py
|
| @@ -46,3 +46,15 @@ class MemoryMeasurement(page_measurement.PageMeasurement):
|
| def MeasurePage(self, page, tab, results):
|
| for h in self.histograms:
|
| h.GetValue(page, tab, results)
|
| +
|
| + if tab.browser.is_profiler_active('tcmalloc-heap'):
|
| + # The tcmalloc_heap_profiler dumps files at regular
|
| + # intervals (~20 secs).
|
| + # This is a minor optimization to ensure it'll dump the last file when
|
| + # the test completes.
|
| + tab.ExecuteJavaScript("""
|
| + if (chrome && chrome.memoryBenchmarking) {
|
| + chrome.memoryBenchmarking.heapProfilerDump('final', 'renderer');
|
| + chrome.memoryBenchmarking.heapProfilerDump('final', 'browser');
|
| + }
|
| + """)
|
|
|