[PATCH] D96387: [CSSPGO][llvm-profgen] Renovate perfscript check and command line input validation
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 11:48:29 PST 2021
wlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/PerfReader.h:522
+ if (!TraceIt.isAtEoF()) {
+ if (Count && TraceIt.getCurrentLine().startswith(" 0x"))
+ return true;
----------------
wenlei wrote:
> A comment showing expected input would be helpful. For LBR part, do we want to check more than leading 0x?
>
> Should we also detect case where input doesn't have LBR at all? We don't have to do it here, but after we've processed the entire input, if no hybrid sample is found, emit an error too?
> Should we also detect case where input doesn't have LBR at all? We don't have to do it here, but after we've processed the entire input, if no hybrid sample is found, emit an error too?
Do you mean we should have three state for that?
1) LBR + call stack, which is detected in this function.
2) LBR only (when we detect the LBR but `Count` is zero)
3) no LBRs at all.
For the 3) case, we will emit an error.
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