event: change the debug -t option with -L
Reason: -t has conflicts with other option in bdevperf or perf(nvme). Change-Id: I4d641b55c609f4cd0425594b461b1a8b279e8dd8 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/415930 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
32d7c91cbc
commit
931e6e51c3
@ -209,7 +209,7 @@ int spdk_app_parse_core_mask(const char *mask, struct spdk_cpuset *cpumask);
|
|||||||
*/
|
*/
|
||||||
struct spdk_cpuset *spdk_app_get_core_mask(void);
|
struct spdk_cpuset *spdk_app_get_core_mask(void);
|
||||||
|
|
||||||
#define SPDK_APP_GETOPT_STRING "c:de:ghi:m:n:p:qr:s:t:uwB:W:"
|
#define SPDK_APP_GETOPT_STRING "c:de:ghi:m:n:p:qr:s:uwB:L:W:"
|
||||||
|
|
||||||
enum spdk_app_parse_args_rvals {
|
enum spdk_app_parse_args_rvals {
|
||||||
SPDK_APP_PARSE_ARGS_HELP = 0,
|
SPDK_APP_PARSE_ARGS_HELP = 0,
|
||||||
|
@ -641,7 +641,7 @@ usage(void (*app_usage)(void))
|
|||||||
printf(" -w wait for RPCs to initialize subsystems\n");
|
printf(" -w wait for RPCs to initialize subsystems\n");
|
||||||
printf(" -B addr pci addr to blacklist\n");
|
printf(" -B addr pci addr to blacklist\n");
|
||||||
printf(" -W addr pci addr to whitelist (-B and -W cannot be used at the same time)\n");
|
printf(" -W addr pci addr to whitelist (-B and -W cannot be used at the same time)\n");
|
||||||
spdk_tracelog_usage(stdout, "-t");
|
spdk_tracelog_usage(stdout, "-L");
|
||||||
if (app_usage) {
|
if (app_usage) {
|
||||||
app_usage();
|
app_usage();
|
||||||
}
|
}
|
||||||
@ -748,24 +748,6 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts,
|
|||||||
opts->mem_size = (int) mem_size_mb;
|
opts->mem_size = (int) mem_size_mb;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 't':
|
|
||||||
#ifndef DEBUG
|
|
||||||
fprintf(stderr, "%s must be built with CONFIG_DEBUG=y for -t flag\n",
|
|
||||||
argv[0]);
|
|
||||||
usage(app_usage);
|
|
||||||
rval = SPDK_APP_PARSE_ARGS_FAIL;
|
|
||||||
goto parse_done;
|
|
||||||
#else
|
|
||||||
rc = spdk_log_set_trace_flag(optarg);
|
|
||||||
if (rc < 0) {
|
|
||||||
fprintf(stderr, "unknown flag\n");
|
|
||||||
usage(app_usage);
|
|
||||||
rval = SPDK_APP_PARSE_ARGS_FAIL;
|
|
||||||
goto parse_done;
|
|
||||||
}
|
|
||||||
opts->print_level = SPDK_LOG_DEBUG;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case 'u':
|
case 'u':
|
||||||
opts->no_pci = true;
|
opts->no_pci = true;
|
||||||
break;
|
break;
|
||||||
@ -788,6 +770,24 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts,
|
|||||||
goto parse_done;
|
goto parse_done;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'L':
|
||||||
|
#ifndef DEBUG
|
||||||
|
fprintf(stderr, "%s must be built with CONFIG_DEBUG=y for -L flag\n",
|
||||||
|
argv[0]);
|
||||||
|
usage(app_usage);
|
||||||
|
rval = SPDK_APP_PARSE_ARGS_FAIL;
|
||||||
|
goto parse_done;
|
||||||
|
#else
|
||||||
|
rc = spdk_log_set_trace_flag(optarg);
|
||||||
|
if (rc < 0) {
|
||||||
|
fprintf(stderr, "unknown flag\n");
|
||||||
|
usage(app_usage);
|
||||||
|
rval = SPDK_APP_PARSE_ARGS_FAIL;
|
||||||
|
goto parse_done;
|
||||||
|
}
|
||||||
|
opts->print_level = SPDK_LOG_DEBUG;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case 'W':
|
case 'W':
|
||||||
if (opts->pci_blacklist) {
|
if (opts->pci_blacklist) {
|
||||||
free(opts->pci_blacklist);
|
free(opts->pci_blacklist);
|
||||||
|
Loading…
Reference in New Issue
Block a user