Hi all,

This patch adds two options, -finstrument-functions-exclude-file-list= and 
-finstrument-functions-exclude-function=list=, which offer a means through 
which headers in various locations and individual functions can be excluded 
from instrumentation via -finstrument-functions. These options can be found in 
GCC alongside -finstrument-functions.

LLVM Bugzilla bug #15255 should be resolved by this patch.

This was sent to the llvm-commits list yesterday. I have been informed that 
this list is a better option for clang-specific patches (which makes sense, in 
hindsight).

Since the original patch submission yesterday, this patch has been updated to 
resolve GCC incompatibilities: the options should now function more or less 
equivalently to their GCC counterparts. The updated patch also adds code to 
avoid instrumenting inline functions that will never be externally visible. 
This should help avoid cases where an inline function has calls to 
__cyg_profile_* with a named reference to the inline function emitted within 
it, but is completely inlined and never has an actual symbol name present. This 
causes linker errors when trying to resolve the inline function names.

Excluded functions do not have __cyg_profile_* calls emitted in them. I have 
included a few tests to ensure the behaviour is as expected.

Cheers,

- Matthew

Attachment: finstrument-functions-exclusions.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to