[PATCH] D45998: [XRay][profiler] Part 5: Profiler File Writing

Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 18:20:58 PDT 2018


kpw accepted this revision.
kpw added a comment.
This revision is now accepted and ready to land.

LGTM, once the dependent changes get in.



================
Comment at: compiler-rt/lib/xray/xray_profile_collector.cc:263
   SpinMutexLock Lock(&GlobalMutex);
-  if (B.Data == nullptr && ProfileBuffers.Size())
     return {ProfileBuffers[0].Data, ProfileBuffers[0].Size};
----------------
Is this just needing to rebase?


================
Comment at: compiler-rt/lib/xray/xray_profiler.cc:132
+      Header.PID = internal_getpid();
+      retryingWriteAll(Fd, reinterpret_cast<const char *>(&Header),
+                       reinterpret_cast<const char *>(&Header) +
----------------
I'd really like to see this written so that we can write somewhere other than files (in a follow up patch). Imho, we should build on an ostream so that this could be a network transport layer.


https://reviews.llvm.org/D45998





More information about the llvm-commits mailing list