idxd: add trace events for OP_SUBMIT and OP_COMPLETE
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I7409b6f49e88a2d4dd1e32feba91adbd7d86e24f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10194 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: John Kariuki <John.K.Kariuki@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
76c73407cb
commit
871e32efc0
@ -60,6 +60,7 @@
|
||||
#define TRACE_GROUP_FTL 0x6
|
||||
#define TRACE_GROUP_BLOBFS 0x7
|
||||
#define TRACE_GROUP_NVMF_FC 0x8
|
||||
#define TRACE_GROUP_IDXD 0x9
|
||||
#define TRACE_GROUP_THREAD 0xA
|
||||
#define TRACE_GROUP_NVME_PCIE 0xB
|
||||
|
||||
@ -157,4 +158,8 @@
|
||||
#define TRACE_NVME_PCIE_SUBMIT SPDK_TPOINT_ID(TRACE_GROUP_NVME_PCIE, 0x0)
|
||||
#define TRACE_NVME_PCIE_COMPLETE SPDK_TPOINT_ID(TRACE_GROUP_NVME_PCIE, 0x1)
|
||||
|
||||
/* idxd trace definitions */
|
||||
#define TRACE_IDXD_OP_SUBMIT SPDK_TPOINT_ID(TRACE_GROUP_IDXD, 0x0)
|
||||
#define TRACE_IDXD_OP_COMPLETE SPDK_TPOINT_ID(TRACE_GROUP_IDXD, 0x1)
|
||||
|
||||
#endif /* SPDK_INTERNAL_TRACE_DEFS */
|
||||
|
@ -119,7 +119,7 @@ endif
|
||||
|
||||
# module/accel
|
||||
DEPDIRS-accel_ioat := log ioat thread jsonrpc rpc accel
|
||||
DEPDIRS-accel_idxd := log idxd thread $(JSON_LIBS) accel
|
||||
DEPDIRS-accel_idxd := log idxd thread $(JSON_LIBS) accel trace
|
||||
|
||||
# module/env_dpdk
|
||||
DEPDIRS-env_dpdk_rpc := log $(JSON_LIBS)
|
||||
|
@ -45,6 +45,8 @@
|
||||
#include "spdk/idxd.h"
|
||||
#include "spdk/util.h"
|
||||
#include "spdk/json.h"
|
||||
#include "spdk/trace.h"
|
||||
#include "spdk_internal/trace_defs.h"
|
||||
|
||||
static bool g_idxd_enable = false;
|
||||
static bool g_kernel_mode = false;
|
||||
@ -136,6 +138,7 @@ idxd_done(void *cb_arg, int status)
|
||||
struct idxd_io_channel *chan = spdk_io_channel_get_ctx(accel_task->accel_ch->engine_ch);
|
||||
|
||||
assert(chan->num_outstanding > 0);
|
||||
spdk_trace_record(TRACE_IDXD_OP_COMPLETE, 0, 0, 0, chan->num_outstanding - 1);
|
||||
if (chan->num_outstanding-- == chan->max_outstanding) {
|
||||
chan->state = IDXD_CHANNEL_ACTIVE;
|
||||
}
|
||||
@ -190,6 +193,7 @@ _process_single_task(struct spdk_io_channel *ch, struct spdk_accel_task *task)
|
||||
|
||||
if (rc == 0) {
|
||||
chan->num_outstanding++;
|
||||
spdk_trace_record(TRACE_IDXD_OP_SUBMIT, 0, 0, 0, chan->num_outstanding);
|
||||
}
|
||||
|
||||
return rc;
|
||||
@ -433,6 +437,14 @@ accel_engine_idxd_write_config_json(struct spdk_json_write_ctx *w)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_TRACE_REGISTER_FN(idxd_trace, "idxd", TRACE_GROUP_IDXD)
|
||||
{
|
||||
spdk_trace_register_description("IDXD_OP_SUBMIT", TRACE_IDXD_OP_SUBMIT, OWNER_NONE, OBJECT_NONE, 0,
|
||||
SPDK_TRACE_ARG_TYPE_INT, "count");
|
||||
spdk_trace_register_description("IDXD_OP_COMPLETE", TRACE_IDXD_OP_COMPLETE, OWNER_NONE, OBJECT_NONE,
|
||||
0, SPDK_TRACE_ARG_TYPE_INT, "count");
|
||||
}
|
||||
|
||||
SPDK_ACCEL_MODULE_REGISTER(accel_engine_idxd_init, accel_engine_idxd_exit,
|
||||
accel_engine_idxd_write_config_json,
|
||||
accel_engine_idxd_get_ctx_size)
|
||||
|
Loading…
Reference in New Issue
Block a user