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 is the culprit. Specifically, it 
seems like `llvm-cov` has gotten significantly slower.

Before this change:

  $ time llvm-cov show -instr-profile merged.profdata -summary-only 
e91b5a1a324aa156
  llvm-cov     0.92s user 0.12s system 99% cpu 1.038 total

After this change:

  $ time llvm-cov show -instr-profile merged.profdata -summary-only 
e91b5a1a324aa156
  llvm-cov     5.61s user 0.89s system 99% cpu 6.495 total

I did some investigation and it seems like the time increase is related to 
`InstrProfSymtab` that used in the `CoverageReader`. I saw that subsequent 
changes fix some issues trying to avoid unnecessary copies, but that still 
hasn't addressed the slowdown since the tip-of-tree is still exhibiting this 
issue.

It's also possible that there isn't any issue that was introduced here, the 
problem is that the implementation simply doesn't scale. For example, the 
binary `e91b5a1a324aa156` I used here has 95527 symbol entries, most of them 
are the `__covrec_*` symbols, and that's one of the smaller binaries we have in 
our build.

Regardless, this is still a serious regression and I'm wondering if there's 
anything we can do short of reverting this change?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157913/new/

https://reviews.llvm.org/D157913

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to