[PATCH] D48956: [XRay][compiler-rt] Profiling Mode: Flush logs on exit
Keith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 11 16:26:26 PDT 2018
kpw added a comment.
Just one concern about exit handler being too aggressive if normal operation finalized and flushed.
================
Comment at: compiler-rt/lib/xray/xray_profiling.cc:296-300
+ // Finalize and flush.
+ if (profilingFinalize() != XRAY_LOG_FINALIZED)
+ return;
+ if (profilingFlush() != XRAY_LOG_FLUSHED)
+ return;
----------------
Isn't it an error to unconditionally finalize and flush without checking the state first?
================
Comment at: compiler-rt/lib/xray/xray_profiling.cc:342-343
+ RegistrationResult);
+ return false;
+ }
+
----------------
Yeah. This is much better.
https://reviews.llvm.org/D48956
More information about the llvm-commits
mailing list