lists.openwall.net   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  linux-cve-announce  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:	Sun, 25 Oct 2015 09:59:06 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Jiri Olsa <jolsa@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 2/4] perf report: Rename to --show-cpu-utilization


* Namhyung Kim <namhyung@...nel.org> wrote:

> So that it can be more consistent with other --show-* options.  The old
> name (--showcpuutilization) is provided only for compatibility.

1)

Btw., maybe we could enhance the option parser to strip all (non-leading) dashes 
from long-form option names? That way both variants would work naturally, and if 
someone thinks it's called '--show-cpuutilization' that would work as well.

2)

Also, another enhancement would be to allow partial matches, so that --showcpu 
would match on the first long-form option name that matches.

Right now we do:

  triton:~/tip> perf report -h --showcpu

   Usage: perf report [<options>]


  triton:~/tip> 

Which arguably isn't very helpful! :-)

3)

The only drawback of doing partial matches would be if we introduce new variants - 
but we'd still 'break' safely: if for example --show-cpu-usage is introduced in a 
couple of years, then previous usage of:

   perf report --showcpu

would emit your ambiguous-options warning that you improved in this series. We'd 
output the two options that match and the user could adjust the parameter to 
whichever he meant.

It would still very smooth behavior from a UI ergonomy POV IMHO.

4)

Another possible tweak would be to print a non-fatal info line when a user didn't 
use the canonical form of the option. So writing:

   perf report --showcpu

would result in (stdout) output like this:

   # Option parser: '--showcpu' matched on '--show-cpu-utilization'

The disadvantage of this would be the extra nuisance factor, so I'm not sure we 
want this aspect.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists