The problem is that value profile evict-or assumes value profile counts are non zero. The assumption is wrong once the counters are cleared (for value profile data, the counts are reset, but the target entries are still kept). When counter resetting and eviction is combined, the zero count entries will end up with large profile count due to wrapping. When all entries are wrapped, adding new target will also lead to seg fault.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This makes sense. Would you be opposed to combining the C file and the test file? I think it'd improve readability to have the run lines and the check lines in the same place.
test/profile/Inputs/instrprof-value-prof-reset.c | ||
---|---|---|
27 | Since max-vals-per-site = 2, I think we'd also want CHECK-NOT: callee_0? | |
27 | nit, could you fix the capitalization here? |
Comment Actions
LGTM.
I don't see any issue with having the whole test live in test/profile/*.c, and would prefer that, but it's no big deal.
Since max-vals-per-site = 2, I think we'd also want CHECK-NOT: callee_0?