[PATCH] D112858: [llvm-profgen] Fill zero count for all function ranges

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 18:28:21 PDT 2021


wlei added inline comments.


================
Comment at: llvm/test/tools/llvm-profgen/inline-noprobe.test:7
 ; RUN: FileCheck %s --input-file %t1 --check-prefix=CHECK
+; RUN: llvm-profgen --format=text --unsymbolized-profile=%t --binary=%S/Inputs/inline-noprobe.perfbin --output=%t1 --fill-zero-for-all-funcs
+; RUN: FileCheck %s --input-file %t1 --check-prefix=CHECK
----------------
modimo wrote:
> wlei wrote:
> > wenlei wrote:
> > > modimo wrote:
> > > > hoy wrote:
> > > > > Does it work when given an empty raw profile? Can it also work without giving a profile input? That can be a real scenario. 
> > > > No profile here would be great!
> > > I think asking user to provide an (empty) profile is reasonable.. Otherwise it feels a bit stretched for llvm-profgen as a profile generation tool. 
> > Currently we only have `PerfScriptReader` and `UnsymbolizedProfileReader` which both need an input. To support no input profile, we might need lots of `if (FillZeroForAllFuncs) else ...` in `validateCommandLine`, `PerfReader` or an UnknownFileReader.  Those seem make the code a  little messy.
> > 
> > Our internal tools also require an input which can be empty(two zero on the top). What do you think?
> Having an empty raw profile is enough, do you mind adding a test case for it?
Good point, changed the test case with only two zero input.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112858



More information about the llvm-commits mailing list