Message ID | 20240813114931.360823-1-ezulian@redhat.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | rtla: Sync the help text between hist tools | expand |
út 13. 8. 2024 v 13:49 odesílatel Eder Zulian <ezulian@redhat.com> napsal: > > In addition, fix a typo in the error message generated when the > specified duration is invalid. > > Signed-off-by: Eder Zulian <ezulian@redhat.com> > --- > tools/tracing/rtla/src/osnoise_hist.c | 4 ++-- > tools/tracing/rtla/src/timerlat_hist.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > FYI some of the issues you fixed for hist are also in timerlat_top.c: " -d/--duration time[m|h|d]: duration of the session in seconds", ... case 'd': params->duration = parse_seconds_duration(optarg); if (!params->duration) timerlat_top_usage("Invalid -D duration\n"); break; and the "Invalid -D duration" (instead of "-d") one is also in osnoise_top.c. Those would probably go to a separate patch, though. Reviewed-by: Tomas Glozar <tglozar@redhat.com> Tomas
On Tue, Aug 13, 2024 at 2:36 PM Tomas Glozar <tglozar@redhat.com> wrote: > > út 13. 8. 2024 v 13:49 odesílatel Eder Zulian <ezulian@redhat.com> napsal: > > > > In addition, fix a typo in the error message generated when the > > specified duration is invalid. > > > > Signed-off-by: Eder Zulian <ezulian@redhat.com> > > --- > > tools/tracing/rtla/src/osnoise_hist.c | 4 ++-- > > tools/tracing/rtla/src/timerlat_hist.c | 4 ++-- > > 2 files changed, 4 insertions(+), 4 deletions(-) > > > > FYI some of the issues you fixed for hist are also in timerlat_top.c: > > " -d/--duration time[m|h|d]: duration of the session in seconds", > ... > case 'd': > params->duration = parse_seconds_duration(optarg); > if (!params->duration) > timerlat_top_usage("Invalid -D duration\n"); > break; > > and the "Invalid -D duration" (instead of "-d") one is also in > osnoise_top.c. Those would probably go to a separate patch, though. I followed your suggestion and submitted it as https://lore.kernel.org/linux-trace-kernel/20240813155831.384446-1-ezulian@redhat.com/T/#u > > Reviewed-by: Tomas Glozar <tglozar@redhat.com> > > > Tomas > Thank you, Tomas.
diff --git a/tools/tracing/rtla/src/osnoise_hist.c b/tools/tracing/rtla/src/osnoise_hist.c index 214e2c93fde0..9017be674810 100644 --- a/tools/tracing/rtla/src/osnoise_hist.c +++ b/tools/tracing/rtla/src/osnoise_hist.c @@ -454,7 +454,7 @@ static void osnoise_hist_usage(char *usage) " usage: rtla osnoise hist [-h] [-D] [-d s] [-a us] [-p us] [-r us] [-s us] [-S us] \\", " [-T us] [-t[file]] [-e sys[:event]] [--filter <filter>] [--trigger <trigger>] \\", " [-c cpu-list] [-H cpu-list] [-P priority] [-b N] [-E N] [--no-header] [--no-summary] \\", - " [--no-index] [--with-zeros] [-C[=cgroup_name]] [--warm-up]", + " [--no-index] [--with-zeros] [-C[=cgroup_name]] [--warm-up s]", "", " -h/--help: print this menu", " -a/--auto: set automatic trace mode, stopping the session if argument in us sample is hit", @@ -603,7 +603,7 @@ static struct osnoise_hist_params case 'd': params->duration = parse_seconds_duration(optarg); if (!params->duration) - osnoise_hist_usage("Invalid -D duration\n"); + osnoise_hist_usage("Invalid -d duration\n"); break; case 'e': tevent = trace_event_alloc(optarg); diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/tracing/rtla/src/timerlat_hist.c index a3907c390d67..2d657ea281a4 100644 --- a/tools/tracing/rtla/src/timerlat_hist.c +++ b/tools/tracing/rtla/src/timerlat_hist.c @@ -666,7 +666,7 @@ static void timerlat_hist_usage(char *usage) " -c/--cpus cpus: run the tracer only on the given cpus", " -H/--house-keeping cpus: run rtla control threads only on the given cpus", " -C/--cgroup[=cgroup_name]: set cgroup, if no cgroup_name is passed, the rtla's cgroup will be inherited", - " -d/--duration time[m|h|d]: duration of the session in seconds", + " -d/--duration time[s|m|h|d]: duration of the session", " --dump-tasks: prints the task running on all CPUs if stop conditions are met (depends on !--no-aa)", " -D/--debug: print debug info", " -t/--trace[file]: save the stopped trace to [file|timerlat_trace.txt]", @@ -827,7 +827,7 @@ static struct timerlat_hist_params case 'd': params->duration = parse_seconds_duration(optarg); if (!params->duration) - timerlat_hist_usage("Invalid -D duration\n"); + timerlat_hist_usage("Invalid -d duration\n"); break; case 'e': tevent = trace_event_alloc(optarg);
In addition, fix a typo in the error message generated when the specified duration is invalid. Signed-off-by: Eder Zulian <ezulian@redhat.com> --- tools/tracing/rtla/src/osnoise_hist.c | 4 ++-- tools/tracing/rtla/src/timerlat_hist.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)