trace: add traces around io_device name
Add/modify tpoints around io_device name in lib/bdev/bdev.c and lib/thread/thread.c. Deleted double spaces in commets of trace_defs.h. Change-Id: I0e2f5118e68b1b329a422bde3400fd2273e7387e Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10687 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
This commit is contained in:
parent
e4ef7b3910
commit
de4eac2a05
@ -65,8 +65,10 @@
|
||||
#define TRACE_GROUP_NVME_PCIE 0xB
|
||||
|
||||
/* Bdev tracepoint definitions */
|
||||
#define TRACE_BDEV_IO_START SPDK_TPOINT_ID(TRACE_GROUP_BDEV, 0x0)
|
||||
#define TRACE_BDEV_IO_DONE SPDK_TPOINT_ID(TRACE_GROUP_BDEV, 0x1)
|
||||
#define TRACE_BDEV_IO_START SPDK_TPOINT_ID(TRACE_GROUP_BDEV, 0x0)
|
||||
#define TRACE_BDEV_IO_DONE SPDK_TPOINT_ID(TRACE_GROUP_BDEV, 0x1)
|
||||
#define TRACE_BDEV_IOCH_CREATE SPDK_TPOINT_ID(TRACE_GROUP_BDEV, 0x2)
|
||||
#define TRACE_BDEV_IOCH_DESTROY SPDK_TPOINT_ID(TRACE_GROUP_BDEV, 0x3)
|
||||
|
||||
/* NVMe-of TCP tracepoint definitions */
|
||||
#define TRACE_TCP_REQUEST_STATE_NEW SPDK_TPOINT_ID(TRACE_GROUP_NVMF_TCP, 0x00)
|
||||
@ -94,7 +96,7 @@
|
||||
#define TRACE_TCP_QP_ABORT_REQ SPDK_TPOINT_ID(TRACE_GROUP_NVMF_TCP, 0x16)
|
||||
#define TRACE_TCP_QP_RCV_STATE_CHANGE SPDK_TPOINT_ID(TRACE_GROUP_NVMF_TCP, 0x17)
|
||||
|
||||
/* NVMe-of RDMA tracepoint definitions */
|
||||
/* NVMe-of RDMA tracepoint definitions */
|
||||
#define TRACE_RDMA_REQUEST_STATE_NEW SPDK_TPOINT_ID(TRACE_GROUP_NVMF_RDMA, 0x0)
|
||||
#define TRACE_RDMA_REQUEST_STATE_NEED_BUFFER SPDK_TPOINT_ID(TRACE_GROUP_NVMF_RDMA, 0x1)
|
||||
#define TRACE_RDMA_REQUEST_STATE_DATA_TRANSFER_TO_CONTROLLER_PENDING SPDK_TPOINT_ID(TRACE_GROUP_NVMF_RDMA, 0x2)
|
||||
@ -114,11 +116,11 @@
|
||||
#define TRACE_RDMA_QP_DISCONNECT SPDK_TPOINT_ID(TRACE_GROUP_NVMF_RDMA, 0x10)
|
||||
#define TRACE_RDMA_QP_DESTROY SPDK_TPOINT_ID(TRACE_GROUP_NVMF_RDMA, 0x11)
|
||||
|
||||
/* Thread tracepoint definitions */
|
||||
/* Thread tracepoint definitions */
|
||||
#define TRACE_THREAD_IOCH_GET SPDK_TPOINT_ID(TRACE_GROUP_THREAD, 0x0)
|
||||
#define TRACE_THREAD_IOCH_PUT SPDK_TPOINT_ID(TRACE_GROUP_THREAD, 0x1)
|
||||
|
||||
/* Blobfs tracepoint definitions */
|
||||
/* Blobfs tracepoint definitions */
|
||||
#define TRACE_BLOBFS_XATTR_START SPDK_TPOINT_ID(TRACE_GROUP_BLOBFS, 0x0)
|
||||
#define TRACE_BLOBFS_XATTR_END SPDK_TPOINT_ID(TRACE_GROUP_BLOBFS, 0x1)
|
||||
#define TRACE_BLOBFS_OPEN SPDK_TPOINT_ID(TRACE_GROUP_BLOBFS, 0x2)
|
||||
@ -126,7 +128,7 @@
|
||||
#define TRACE_BLOBFS_DELETE_START SPDK_TPOINT_ID(TRACE_GROUP_BLOBFS, 0x4)
|
||||
#define TRACE_BLOBFS_DELETE_DONE SPDK_TPOINT_ID(TRACE_GROUP_BLOBFS, 0x5)
|
||||
|
||||
/* NVMe-oF FC tracepoint definitions */
|
||||
/* NVMe-oF FC tracepoint definitions */
|
||||
#define TRACE_FC_REQ_INIT SPDK_TPOINT_ID(TRACE_GROUP_NVMF_FC, 0x01)
|
||||
#define TRACE_FC_REQ_READ_BDEV SPDK_TPOINT_ID(TRACE_GROUP_NVMF_FC, 0x02)
|
||||
#define TRACE_FC_REQ_READ_XFER SPDK_TPOINT_ID(TRACE_GROUP_NVMF_FC, 0x03)
|
||||
@ -144,7 +146,7 @@
|
||||
#define TRACE_FC_REQ_PENDING SPDK_TPOINT_ID(TRACE_GROUP_NVMF_FC, 0x0F)
|
||||
#define TRACE_FC_REQ_FUSED_WAITING SPDK_TPOINT_ID(TRACE_GROUP_NVMF_FC, 0x10)
|
||||
|
||||
/* Iscsi conn tracepoint definitions */
|
||||
/* Iscsi conn tracepoint definitions */
|
||||
#define TRACE_ISCSI_READ_FROM_SOCKET_DONE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x0)
|
||||
#define TRACE_ISCSI_FLUSH_WRITEBUF_START SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x1)
|
||||
#define TRACE_ISCSI_FLUSH_WRITEBUF_DONE SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x2)
|
||||
@ -154,11 +156,11 @@
|
||||
#define TRACE_ISCSI_TASK_EXECUTED SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x6)
|
||||
#define TRACE_ISCSI_PDU_COMPLETED SPDK_TPOINT_ID(TRACE_GROUP_ISCSI, 0x7)
|
||||
|
||||
/* Scsi tracepoint definitions */
|
||||
/* Scsi tracepoint definitions */
|
||||
#define TRACE_SCSI_TASK_DONE SPDK_TPOINT_ID(TRACE_GROUP_SCSI, 0x0)
|
||||
#define TRACE_SCSI_TASK_START SPDK_TPOINT_ID(TRACE_GROUP_SCSI, 0x1)
|
||||
|
||||
/* NVMe PCIe tracepoint definitions */
|
||||
/* NVMe PCIe tracepoint definitions */
|
||||
#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)
|
||||
|
||||
|
@ -3003,6 +3003,9 @@ bdev_channel_create(void *io_device, void *ctx_buf)
|
||||
return -1;
|
||||
}
|
||||
|
||||
spdk_trace_record(TRACE_BDEV_IOCH_CREATE, 0, 0, 0, ch->bdev->name,
|
||||
spdk_thread_get_id(spdk_io_channel_get_thread(ch->channel)));
|
||||
|
||||
assert(ch->histogram == NULL);
|
||||
if (bdev->internal.histogram_enabled) {
|
||||
ch->histogram = spdk_histogram_data_alloc();
|
||||
@ -3273,6 +3276,9 @@ bdev_channel_destroy(void *io_device, void *ctx_buf)
|
||||
SPDK_DEBUGLOG(bdev, "Destroying channel %p for bdev %s on thread %p\n", ch, ch->bdev->name,
|
||||
spdk_get_thread());
|
||||
|
||||
spdk_trace_record(TRACE_BDEV_IOCH_DESTROY, 0, 0, 0, ch->bdev->name,
|
||||
spdk_thread_get_id(spdk_io_channel_get_thread(ch->channel)));
|
||||
|
||||
/* This channel is going away, so add its statistics into the bdev so that they don't get lost. */
|
||||
pthread_mutex_lock(&ch->bdev->internal.mutex);
|
||||
bdev_io_stat_add(&ch->bdev->internal.stat, &ch->stat);
|
||||
@ -7165,6 +7171,22 @@ SPDK_TRACE_REGISTER_FN(bdev_trace, "bdev", TRACE_GROUP_BDEV)
|
||||
OWNER_BDEV, OBJECT_BDEV_IO, 0,
|
||||
{{ "ctx", SPDK_TRACE_ARG_TYPE_PTR, 8 }}
|
||||
},
|
||||
{
|
||||
"BDEV_IOCH_CREATE", TRACE_BDEV_IOCH_CREATE,
|
||||
OWNER_BDEV, OBJECT_NONE, 1,
|
||||
{
|
||||
{ "name", SPDK_TRACE_ARG_TYPE_STR, 40 },
|
||||
{ "thread_id", SPDK_TRACE_ARG_TYPE_INT, 8}
|
||||
}
|
||||
},
|
||||
{
|
||||
"BDEV_IOCH_DESTROY", TRACE_BDEV_IOCH_DESTROY,
|
||||
OWNER_BDEV, OBJECT_NONE, 0,
|
||||
{
|
||||
{ "name", SPDK_TRACE_ARG_TYPE_STR, 40 },
|
||||
{ "thread_id", SPDK_TRACE_ARG_TYPE_INT, 8}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
@ -2139,7 +2139,7 @@ spdk_get_io_channel(void *io_device)
|
||||
*/
|
||||
pthread_mutex_unlock(&g_devlist_mutex);
|
||||
spdk_trace_record(TRACE_THREAD_IOCH_GET, 0, 0,
|
||||
(uint64_t)spdk_io_channel_get_ctx(ch), ch->ref);
|
||||
(uint64_t)spdk_io_channel_get_ctx(ch), ch->ref, dev->name);
|
||||
return ch;
|
||||
}
|
||||
|
||||
@ -2174,7 +2174,7 @@ spdk_get_io_channel(void *io_device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
spdk_trace_record(TRACE_THREAD_IOCH_GET, 0, 0, (uint64_t)spdk_io_channel_get_ctx(ch), 1);
|
||||
spdk_trace_record(TRACE_THREAD_IOCH_GET, 0, 0, (uint64_t)spdk_io_channel_get_ctx(ch), 1, dev->name);
|
||||
return ch;
|
||||
}
|
||||
|
||||
@ -2242,7 +2242,7 @@ spdk_put_io_channel(struct spdk_io_channel *ch)
|
||||
int rc __attribute__((unused));
|
||||
|
||||
spdk_trace_record(TRACE_THREAD_IOCH_PUT, 0, 0,
|
||||
(uint64_t)spdk_io_channel_get_ctx(ch), ch->ref);
|
||||
(uint64_t)spdk_io_channel_get_ctx(ch), ch->ref, ch->dev->name);
|
||||
|
||||
thread = spdk_get_thread();
|
||||
if (!thread) {
|
||||
|
Loading…
Reference in New Issue
Block a user