| <!DOCTYPE html> |
| <!-- |
| Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| --> |
| |
| <link rel="import" href="/core/trace_model/timed_event.html"> |
| <link rel="import" href="/core/analysis/util.html"> |
| |
| <script> |
| 'use strict'; |
| |
| /** |
| * @fileoverview Provides the GlobalMemoryDump class. |
| */ |
| tv.exportTo('tv.c.trace_model', function() { |
| /** |
| * The GlobalMemoryDump represents a simultaneous memory dump of all |
| * processes. |
| * @constructor |
| */ |
| function GlobalMemoryDump(model, start, opt_args) { |
| tv.c.trace_model.TimedEvent.call(this, start); |
| this.model = model; |
| this.processMemoryDumps = {}; |
| this.args = opt_args; |
| }; |
| |
| GlobalMemoryDump.prototype = { |
| __proto__: tv.c.trace_model.TimedEvent.prototype, |
| |
| shiftTimestampsForward: function(amount) { |
| this.start += amount; |
| }, |
| |
| get userFriendlyName() { |
| return 'Global memory dump ' + ' at ' + |
| tv.c.analysis.tsString(this.start); |
| } |
| }; |
| |
| tv.c.trace_model.EventRegistry.register( |
| GlobalMemoryDump, |
| { |
| name: 'globalMemoryDump', |
| pluralName: 'globalMemoryDumps', |
| singleViewElementName: 'tv-c-single-global-memory-dump-sub-view', |
| multiViewElementName: 'tv-c-multi-global-memory-dump-sub-view' |
| }); |
| |
| return { |
| GlobalMemoryDump: GlobalMemoryDump |
| }; |
| }); |
| </script> |