[xray] Option to omit the function index
authorIan Levesque <ianlevesque@fb.com>
Wed, 17 Jun 2020 00:36:11 +0000 (20:36 -0400)
committerIan Levesque <ianlevesque@fb.com>
Wed, 17 Jun 2020 17:49:01 +0000 (13:49 -0400)
commit7c7c8e0da4e0c400e7e06c4c6658372ea0b487ea
tree470a101986e1efd2ec880cafcca85a533b597273
parentacb30f6856c34b929b30bfd76dc938a1087af0a9
[xray] Option to omit the function index

Summary:
Add a flag to omit the xray_fn_idx to cut size overhead and relocations
roughly in half at the cost of reduced performance for single function
patching.  Minor additions to compiler-rt support per-function patching
without the index.

Reviewers: dberris, MaskRay, johnislarry

Subscribers: hiraditya, arphaman, cfe-commits, #sanitizers, llvm-commits

Tags: #clang, #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D81995
17 files changed:
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Driver/Options.td
clang/include/clang/Driver/XRayArgs.h
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/Driver/XRayArgs.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Driver/XRay/xray-function-index-flags.cpp [new file with mode: 0644]
compiler-rt/lib/xray/xray_init.cpp
compiler-rt/lib/xray/xray_interface.cpp
compiler-rt/test/xray/TestCases/Posix/coverage-sample.cpp
compiler-rt/test/xray/TestCases/Posix/func-id-utils.cpp
compiler-rt/test/xray/TestCases/Posix/patching-unpatching.cpp
llvm/include/llvm/CodeGen/CommandFlags.h
llvm/include/llvm/Target/TargetOptions.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/CommandFlags.cpp
llvm/test/CodeGen/AArch64/xray-omit-function-index.ll [new file with mode: 0644]