rootbench
rootbench copied to clipboard
[Lilit summer student development] Flamegraph integration
@eguiraud I tried but I am confused why it works from the terminal but doesn't generate anything in ctest...
From rootbench build directory:
export PATH=$PWD/FlameGraph-prefix/src/FlameGraph/:$PATH
./tools/flamegraph.sh -d . -b root/tmva/tmva/ConvNetCpuBenchmarks -c -m
.......
----------------------------------------------------------------------
Benchmark Time CPU Iterations
----------------------------------------------------------------------
BM_ConvolutionalNetwork_CPU 39306567750 ns 38953830955 ns 1
[ perf record: Woken up 12 times to write data ]
[ perf record: Captured and wrote 3,832 MB perf.data (381 samples) ]
and both pngs (memory and CPU flamegraphs) are beautifully generated!
But from ctest:
ctest -R rootbench-fixture-flamegraphcpu-ConvNetCpuBenchmarks
......
69: [ perf record: Woken up 4 times to write data ]
69: [ perf record: Captured and wrote 0,000 MB (null) ]
69: failed to open perf.data: No such file or directory (try 'perf record' first)
69: ERROR: No stack counts found
1/1 Test #69: rootbench-fixture-flamegraph-ConvNetCpuBenchmarks ...***Failed 119.84 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 119.89 sec
The following tests FAILED:
69 - rootbench-fixture-flamegraph-ConvNetCpuBenchmarks (Failed)
Errors while running CTest
The command is the same for both and I see the benchmark is running actually...
Rebased and readapted from https://github.com/root-project/rootbench/pull/94
@oshadura I bet it's a "current working directory" issue. You can check the verbose ctest -V -R rootbench-fixture-flamegraphcpu-ConvNetCpuBenchmarks
and also check, after the test failed, in which directory the perf.data
file has been created.
Looks like the behavior of perf record
is different if being called from ctest. Let's aim for merging the script and then the rest.