1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib
Dean Michael Berris a9b91bad26 [XRay][llvm] Load XRay Profiles
Summary:
This change implements the profile loading functionality in LLVM to
support XRay's profiling mode in compiler-rt.

We introduce a type named `llvm::xray::Profile` which allows building a
profile representation. We can load an XRay profile from a file to build
Profile instances, or do it manually through the Profile type's API.

The intent is to get the `llvm-xray` tool to generate `Profile`
instances and use that as the common abstraction through which all
conversion and analysis can be done. In the future we can generate
`Profile` instances from `Trace` instances as well, through conversion
functions.

Some of the key operations supported by the `Profile` API are:

- Path interning (`Profile::internPath(...)`) which returns a unique path
  identifier.

- Block appending (`Profile::addBlock(...)`) to add thread-associated
  profile information.

- Path ID to Path lookup (`Profile::expandPath(...)`) to look up a
  PathID and return the original interned path.

- Block iteration.

A 'Path' in this context represents the function call stack in
leaf-to-root order. This is represented as a path in an internally
managed prefix tree in the `Profile` instance. Having a handle (PathID)
to identify the unique Paths we encounter for a particular Profile
allows us to reduce the amount of memory required to associate profile
data to a particular Path.

This is the first of a series of patches to migrate the `llvm-stacks`
tool towards using a single profile representation.

Depends on D48653.

Reviewers: kpw, eizan

Reviewed By: kpw

Subscribers: kpw, thakis, mgorny, llvm-commits, hiraditya

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

llvm-svn: 341012
2018-08-30 01:43:22 +00:00
..
Analysis [MemorySSA] Silence warning. 2018-08-29 23:20:29 +00:00
AsmParser [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
BinaryFormat Fix undefined behavior in r340457 2018-08-23 02:51:09 +00:00
Bitcode [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
CodeGen [GlobalMerge] Fix GlobalMerge on bss external global variables. 2018-08-30 00:49:50 +00:00
DebugInfo [DWARF] Unify warning callbacks. NFC. 2018-08-23 12:43:33 +00:00
Demangle [MS Demangler] Fix several crashes and demangling bugs. 2018-08-29 23:56:09 +00:00
ExecutionEngine [ORC] Replace lookupFlags in JITSymbolResolver with getResponsibilitySet. 2018-08-28 21:18:05 +00:00
Fuzzer
FuzzMutate [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
IR [NFC] Make getPreferredAlignment honor section markings. 2018-08-29 23:46:26 +00:00
IRReader
LineEditor
Linker
LTO
MC [MC] fix a clang-tidy warning, NFC 2018-08-29 10:40:51 +00:00
Object [COFF] Expose an easier helper function for getting names for relocation types 2018-08-27 08:42:39 +00:00
ObjectYAML [yaml2obj] - Add a support for changing EntSize. 2018-08-07 08:11:38 +00:00
Option
Passes Revert r340922 "[GVNHoist] Re-enable GVNHoist by default" 2018-08-29 13:00:55 +00:00
ProfileData [Coverage] Ignore 'unused' functions with non-zero execution counts 2018-08-07 22:25:36 +00:00
Support Start reserving x18 by default on Android targets. 2018-08-29 01:38:47 +00:00
TableGen
Target [WebAssembly] Be a little more conservative in WebAssemblyFixFunctionBitcasts 2018-08-30 01:01:30 +00:00
Testing
ToolDrivers
Transforms [SimplifyCFG] Rename a variable for readibility of a future change [NFC] 2018-08-30 00:12:29 +00:00
WindowsManifest
XRay [XRay][llvm] Load XRay Profiles 2018-08-30 01:43:22 +00:00
CMakeLists.txt
LLVMBuild.txt