Notes: since VP is not supported with buffer API, the test case for VP merging is not added. The API to do profile/in-process counter matching check will be in a followup patch.
Details
Diff Detail
Event Timeline
Lgtm with minor changes.
lib/profile/InstrProfiling.h | ||
---|---|---|
66 | nit, from | |
lib/profile/InstrProfilingMerge.c | ||
27 | It's documented that the source/destination profile buffers should have the same layout, but we should return early if data_size(data_begin(), data_end()) != Header->DataSize. The same goes for CountersSize and NamesSize. | |
60 | Please split this loop nest into a separate function. | |
make/platform/clang_linux.mk | ||
83 | nit, indentation |
Hi David, this looks really nice. You were right that the profraw merging is quite simple.
Can you update instrprof-without-libc.c test to include __llvm_profile_merge_from_buffer?
Also, would it be reasonable to omit the value prof merging until we can test it? If not, that's fine, but it may simplify this patch.
test/profile/instrprof-merge.c | ||
---|---|---|
94 | Nit: Note -> Not |
Addressed all review feedbacks from vsk and sean:
- split the vp merger to avoid introduce libc dependency on buffer API client
- added a test in instrprof-without-lib.c by calling buffer merge API
- added a test case for VP data merging
nit, from