[PATCH] [Profile] compiler-rt support for setting profile output from command line

Teresa Johnson tejohnson at google.com
Tue Apr 28 09:44:40 PDT 2015


================
Comment at: lib/profile/InstrProfiling.h:90
@@ +89,3 @@
+ */
+void __llvm_profile_set_filename_env_override(const char *Name);
+
----------------
davidxl wrote:
> Is it better to merge this interface with the previous one but with an additional parameter ?
I didn't want to affect any existing users of the __llvm_profile_set_filename interface by adding a new parameter (since this is C not C++ and can't add parameter defaults).

================
Comment at: lib/profile/InstrProfilingFile.c:187
@@ -169,2 +186,3 @@
 __attribute__((visibility("hidden")))
 void __llvm_profile_set_filename(const char *Filename) {
+  setFilenamePossiblyWithPid(Filename);
----------------
davidxl wrote:
> The behavior of this interface changes (improves) slightly. Is this intended?
Yes. I am guessing that the lack of %p handling in the existing __llvm_profile_set_filename was probably just because no one needed it.

http://reviews.llvm.org/D9323

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list