[PATCH] D155290: [PGO] Use Unique Profile Files when New Processes are Forked
Qiongsi Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 17 06:45:59 PDT 2023
qiongsiwu1 marked 2 inline comments as done.
qiongsiwu1 added inline comments.
================
Comment at: compiler-rt/lib/profile/InstrProfilingFile.c:795
- /* When PNS >= OldPNS, the last one wins. */
- if (!FilenamePat || parseFilenamePattern(FilenamePat, CopyFilenamePat))
resetFilenameToDefault();
----------------
davidxl wrote:
> what is this change for?
This change is not relevant to the feature, rather a small simplification. If I read/tested the code correctly, we already set `FilenamePat` on line 787 if it is null, so here we no longer need to worry about that case.
================
Comment at: compiler-rt/test/profile/Posix/instrprof-fork.c:10
+// RUN: PROFILE2=`tail -n 1 %t.out`
+// RUN: ls $PROFILE2
+
----------------
davidxl wrote:
> add some dump and check to make sure profiles are not truncated?
Thanks for the comment! The test now uses `llvm-profdata` to show that the profile files are valid.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155290/new/
https://reviews.llvm.org/D155290
More information about the cfe-commits
mailing list