Closed jamienicol closed 5 months ago
Oh yeah, this looks like an oversight.
I think this wasn't needed on Linux for the following reasons:
FORK
records) and then update the name once we see the COMM
record.samply record
does the profiling, we call register_existing_thread
with the name from /proc/{pid}/task/{tid}/comm
.perf record
does the profiling, perf synthesizes COMM
events at the start of the trace.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.
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.
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