This is an archive of the discontinued LLVM Phabricator instance.

[InstrProf] Fix bug when merging empty profile with multiple threads
ClosedPublic

Authored by ellis on Dec 9 2022, 5:13 PM.

Details

Summary

When merging profiles with multiple threads, the mergeWriterContexts() function is used to merge profile data between writers. This must be in sync with loadInput() which merges profiles to a single writer. This diff merges the profile kind correctly in mergeWriterContexts() to fix a subtle bug.

Diff Detail

Event Timeline

ellis created this revision.Dec 9 2022, 5:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2022, 5:13 PM
ellis edited the summary of this revision. (Show Details)Dec 9 2022, 5:18 PM
ellis added reviewers: xur, aganea, phosek.
ellis updated this revision to Diff 481799.Dec 9 2022, 5:18 PM

Expand comment.

ellis published this revision for review.Dec 9 2022, 5:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2022, 5:19 PM
phosek accepted this revision.Dec 10 2022, 8:06 AM

LGTM

This revision is now accepted and ready to land.Dec 10 2022, 8:06 AM
ellis updated this revision to Diff 482165.Dec 12 2022, 9:23 AM

Rebase.

This revision was landed with ongoing or failed builds.Dec 12 2022, 9:23 AM
This revision was automatically updated to reflect the committed changes.