nvme/perf: enable the trace for nvme perf

The puprose is to print some trace info. We support
it in nvme identitfy. Also -L is occupied by other usage,
so we use -T instead.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I29f018c2a5951e5e3aad04dbeaa7ee74a2d7e3f4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469919
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Ziye Yang 2019-10-01 10:54:25 +08:00 committed by Jim Harris
parent 23975858e5
commit f76d16efe7

View File

@ -1126,6 +1126,8 @@ static void usage(char *program_name)
printf("\t[-m max completions per poll]\n");
printf("\t\t(default: 0 - unlimited)\n");
printf("\t[-i shared memory group ID]\n");
printf("\t");
spdk_log_usage(stdout, "-T");
printf("\t[-V enable VMD enumeration]\n");
#ifdef DEBUG
printf("\t[-G enable debug logging]\n");
@ -1534,6 +1536,7 @@ parse_args(int argc, char **argv)
int op;
bool mix_specified = false;
long int val;
int rc;
/* default value */
g_queue_depth = 0;
@ -1544,7 +1547,7 @@ parse_args(int argc, char **argv)
g_core_mask = NULL;
g_max_completions = 0;
while ((op = getopt(argc, argv, "c:e:i:lm:n:o:q:r:k:s:t:w:DGHILM:NU:V")) != -1) {
while ((op = getopt(argc, argv, "c:e:i:lm:n:o:q:r:k:s:t:w:DGHILM:NT:U:V")) != -1) {
switch (op) {
case 'i':
case 'm':
@ -1642,6 +1645,21 @@ parse_args(int argc, char **argv)
case 'N':
g_no_shn_notification = true;
break;
case 'T':
rc = spdk_log_set_flag(optarg);
if (rc < 0) {
fprintf(stderr, "unknown flag\n");
usage(argv[0]);
exit(EXIT_FAILURE);
}
spdk_log_set_print_level(SPDK_LOG_DEBUG);
#ifndef DEBUG
fprintf(stderr, "%s must be rebuilt with CONFIG_DEBUG=y for -T flag.\n",
argv[0]);
usage(argv[0]);
return 0;
#endif
break;
case 'V':
g_vmd = true;
break;