Re: [PATCH] perf tests: let 'perf test list' display subtests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 13, 2018 at 09:42:23AM +0200, Hendrik Brueckner wrote:
> The output of perf test and perf test list differ because perf test list
> does not display subtests.  Correct this behavior and also let perf test
> list report subtests.
> 
> For example:
> 
> 	$ ./perf test 2>&1 |wc -l
> 	65
> 
> Without this commit:
> 	$ ./perf test list 2>&1 |wc -l
> 	57
> 
> With this commit:
> 	$ ./perf test list 2>&1 |wc -l
> 	65
> 
> Reviewed-by: Thomas Richter <tmricht@xxxxxxxxxxxxx>
> Signed-off-by: Hendrik Brueckner <brueckner@xxxxxxxxxxxxx>

Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

thanks,
jirka

> ---
>  tools/perf/tests/builtin-test.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
> index 625f5a6..989cc9c 100644
> --- a/tools/perf/tests/builtin-test.c
> +++ b/tools/perf/tests/builtin-test.c
> @@ -653,6 +653,15 @@ static int perf_test__list(int argc, const char **argv)
>  			continue;
>  
>  		pr_info("%2d: %s\n", i, t->desc);
> +
> +		if (t->subtest.get_nr) {
> +			int subn = t->subtest.get_nr();
> +			int subi;
> +
> +			for (subi = 0; subi < subn; subi++)
> +				pr_info("%2d:%1d: %s\n", i, subi + 1,
> +					t->subtest.get_desc(subi));
> +		}
>  	}
>  
>  	perf_test__list_shell(argc, argv, i);
> -- 
> 1.8.3.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux