Commit 931e6e51 authored by Ziye Yang's avatar Ziye Yang Committed by Jim Harris
Browse files

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: default avatarZiye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/415930


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 32d7c91c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);

#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 {
	SPDK_APP_PARSE_ARGS_HELP = 0,
+19 −19
Original line number Diff line number Diff line
@@ -641,7 +641,7 @@ usage(void (*app_usage)(void))
	printf(" -w         wait for RPCs to initialize subsystems\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");
	spdk_tracelog_usage(stdout, "-t");
	spdk_tracelog_usage(stdout, "-L");
	if (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;
			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':
			opts->no_pci = true;
			break;
@@ -788,6 +770,24 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts,
				goto parse_done;
			}
			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':
			if (opts->pci_blacklist) {
				free(opts->pci_blacklist);