This new interface is intended to be used to collect profile in hand selected hot regions. It is a wrapper to __llvm_profile_write_file. The behavior of the latter (existing one) does not change.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Neat! The test looks good.
lib/profile/InstrProfiling.c | ||
---|---|---|
81 ↗ | (On Diff #66618) | Should probably also be cleared when llvm_prof_set_filename() or llvm_profile_merge_from_buffer() are called. |
lib/profile/InstrProfiling.h | ||
---|---|---|
135 ↗ | (On Diff #66618) | I don't think it is clear to the user what "on-line profile merging is on" means. AFAIK, currently that implicitly gets turned on based on the filename. |
lib/profile/InstrProfiling.c | ||
---|---|---|
81 ↗ | (On Diff #66618) | It is a mistake to not call reset counter before dumping again (due to double counting) regardless whether merging is used or not |
lib/profile/InstrProfiling.c | ||
---|---|---|
81 ↗ | (On Diff #66618) | Oh, I see. This sequence of calls doesn't make sense: dump(), merge_profile_from_buffer(), dump(). You're saying you'd need to reset the counters some time before the second call to dump() anyway. What about: dump(), set_filename(), dump()?. The second 'dump()' wouldn't go through, which seems like a problem. |