diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-11-21 17:30:34 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-11-21 17:30:34 +0000 |
commit | 14e8a5a32d8f34b5154f24072fb7a8803ea52ae3 (patch) | |
tree | c666d8392421acf372a32515befa73481d57c6d9 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | d97c0f785576b78aa8c5771841a505f4aef79ad9 (diff) | |
download | bcm5719-llvm-14e8a5a32d8f34b5154f24072fb7a8803ea52ae3.tar.gz bcm5719-llvm-14e8a5a32d8f34b5154f24072fb7a8803ea52ae3.zip |
Add -finstrument-function-entry-bare flag
This is an instrumentation flag that's similar to
-finstrument-functions, but it only inserts calls on function entry, the
calls are inserted post-inlining, and they don't take any arugments.
This is intended for users who want to instrument function entry with
minimal overhead.
(-pg would be another alternative, but forces frame pointer emission and
affects link flags, so is probably best left alone to be used for
generating gcov data.)
Differential revision: https://reviews.llvm.org/D40276
llvm-svn: 318785
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 384124bee2b..3d484170f82 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -782,6 +782,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.InstrumentFunctions = Args.hasArg(OPT_finstrument_functions); Opts.InstrumentFunctionsAfterInlining = Args.hasArg(OPT_finstrument_functions_after_inlining); + Opts.InstrumentFunctionEntryBare = + Args.hasArg(OPT_finstrument_function_entry_bare); Opts.XRayInstrumentFunctions = Args.hasArg(OPT_fxray_instrument); Opts.XRayInstructionThreshold = getLastArgIntValue(Args, OPT_fxray_instruction_threshold_EQ, 200, Diags); |