To align with https://reviews.llvm.org/D95547, we need to add brackets for context id before initializing the SampleContext.
Also added test cases for extended binary format from llvm-profgen side.
Paths
| Differential D95929
[CSSPGO][llvm-profgen] Add brackets for context id to support extended binary format ClosedPublic Authored by wlei on Feb 3 2021, 12:39 AM.
Details Summary To align with https://reviews.llvm.org/D95547, we need to add brackets for context id before initializing the SampleContext. Also added test cases for extended binary format from llvm-profgen side.
Diff Detail
Event TimelineHerald added subscribers: hoy, wenlei, lxfind, hiraditya. · View Herald TranscriptFeb 3 2021, 12:39 AM
Comment Actions
Thanks! Looks a lot cleaner now.
This revision is now accepted and ready to land.Feb 5 2021, 4:02 PM This revision was landed with ongoing or failed builds.Feb 12 2021, 1:15 AM Closed by commit rGc3aeabaea16e: [CSSPGO][llvm-profgen] Add brackets for context id to support extended binary… (authored by wlei). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 323243 llvm/lib/ProfileData/SampleProfWriter.cpp
llvm/test/tools/llvm-profgen/cs-extbinary.test
llvm/test/tools/llvm-profgen/inline-cs-noprobe.test
llvm/test/tools/llvm-profgen/noinline-cs-noprobe.test
llvm/test/tools/llvm-profgen/recursion-compression-noprobe.test
llvm/test/tools/llvm-profgen/recursion-compression-pseudoprobe.test
llvm/tools/llvm-profgen/ProfileGenerator.h
llvm/tools/llvm-profgen/ProfileGenerator.cpp
llvm/tools/llvm-profgen/ProfiledBinary.cpp
|
The whole if-else can be just replaced by OS << S.getNameWithContext(true) << ":" << S.getTotalSamples();