[llvm-commits] PATCH: Optionally set profiling data output file name via environment variable

Alastair Murray alastairmurray42 at gmail.com
Fri Jul 13 00:24:08 PDT 2012


Hi,

I am a GSoC student working on profiling support, I'm starting to split 
out some patches from my work.

The attached patch modifies the profiling runtime code to change the 
profiling data output file name to the value of the LLVMPROF_OUTPUT 
environment variable, if it is set.

This is in addition to the existing code which can set this file name 
via the "-llvmprof-output $NAME" command line argument.  That, however, 
only works for programs that already take an argv argument to main.  If 
both the command line argument and the environment variable are provided 
the command line argument value is used.

I use this patch to allow profiling with parallel make in the 
test-suite.  Without this only one program can generate profiling data 
at a time.

Please review.

Regards,
Alastair Murray.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: profile_envvar.patch
Type: text/x-patch
Size: 1943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120713/1edac405/attachment.bin>


More information about the llvm-commits mailing list