Critical path in UI appears not to be working for Android/Chrome traces. Is that expected currently?

84 views
Skip to first unread message

Andrew Haigh

unread,
Oct 3, 2024, 9:11:02 AM10/3/24
to Perfetto Development - www.perfetto.dev
Hi all,
I would like to make use of the thread state critical path view in the UI for understanding some multi-threading behaviour on a linux-like platform. But it appears not to be working at the moment. Can anyone else confirm if this is the case?

For example:
  1. Load the UI in Chrome on Windows or MacOS.
  2. Load the example Android trace
  3. Open the trace timeline for e.g. com.google.android.apps.messaging and select a thread state. E.g. thread_state with ID 147753. Click on the 'critical path' or 'critical path lite' buttons on the right hand side of the UI.
  4. The browser (or perhaps underlying trace engine) appears to stall. 
  5. (For simpler traces from my own platform, it sometimes shows an empty extra timeline but with no information).

This is running on recent Chrome a Mac M1 Max with 32Gb memory. Similar behaviour has also been seen on Windows with Chrome too.

Is this expected to work or a known problem? I can raise a bug report if that helps.

Thanks,
Andrew Haigh

Lalit Maganti

unread,
Oct 3, 2024, 9:43:35 AM10/3/24
to Andrew Haigh, Zimuzo Ezeozue, Perfetto Development - www.perfetto.dev
> Load the example Android trace

The example Android trace unfortunately does not have the necessary information to compute the critical path at the moment: this is due to the trace being quite old at the moment. We should really:
1) Update the trace to be much newer
2) Not show the critical path button unless we can compute it.

+Zimuzo Ezeozue FYI for feedback above

https://ui.perfetto.dev/#!/?s=c42b1c8a72d3790b547aa2c973c025f5420c2e5a: here's an example of trace where the critical path will show some data.

On the traces you are collecting, you might need to enable the sched_switch and sched_waking ftrace events: these are both necessary for computing critical path.

--
You received this message because you are subscribed to the Google Groups "Perfetto Development - www.perfetto.dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to perfetto-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/perfetto-dev/9ed382c1-e42a-4d2b-921e-97fa173744e5n%40googlegroups.com.

Andrew Haigh

unread,
Oct 3, 2024, 11:20:51 AM10/3/24
to Perfetto Development - www.perfetto.dev
Hi,
Thanks for the rapid answer and yes I can see your example works.

I will try to get the schedule_waking events into traces on my own platform.

Thanks again,
Andrew Haigh

Reply all
Reply to author
Forward
0 new messages