lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Dec 2017 13:26:33 -0300
From:   Arnaldo Carvalho de Melo <>
To:     Jin Yao <>
Subject: Re: [PATCH] perf tool: Improve bash command line auto-complete for
 multiple events with comma

Em Thu, Dec 21, 2017 at 05:26:10PM +0800, Jin Yao escreveu:
> perf has to define command line auto-completion in
> bash/zsh.
> For record/stat -e it works for single events, but not working when
> specifying multiple events with comma.

I'm testing this, and found one issue, that can be fixed in a followup
patch, I think:

If I do:

	perf stat -e <TAB>

Then it will get all events and offer them as completions:

[ perf]$ perf stat -e 
Display all 1523 possibilities? (y or n)

Which is around what:

[ perf]$ perf list --raw-dump | wc -w
[ perf]$


Ok, so if I say yes all will be presented, and the pager will be used,
etc. then I can press 'q' as soon as I find the one I want and continue
from there (the pager doesn't allow searching with '/', would be nice).

then, the behaviour changes after I add a comma:

[ perf]$ perf stat -e cycles,<TAB>
0000-cover-letter.patch                                          Kbuild
0001-perf-tools-Use-shell-function-for-perl-cflags-retrie.patch  Kconfig
[ perf]$ perf stat -e cycles

I.e. after the comma it tries autocompletion with files in the local
directory, not with the list of all events.

Only if I have some character right after the comma is that it will look
for events and not files in the local directory:

[ perf]$ perf stat -e cycles,i<TAB>
icache.hit                                         idq_uops_not_delivered.cycles_le_3_uop_deliv.core
icache.ifdata_stall                                ild_stall.lcp
icache.misses                                      inst_retired.any
idq.all_dsb_cycles_4_uops                          inst_retired.any_p
idq.all_dsb_cycles_any_uops                        inst_retired.prec_dist
idq.all_mite_cycles_4_uops                         inst_retired.x87
idq.all_mite_cycles_any_uops                       instructions
idq.dsb_cycles                                     intel_bts//
idq.dsb_uops                                       intel_pt//
[ perf]$ perf stat -e cycles,i

Would be nice to have the same behaviour right after the comma as when
right after -e.

I'm doing a few more tests but I think this can be merged as-is and the
above be just a suggestion for improvement.


- Arnaldo

Powered by blists - more mailing lists