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:   Mon, 4 Nov 2019 15:04:38 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Jin Yao <yao.jin@...ux.intel.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 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ