File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/vscode-js-profile-flame/src/client Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ export const buildColumns = (model: IProfileModel) => {
171
171
}
172
172
173
173
// 2. Merge them
174
+ let lastFrameWasGc = false ;
174
175
for ( let x = 1 ; x < columns . length ; x ++ ) {
175
176
const col = columns [ x ] ;
176
177
const root = col . rows [ 0 ] as IColumnLocation ;
@@ -179,10 +180,14 @@ export const buildColumns = (model: IProfileModel) => {
179
180
// show GC on top of the previous frame. Matches what chrome devtools do.
180
181
if ( col . rows . length === 1 && x > 0 && root . callFrame . functionName === Constants . GcFunction ) {
181
182
col . rows = columns [ x - 1 ] . rows . map ( row => ( typeof row === 'number' ? row : x - 1 ) ) ;
182
- col . rows . push ( root ) ;
183
+ if ( ! lastFrameWasGc ) {
184
+ col . rows . push ( root ) ;
185
+ lastFrameWasGc = true ;
186
+ }
183
187
continue ;
184
188
}
185
189
190
+ lastFrameWasGc = false ;
186
191
for ( let y = 0 ; y < col . rows . length ; y ++ ) {
187
192
const current = col . rows [ y ] as IColumnLocation ;
188
193
const prevOrNumber = columns [ x - 1 ] ?. rows [ y ] ;
You can’t perform that action at this time.
0 commit comments