Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rtla: Fix -a overriding -t argument

When running rtla as

`rtla <timerlat|osnoise> <top|hist> -t custom_file.txt -a 100`

-a options override trace output filename specified by -t option.
Running the command above will create <timerlat|osnoise>_trace.txt file
instead of custom_file.txt. Fix this by making sure that -a option does
not override trace output filename even if it's passed after trace
output filename is specified.

Fixes: 173a3b014827 ("rtla/timerlat: Add the automatic trace option")
Signed-off-by: Ivan Pravdin <ipravdin.official@gmail.com>
Reviewed-by: Tomas Glozar <tglozar@redhat.com>
Link: https://lore.kernel.org/r/b6ae60424050b2c1c8709e18759adead6012b971.1762186418.git.ipravdin.official@gmail.com
[ use capital letter in subject, as required by tracing subsystem ]
Signed-off-by: Tomas Glozar <tglozar@redhat.com>

authored by

Ivan Pravdin and committed by
Tomas Glozar
ddb6e424 7b71f3a6

+8 -4
+2 -1
tools/tracing/rtla/src/osnoise_hist.c
··· 534 534 params->threshold = 1; 535 535 536 536 /* set trace */ 537 - trace_output = "osnoise_trace.txt"; 537 + if (!trace_output) 538 + trace_output = "osnoise_trace.txt"; 538 539 539 540 break; 540 541 case 'b':
+2 -1
tools/tracing/rtla/src/osnoise_top.c
··· 386 386 params->threshold = 1; 387 387 388 388 /* set trace */ 389 - trace_output = "osnoise_trace.txt"; 389 + if (!trace_output) 390 + trace_output = "osnoise_trace.txt"; 390 391 391 392 break; 392 393 case 'c':
+2 -1
tools/tracing/rtla/src/timerlat_hist.c
··· 853 853 params->print_stack = auto_thresh; 854 854 855 855 /* set trace */ 856 - trace_output = "timerlat_trace.txt"; 856 + if (!trace_output) 857 + trace_output = "timerlat_trace.txt"; 857 858 858 859 break; 859 860 case 'c':
+2 -1
tools/tracing/rtla/src/timerlat_top.c
··· 617 617 params->print_stack = auto_thresh; 618 618 619 619 /* set trace */ 620 - trace_output = "timerlat_trace.txt"; 620 + if (!trace_output) 621 + trace_output = "timerlat_trace.txt"; 621 622 622 623 break; 623 624 case '5':