OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <!-- |
| 3 Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. |
| 6 --> |
| 7 |
| 8 <link rel="import" href="/tracing/model/thread_slice.html"> |
| 9 |
| 10 <script> |
| 11 'use strict'; |
| 12 |
| 13 tr.exportTo('tr.e.v8', function() { |
| 14 var ThreadSlice = tr.model.ThreadSlice; |
| 15 |
| 16 function V8GCStatsThreadSlice() { |
| 17 ThreadSlice.apply(this, arguments); |
| 18 this.liveObjects_ = JSON.parse(this.args['live']); |
| 19 delete this.args['live']; |
| 20 this.deadObjects_ = JSON.parse(this.args['dead']); |
| 21 delete this.args['dead']; |
| 22 } |
| 23 |
| 24 V8GCStatsThreadSlice.prototype = { |
| 25 __proto__: ThreadSlice.prototype, |
| 26 |
| 27 get liveObjects() { |
| 28 return this.liveObjects_; |
| 29 }, |
| 30 |
| 31 get deadObjects() { |
| 32 return this.deadObjects_; |
| 33 } |
| 34 }; |
| 35 |
| 36 ThreadSlice.subTypes.register( |
| 37 V8GCStatsThreadSlice, |
| 38 { |
| 39 categoryParts: ['disabled-by-default-v8.gc_stats'], |
| 40 name: 'v8 gc stats slice', |
| 41 pluralName: 'v8 gc stats slices' |
| 42 } |
| 43 ); |
| 44 |
| 45 return { |
| 46 V8GCStatsThreadSlice: V8GCStatsThreadSlice |
| 47 }; |
| 48 }); |
| 49 </script> |
OLD | NEW |