Perfetto: Swiss army knife for Linux client tracing

(lalitm.com)

92 points | by todsacerdoti 13 hours ago ago

9 comments

  • knlb 6 hours ago

    Perfetto is definitely one of my favorite tools to use ever, thank you for working on it!

    My personal favorite tool I've built this year is to dynamically generate a trace from a sql query, and allow quickly combining queries. Something like `SELECT timestamp, track, name, ` etc. where column names get transformed to packets automatically.

    That way I can overlay multiple py-spy traces and instrumentation into a dynamically implemented generated perfetto trace, loaded into a perfetto iframe using the ping/pong mechanism at https://perfetto.dev/docs/visualization/deep-linking-to-perf....

    • lalitmaganti 5 hours ago

      Thanks for the nice words! Your tool sounds super neat!

      We're look at integrating some sort of similarish things into Perfetto itself where, for a synthetically generated trace, you can say "run this SQL query and add a debug track for it on trace load". See the discussion on https://github.com/google/perfetto/issues/1342 :)

  • time4tea 2 hours ago

    Perfetto is so nice.

    Viztracer is a super library to capture perfetto compatible output from Python.

    It helped me find perf issues in literally minutes.

    https://raw.githubusercontent.com/time4tea/gopro-dashboard-o...

  • sunnyps 2 hours ago

    Glad to see that there's support for CPU sample flamegraphs in Perfetto now that's on par with Google's internal pprof visualizer as alluded to in the talk. Using the internal visualizer to share Windows ETW traces with colleagues was the primary motivation for developing [EtwToPprof](https://github.com/google/EtwToPprof). Now that perfetto supports this natively, I might look into developing EtwToPerfetto :-)

    • lalitmaganti 2 hours ago

      Fun fact: Perfetto also gained support for the pprof format within the last month :)

      It opens a special "aggregate flame graph" view of the profile since pprof does not preserve time information. But it works! We use it for visualizing aggregates across thousands of profiles in production!

  • imcritic 5 hours ago

    Something too complex; I fear I won't ever have enough time to try it and figure out how to apply it for it to be of any use for me.

    I wish there was a simpler and quicker introduction into the tool's capabilities than an hour long video and a text article saying it's a swiss army knife that does a lot of things. I need 1 or a few glimpses into it, there's no need to cover every capability thoroughly, show just enough to have some general understanding of how it works and how to use it and how to solve some common problems with it.