+119
−7
Loading
This patch adds support for annotating qpairs. The raw pointer values are replaced with a list of various properties of a qpair collected by the bpftrace script. A line like this: `0 2856282624.000 RDMA_REQ_NEW id: r3256 qpair: 0x26ba550` becomes (the line was only broken here): `0 2856282502.669 RDMA_REQ_NEW id: r3256 qpair(ptr=0x26ba550, thread=2, qid=0, \ subnqn=nqn.2016-06.io.spdk:cnode1, \ hostnqn=nqn.2014-08.org.nvmexpress:uuid:729783b4ab38485d8d767b7741108a8)` To annotate a trace, one first needs to enable and record the DTrace probes: ``` $ scripts/bpf/trace.py --record `pidof spdk_tgt` > bpftraces ^C ``` Of course, the probe events are only recorded when the script is executing, so in order to generate the annotations properly, it must be started before the annotated objects are created. For instance, for NVMeoF, it needs to be running before a connection is made. After the BPF probes are recored, the traces can be annotated: ``` $ build/bin/spdk_trace -p `pidof spdk_tgt` -s spdk_tgt -j | \ scripts/bpf/trace.py -b bpftraces ``` For now, the script only annotates traces from the rdma module, as it's the only one with tracpoints recording qpair pointers now, but it could be extended to support more tracepoints. Similarly, more objects could be annotated in the future by extending the `SPDKObject` class and defining additional DTrace probe points. Signed-off-by:Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I2225f4b1ab266b41af561b5e7d942411cd0c13c1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8107 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com>