[LLVMdev] why is coverage map and profile names mixed?

Justin Bogner mail at justinbogner.com
Tue May 19 21:50:25 PDT 2015


"Moshtaghi, Alireza" <Alireza.Moshtaghi at netapp.com> writes:
> I’m referencing the method: Lib/Transforms/Instrumentation/
> InstrProfiling.cpp:InstrProfiling::lowerCoverageData() At the end of
> the function, why is the variable being placed in __llvm_prf_names
> section?  Shouldn’t it be placed in __llvm_covmap section?

All of the names that coverage references are in the __llvm_prf_names
section today. This is shared with the profile data's references to
names: since a coverage mapping without profile data isn't useful, it
reasonable to expect these names are already there.

The logic in lowerCoverageData moves any names that aren't found in the
profile data into the __llvm_prf_names, where the names that were found
are already expected to be. This is basically just a workaround for the
fact that functions that aren't emitted may still have a coverage
mapping, but there won't be any profile data for them.




More information about the llvm-dev mailing list