Commit Graph

4 Commits

Author SHA1 Message Date
Guilherme Amadio
b0940d1ba7 Re-enable support for profiling/debugging interpreted/JITted code
This feature, originally added in commit 22b1606f, was reverted to
make the LLVM upgrade to version 13 easier. This commit adds back
all functionality as it was just before the LLVM upgrade.
2022-12-15 10:29:03 +01:00
Jonas Hahnfeld
eb2b4bd693 Revert "Add support for profiling/debugging interpreted/JITted code"
This reverts commit 22b1606f5fd842590f04724d789de5b29495efc6 until it
is re-implemented on top of the changes for upgrading to LLVM 13.
2022-12-09 08:44:15 +01:00
Enrico Guiraud
5f0c2a38ae Remove unused include of "llvm/Config/config.h"
Including that header from cling breaks building ROOT with
external llvm and clang (which is needed e.g. for the conda
package): `config.h` is not avaiable in that scenario.
2022-06-08 15:14:03 +02:00
Guilherme Amadio
bbc1089732 Add support for profiling/debugging interpreted/JITted code
This commit builds on previous work for getting GDB support for JITted
and interpreted code working in cling. It adds a JIT event listener as
well to create perf map files to allow profiling of interpreted/JITted
code with cling.

The functionality provided is disabled by default. The interface to
enable it has been chosen to be via environment variables to allow both
interpreted code in the prompt as well as linked code to be able to
optionally enable debugging/profiling. Using ld.so as example, where
LD_DEBUG and LD_PROFILE exist, we chose CLING_DEBUG and CLING_PROFILE
to enable these features. For the moment, setting these variables to
anything enables the feature. Later on, if support for oprofile is
added, for example, it may be better to enable specific JIT event
listeners depending on the value of the variables, for example with
CLING_PROFILE=perf or CLING_PROFILE=oprofile, respectively.
2022-06-07 21:59:05 +02:00