[all-commits] [llvm/llvm-project] bf8f5c: Reland: [llvm-cov][WebAssembly] Read `__llvm_prf_n...

Yuta Saito via All-commits all-commits at lists.llvm.org
Wed Oct 23 20:53:11 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf8f5cc9b50b411ab0d8ee6532c6189992d790db
      https://github.com/llvm/llvm-project/commit/bf8f5cc9b50b411ab0d8ee6532c6189992d790db
  Author: Yuta Saito <kateinoigakukun at gmail.com>
  Date:   2024-10-24 (Thu, 24 Oct 2024)

  Changed paths:
    M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
    A llvm/test/tools/llvm-cov/Inputs/binary-formats.v6.wasm32
    A llvm/test/tools/llvm-cov/Inputs/binary-formats.wasm.proftext
    M llvm/test/tools/llvm-cov/binary-formats.c

  Log Message:
  -----------
  Reland: [llvm-cov][WebAssembly] Read `__llvm_prf_names` from data segments (#112569)

On WebAssembly, most coverage metadata contents read by llvm-cov (like
`__llvm_covmap` and `__llvm_covfun`) are stored in custom sections
because they are not referenced at runtime. However, `__llvm_prf_names`
is referenced at runtime by the profile runtime library and is read by
llvm-cov post-processing tools, so it needs to be stored in a data
segment, which is allocatable at runtime and accessible by tools as long
as "name" section is present in the binary.

This patch changes the way llvm-cov reads `__llvm_prf_names` on
WebAssembly. Instead of looking for a section, it looks for a data
segment with the same name.

This reverts commit 157f10ddf2d851125a85a71e530dc9d50cb032a2 and fixes
PE/COFF `.lprfn$A` section handling.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list