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

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 12:59:46 PDT 2021


davidxl added a comment.

In D102039#2845002 <https://reviews.llvm.org/D102039#2845002>, @phosek wrote:

> 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.

I suppose this workflow can also be done with

llvm-cov show --instr-profile=merged.profdata --buildids=<file of list of ids> without the need to fetch the binaries.

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

It is not an issue, but I think it is preferable minimize version bumps for indexed format to reduce longer term churns. Given this restriction, it is better to make version change tied to functionalities that can do without a format change.  Scripts, wrappers etc. are better for non-essential changes -- especially for workflows that can be mostly automated (which minimizes human inconveniences).


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