usdt: pass ticks as the first probe argument

This will allow to match and compare the DTrace probes with SPDK traces
as they'll be using the same source for the timestamps.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I686c3351428c75f9b618a1a909836504fccad828
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8101
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
Konrad Sztyber 2021-05-26 08:57:20 +02:00 committed by Jim Harris
parent c556b6b892
commit a4044e77d6
2 changed files with 20 additions and 19 deletions

View File

@ -35,16 +35,17 @@
#define SPDK_INTERNAL_USDT_H
#include "spdk/config.h"
#include "spdk/env.h"
#ifdef SPDK_CONFIG_USDT
#include <sys/sdt.h>
#define SPDK_DTRACE_PROBE(name) DTRACE_PROBE(spdk,name)
#define SPDK_DTRACE_PROBE1(name,a1) DTRACE_PROBE1(spdk,name,a1)
#define SPDK_DTRACE_PROBE2(name,a1,a2) DTRACE_PROBE2(spdk,name,a1,a2)
#define SPDK_DTRACE_PROBE3(name,a1,a2,a3) DTRACE_PROBE3(spdk,name,a1,a2,a3)
#define SPDK_DTRACE_PROBE4(name,a1,a2,a3,a4) DTRACE_PROBE4(spdk,name,a1,a2,a3,a4)
#define SPDK_DTRACE_PROBE(name) DTRACE_PROBE1(spdk,name,spdk_get_ticks())
#define SPDK_DTRACE_PROBE1(name,a1) DTRACE_PROBE2(spdk,name,spdk_get_ticks(),a1)
#define SPDK_DTRACE_PROBE2(name,a1,a2) DTRACE_PROBE3(spdk,name,spdk_get_ticks(),a1,a2)
#define SPDK_DTRACE_PROBE3(name,a1,a2,a3) DTRACE_PROBE4(spdk,name,spdk_get_ticks(),a1,a2,a3)
#define SPDK_DTRACE_PROBE4(name,a1,a2,a3,a4) DTRACE_PROBE5(spdk,name,spdk_get_ticks(),a1,a2,a3,a4)
#else

View File

@ -1,83 +1,83 @@
usdt:__EXE__:nvmf_tgt_state {
printf("%d.%06d: nvmf_tgt reached state %s\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
@target[arg0]);
@target[arg1]);
}
usdt:__EXE__:nvmf_subsystem_change_state {
printf("%d.%06d: %s change state from %s to %s start\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
str(arg0), @subsystem[arg2], @subsystem[arg1]);
str(arg1), @subsystem[arg3], @subsystem[arg2]);
}
usdt:__EXE__:nvmf_subsystem_change_state_done {
printf("%d.%06d: %s change state from %s to %s %s\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
str(arg0), @subsystem[arg2], @subsystem[arg1], arg3 ? "failed" : "done");
str(arg1), @subsystem[arg3], @subsystem[arg2], arg4 ? "failed" : "done");
}
usdt:__EXE__:nvmf_pg_change_state {
printf("%d.%06d: %s on thread %d state to %s start\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
str(arg0), arg2, @subsystem[arg1]);
str(arg1), arg3, @subsystem[arg2]);
}
usdt:__EXE__:nvmf_pg_change_state_done {
printf("%d.%06d: %s on thread %d state to %s done\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
str(arg0), arg2, @subsystem[arg1]);
str(arg1), arg3, @subsystem[arg2]);
}
usdt:__EXE__:nvmf_create_poll_group {
printf("%d.%06d: create poll group on thread: %d\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
arg0);
arg1);
}
usdt:__EXE__:nvmf_destroy_poll_group {
printf("%d.%06d: destroy poll group on thread: %d\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
arg0);
arg1);
}
usdt:__EXE__:nvmf_poll_group_add_qpair {
printf("%d.%06d: add qpair: %p to poll group on thread %d\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
arg0, arg1);
arg1, arg2);
}
usdt:__EXE__:nvmf_destroy_poll_group_qpairs {
printf("%d.%06d: destroy qpairs on poll group on thread %d\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
arg0);
arg1);
}
usdt:__EXE__:nvmf_poll_group_remove_qpair {
printf("%d.%06d: remove qpair: %p from poll group on thread %d\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
arg0, arg1);
arg1, arg2);
}
usdt:__EXE__:nvmf_qpair_disconnect {
printf("%d.%06d: disconnect qpair: %p from poll group on thread %d\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
arg0, arg1);
arg1, arg2);
}
usdt:__EXE__:nvmf_transport_qpair_fini {
printf("%d.%06d: destroy qpair: %p on transport layer\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
arg0);
arg1);
}
usdt:__EXE__:nvmf_poll_group_drain_qpair {
printf("%d.%06d: drain qpair: %p from poll group on thread %d\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
arg0, arg1);
arg1, arg2);
}
usdt:__EXE__:nvmf_ctrlr_add_qpair {
printf("%d.%06d: %s add qpair: %p, qid: %d for host: %s\n",
elapsed / (uint64)(1000 * 1000), elapsed % (uint64)(1000 * 1000),
str(arg2), arg0, arg1, str(arg3));
str(arg3), arg1, arg2, str(arg4));
}