[PATCH] D47208: [profile] Support profiling runtime on Fuchsia

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 11:34:34 PDT 2018


davidxl added inline comments.


================
Comment at: compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c:37
+  if (lprofProfileDumped()) {
+    PROF_NOTE("Profile data not written to file: %s.\n",
+              "already written");
----------------
Info notes out of date?


================
Comment at: compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c:55
+  zx_info_handle_basic_t info;
+  status = _zx_object_get_info(_zx_process_self(), ZX_INFO_HANDLE_BASIC, &info,
+                               sizeof(info), NULL, NULL);
----------------
Add a comment here.


================
Comment at: compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c:102
+
+  lprofSetupValueProfiler();
+
----------------
Probably don't need this. In fact, buffer API does not yet support value profile data dump, so value profiling can be turned off by default for Fusia.


================
Comment at: compiler-rt/lib/profile/InstrProfilingPlatformLinux.c:10
 
-#if defined(__linux__) || defined(__FreeBSD__) || \
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__Fuchsia__) || \
     (defined(__sun__) && defined(__svr4__))
----------------
vsk wrote:
> phosek wrote:
> > This file seems more related to the file format and linker support than platform. Would there be any objections against renaming `InstrProfilingPlatformLinux.c` to `InstrProfilingPlatformELF.c` and similarly `InstrProfilingPlatformDarwin.c` to `InstrProfilingPlatformMachO.c`?
> No objection here.
if you want to do this, please do it in a separate patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D47208





More information about the llvm-commits mailing list