File tree Expand file tree Collapse file tree
ui/src/plugins/dev.perfetto.HeapProfile Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,32 +264,30 @@ export default class HeapProfilePlugin implements PerfettoPlugin {
264264 }
265265
266266 private async selectHeapProfile ( ctx : Trace ) {
267+ // Heap-graphs default open in the HeapDumpExplorer so exclude them here to
268+ // avoid redundant queries.
267269 const result = await ctx . engine . query ( `
268270 SELECT
269- id,
270271 upid,
271272 type
272273 FROM ${ EVENT_TABLE_NAME }
274+ WHERE type != 'java_heap_graph'
273275 ORDER BY type, ts
274276 LIMIT 1
275277 ` ) ;
276278
277- const iter = result . maybeFirstRow ( { id : NUM , upid : NUM , type : STR } ) ;
279+ const iter = result . maybeFirstRow ( { upid : NUM , type : STR } ) ;
278280 if ( ! iter ) return ;
279281
280282 const uri = trackUri ( iter . upid , iter . type ) ;
281283 const track = this . trackMap . get ( uri ) ;
282284 if ( ! track ) return ;
283285
284- if ( profileDescriptor ( iter . type ) . type === ProfileType . JAVA_HEAP_GRAPH ) {
285- ctx . selection . selectTrackEvent ( track . uri , iter . id ) ;
286- } else {
287- ctx . selection . selectArea ( {
288- start : ctx . traceInfo . start ,
289- end : ctx . traceInfo . end ,
290- trackUris : [ uri ] ,
291- } ) ;
292- }
286+ ctx . selection . selectArea ( {
287+ start : ctx . traceInfo . start ,
288+ end : ctx . traceInfo . end ,
289+ trackUris : [ uri ] ,
290+ } ) ;
293291 }
294292
295293 private heapProfileSelectionHandler (
You can’t perform that action at this time.
0 commit comments