[PATCH] D96387: [CSSPGO][llvm-profgen] Renovate perfscript check and command line input validation

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 12:50:27 PST 2021


hoy added inline comments.


================
Comment at: llvm/tools/llvm-profgen/PerfReader.h:529
+  // Determine the perfscript contains hybrid samples(call stack + LBRs) by
+  // checking whether there is a non-empty call stack immediately followed by
+  // a LBR sample
----------------
Add a test for this?


================
Comment at: llvm/tools/llvm-profgen/llvm-profgen.cpp:47
+  PerfReader Reader(BinaryFilenames, PerfTraceFilenames);
   Reader.parsePerfTraces(PerfTraceFilenames);
 
----------------
wlei wrote:
> wenlei wrote:
> > hoy wrote:
> > > We should probably return here with `--show-disassembly` and the output file should have the disassemblies instead of a sample profile.
> > I thought `show-disassembly` prints the assembly to stdout, while the generated profile goes into output file. However, if we want the tool to show assembly instead of generating profile, we may need to rename the switch to something like `show-disassembly-only`.
> I see, how about we support both?
> `show-disassembly` print to stdout and also generate profile. 
> `show-disassembly-only` only print to output file, this can be used for the disassembly output only test.
Sounds good, thanks! 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96387



More information about the llvm-commits mailing list