[PATCH] D131592: [SampleProfile] Fix non-determinism in promoteMergeNotInlinedContextSamples()

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 12 14:44:05 PDT 2022


aeubanks added a comment.

In D131592#3719843 <https://reviews.llvm.org/D131592#3719843>, @dblaikie wrote:

> @rnk mentioned reverse iteration mode - have you tried that? Does it stabilize the nondeterminism at all? (nondeterminism due to hash ordering of pointers could be easily perturbed by unrelated changes causing different allocation profiles, locations, etc - but reverse iteration can stabilize that more/make the non-determinism... deterministic?)
>
> It'd be good to have a test that fails under reverse or forward iteration and passes under the other, if possible.

I tried reverse iteration mode, but it wasn't any more useful than the script I used, the issue is still that I can't figure out how to reduced the profile.

Speaking of the profile, I believe the reason for the error is that we use md5 hashes in place of the function names, which breaks [1].

[1] https://github.com/llvm/llvm-project/blob/3329cec2f79185bafd678f310fafadba2a8c76d2/llvm/lib/ProfileData/SampleProfReader.cpp#L342


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131592/new/

https://reviews.llvm.org/D131592



More information about the llvm-commits mailing list