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

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 10:52:32 PDT 2018


phosek added inline comments.


================
Comment at: compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c:31
+COMPILER_RT_VISIBILITY
+void __llvm_profile_initialize_file(void) {
+  /* Unsupported */
----------------
This is only needed because runtime registration invokes it: https://reviews.llvm.org/diffusion/L/browse/compiler-rt/trunk/lib/profile/InstrProfilingRuntime.cc;333007$24, if we did our own registration we could avoid this function altogether and we could also name `__llvm_profile_register_write_file_atexit` more appropriately (since there're no files involved) but I'm not sure whether it's worth the duplication?


================
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__))
----------------
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`?


Repository:
  rL LLVM

https://reviews.llvm.org/D47208





More information about the llvm-commits mailing list