+69
−0
+4
−0
+13
−0
+157
−1
Loading
An "owner" is now represented by a textual string describing the owner of a trace event. A trace file can have up to 16K outstanding owners at any given time. We need this many to be able to track all of the various NVMe-oF qpairs, bdevs, NVMe driver qpairs, accel channels, etc. A library creating trace events can call spdk_trace_register_owner() with a description string to allocate a a 16-bit owner_id. This owner_id is then passed as a parameter to spdk_trace_record(). Libraries can change the description of a registered owner by calling spdk_trace_owner_set_description(). This can be useful for cases like NVMe-oF, where where a newly established qpair may only have a source IP/port, but later can be changed to also add the subsystem nqn once the CONNECT command arrives. A library is responsible for calling spdk_trace_unregister_owner() once the associated object is destroyed (i.e. a qpair disconnects or a bdev is unregistered). An owner lifetime is tracked by recording the tsc when the owner was registered. This allows the trace app to handle the case where an owner_id gets reused during the span of a trace file. Signed-off-by:Jim Harris <jim.harris@samsung.com> Change-Id: I79c9979a0769c32a85ee646c8237fe8329993c45 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22646 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Community-CI: Mellanox Build Bot Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>