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

Unified Diff: tracing/tracing/model/process_memory_dump.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 9 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 | « tracing/tracing/model/process_base.html ('k') | tracing/tracing/model/process_memory_dump_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/process_memory_dump.html
diff --git a/tracing/tracing/model/process_memory_dump.html b/tracing/tracing/model/process_memory_dump.html
index 9208972caf5a4e9509a91450557d28c7302b0b58..151749619e68d8c853b8b2d47d533603507d7b4c 100644
--- a/tracing/tracing/model/process_memory_dump.html
+++ b/tracing/tracing/model/process_memory_dump.html
@@ -31,8 +31,7 @@ tr.exportTo('tr.model', function() {
function getSizeNumericValue(dump, sizeNumericName) {
var sizeNumeric = dump.numerics[sizeNumericName];
- if (sizeNumeric === undefined)
- return 0;
+ if (sizeNumeric === undefined) return 0;
return sizeNumeric.value;
}
@@ -89,8 +88,8 @@ tr.exportTo('tr.model', function() {
setUpTracingOverheadOwnership: function(opt_model) {
// Make sure that calling this method twice won't lead to
// 'double-discounting'.
- if (this.tracingOverheadOwnershipSetUp_)
- return;
+ if (this.tracingOverheadOwnershipSetUp_) return;
+
this.tracingOverheadOwnershipSetUp_ = true;
var tracingDump = this.getMemoryAllocatorDumpByFullName('tracing');
@@ -100,8 +99,7 @@ tr.exportTo('tr.model', function() {
return;
}
- if (tracingDump.owns !== undefined)
- return;
+ if (tracingDump.owns !== undefined) return;
// Add an ownership link from tracing to
// malloc/allocated_objects/tracing_overhead or
@@ -111,8 +109,9 @@ tr.exportTo('tr.model', function() {
// First check if the allocator root exists.
var allocatorDump = this.getMemoryAllocatorDumpByFullName(
allocatorName);
- if (allocatorDump === undefined)
+ if (allocatorDump === undefined) {
return false; // Allocator doesn't exist, try another one.
+ }
var nextPathIndex = 0;
var currentDump = allocatorDump;
@@ -126,8 +125,7 @@ tr.exportTo('tr.model', function() {
TRACING_OVERHEAD_PATH[nextPathIndex];
var childDump = this.getMemoryAllocatorDumpByFullName(
childFullName);
- if (childDump === undefined)
- break;
+ if (childDump === undefined) break;
currentDump = childDump;
currentFullName = childFullName;
@@ -158,35 +156,35 @@ tr.exportTo('tr.model', function() {
// Force rebuilding the memory allocator dump index (if we've just added
// a new memory allocator dump).
- if (hasDiscountedFromAllocatorDumps)
+ if (hasDiscountedFromAllocatorDumps) {
this.forceRebuildingMemoryAllocatorDumpByFullNameIndex();
+ }
},
discountTracingOverheadFromVmRegions: function(opt_model) {
// Make sure that calling this method twice won't lead to
// 'double-discounting'.
- if (this.tracingOverheadDiscountedFromVmRegions_)
- return;
+ if (this.tracingOverheadDiscountedFromVmRegions_) return;
this.tracingOverheadDiscountedFromVmRegions_ = true;
var tracingDump = this.getMemoryAllocatorDumpByFullName('tracing');
- if (tracingDump === undefined)
- return;
+ if (tracingDump === undefined) return;
var discountedSize =
getSizeNumericValue(tracingDump, SIZE_NUMERIC_NAME);
var discountedResidentSize =
getSizeNumericValue(tracingDump, RESIDENT_SIZE_NUMERIC_NAME);
- if (discountedSize <= 0 && discountedResidentSize <= 0)
- return;
+ if (discountedSize <= 0 && discountedResidentSize <= 0) return;
// Subtract the tracing size from the totals.
if (this.totals !== undefined) {
- if (this.totals.residentBytes !== undefined)
+ if (this.totals.residentBytes !== undefined) {
this.totals.residentBytes -= discountedResidentSize;
- if (this.totals.peakResidentBytes !== undefined)
+ }
+ if (this.totals.peakResidentBytes !== undefined) {
this.totals.peakResidentBytes -= discountedResidentSize;
+ }
}
// Subtract the tracing size from VM regions. More precisely, subtract
@@ -204,10 +202,12 @@ tr.exportTo('tr.model', function() {
((hasPrivateDirtyResident || hasProportionalResident) &&
discountedResidentSize > 0)) {
var byteStats = {};
- if (hasPrivateDirtyResident)
+ if (hasPrivateDirtyResident) {
byteStats.privateDirtyResident = -discountedResidentSize;
- if (hasProportionalResident)
+ }
+ if (hasProportionalResident) {
byteStats.proportionalResident = -discountedResidentSize;
+ }
this.vmRegions.addRegion(tr.model.VMRegion.fromDict({
mappedFile: '[discounted tracing overhead]',
sizeInBytes: hasSizeInBytes ? -discountedSize : undefined,
@@ -223,8 +223,9 @@ tr.exportTo('tr.model', function() {
processDumps.forEach(function(processDump) {
// Update the most recent VM regions from the current dump.
- if (processDump.vmRegions !== undefined)
+ if (processDump.vmRegions !== undefined) {
mostRecentVmRegions = processDump.vmRegions;
+ }
// Set the most recent VM regions of the current dump.
processDump.mostRecentVmRegions = mostRecentVmRegions;
« no previous file with comments | « tracing/tracing/model/process_base.html ('k') | tracing/tracing/model/process_memory_dump_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698