Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: chrome/browser/resources/profiler/profiler.js

Issue 2386123003: Add heap allocator usage to task profiler. (Closed)
Patch Set: Figure out where the @#$%! corruption is coming from. Move heap tracking to TaskStopwatch." Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/profiler/profiler.js
diff --git a/chrome/browser/resources/profiler/profiler.js b/chrome/browser/resources/profiler/profiler.js
index ec573ad57a3f680368aad011973a9979db400f4c..18629e00ec5c9f158134971868ed38d636369743 100644
--- a/chrome/browser/resources/profiler/profiler.js
+++ b/chrome/browser/resources/profiler/profiler.js
@@ -126,6 +126,13 @@ var MainView = (function() {
var KEY_MAX_RUN_TIME = END_KEY++;
var KEY_QUEUE_TIME = END_KEY++;
var KEY_AVG_QUEUE_TIME = END_KEY++;
+ var KEY_ALLOC_OPS = END_KEY++;
+ var KEY_FREE_OPS = END_KEY++;
+ var KEY_ALLOCATED_BYTES = END_KEY++;
+ var KEY_FREED_BYTES = END_KEY++;
+ var KEY_NET_BYTES = END_KEY++;
+ var KEY_ALLOC_OVERHEAD_BYTES = END_KEY++;
+ var KEY_MAX_ALLOCATED_BYTES = END_KEY++;
var KEY_MAX_QUEUE_TIME = END_KEY++;
var KEY_BIRTH_THREAD = END_KEY++;
var KEY_DEATH_THREAD = END_KEY++;
@@ -418,6 +425,76 @@ var MainView = (function() {
diff: diffFuncForCount,
};
+ KEY_PROPERTIES[KEY_ALLOC_OPS] = {
+ name: 'Allocation count',
+ cellAlignment: 'right',
+ sortDescending: true,
+ textPrinter: formatNumberAsText,
+ inputJsonKey: 'death_data.alloc_ops',
+ aggregator: SumAggregator,
+ diff: diffFuncForCount,
+ };
+
+ KEY_PROPERTIES[KEY_FREE_OPS] = {
+ name: 'Free Count',
+ cellAlignment: 'right',
+ sortDescending: true,
+ textPrinter: formatNumberAsText,
+ inputJsonKey: 'death_data.free_ops',
+ aggregator: SumAggregator,
+ diff: diffFuncForCount,
+ };
+
+ KEY_PROPERTIES[KEY_ALLOCATED_BYTES] = {
+ name: 'Allocated bytes',
+ cellAlignment: 'right',
+ sortDescending: true,
+ textPrinter: formatNumberAsText,
+ inputJsonKey: 'death_data.allocated_bytes',
+ aggregator: SumAggregator,
+ diff: diffFuncForCount,
+ };
+
+ KEY_PROPERTIES[KEY_FREED_BYTES] = {
+ name: 'Freed bytes',
+ cellAlignment: 'right',
+ sortDescending: true,
+ textPrinter: formatNumberAsText,
+ inputJsonKey: 'death_data.freed_bytes',
+ aggregator: SumAggregator,
+ diff: diffFuncForCount,
+ };
+
+ KEY_PROPERTIES[KEY_NET_BYTES] = {
+ name: 'Net allocated bytes',
+ cellAlignment: 'right',
+ sortDescending: true,
+ textPrinter: formatNumberAsText,
+ inputJsonKey: 'death_data.net_allocated_bytes',
+ aggregator: SumAggregator,
+ diff: diffFuncForCount,
+ };
+
+ KEY_PROPERTIES[KEY_ALLOC_OVERHEAD_BYTES] = {
+ name: 'Overhead bytes',
+ cellAlignment: 'right',
+ sortDescending: true,
+ textPrinter: formatNumberAsText,
+ inputJsonKey: 'death_data.alloc_overhead_bytes',
+ aggregator: SumAggregator,
+ diff: diffFuncForCount,
+ };
+
+ KEY_PROPERTIES[KEY_MAX_ALLOCATED_BYTES] = {
+ name: 'Max allocated (outstanding) bytes',
+ cellAlignment: 'right',
+ sortDescending: true,
+ textPrinter: formatNumberAsText,
+ inputJsonKey: 'death_data.max_allocated_bytes',
+ aggregator: MaxAggregator,
+ diff: diffFuncForMax,
+ };
+
KEY_PROPERTIES[KEY_AVG_RUN_TIME] = {
name: 'Avg run time',
cellAlignment: 'right',
@@ -450,6 +527,7 @@ var MainView = (function() {
aggregator: UniquifyAggregator,
};
+
/**
* Returns the string name for |key|.
*/

Powered by Google App Engine
This is Rietveld 408576698