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

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 11:59:58 PDT 2021


phosek added a comment.

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

> Is the merging done in process or offline? Assuming it is offline, it seems possible to use name base approach.

It's done offline but since the profiles published via IPC don't have any names, we cannot rely or filenames, we would need to introduce a custom Fuchsia wrapper format (see my previous comment about the "envelope" idea).

We don't necessarily need binary ID in the indexed format, what we could do is:

  llvm-profdata show --binary-id a.profraw >a.buildid
  # fetch a binary with a.buildid as a.out
  llvm-profdata show --binary-id b.profraw >b.buildid
  # fetch a binary with b.buildid as b.out
  ...
  llvm-profdata merge -o merged.profdata a.profraw b.profraw ...
  llvm-cov show --instr-profile=merged.profdata a.out b.out ...

If we also stored binary IDs inside the indexed format, we could simplify this and do:

  llvm-profdata show --binary-ids merged.profdata >merged.buildids
  # fetch all binaries

This is more efficient but either would be fine with us for now.

Storing binary IDs inside  the indexed profile would become really valuable if/once we have support debuginfod support at which point we should be able to just do:

  llvm-profdata merge -o merged.profdata a.profraw b.profraw ...
  llvm-cov show --instr-profile=merged.profdata

and `llvm-cov` would fetch binaries directly from the debuginfod server using binary IDs stored inside the indexed profile. It'll take a while before we have debuginfod support available in LLVM though so this is not critical for now, we're just trying to plan ahead.

Is extending the indexed format a problem? Is there some way to make it less of an issue?


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