mstange / samply

Command-line sampling profiler for macOS and Linux
Apache License 2.0
2.18k stars 56 forks source link

Ensure new non-main threads have their names set #140

Closed jamienicol closed 5 months ago

jamienicol commented 5 months ago

Before: https://share.firefox.dev/3Ui2gF8 After: https://share.firefox.dev/4aSsmny

Ignore the "Thread-2", "Thread-3" etc in the after profile. Those are indeed the "correct" names due to https://bugzilla.mozilla.org/show_bug.cgi?id=1891726

mstange commented 5 months ago

Oh yeah, this looks like an oversight.

I think this wasn't needed on Linux for the following reasons:

So it seems either simpleperf does not synthesize COMM events, or maybe it puts the "thread map" in a different place.

Anyway, this change looks like a clear improvement, merging.

mstange commented 5 months ago

So it seems either simpleperf does not synthesize COMM events, or maybe it puts the "thread map" in a different place.

It seems the COMM events are there, but the MMAP2 events come first, so the thread already exists by the time we see the COMM events.