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

Moshtaghi, Alireza Alireza.Moshtaghi at netapp.com
Wed May 20 12:48:04 PDT 2015


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

On 5/19/15, 9:50 PM, "Justin Bogner" <mail at justinbogner.com> wrote:

>"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