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:   Wed, 23 Oct 2019 13:36:36 +0200
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 v3 3/5] perf report: Sort by sampled cycles percent per
 block for stdio

On Tue, Oct 22, 2019 at 04:07:08PM +0800, Jin Yao wrote:

SNIP

> +static void get_block_hists(struct hists *hists, struct block_hist *bh,
> +			    struct report *rep)
> +{
> +	struct rb_node *next = rb_first_cached(&hists->entries);
> +	struct hist_entry *he;
> +
> +	init_block_hist(bh, rep);
> +
> +	while (next) {
> +		he = rb_entry(next, struct hist_entry, rb_node);
> +		block_info__process_sym(he, bh, &rep->block_cycles,
> +					rep->cycles_count);
> +		next = rb_next(&he->rb_node);
> +	}
> +
> +	hists__output_resort(&bh->block_hists, NULL);
> +}
> +
> +static int hists__fprintf_all_blocks(struct hists *hists, struct report *rep)
> +{
> +	struct block_hist *bh = &rep->block_hist;
> +
> +	get_block_hists(hists, bh, rep);
> +	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)
> @@ -500,6 +820,12 @@ static int perf_evlist__tty_browse_hists(struct evlist *evlist,
>  			continue;
>  
>  		hists__fprintf_nr_sample_events(hists, rep, evname, stdout);
> +
> +		if (rep->total_cycles) {
> +			hists__fprintf_all_blocks(hists, rep);

it's still being computed in output function, the computation
should be outside.. like in report__output_resort or such

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ