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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <518dbf6a-4fe7-a662-984e-297c2f2ae63f@linux.intel.com>
Date:   Tue, 27 Mar 2018 14:12:39 +0800
From:   "Jin, Yao" <yao.jin@...ux.intel.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v1 3/3] perf: Support perf -vv



On 3/27/2018 2:03 PM, Ingo Molnar wrote:
> 
> * Jin Yao <yao.jin@...ux.intel.com> wrote:
> 
>> +++ b/tools/perf/perf.c
>> @@ -64,6 +64,7 @@ static struct cmd_struct commands[] = {
>>   	{ "top",	cmd_top,	0 },
>>   	{ "annotate",	cmd_annotate,	0 },
>>   	{ "version",	cmd_version,	0 },
>> +	{ "version2",	cmd_version2,	0 },
>>   	{ "script",	cmd_script,	0 },
>>   	{ "sched",	cmd_sched,	0 },
>>   #ifdef HAVE_LIBELF_SUPPORT
>> @@ -190,6 +191,11 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
>>   			break;
>>   		}
>>   
>> +		if (!strcmp(cmd, "-vv")) {
>> +			(*argv)[0] = "--version2";
>> +			break;
>> +		}
> 
> That is just lazy hackery, please use the regular option library to add options
> and document them!
> 
> Also, '--version2' is a sloppy name, the right solution is to do what Git does, it
> has a --build-options sub-option to 'perf version':
> 
>    triton:~/tip> git version -h
>    usage: git version [<options>]
> 
>        --build-options       also print build options
> 
> 
>    triton:~/tip> git version --build-options
>    git version 2.14.1
>    sizeof-long: 8
> 
> This should be done for perf as well, and _then_ maybe can we add a helper alias
> that maps '-vv' to 'version --build-options'.
> 
> Thanks,
> 
> 	Ingo
> 

Something like 'perf version --build-options' and that will be mapped to 
'-vv'.

It's a good idea, thanks!

Thanks
Jin Yao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ