perfetto icon indicating copy to clipboard operation
perfetto copied to clipboard

Execution time distribution across CPU cluster

Open lbknxy opened this issue 11 months ago • 5 comments

Hi,

perfetto ui will show the distribution of a tag slice 's execution time across each CPU core, such as tag DrawFrame image bellow, we can see big/little/medium time spent on every cpu cluster. BUT

Image

But, not every logic with a tag, such as thread pool or select sched slice across multi tag, the image bellow shows a thread pool that I select all four threads. We also want to see the distribution of execution time across each CPU core when it fluctuates significantly, to determine whether performance variations are caused by core switching.

So, I would like to know if you have any plans to support this feature.

Image

lbknxy avatar Dec 09 '25 11:12 lbknxy

If my understanding is correct, I believe we already support this feature in a slightly different way i.e aggregation by cpu number rather than cpu type.

https://github.com/google/perfetto/pull/2019 added support to see thread state by cpu number behind a flag (you would have to enable that)

Image

I would let @stevegolton comment on adding support for cluster type and just to ensure what i said is right or not

sashwinbalaji avatar Dec 09 '25 13:12 sashwinbalaji

Thanks , I enable Thread State by CPU Aggregation and filter CPU is not null , it's good. It would be better if it could be grouped by same cpu or cluster.

Image

lbknxy avatar Dec 10 '25 02:12 lbknxy

@sashwinbalaji that's correct. @lbknxy As you've seen this simply adds a new table pivoting on CPU in addition to thread and state. The feature is behind a flag, not because it's experimental per-se - more because we may remove it or change how it works at any point.

Speaking of which, we have a feature landing soon that'll let you configure the pivot table a lot more, including (most likely) pivoting on cluster types. At that point we'll remove the flag.

stevegolton avatar Dec 10 '25 09:12 stevegolton

@stevegolton following up on this: could we remove the flag now?

LalitMaganti avatar Mar 26 '26 10:03 LalitMaganti

In short, there is a missing piece before we can get rid of the flag. While it's possible to add cluster type as a group by column in the datagrid, it is not persisted across traces.

I had a go at this today: https://github.com/google/perfetto/pull/5304. Once this is landed, I'd be happy to remove the flag.

stevegolton avatar Mar 26 '26 17:03 stevegolton