[PATCH] D103372: [InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 2 14:58:09 PDT 2021


rnk added a comment.

Thanks! This is really cool. It will probably help reduce coverage object file size by a lot. Let me see if I can get some numbers for that.

BTW, if you are adventurous, Chromium does support cross-compiling from Linux to Windows, so you can do everything short of running tests from a Linux machine. It is then possible to execute those binaries remotely on Chrome swarming test infra, although that may require some ACLs and is more involved.

There is a possible behavior change here with linker GC. Previously, the /include: directives would make `__profd_*` into a GC root. Now, the `__profd` is kept alive by .text references to `__profc` symbols. If GC removes the text keeping some counters and data alive, the binary will no longer contain profile data for that function. I believe the coverage tools display "no info" different from "counters present and zero". I think this is OK in our usage, and if it isn't, there is an easy workaround: disable GC for coverage builds.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103372



More information about the llvm-commits mailing list