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

Unified Diff: tracing/tracing/metrics/system_health/memory_metric.html

Issue 2169873002: [system-health] Track amount of peak malloced memory in V8. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: fix order Created 4 years, 5 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
« no previous file with comments | « no previous file | tracing/tracing/metrics/system_health/memory_metric_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/system_health/memory_metric.html
diff --git a/tracing/tracing/metrics/system_health/memory_metric.html b/tracing/tracing/metrics/system_health/memory_metric.html
index acccd77c6b37cc50f1abfaf9c04ecf8bf258752d..8396e3241d189c3d3f203e0ac5276cc2c372dca8 100644
--- a/tracing/tracing/metrics/system_health/memory_metric.html
+++ b/tracing/tracing/metrics/system_health/memory_metric.html
@@ -275,15 +275,19 @@ tr.exportTo('tr.metrics.sh', function() {
var v8Dump = processDump.getMemoryAllocatorDumpByFullName('v8');
if (v8Dump !== undefined) {
var allocatedByMalloc = 0;
+ var peakAllocatedByMalloc = 0;
var hasMallocDump = false;
v8Dump.children.forEach(function(isolateDump) {
var mallocDump =
isolateDump.getDescendantDumpByFullName('malloc');
- if (mallocDump === undefined ||
- mallocDump.numerics['effective_size'] === undefined) {
+ if (mallocDump === undefined)
return;
+ if (mallocDump.numerics['effective_size'] !== undefined) {
+ allocatedByMalloc +=
+ mallocDump.numerics['effective_size'].value;
}
- allocatedByMalloc += mallocDump.numerics['effective_size'].value;
+ if (mallocDump.numerics['peak_size'] !== undefined)
+ peakAllocatedByMalloc += mallocDump.numerics['peak_size'].value;
hasMallocDump = true;
});
if (hasMallocDump) {
@@ -296,6 +300,15 @@ tr.exportTo('tr.metrics.sh', function() {
descriptionPrefixBuilder:
CHROME_VALUE_PROPERTIES['effective_size']
});
+ addProcessScalar({
+ source: 'reported_by_chrome',
+ component: ['v8', 'allocated_by_malloc'],
+ property: 'peak_size',
+ value: peakAllocatedByMalloc,
+ unit: sizeInBytes_smallerIsBetter,
+ descriptionPrefixBuilder:
+ CHROME_VALUE_PROPERTIES['peak_size']
+ });
}
}
},
@@ -403,7 +416,11 @@ tr.exportTo('tr.metrics.sh', function() {
'locked_size': buildChromeValueDescriptionPrefix.bind(undefined, {
userFriendlyPropertyName: 'locked (pinned) size',
componentPreposition: 'of'
- })
+ }),
+ 'peak_size': buildChromeValueDescriptionPrefix.bind(undefined, {
+ userFriendlyPropertyName: 'peak size',
+ componentPreposition: 'of'
+ }),
};
/**
« no previous file with comments | « no previous file | tracing/tracing/metrics/system_health/memory_metric_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698