google / perfetto

Performance instrumentation and tracing for Android, Linux and Chrome (read-only mirror of https://android.googlesource.com/platform/external/perfetto/)
https://www.perfetto.dev
Apache License 2.0
2.6k stars 329 forks source link

Interpreting Perfetto trace visualization #684

Open lucaslingle opened 5 months ago

lucaslingle commented 5 months ago

When collecting a trace using the Jax profiler, the Perfetto UI shows an expanded view and a compact view. For example, in the attached screenshot, I have expanded the view for device:TPU:7 only.

Notably, the compact view looks very different, and appears to show a 1-second-long period of inactivity on all the TPUs between 00:00:01 and 00:00:02, whereas the expanded view does not.

What does this compact view in Perfetto purport to show? Thanks for any insights you can provide.

Screen Shot 2024-01-08 at 7 45 32 PM
stevegolton commented 5 months ago

Hey @lucaslingle

It should represent a histogram of the density of slices from all tracks within the category, but I agree it looks like this isn't working as expected. This may well be a bug.

I'll look into it and get back to you.

chromy commented 5 months ago

Seems like maybe a span_join issue? (tracked internally at b/320660297)