X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Ftracing%2FREADME.md;h=32ec17f4d9ff48de32fbeb8d1b3c21a51b8a35f7;hb=31f18b776d001752a193a7cec8bb49033c1a904c;hp=dea1d20a2c5fe492a08988b026aacb8435fa656c;hpb=40152f1e46a80b3405e5558a442ee632198dfd24;p=ceph.git diff --git a/ceph/src/tracing/README.md b/ceph/src/tracing/README.md index dea1d20a2..32ec17f4d 100644 --- a/ceph/src/tracing/README.md +++ b/ceph/src/tracing/README.md @@ -26,4 +26,26 @@ provider shared object, in which `TRACEPOINT_DEFINE` should be defined. See Place the `.tp` and the `.c` files into the `src/tracing` directory and modify the CMake file `src/tracing/CMakeLists.txt` accordingly. +Function Instrumentation +======================== +Ceph supports instrumentation using GCC's `-finstrument-functions` flag. +Supported CMake flags are: + +* `-DWITH_OSD_INSTRUMENT_FUNCTIONS=ON`: instrument OSD code + +Note that this instrumentation adds an extra function call on each function entry +and exit of Ceph code. This option is currently only supported with GCC. Using it +with Clang has no effect. + +The only function tracing implementation at the moment is done using LTTng UST. +In order to use it, Ceph needs to be configured with LTTng using `-DWITH_LTTNG=ON`. +[TraceCompass](http://www.tracecompass.org) can be used to generate flame +charts/graphs and other metrics. + +It is also possible to use [libbabeltrace](http://diamon.org/babeltrace/#docs) +to write custom analysis. The entry and exit tracepoints are called +`lttng_ust_cyg_profile:func_enter` and `lttng_ust_cyg_profile:func_exit` +respectively. The payload variable `addr` holds the address of the function +called and the payload variable `call_site` holds the address where it is called. +`nm` can be used to resolve function addresses (`addr` to function name).