llvm-project/compiler-rt/lib/xray
Dean Michael Berris 980d93d0e0 [XRay][profiler] Part 2: XRay Function Call Trie
Summary:
This is part of the larger XRay Profiling Mode effort.

This patch implements a central data structure for capturing statistics
about XRay instrumented function call stacks. The `FunctionCallTrie`
type does the following things:

*  It keeps track of a shadow function call stack of XRay instrumented
   functions as they are entered (function enter event) and as they are
   exited (function exit event).

*  When a function is entered, the shadow stack contains information
   about the entry TSC, and updates the trie (or prefix tree)
   representing the current function call stack. If we haven't
   encountered this function call before, this creates a unique node for
   the function in this position on the stack. We update the list of
   callees of the parent function as well to reflect this newly found
   path.

*  When a function is exited, we compute statistics (TSC deltas,
   function call count frequency) for the associated function(s) up the
   stack as we unwind to find the matching entry event.

This builds upon the XRay `Allocator` and `Array` types in Part 1 of
this series of patches.

Depends on D45756.

Reviewers: echristo, pelikan, kpw

Reviewed By: kpw

Subscribers: llvm-commits, mgorny

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

llvm-svn: 332313
2018-05-15 00:42:36 +00:00
..
tests [XRay][profiler] Part 2: XRay Function Call Trie 2018-05-15 00:42:36 +00:00
CMakeLists.txt [XRay][profiler] Part 2: XRay Function Call Trie 2018-05-15 00:42:36 +00:00
weak_symbols.txt [XRay][compiler-rt][Darwin] Minimal XRay build support in Darwin 2017-11-28 11:49:22 +00:00
xray_AArch64.cc [XRay][compiler-rt] Add noop patch functions for unsupported arches. 2018-04-17 23:19:23 +00:00
xray_allocator.h [XRay][profiler] Part 1: XRay Allocator and Array Implementations 2018-04-29 13:46:30 +00:00
xray_always_instrument.txt [XRay][compiler-rt][NFC] Add example always/never instrument files. 2017-06-28 04:44:36 +00:00
xray_arm.cc [XRay][compiler-rt] Add noop patch functions for unsupported arches. 2018-04-17 23:19:23 +00:00
xray_basic_flags.cc [XRay][compiler-rt] Support string-based config for Basic mode. 2018-05-04 06:27:53 +00:00
xray_basic_flags.h [XRay][compiler-rt] Support string-based config for Basic mode. 2018-05-04 06:27:53 +00:00
xray_basic_flags.inc [XRay][compiler-rt] Support string-based config for Basic mode. 2018-05-04 06:27:53 +00:00
xray_basic_logging.cc [XRay][compiler-rt] Support string-based config for Basic mode. 2018-05-04 06:27:53 +00:00
xray_basic_logging.h [XRay][compiler-rt] Support string-based config for Basic mode. 2018-05-04 06:27:53 +00:00
xray_buffer_queue.cc [XRay] Rename Buffer.Buffer to Buffer.Data 2018-02-10 09:07:34 +00:00
xray_buffer_queue.h [XRay][compiler-rt] Support in-memory processing of FDR mode logs 2018-05-14 03:35:01 +00:00
xray_defs.h [XRay][compiler-rt] Disable XRay instrumentation of the XRay runtime. 2016-11-16 01:01:13 +00:00
xray_fdr_flags.cc [XRay][compiler-rt] Support string-based config for FDR mode 2018-05-04 06:13:35 +00:00
xray_fdr_flags.h [XRay][compiler-rt] Support string-based config for FDR mode 2018-05-04 06:13:35 +00:00
xray_fdr_flags.inc [XRay][compiler-rt] Support in-memory processing of FDR mode logs 2018-05-14 03:35:01 +00:00
xray_fdr_log_records.h Implement trampoline and handler for typed xray event tracing. 2018-04-17 21:28:53 +00:00
xray_fdr_logging.cc [XRay][compiler-rt] Fixup: Use proper string comparison for DCHECK 2018-05-14 04:14:39 +00:00
xray_fdr_logging.h [XRay] [compiler-rt] FDR logging arg1 handler 2017-09-28 05:29:59 +00:00
xray_fdr_logging_impl.h [XRay][compiler-rt] Support in-memory processing of FDR mode logs 2018-05-14 03:35:01 +00:00
xray_flags.cc [XRay][compiler-rt] Support string-based config for FDR mode 2018-05-04 06:13:35 +00:00
xray_flags.h [XRay][compiler-rt] Support string-based config for FDR mode 2018-05-04 06:13:35 +00:00
xray_flags.inc [XRay][compiler-rt] Support string-based config for Basic mode. 2018-05-04 06:27:53 +00:00
xray_function_call_trie.h [XRay][profiler] Part 2: XRay Function Call Trie 2018-05-15 00:42:36 +00:00
xray_init.cc [XRay][compiler-rt][Darwin] Use dynamic initialisation as an alternative 2017-11-29 22:06:12 +00:00
xray_interface.cc Remove 'noexcept's that do not match between header and source file. 2018-04-24 20:33:37 +00:00
xray_interface_internal.h Implement trampoline and handler for typed xray event tracing. 2018-04-17 21:28:53 +00:00
xray_log_interface.cc [XRay][compiler-rt+docs] Introduce __xray_log_init_mode(...). 2018-05-04 06:01:12 +00:00
xray_mips.cc [XRay][compiler-rt] Add noop patch functions for unsupported arches. 2018-04-17 23:19:23 +00:00
xray_mips64.cc [XRay][compiler-rt] Add noop patch functions for unsupported arches. 2018-04-17 23:19:23 +00:00
xray_never_instrument.txt [XRay][compiler-rt][NFC] Add example always/never instrument files. 2017-06-28 04:44:36 +00:00
xray_powerpc64.cc [XRay][compiler-rt] Add noop patch functions for unsupported arches. 2018-04-17 23:19:23 +00:00
xray_powerpc64.inc Re-commit r295017, since we have a potential fix of the tests, r295248, landed. 2017-02-15 22:40:29 +00:00
xray_profiler_flags.cc [XRay][profiler] Part 2: XRay Function Call Trie 2018-05-15 00:42:36 +00:00
xray_profiler_flags.h [XRay][profiler] Part 2: XRay Function Call Trie 2018-05-15 00:42:36 +00:00
xray_profiler_flags.inc [XRay][profiler] Part 2: XRay Function Call Trie 2018-05-15 00:42:36 +00:00
xray_segmented_array.h [XRay][compiler-rt] Relocate a DCHECK to the correct location. 2018-05-14 04:21:12 +00:00
xray_trampoline_AArch64.S Add NO_EXEC_STACK_DIRECTIVE to xray assembly files. 2017-03-15 21:18:47 +00:00
xray_trampoline_arm.S Add NO_EXEC_STACK_DIRECTIVE to xray assembly files. 2017-03-15 21:18:47 +00:00
xray_trampoline_mips.S [Compiler-rt][XRAY][MIPS] Support xray on mips/mipsel/mips64/mips64el 2017-02-15 10:54:09 +00:00
xray_trampoline_mips64.S [Compiler-rt][XRAY][MIPS] Support xray on mips/mipsel/mips64/mips64el 2017-02-15 10:54:09 +00:00
xray_trampoline_powerpc64.cc Re-commit r295017, since we have a potential fix of the tests, r295248, landed. 2017-02-15 22:40:29 +00:00
xray_trampoline_powerpc64_asm.S [XRay] Fix XRay PPC return value bug. 2017-05-10 16:28:21 +00:00
xray_trampoline_x86_64.S [XRay][compiler-rt] Add llvm-mca assembler annotations for XRay (NFC) 2018-05-08 01:57:51 +00:00
xray_tsc.h [XRay][compiler-rt] Support TSC emulation even for x86_64 2017-03-15 02:28:00 +00:00
xray_utils.cc [XRay][compiler-rt] Reduce XRay log spam 2017-12-13 06:37:13 +00:00
xray_utils.h [XRay] Refactor TSC related functions into a single header. NFC. 2017-02-10 20:30:43 +00:00
xray_x86_64.cc Implement trampoline and handler for typed xray event tracing. 2018-04-17 21:28:53 +00:00
xray_x86_64.inc Add Xray instrumentation support to FreeBSD 2018-02-15 14:17:15 +00:00