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]
Message-ID: <20130116142549.GD1042@krava.brq.redhat.com>
Date:	Wed, 16 Jan 2013 15:25:49 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Ulrich Drepper <drepper@...il.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Andi Kleen <andi@...stfloor.org>,
	David Ahern <dsahern@...il.com>
Subject: Re: [RFC 0/4] perf tool: Adding ratios support

On Wed, Jan 16, 2013 at 09:00:07AM -0500, Ulrich Drepper wrote:
> On Tue, Jan 15, 2013 at 8:39 AM, Jiri Olsa <jolsa@...hat.com> wrote:
> >   $ perf stat -f formula.conf:cpi kill
> >   usage: kill [ -s signal | -p ] [ -a ] pid ...
> >          kill -l [ signal ]
> 
> I do like this proposal.  The only comment I have is that perhaps the
> command line syntax isn't ideal.  What you use above is tied to the
> ratios be defined in the config file.  I would imagine that at least
> over time (for some ratios probably right away) they become available
> by default and don't require a config file.  Also, users might want to
> put individualized ratio definitions in a config file which is read by
> default.
> 
> How about the formulas becoming available whenever the config file is
> read.  Maybe this means a few more keywords in the config file (ratio,
> ratio-set, ...).  E.g.:
> 
> ratio-set branch {
>           events = {instructions,branch-instructions,branch-misses}:u
> 
>           ratio branch-rate {
>                   formula = branch-instructions / instructions
>                   desc = branch rate
>           }
> 
>           ratio branch-miss-rate {
>                   formula = branch-misses / instructions
>                   desc = branch misprediction rate
>           }
> 
>           ratio branch-miss-ratio{
>                   formula = branch-misses / branch-instructions
>                   desc = branch misprediction ratio
>           }
>   }

I was thinking having config files (global and arch specific)
comming with perf having predefined formulas.

Plus adding the possibility to load extra config file via command
line option.

> 
> You get the idea.  Maybe substitute "ratio":with "formula". Then allow
> such a ratio/formula to be used just like a normal event, perhaps with
> a special suffix/prefix to designate it.  This should then also mark

I like the idea of having ratios handled within event definitions
maybe even in a similar way like aliases are handled today.. like:

1)  -e 'ratio/branch-rate/'  # special event class
2)  -e 'ratio-branch-rate'   # 'ratio-' prefix
3)  -e cpu/branch-rate/      # handled like aliases, ratio name would need to be unique 
  ... ?

ideas?

Having both 2) with 3) seems good to me

> the events as part of a group so that the underlying counters are
> scheduled in together.

the 'events' definitions could be put into group by default,
meanwhile I used 'events = { ... }'

thanks,
jirka
--
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