From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754552AbcHYOkm (ORCPT ); Thu, 25 Aug 2016 10:40:42 -0400 Received: from mail.kernel.org ([198.145.29.136]:49930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754136AbcHYOkk (ORCPT ); Thu, 25 Aug 2016 10:40:40 -0400 Date: Thu, 25 Aug 2016 11:40:33 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Jiri Olsa Subject: Re: [RFC PATCH 2/4] perf-probe: Add offline output directory option Message-ID: <20160825144033.GF10063@kernel.org> References: <147201825017.5713.10732844032749364745.stgit@devbox> <147201829193.5713.7794866764620845084.stgit@devbox> <20160824125845.GB10063@kernel.org> <20160825194816.471b954460d3a897ed9c0cae@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160825194816.471b954460d3a897ed9c0cae@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Aug 25, 2016 at 07:48:16PM +0900, Masami Hiramatsu escreveu: > On Wed, 24 Aug 2016 09:58:45 -0300 > Arnaldo Carvalho de Melo wrote: > > > > > Also please fix the OPT_STRING string, it should start with a capital > > letter: > > > > --max-probes Set how many probe points can be found for a probe. > > --no-inlines Don't search inlined functions > > --outdir > > path to offline output directory > > --range Show variables location range in scope (with --vars only) > > > > > > See how it stands out? All the others start with a capital letter. > > BTW, actually in most case, perf shows option explanations start without a captal letter, > > ./perf lock > > Usage: perf lock [] {record|report|script|info} > > -D, --dump-raw-trace dump raw trace in ASCII > -i, --input input file name > -v, --verbose be more verbose (show symbol address, etc) > > etc. Some commands (including probe) mixing it... Right, inconsistent, so I went to see how other utilities do this, and, say, something really old: [acme@jouet linux]$ cp --help | grep -- "[ ]\+-[a-z]" or: cp [OPTION]... -t DIRECTORY SOURCE... -a, --archive same as -dR --preserve=all -b like --backup but does not accept an argument -d same as --no-dereference --preserve=links -f, --force if an existing destination file cannot be is ignored when the -n option is also used) -i, --interactive prompt before overwrite (overrides a previous -n -l, --link hard link files instead of copying -n, --no-clobber do not overwrite an existing file (overrides a previous -i option) -p same as --preserve=mode,ownership,timestamps -c deprecated, same as --preserve=context -R, -r, --recursive copy directories recursively -s, --symbolic-link make symbolic links instead of copying -t, --target-directory=DIRECTORY copy all SOURCE arguments into DIRECTORY -u, --update copy only when the SOURCE file is newer -v, --verbose explain what is being done -x, --one-file-system stay on this file system [acme@jouet linux]$ And then something more recent, and one perf initially was modelled after: [acme@jouet linux]$ git commit -h |& grep -- "[ ]\+-[a-z]" | tail -15 -q, --quiet suppress summary after successful commit -v, --verbose show diff in commit message template -m, --message -c, --reedit-message -s, --signoff add Signed-off-by: -t, --template -e, --edit force edit of commit -a, --all commit all changed files -i, --include add specified files to index for commit -p, --patch interactively add changes -o, --only commit only specified files -n, --no-verify bypass pre-commit hook -z, --null terminate entries with NUL -u, --untracked-files[=] [acme@jouet linux]$ So, yeah, use lowercase and over time we can go on making it consistent... - Arnaldo