1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/include/llvm
Dean Michael Berris dccae9fc98 [XRay] Create an Index of sleds per function
Summary:
This change adds a new section to the xray-instrumented binary that
stores an index into ranges of the instrumentation map, where sleds
associated with the same function can be accessed as an array. At
runtime, we can get access to this index by function ID offset allowing
for selective patching and unpatching by function ID.

Each entry in this new section (xray_fn_idx) will include two pointers
indicating the start and one past the end of the sleds associated with
the same function. These entries will be 16 bytes long on x86 and
aarch64. On arm, we align to 16 bytes anyway so the runtime has to take
that into consideration.

__{start,stop}_xray_fn_idx will be the symbols that the runtime will
look for when we implement the selective patching/unpatching by function
id APIs. Because XRay synthesizes the function id's in a monotonically
increasing manner at runtime now, implementations (and users) can use
this table to look up the sleds associated with a specific function.
This is useful in implementations that want to do things like:

  - Implement coverage mode for functions by patching everything
    pre-main, then as functions are encountered, the installed handler
    can unpatch the function that's been encountered after recording
    that it's been called.
  - Do "learning mode", so that the implementation can figure out some
    statistical information about function calls by function id for a
    time being, and then determine which functions are worth
    uninstrumenting at runtime.
  - Do "selective instrumentation" where an implementation can
    specifically instrument only certain function id's at runtime
    (either based on some external data, or through some other
    heuristics) instead of patching all the instrumented functions at
    runtime.

Reviewers: dblaikie, echristo, chandlerc, javed.absar

Subscribers: pelikan, aemerson, kpw, llvm-commits, rengolin

Differential Revision: https://reviews.llvm.org/D32693

llvm-svn: 302109
2017-05-04 03:37:57 +00:00
..
ADT [APInt] Give the value union a name so we can remove assumptions on VAL being the larger member 2017-05-03 15:46:24 +00:00
Analysis [SCEV] createAddRecFromPHI: Optimize for the most common case. 2017-05-03 23:53:38 +00:00
AsmParser
Bitcode Bitcode: Make the summary reader responsible for merging. NFCI. 2017-05-01 22:04:36 +00:00
CodeGen [XRay] Create an Index of sleds per function 2017-05-04 03:37:57 +00:00
Config Allow suppressing host and target info in VersionPrinter 2017-04-19 00:03:36 +00:00
DebugInfo clang-format and restyle DWARFFormValue before working on it. NFC 2017-05-03 21:53:21 +00:00
Demangle
ExecutionEngine [Orc] Fix a warning by removing an unused lambda capture. 2017-04-24 01:21:23 +00:00
IR IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI. 2017-05-04 03:36:16 +00:00
IRReader
LibDriver
LineEditor
Linker [Linker] Provide callback for internalization 2017-03-13 18:08:11 +00:00
LTO Object, LTO: Add target triple to irsymtab and LTO API. 2017-04-14 02:55:06 +00:00
MC [LLVM][inline-asm] Altmacro absolute expression '%' feature 2017-05-01 13:20:12 +00:00
Object Add llvm::object::getELFSectionTypeName(). 2017-05-02 14:04:52 +00:00
ObjectYAML [WebAssembly] Allow for signed relocation addends 2017-04-26 00:02:31 +00:00
Option Work around MSVC rejects-valid bug related to C++11 narrowing conversions. 2017-04-13 00:14:39 +00:00
Passes
ProfileData ProfileData: clean up some stale declarations (NFC) 2017-04-24 21:05:05 +00:00
Support [KnownBits] Add methods for determining if KnownBits is a constant value 2017-05-03 23:12:29 +00:00
TableGen [tblgen] GCC/MS builtin to target intrisics map. 2017-04-19 19:14:20 +00:00
Target [PowerPC, DAGCombiner] Fold a << (b % (sizeof(a) * 8)) back to a single instruction 2017-05-03 00:07:02 +00:00
Transforms Rename WeakVH to WeakTrackingVH; NFC 2017-05-01 17:07:49 +00:00
XRay [XRay][tools] Add option to llvm-xray extract to symbolize functions 2017-04-18 23:23:54 +00:00
CMakeLists.txt Support: Add a VCSRevision.h header file. 2017-04-13 01:26:12 +00:00
InitializePasses.h [PM/LoopUnswitch] Introduce a new, simpler loop unswitch pass. 2017-04-27 18:45:20 +00:00
LinkAllIR.h
LinkAllPasses.h [PGO] Memory intrinsic calls optimization based on profiled size 2017-04-04 16:42:20 +00:00
module.modulemap Recommit: [globalisel] Change LLT constructor string into an LLT-based object that knows how to generate it. 2017-03-07 23:20:35 +00:00
module.modulemap.build
Pass.h
PassAnalysisSupport.h
PassInfo.h
PassRegistry.h
PassSupport.h Fixing outdated comment [NFC] 2017-04-20 18:20:02 +00:00