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, 29 Oct 2012 04:02:00 -0700
From:	Andi Kleen <ak@...ux.intel.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	acme@...hat.com, peterz@...radead.org, jolsa@...hat.com,
	eranian@...gle.com, mingo@...nel.org
Subject: Re: [PATCH 16/33] perf, tools: Add support for weight v2

On Mon, Oct 29, 2012 at 07:44:17PM +0900, Namhyung Kim wrote:
> On Fri, 26 Oct 2012 13:29:58 -0700, Andi Kleen wrote:
> > From: Andi Kleen <ak@...ux.intel.com>
> >
> > perf record has a new option -W that enables weightened sampling.
> >
> > Add sorting support in top/report for the average weight per sample and the
> > total weight sum. This allows to both compare relative cost per event
> > and the total cost over the measurement period.
> 
> I expected the weight is used for scaling a sample period somehow - and
> wondered the *somehow* part - when reading previous patch descriptions
> but you just added sort keys.  Is it what you intended originally?

I originally simply multiplied, but then I changed over to separate sort 
keys which give the same result and are more flexible and easier to understand

You're right the manpage is stale, will fix.

> 
> 
> >
> > Add the necessary glue to perf report, record and the library.
> >
> > v2: Merge with new hist refactoring.
> > Rename global_weight to weight and weight to local_weight.
> 
> But I think (total_)weight and avg_weight looks more natural.

Frankly I think your names as as arbitary as mine, so I'll stay
with mine for now.

> >  			 * become out-of-date due to an exec() or
> > @@ -314,6 +322,7 @@ static struct hist_entry *add_hist_entry(struct hists *hists,
> >  
> >  	rb_link_node(&he->rb_node_in, parent, p);
> >  	rb_insert_color(&he->rb_node_in, hists->entries_in);
> > +	he->stat.weight += weight;
> 
> I'd suggest that the weight should be set to the 'entry' so that it can
> be added when hist_entry__new() called.

I did that originally, but ran into some problem, so I moved to this way

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ