why is coverage map and profile names mixed?

Hi
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?

Thanks
Ali

"Moshtaghi, Alireza" <Alireza.Moshtaghi@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.

My problem is that the instrumented code gets too big and I need to strip
the coverage mapping.
Would it make any functional difference if I save these variables in
__llvm_covmap?

Thanks
Ali

"Moshtaghi, Alireza" <Alireza.Moshtaghi@netapp.com> writes:

My problem is that the instrumented code gets too big and I need to strip
the coverage mapping.
Would it make any functional difference if I save these variables in
__llvm_covmap?

The llvm libraries that read the coverage data won't be able to handle
that.