This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Initialize separate time trace profiler for mapfile worker
ClosedPublic

Authored by int3 on Jan 11 2022, 5:10 PM.

Details

Summary

After D115416: [lld-macho] Make writing map file asynchronous, the "Write map file" event no longer shows up
in the time trace. Each time trace profiler instance is thread-local,
but we had neglected to initialize a separate instance for the mapfile
worker thread.

Diff Detail

Event Timeline

int3 created this revision.Jan 11 2022, 5:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2022, 5:10 PM
int3 requested review of this revision.Jan 11 2022, 5:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2022, 5:10 PM
keith accepted this revision as: keith.Jan 11 2022, 5:25 PM
This revision is now accepted and ready to land.Jan 11 2022, 5:25 PM

Looks like this commit makes the test flakey somehow.

thakis added a subscriber: thakis.Jan 11 2022, 6:46 PM

This seems to break tests: http://45.33.8.238/macm1/25367/step_10.txt

Please take a look, and revert for now if takes a while to fix.

Seems to not fail every time though.

int3 added a comment.Jan 11 2022, 11:00 PM

Hm it seems that "Total Write map file" always exists, but the "Write map file" sub-event may or may not be emitted. Maybe it depends on whether that even occurs concurrently with other events?

I'll change the test to check for "Total Write map file" and see if that fixes things.