Skip to content

Commit dd48f31

Browse files
Daniel Bristot de Oliveirarostedt
authored andcommitted
rtla/hist: Make -E the short version of --entries
Currently, --entries uses -e as the short version in the hist mode of timerlat and osnoise tools. But as -e is already used to enable events on trace sessions by other tools, thus let's keep it available for the same usage for all rtla tools. Make -E the short version of --entries for hist mode on all tools. Note: rtla was merged in this merge window, so rtla was not released yet. Link: https://lkml.kernel.org/r/5dbf0cbe7364d3a05e708926b41a097c59a02b1e.1645206561.git.bristot@kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent c5229a0 commit dd48f31

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

Documentation/tools/rtla/common_hist_options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Set the histogram bucket size (default *1*).
44

5-
**-e**, **--entries** *N*
5+
**-E**, **--entries** *N*
66

77
Set the number of entries of the histogram (default 256).
88

Documentation/tools/rtla/rtla-osnoise-hist.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ default). The reason for reducing the runtime is to avoid starving the
3636
**rtla** tool. The tool is also set to run for *one minute*. The output
3737
histogram is set to group outputs in buckets of *10us* and *25* entries::
3838

39-
[root@f34 ~/]# rtla osnoise hist -P F:1 -c 0-11 -r 900000 -d 1M -b 10 -e 25
39+
[root@f34 ~/]# rtla osnoise hist -P F:1 -c 0-11 -r 900000 -d 1M -b 10 -E 25
4040
# RTLA osnoise histogram
4141
# Time unit is microseconds (us)
4242
# Duration: 0 00:01:00

tools/tracing/rtla/src/osnoise_hist.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ static void osnoise_hist_usage(char *usage)
426426
static const char * const msg[] = {
427427
"",
428428
" usage: rtla osnoise hist [-h] [-D] [-d s] [-p us] [-r us] [-s us] [-S us] [-t[=file]] \\",
429-
" [-c cpu-list] [-P priority] [-b N] [-e N] [--no-header] [--no-summary] \\",
429+
" [-c cpu-list] [-P priority] [-b N] [-E N] [--no-header] [--no-summary] \\",
430430
" [--no-index] [--with-zeros]",
431431
"",
432432
" -h/--help: print this menu",
@@ -439,7 +439,7 @@ static void osnoise_hist_usage(char *usage)
439439
" -D/--debug: print debug info",
440440
" -t/--trace[=file]: save the stopped trace to [file|osnoise_trace.txt]",
441441
" -b/--bucket-size N: set the histogram bucket size (default 1)",
442-
" -e/--entries N: set the number of entries of the histogram (default 256)",
442+
" -E/--entries N: set the number of entries of the histogram (default 256)",
443443
" --no-header: do not print header",
444444
" --no-summary: do not print summary",
445445
" --no-index: do not print index",
@@ -486,7 +486,7 @@ static struct osnoise_hist_params
486486
while (1) {
487487
static struct option long_options[] = {
488488
{"bucket-size", required_argument, 0, 'b'},
489-
{"entries", required_argument, 0, 'e'},
489+
{"entries", required_argument, 0, 'E'},
490490
{"cpus", required_argument, 0, 'c'},
491491
{"debug", no_argument, 0, 'D'},
492492
{"duration", required_argument, 0, 'd'},
@@ -507,7 +507,7 @@ static struct osnoise_hist_params
507507
/* getopt_long stores the option index here. */
508508
int option_index = 0;
509509

510-
c = getopt_long(argc, argv, "c:b:d:e:Dhp:P:r:s:S:t::0123",
510+
c = getopt_long(argc, argv, "c:b:d:E:Dhp:P:r:s:S:t::0123",
511511
long_options, &option_index);
512512

513513
/* detect the end of the options. */
@@ -534,7 +534,7 @@ static struct osnoise_hist_params
534534
if (!params->duration)
535535
osnoise_hist_usage("Invalid -D duration\n");
536536
break;
537-
case 'e':
537+
case 'E':
538538
params->entries = get_llong_from_str(optarg);
539539
if ((params->entries < 10) || (params->entries > 9999999))
540540
osnoise_hist_usage("Entries must be > 10 and < 9999999\n");

tools/tracing/rtla/src/timerlat_hist.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ static void timerlat_hist_usage(char *usage)
429429
char *msg[] = {
430430
"",
431431
" usage: [rtla] timerlat hist [-h] [-q] [-d s] [-D] [-n] [-p us] [-i us] [-T us] [-s us] [-t[=file]] \\",
432-
" [-c cpu-list] [-P priority] [-e N] [-b N] [--no-irq] [--no-thread] [--no-header] [--no-summary] \\",
432+
" [-c cpu-list] [-P priority] [-E N] [-b N] [--no-irq] [--no-thread] [--no-header] [--no-summary] \\",
433433
" [--no-index] [--with-zeros]",
434434
"",
435435
" -h/--help: print this menu",
@@ -443,7 +443,7 @@ static void timerlat_hist_usage(char *usage)
443443
" -T/--trace[=file]: save the stopped trace to [file|timerlat_trace.txt]",
444444
" -n/--nano: display data in nanoseconds",
445445
" -b/--bucket-size N: set the histogram bucket size (default 1)",
446-
" -e/--entries N: set the number of entries of the histogram (default 256)",
446+
" -E/--entries N: set the number of entries of the histogram (default 256)",
447447
" --no-irq: ignore IRQ latencies",
448448
" --no-thread: ignore thread latencies",
449449
" --no-header: do not print header",
@@ -494,7 +494,7 @@ static struct timerlat_hist_params
494494
{"cpus", required_argument, 0, 'c'},
495495
{"bucket-size", required_argument, 0, 'b'},
496496
{"debug", no_argument, 0, 'D'},
497-
{"entries", required_argument, 0, 'e'},
497+
{"entries", required_argument, 0, 'E'},
498498
{"duration", required_argument, 0, 'd'},
499499
{"help", no_argument, 0, 'h'},
500500
{"irq", required_argument, 0, 'i'},
@@ -516,7 +516,7 @@ static struct timerlat_hist_params
516516
/* getopt_long stores the option index here. */
517517
int option_index = 0;
518518

519-
c = getopt_long(argc, argv, "c:b:d:e:Dhi:np:P:s:t::T:012345",
519+
c = getopt_long(argc, argv, "c:b:d:E:Dhi:np:P:s:t::T:012345",
520520
long_options, &option_index);
521521

522522
/* detect the end of the options. */
@@ -543,7 +543,7 @@ static struct timerlat_hist_params
543543
if (!params->duration)
544544
timerlat_hist_usage("Invalid -D duration\n");
545545
break;
546-
case 'e':
546+
case 'E':
547547
params->entries = get_llong_from_str(optarg);
548548
if ((params->entries < 10) || (params->entries > 9999999))
549549
timerlat_hist_usage("Entries must be > 10 and < 9999999\n");

0 commit comments

Comments
 (0)