Skip to content

Commit

Permalink
Add cell size to JSC heap capture visualization
Browse files Browse the repository at this point in the history
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 76e3d45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions local-cli/server/middleware/heapCapture/src/heapCapture.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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 },
Expand All @@ -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,
]);
Expand Down

0 comments on commit 76e3d45

Please sign in to comment.