Permalink
Browse files

Add cell size to JSC heap capture visualization

Reviewed By: bnham

Differential Revision: D4469000

fbshipit-source-id: 3e572bb7bdd83f79009d2059d543e03e6a57bba0
  • Loading branch information...
cwdick authored and facebook-github-bot committed Feb 1, 2017
1 parent 295a015 commit 76e3d45c34d49a682de871e500ed45f8a61a43c7
Showing with 5 additions and 0 deletions.
  1. +5 −0 local-cli/server/middleware/heapCapture/src/heapCapture.js
@@ -342,6 +342,7 @@ function registerCapture(data, captureId, capture, stacks, strings) {
parseInt(id, 16),
ref.type,
ref.size,
ref.cellSize,
captureId,
ref.rootPath === undefined ? noneStack : ref.rootPath,
ref.reactTree === undefined ? noneStack : ref.reactTree,
@@ -355,6 +356,7 @@ function registerCapture(data, captureId, capture, stacks, strings) {
parseInt(id, 16),
'Marked Block Overhead',
block.capacity - block.size,
0,
captureId,
noneStack,
noneStack,
@@ -372,6 +374,7 @@ if (preLoadedCapture) {
{ name: 'id', type: 'int' },
{ name: 'type', type: 'string', strings: strings },
{ name: 'size', type: 'int' },
{ name: 'cell', type: 'int' },
{ name: 'trace', type: 'string', strings: strings },
{ name: 'path', type: 'stack', stacks: stacks, getter: x => strings.get(x), formatter: x => x },
{ name: 'react', type: 'stack', stacks: stacks, getter: x => strings.get(x), formatter: x => x },
@@ -398,8 +401,10 @@ if (preLoadedCapture) {
valueExpander,
]);
const sizeAggregator = aggrow.addSumAggregator('Size', 'size');
const cellAggregator = aggrow.addSumAggregator('Cell Size', 'cell');
const countAggregator = aggrow.addCountAggregator('Count');
aggrow.expander.setActiveAggregators([
cellAggregator,
sizeAggregator,
countAggregator,
]);

0 comments on commit 76e3d45

Please sign in to comment.