Remove support for compact binary sample profile format
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/unittests/ProfileData/SampleProfTest.cpp | ||
---|---|---|
291–292 | Nit: remove the Compact |
llvm/include/llvm/ProfileData/SampleProf.h | ||
---|---|---|
93 | Keep the symbolic value with deprecation comment. | |
llvm/tools/llvm-profdata/llvm-profdata.cpp | ||
57 | The enum should be kept and synced with the definition in SampleProf.h. Just add a deprecation comment. | |
411–412 | For PF_Compact_Binary format, produce a different error message. |
lgtm (perhaps keep one of the compact format file and use it as test case for error message)
We have been using compbinary format in ChromeOS. Now it fails with the the following error:
llvm-profdata merge: Did you mean '--binary'?
Can you please suggest the fix? The current usages are:
- https://source.chromium.org/chromium/chromiumos/overlays/chromiumos-overlay/+/main:eclass/cros-kernel2.eclass;l=2397
- https://source.chromium.org/chromium/chromiumos/chromite/+/main:lib/toolchain_util.py;l=1038
The reason for using compbinary is that it uses lower memory.
# Compressed binary profiles are lazily loaded, so they save a # meaningful amount of CPU and memory per clang invocation.
I suggest switching to extended binary format for now. williamjhuang@'s follow up improvement patches will greatly improve memory and CPU usage for extbinary format (should be better than compact format).
Ideally, the changes to llvm-profdata and use inside clang should have been separate and delayed. Now, we have a case where the older profiles are erroring out when building with ToT clang.
Builders are full or errors like:
Could not open profile: Unrecognized sample profile encoding format[0m
1 error generated.
So, now we are in a scramble to somehow create new profiles :(.
Keep the symbolic value with deprecation comment.