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] [day] [month] [year] [list]
Message-ID: <7bb97f3e-5a45-3ad0-df0f-6e72f8afa4da@linux.intel.com>
Date:   Tue, 5 Nov 2019 11:41:45 +0800
From:   "Jin, Yao" <yao.jin@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
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 v5 5/7] perf report: Sort by sampled cycles percent per
 block for stdio



On 11/4/2019 10:04 PM, Jiri Olsa wrote:
> On Wed, Oct 30, 2019 at 02:04:28PM +0800, Jin Yao wrote:
> 
> SNIP
> 
>> +static int hists__fprintf_all_blocks(struct block_hist *bh)
>> +{
>> +	symbol_conf.report_individual_block = true;
>> +	hists__fprintf(&bh->block_hists, true, 0, 0, 0,
>> +		       stdout, true);
>> +	hists__delete_entries(&bh->block_hists);
>> +	return 0;
>> +}
>> +
>>   static int perf_evlist__tty_browse_hists(struct evlist *evlist,
>>   					 struct report *rep,
>>   					 const char *help)
>>   {
>>   	struct evsel *pos;
>> +	int i = 0;
>>   
>>   	if (!quiet) {
>>   		fprintf(stdout, "#\n# Total Lost Samples: %" PRIu64 "\n#\n",
>> @@ -494,12 +509,20 @@ static int perf_evlist__tty_browse_hists(struct evlist *evlist,
>>   	evlist__for_each_entry(evlist, pos) {
>>   		struct hists *hists = evsel__hists(pos);
>>   		const char *evname = perf_evsel__name(pos);
>> +		struct block_hist *block_hist;
>>   
>>   		if (symbol_conf.event_group &&
>>   		    !perf_evsel__is_group_leader(pos))
>>   			continue;
>>   
>>   		hists__fprintf_nr_sample_events(hists, rep, evname, stdout);
>> +
>> +		if (rep->total_cycles_mode) {
>> +			block_hist = &rep->block_reports[i++].hist;
>> +			hists__fprintf_all_blocks(block_hist);
>> +			continue;
>> +		}
> 
> hum, you don't need evsel in here, please make separate function like
> perf_evlist__tty_browse_block_hists, where you will iterate directly
> block_reports[i++]
> 
> IMO the best would be to have report__browse_block_hists in block-info.c
> and handle all display modes from there
> 
> that's probably the last thing that would be moved to block-info.c
> other than that I think the patchset is ok
> 
> thanks,
> jirka
> 

Thanks Jiri!

I just posted v6 which moved more block display codes from 
builtin-report.c to block-info.c. That should let the code be more clear.

Thanks
Jin Yao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ