diff --git a/Profiling-using-XRay.md b/Profiling-using-XRay.md index 1aa7368..8b7f755 100644 --- a/Profiling-using-XRay.md +++ b/Profiling-using-XRay.md @@ -85,3 +85,21 @@ Here you can do further filtering of the output. For a function call to be added # Example See [hermit/usr/openmpbench/syncbench.c](https://github.com/RWTH-OS/HermitCore/blob/dae722ea8cab9d14ba3e8e4700310b5dcf20d8ef/hermit/usr/openmpbench/syncbench.c). + +# Analysation + +After tracing your code, you may want to analyse the report. While the XRay report is already human-readable, it's hard to get an overview of the whole trace. Therefore, it's possible to convert the XRay report to a format that [kCacheGrind](https://kcachegrind.github.io) can read. You can find the tool needed for conversion at `/hermit/usr/xray/tools`. + +```bash +$ ./conv2kcg.py libgomp_trace.xray +INFO:Parsing Header is done. Found 1 frames +INFO:Found frame 'PARALLEL' data +INFO:Frame 'PARALLEL' complete +INFO:Report file 'libgomp_trace.xray' parsed completely. +INFO:Create callgrind file for frame 'PARALLEL' +INFO:Writing to: libgomp_trace_PARALLEL.callgrind +``` + +This will create the file `libgomp_trace_PARALLEL.callgrind` which can be opened using kCacheGrind (Open dialog: set Filter to 'All Files') and may look like this: + +[[images/kcachegrind_screenshot.png]] \ No newline at end of file