[PATCH] D102039: [profile] Add binary id into profiles

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 25 10:59:52 PDT 2021


phosek added a comment.

In D102039#2841108 <https://reviews.llvm.org/D102039#2841108>, @davidxl wrote:

> Repeating the same question asked in RFC: the profile data has builtin fine grained matching mechanism. For the top level stamping, is it enough to embed the build id in the file name of the profile data?

We need to be able to match the profile back to the corresponding binary when generating coverage. Embedding build ID in filename doesn't work for us because on Fuchsia, most processes don't have access to filesystem (it's a capability that most processes shouldn't need). Rather the profile is exported via IPC as a memory object that doesn't have any name.

There might be a Fuchsia-specific solution, like wrapping the profile in an envelope that contains he build ID, but that solution would be Fuchsia-specific and we thought that making profiles more self-descriptive could be generally useful.

One idea we would like to pursue in the future is implementing support for the debuginfod <https://sourceware.org/elfutils/Debuginfod.html> protocol in LLVM, including `llvm-cov`, you could then use `llvm-cov --instr-profile default.profraw` and `llvm-cov` would fetch both the binary and the source from `debuginfod` server using the build ID inside the profile. In our case, this would not only simplify our infrastructure but also make it easy for developers to generate coverage reports from profiles fetched directly from our CI to reproduce results.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102039



More information about the llvm-commits mailing list