Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Perfetto is kind of a weird tool because it seems to be designed around tracing Linux and Android but overwhelmingly it gets used because of their integration with the exceptionally simple JSON tracing format that takes like 2 seconds to implement in whatever tool you are using. This alone is profoundly useful and I greatly respect the impact they have had towards commoditizing "trace viewing". I've gotten so much mileage out of it because of that.

I understand that Google maintains and uses this tool for their own thing but I kind of wonder if the UI should just get split off into its own thing, because I get the impression that they don't even really particularly like supporting what everyone else is using it for. I know the maintainers are around here is around so perhaps they have more context but it's just very strange to me that the UI will always be showing things like "syscall trace" or "connect a device" when I am looking at GPU kernels or network spans. And I get the impression that the JSON format is considered to be kind of grandfathered in and not really what they like supporting. I guess in a sense it's a little weird that most of the people I know use it like the flamegraph viewer tool for traces but it views itself as the one-stop-shop for your Android performance profiling that just happens to have good import for recorded profiles.

Also, I repeat this a lot, but I think a lot of profiling tools could stand to learn things from Apple's Instruments. I don't really know what they are doing over there but their UI is almost always the best for actually finding what the problem is rather than just dumping data at you like what a lot of profiling tools do (especially for Linux). Notably it's had the "bottom up" view for a very long time because I assume the Apple engineers who work on like malloc use it a lot. It's even weirder and more proprietary in the ways I mentioned above while also not having any sort of import feature, so I understand why nobody seems to know about it or steal design ideas from it, but it's slept on. Arguably I don't even think people should be using it for general-purpose use because it's ironically slow and laggy in ways that Perfetto definitely isn't, but it is exceptionally good at common tasks like "zoom into this region" or "let me quickly jump to the part of this call stack that is a problem" that I have not seen anywhere else.



Thanks for the detailed comment!

> overwhelmingly it gets used because of their integration with the exceptionally simple JSON tracing format

So in the open source community maybe, but it's use in the Android organization in Google is ubiquitous. Obviously, people outside the company don't see this, but we do. And I think even outside, there are a fair number of people using it for Android/Linux related things.

> UI should just get split off into its own thing

By split off, do you mean from a "branding" perspective? Or like separate as its own technical entity? If the former, maybe a reasonable idea but I think rebranding now would lose a lot of the "name recognition" which comes with the Perfetto name.

If the latter, there are two problems as I see it: 1) The UI uses the trace processor as its "backend". And the trace processor is deeply integrated into the rest of Perfetto. 2) If it's split off, who maintains it?

> it's just very strange to me that the UI will always be showing things like "syscall trace" or "connect a device" when I am looking at GPU kernels or network spans

Only in the recording page right? At least from the timeline perspective, everything should be only related with your trace. And in practice, we've been working on the last year or so on "pluginizing" the UI - basically turning the UI into a modular set of components and separating the "core" of the UI (which doesn't know anything about Android or Chrome and reasons purely in terms of "tracks", "slices", "counters" etc).

So it's actually possible to just totally remove all the parts of the UI you don't care about by going around and turning off things on the "Plugins" page. Obviously, most people are not going to do that but maybe we can offer them a "one click" solution when they first open the UI to do so?

> because I get the impression that they don't even really particularly like supporting what everyone else is using it for.

This is not true, we actually really do like supporting it for other people. It's just that sometimes what we want to do for open source conflicts with what Google wants from us as a team in prioritisation. I actually talked about this in detail recently: https://lalitm.com/perfetto-oss-company-prio/

> Also, I repeat this a lot, but I think a lot of profiling tools could stand to learn things from Apple's Instruments.

At least from the Android system profiling level, we do look at Apple Instruments! And yes there are things we can learn from them! But I don't think the gap is as large as you suggest (see below).

> It's even weirder and more proprietary in the ways I mentioned above while also not having any sort of import feature

So this is one reason Apple Instruments is so good at what it does: it's a focused profilier helping you debug problems on Apple devices and so they can deeply bake that intelligence in the tool. With Perfetto, I think if you record a real Perfetto Android trace (instead of generating a JSON one) you do actually get a much more "intelligence" (even though it's not as much as Apple).

For a synthetic trace, it's very hard for us to offer the experience because we don't know the same "happy debugging paths": we have no idea how you want to look at the data. How are is the UI meant to know on a random trace what sort of "problems" the user is looking for?

Would love to hear your thoughts on this because it's not like it's a problem we're not aware of, it's more, we think it's a super hard problem with no easy solution.

> but it is exceptionally good at common tasks like "zoom into this region"

At least for this example, Perfetto has this feature: when zoomed out, click on a slice in an area you want to zoom to and then press "f". It wil snap zoom into that section

> or "let me quickly jump to the part of this call stack that is a problem"

I think we also have this but it's a few more clicks than I think we should have. Definitely something we should close the gap on!


Thid is the kind of interractions I come to HN for.


> So in the open source community maybe, but it's use in the Android organization in Google is ubiquitous.

Yes I know, I used to work on Android ;)

> By split off, do you mean from a "branding" perspective?

> And in practice, we've been working on the last year or so on "pluginizing" the UI - basically turning the UI into a modular set of components and separating the "core" of the UI (which doesn't know anything about Android or Chrome and reasons purely in terms of "tracks", "slices", "counters" etc).

Yeah this is what I mean ^

> It's just that sometimes what we want to do for open source conflicts with what Google wants from us as a team in prioritisation. I actually talked about this in detail recently: https://lalitm.com/perfetto-oss-company-prio/

Yeah this is basically exactly what I mean, in fact I am kind of impressed that you nailed it down so precisely. I actually ran into that very bug and saw it get resolved in real time. I think this is a really good sign.

> So this is one reason Apple Instruments is so good at what it does: it's a focused profilier helping you debug problems on Apple devices and so they can deeply bake that intelligence in the tool.

No I don't actually care about this part, I am mostly talking about usability for general workflows…

> At least for this example, Perfetto has this feature: when zoomed out, click on a slice in an area you want to zoom to and then press "f". It wil snap zoom into that section

…like this one. I learned about this shortcut but it doesn't actually work the way I like. "f" doesn't zoom far enough and it doesn't stack, so it will "focus" with the region as like a quarter of the screen. There's a bunch of other nitpicks I have, for example when I select a range it will immediately pop up the thing from the bottom that I invariably close until I actually want it, or that every time I open it the sidebar (that I never use) is open. Feature-wise, I still haven't figured out how I can do something like get an "activity view" (like the stack that shows how many tasks are active) across all tracks, or quickly select the region between two spans, or pin a whole process (rather than just a thread). I am sure that some of these are solved or I'm just holding it wrong but I feel like it's just harder to get what I want, especially since I can't really right-click anything which is what I typically do when looking for features. If it would help, I am of course happy to file bugs and also make simple fixes :)


> Yes I know, I used to work on Android ;)

Ahhhh good to know :D

> If it would help, I am of course happy to file bugs and also make simple fixes :)

Please yes do file bugs! It's so useful to have these things tracked: I think you've already given several great pieces of feedback in your comment, it would be really nice to have this tracked.

Doubly so if you have screenshots/videos/descriptions of other profilers (e.g. instruments) and how they do things so we can learn from their UX as well!

And of course, if you're willing to contribute, we would love to have them! We have a decent contributor base today but it's something I want to continue growing and investing in over time!

> can do something like get an "activity view" (like the stack that shows how many tasks are active) across all tracks

I think you're asking for basically the same as what https://github.com/google/perfetto/issues/3463 is asking for if I'm not mistaken? That will do it per-group (i.e. per process for the JSON format). Or do you actually want something global across all processes? I think we could do that, maybe hidden behind a command?

> across all tracks, or quickly select the region between two spans

I think you're asking for https://github.com/google/perfetto/issues/154!

> pin a whole process (rather than just a thread)

Makes sense, please file a bug!

> especially since I can't really right-click anything which is what I typically do when looking for features

There are some philosophical differences in the Perfetto team about "right clicking" :) I'm pro having it as an additional discovery mechanism but others feel it's a sign of bad UI/UX. Some commentary from users might help break ties!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: