rootbench
rootbench copied to clipboard
Add memory instrumentation support
Initial implementation of a rootbench memory tracing library.
It implements a C library which records information about the memory allocations. The library is loaded using the LD_PRELOAD mechanism (and DYLD_INSERT_LIBRARIES for osx).
GoogleBenchmark displays the memory allocation results are only in the json format. For instance:
DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES=./lib/Instrumentation/libRBInstrumentation.dylib ./root/interpreter/InterpreterLookupHelperBenchmarks --benchma
rk_format=json:
...
{
"name": "BM_LookupHelper_Leak",
"run_name": "BM_LookupHelper_Leak",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 1,
"real_time": 1.3199219449888916e+09,
"cpu_time": 8.0450300000000000e+08,
"time_unit": "ns",
"allocs_per_iter": 6.0000000000000000e+00,
"max_bytes_used": 3368
}
ping
@vgvassilev sorry! I am here finally, can I ask you to rebase please?
@vgvassilev if you will rebase on master again, GH Actions with root-nightlies from conda will be retriggered :+1:
Done
[ 18%] Building CXX object lib/Support/CMakeFiles/RBSupport.dir/MemoryManager.cxx.o
In file included from /home/runner/work/rootbench/rootbench/lib/Support/MemoryManager.cxx:12:0:
/home/runner/work/rootbench/rootbench/include/rootbench/RBConfig.h:40:3: error: #error Unsupported Platform;
# error Unsupported Platform;
^~~~~
lib/Support/CMakeFiles/RBSupport.dir/build.make:94: recipe for target 'lib/Support/CMakeFiles/RBSupport.dir/MemoryManager.cxx.o' failed
CMakeFiles/Makefile2:1474: recipe for target 'lib/Support/CMakeFiles/RBSupport.dir/all' failed
Makefile:113: recipe for target 'all' failed
``` (I could check a bit later in case you are busy..)
@vgvassilev I check CI logs and I see segfault :(
3:
3: *** Break *** segmentation violation
3: Generating stack trace...
3/21 Test #3: rootbench-InterpreterLookupHelperBenchmarks ...***Failed 1.01 sec
If you will have time can you rebase please here?
I can reproduce the failure. I do not know what's going on and I will have to fix it before landing it...