diff options
author | Ian Levesque <ianlevesque@fb.com> | 2020-09-18 14:45:51 -0400 |
---|---|---|
committer | Ian Levesque <ianlevesque@fb.com> | 2020-09-24 22:09:53 -0400 |
commit | 6f7fbdd2857fc8a7280afbb26fd4e1a6450069e4 (patch) | |
tree | 830555b1f045c819c3da54f7d6c7ca26ba491f8e /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 8c98c8803430804010da06a07cfb291dab59067c (diff) | |
download | llvm-6f7fbdd2857fc8a7280afbb26fd4e1a6450069e4.zip llvm-6f7fbdd2857fc8a7280afbb26fd4e1a6450069e4.tar.gz llvm-6f7fbdd2857fc8a7280afbb26fd4e1a6450069e4.tar.bz2 |
[xray] Function coverage groups
Add the ability to selectively instrument a subset of functions by dividing the functions into N logical groups and then selecting a group to cover. By selecting different groups over time you could cover the entire application incrementally with lower overhead than instrumenting the entire application at once.
Differential Revision: https://reviews.llvm.org/D87953
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index a88a911..2d008d8 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1130,6 +1130,10 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, getLastArgIntValue(Args, OPT_fxray_instruction_threshold_EQ, 200, Diags); Opts.XRayIgnoreLoops = Args.hasArg(OPT_fxray_ignore_loops); Opts.XRayOmitFunctionIndex = Args.hasArg(OPT_fno_xray_function_index); + Opts.XRayTotalFunctionGroups = + getLastArgIntValue(Args, OPT_fxray_function_groups, 1, Diags); + Opts.XRaySelectedFunctionGroup = + getLastArgIntValue(Args, OPT_fxray_selected_function_group, 0, Diags); auto XRayInstrBundles = Args.getAllArgValues(OPT_fxray_instrumentation_bundle); |