llvm-project/llvm
wlei a94fa86229 [CSSPGO][llvm-profgen] Parse mmap events from perf script
This stack of changes introduces `llvm-profgen` utility which generates a profile data file from given perf script data files for sample-based PGO. It’s part of(not only) the CSSPGO work. Specifically to support context-sensitive with/without pseudo probe profile, it implements a series of functionalities including perf trace parsing, instruction symbolization, LBR stack/call frame stack unwinding, pseudo probe decoding, etc. Also high throughput is achieved by multiple levels of sample aggregation and compatible format with one stop is generated at the end. Please refer to: https://groups.google.com/g/llvm-dev/c/1p1rdYbL93s for the CSSPGO RFC.

As a starter, this change sets up an entry point by introducing PerfReader to load profiled binaries and perf traces(including perf events and perf samples). For the event, here it parses the mmap2 events from perf script to build the loader snaps, which is used to retrieve the image load address in the subsequent perf tracing parsing.

As described in llvm-profgen.rst, the tool being built aims to support multiple input perf data (preprocessed by perf script) as well as multiple input binary images. It should also support dynamic reload/unload shared objects by leveraging the loader snaps being built by this change

Reviewed By: wenlei, wmi

Differential Revision: https://reviews.llvm.org/D89707
2020-11-20 14:26:26 -08:00
..
benchmarks
bindings Revert "[IR] add fn attr for no_stack_protector; prevent inlining on mismatch" 2020-11-17 17:27:14 -08:00
cmake [CMake] Fix ExtensionDependencies.inc with multiple extensions 2020-11-17 17:24:47 -08:00
docs [CSSPGO][llvm-profgen] Parse mmap events from perf script 2020-11-20 14:26:26 -08:00
examples llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
include Demangling support for class type non-type template parameter extensions. 2020-11-20 13:45:08 -08:00
lib [AArch64][GlobalISel] Make G_EXTRACT_VECTOR_ELT of <2 x p0> legal. 2020-11-20 14:07:45 -08:00
projects llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
resources
runtimes
test [CSSPGO][llvm-profgen] Parse mmap events from perf script 2020-11-20 14:26:26 -08:00
tools [CSSPGO][llvm-profgen] Parse mmap events from perf script 2020-11-20 14:26:26 -08:00
unittests [AMDGPU] Set the default globals address space to 1 2020-11-20 15:46:53 +00:00
utils [gn build] Port 8adc4d1ec7 2020-11-20 00:15:31 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
CODE_OWNERS.TXT [CODE_OWNERS.TXT] Update to include yours truly as the TableGen owner 2020-11-12 09:49:00 -05:00
CREDITS.TXT
LICENSE.TXT
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.