trace: update trace help inside SPDK target
Delete bit masks from trace help (found inside build/bin/spdk_tgt -h help text), as they do not provide useful information, are much harder to remember and use, and migh leave user confused. Since we provide trace group names anyway, bit masks are excessive. Change --tpoint-group-mask parameter name to --tpoint-group, because we do not provide bit masks anymore. Drop "default" tpoint group mask from help text, since it does not enable any tracepoints and may confuse the user. Change-Id: I2ca780883dfa7822e76523e9ba1fc65a7bfe5a99 Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14656 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
d5dc6a8853
commit
19c1d632f1
@ -29,7 +29,7 @@ Param | Long Param | Type | Default | Descript
|
||||
-------- | ---------------------- | -------- | ---------------------- | -----------
|
||||
-c | --config | string | | @ref cmd_arg_config_file
|
||||
-d | --limit-coredump | flag | false | @ref cmd_arg_limit_coredump
|
||||
-e | --tpoint-group-mask | integer | 0x0 | @ref cmd_arg_limit_tpoint_group_mask
|
||||
-e | --tpoint-group | integer | | @ref cmd_arg_limit_tpoint_group_mask
|
||||
-g | --single-file-segments | flag | | @ref cmd_arg_single_file_segments
|
||||
-h | --help | flag | | show all available parameters and exit
|
||||
-i | --shm-id | integer | | @ref cmd_arg_multi_process
|
||||
@ -61,7 +61,7 @@ to RLIM_INFINITY. Specifying `--limit-coredump` will not set the resource limit
|
||||
|
||||
SPDK has an experimental low overhead tracing framework. Tracepoints in this
|
||||
framework are organized into tracepoint groups. By default, all tracepoint
|
||||
groups are disabled. `--tpoint-group-mask` can be used to enable a specific
|
||||
groups are disabled. `--tpoint-group` can be used to enable a specific
|
||||
subset of tracepoint groups in the application.
|
||||
|
||||
Note: Additional documentation on the tracepoint framework is in progress.
|
||||
|
@ -62,8 +62,8 @@ static const struct option g_cmdline_options[] = {
|
||||
{"config", required_argument, NULL, CONFIG_FILE_OPT_IDX},
|
||||
#define LIMIT_COREDUMP_OPT_IDX 'd'
|
||||
{"limit-coredump", no_argument, NULL, LIMIT_COREDUMP_OPT_IDX},
|
||||
#define TPOINT_GROUP_MASK_OPT_IDX 'e'
|
||||
{"tpoint-group-mask", required_argument, NULL, TPOINT_GROUP_MASK_OPT_IDX},
|
||||
#define TPOINT_GROUP_OPT_IDX 'e'
|
||||
{"tpoint-group", required_argument, NULL, TPOINT_GROUP_OPT_IDX},
|
||||
#define SINGLE_FILE_SEGMENTS_OPT_IDX 'g'
|
||||
{"single-file-segments", no_argument, NULL, SINGLE_FILE_SEGMENTS_OPT_IDX},
|
||||
#define HELP_OPT_IDX 'h'
|
||||
@ -812,7 +812,7 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts,
|
||||
case LIMIT_COREDUMP_OPT_IDX:
|
||||
opts->enable_coredump = false;
|
||||
break;
|
||||
case TPOINT_GROUP_MASK_OPT_IDX:
|
||||
case TPOINT_GROUP_OPT_IDX:
|
||||
opts->tpoint_group_mask = optarg;
|
||||
break;
|
||||
case SINGLE_FILE_SEGMENTS_OPT_IDX:
|
||||
|
@ -193,23 +193,30 @@ void
|
||||
spdk_trace_mask_usage(FILE *f, const char *tmask_arg)
|
||||
{
|
||||
struct spdk_trace_register_fn *register_fn;
|
||||
bool first_group_name = true;
|
||||
|
||||
fprintf(f, " %s, --tpoint-group-mask <group-mask>[:<tpoint_mask>]\n", tmask_arg);
|
||||
fprintf(f, " group_mask - tracepoint group mask ");
|
||||
fprintf(f, "for spdk trace buffers (default 0x0");
|
||||
fprintf(f, " %s, --tpoint-group <group-name>[:<tpoint_mask>]\n", tmask_arg);
|
||||
fprintf(f, " group_name - tracepoint group name ");
|
||||
fprintf(f, "for spdk trace buffers (");
|
||||
|
||||
register_fn = g_reg_fn_head;
|
||||
while (register_fn) {
|
||||
fprintf(f, ", %s 0x%x", register_fn->name, 1 << register_fn->tgroup_id);
|
||||
if (first_group_name) {
|
||||
fprintf(f, "%s", register_fn->name);
|
||||
first_group_name = false;
|
||||
} else {
|
||||
fprintf(f, ", %s", register_fn->name);
|
||||
}
|
||||
register_fn = register_fn->next;
|
||||
}
|
||||
|
||||
fprintf(f, ", all 0xffff)\n");
|
||||
fprintf(f, ", all)\n");
|
||||
fprintf(f, " tpoint_mask - tracepoint mask for enabling individual");
|
||||
fprintf(f, " tpoints inside a tracepoint group.");
|
||||
fprintf(f, " First tpoint inside a group can be");
|
||||
fprintf(f, " enabled by setting tpoint_mask to 1 (e.g. 0x8:1).\n");
|
||||
fprintf(f, " Masks can be combined (e.g. 0x400,0x8:1).\n");
|
||||
fprintf(f, " enabled by setting tpoint_mask to 1 (e.g. bdev:0x1).\n");
|
||||
fprintf(f, " Groups and masks can be combined (e.g.");
|
||||
fprintf(f, " thread,bdev:0x1).\n");
|
||||
fprintf(f, " All available tpoints can be found in");
|
||||
fprintf(f, " /include/spdk_internal/trace_defs.h\n");
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ _spdk_opt_to_complete() {
|
||||
--iova-mode)
|
||||
COMPREPLY=($(compgen -W 'pa va' -- "$cur"))
|
||||
;;
|
||||
--tpoint-group-mask | -e)
|
||||
--tpoint-group | -e)
|
||||
COMPREPLY=($(compgen -W '$(_get_tpoint_g_masks)' -- "$cur"))
|
||||
compopt -o nosort
|
||||
;;
|
||||
|
@ -44,7 +44,7 @@ run_step() {
|
||||
|
||||
run_bsdump() {
|
||||
# 0x80 is the bit mask for BlobFS tracepoints
|
||||
$SPDK_EXAMPLE_DIR/blobcli -j $ROCKSDB_CONF -b Nvme0n1 --tpoint-group-mask 0x80 &> bsdump.txt
|
||||
$SPDK_EXAMPLE_DIR/blobcli -j $ROCKSDB_CONF -b Nvme0n1 --tpoint-group blobfs &> bsdump.txt
|
||||
}
|
||||
|
||||
# In the autotest job, we copy the rocksdb source to just outside the spdk directory.
|
||||
@ -83,7 +83,7 @@ trap 'dump_db_bench_on_err; run_bsdump || :; rm -f $ROCKSDB_CONF; sanitize_resul
|
||||
|
||||
if [ -z "$SKIP_MKFS" ]; then
|
||||
# 0x80 is the bit mask for BlobFS tracepoints
|
||||
run_test "blobfs_mkfs" $rootdir/test/blobfs/mkfs/mkfs $ROCKSDB_CONF Nvme0n1 --tpoint-group-mask 0x80
|
||||
run_test "blobfs_mkfs" $rootdir/test/blobfs/mkfs/mkfs $ROCKSDB_CONF Nvme0n1 --tpoint-group blobfs
|
||||
fi
|
||||
|
||||
mkdir -p $output_dir/rocksdb
|
||||
|
@ -36,7 +36,7 @@ fio_py="$rootdir/scripts/fio-wrapper"
|
||||
timing_enter start_iscsi_tgt
|
||||
|
||||
echo "start iscsi_tgt with trace enabled"
|
||||
"${ISCSI_APP[@]}" -m 0xf --num-trace-entries $NUM_TRACE_ENTRIES --tpoint-group-mask 0xf &
|
||||
"${ISCSI_APP[@]}" -m 0xf --num-trace-entries $NUM_TRACE_ENTRIES --tpoint-group all &
|
||||
iscsi_pid=$!
|
||||
echo "Process pid: $iscsi_pid"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user