[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-26 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. We've been investigating a serious performance regression in our latest Clang roll that is affecting coverage. Whereas previously, we could process all coverage data in under an hour, now the job times out after 6 hours. After investigation, I found out that this change

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D157913#4648313 , @ellis wrote: > I have seen that MachO sections remain in the header even if the size is zero > which seems to be the case here. You could use `llvm-objdump` to verify that > the section exists but the

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. I feel like either this feature not working well with mac or we should keep `__llvm_prf_names` section in the binary. Current idea is to completely get rid of `__llvm_prf_names` section in the binary. Even if I fixed the issue https://reviews.llvm.org/D157913#4648296,

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-19 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. In D157913#4648296 , @zequanwu wrote: > For some unknown reasons, linker still generates __llvm_prf_names section in > the final binary on mac even if the object file doesn't have this section. > And I cannot use llvm-objdump to

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added a comment. For some unknown reasons, linker still generates __llvm_prf_names section in the final binary on mac even if the object file doesn't have this section. And I cannot use llvm-objdump to get anything from that section. $

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: llvm/lib/ProfileData/InstrProfCorrelator.cpp:42 +const char *InstrProfCorrelator::CovFunctionNameAttributeName = +"Cov Function Name"; phosek wrote: > I missed this

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: llvm/lib/ProfileData/InstrProfCorrelator.cpp:42 +const char *InstrProfCorrelator::CovFunctionNameAttributeName = +"Cov Function Name"; I missed this earlier, but I think that spelling this out in full, that is

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D157913#4646718 , @thakis wrote: > Looks like this breaks check-clang on mac: > http://45.33.8.238/macm1/69297/step_7.txt > > Please take a look and revert for now if it takes a while to fix.

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this breaks check-clang on mac: http://45.33.8.238/macm1/69297/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157913/new/

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-15 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG32db121b29f7: [Coverage] Allow Clang coverage to be used with debug info correlation. (authored by zequanwu). Changed prior to commit:

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-14 Thread Ellis Hoag via Phabricator via cfe-commits
ellis accepted this revision. ellis added a comment. This revision is now accepted and ready to land. In D157913#4646201 , @zequanwu wrote: > In D157913#4646184 , @ellis wrote: > >> It looks like

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D157913#4646184 , @ellis wrote: > It looks like `debug-info-correlate-coverage.ll` was renamed twice. Is this > intended? I just moved `llvm/test/Instrumentation/InstrProfiling/debug-info-correlate-coverage.ll.` to

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 556809. zequanwu marked 3 inline comments as done. zequanwu added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157913/new/ https://reviews.llvm.org/D157913 Files:

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-14 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. It looks like `debug-info-correlate-coverage.ll` was renamed twice. Is this intended? Comment at: compiler-rt/lib/profile/InstrProfilingWriter.c:276-277 __llvm_profile_get_num_counters(CountersBegin, CountersEnd); - const uint64_t NamesSize =

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 556805. zequanwu added a comment. Remove profile name section. Unused coverage function names are stored in debug info as a fake global variable info: 0x000b: DW_TAG_compile_unit ... 0x0071: DW_TAG_variable DW_AT_name

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-12 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. In D157913#4638845 , @zequanwu wrote: > In D157913#4638569 , @phosek wrote: > >> In D157913#4626007 , @zequanwu >> wrote: >> It seems that

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-05 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D157913#4638569 , @phosek wrote: > In D157913#4626007 , @zequanwu > wrote: > >>> It seems that the `__llvm_prf_names` is retained in this mode. What is the >>> overhead of this

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-05 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D157913#4626007 , @zequanwu wrote: >> It seems that the `__llvm_prf_names` is retained in this mode. What is the >> overhead of this section generally? Can we instead use debug info to lookup >> function names? > > With debug

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-05 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: compiler-rt/test/profile/Darwin/coverage-debug-info-correlate.cpp:29 + +// RUN: llvm-cov report --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NONAME + ellis wrote: > Is it worth testing that

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-05 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 555889. zequanwu marked 4 inline comments as done. zequanwu added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157913/new/ https://reviews.llvm.org/D157913 Files:

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-09-01 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. In D157913#4626007 , @zequanwu wrote: >> It seems that the `__llvm_prf_names` is retained in this mode. What is the >> overhead of this section generally? Can we instead use debug info to lookup >> function names? > > With debug

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-08-29 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. > It seems that the `__llvm_prf_names` is retained in this mode. What is the > overhead of this section generally? Can we instead use debug info to lookup > function names? With debug info correlation enabled, `__llvm_prf_names` section will only contain functions

[PATCH] D157913: [Coverage] Allow Clang coverage to be used with debug info correlation.

2023-08-29 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. Thanks for working on this! I've added a few other reviewers that might be interested. In particular it might conflict with the stack D138846 IIRC It seems that the `__llvm_prf_names` is retained in this mode. What is the overhead of