lkml.org 
[lkml]   [2009]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [perf] howto switch from pfmon

* Brice Goglin <Brice.Goglin@inria.fr> wrote:

> Ingo Molnar wrote:
> > You can also do a profile with such events:
> >
> > perf record -f -e r1000ffe0 ./hackbench 10
> >
> > and look at it via 'perf report'.
> >
>
> I am not sure what the perf.data profile file contains but 'perf
> report' only shows percentages. Is there a way to get a 'perf
> stat'-like output from 'perf report'? Or maybe just have a -f
> option in 'perf stat' to send the output into a file (with the PID
> in the name).

It's not yet possible but it's a very good feature request.

> By the way, there's a typo in the description in
> tools/perf/Documentation/perf-report.txt, you want s/via perf
> report/via perf record/

thanks, fixed and pushed out. You can generally find the latest
'perf' stuff at:

http://people.redhat.com/mingo/tip.git/README

> > [ Note, there's no need to specify any --follow-* flags as that is
> > implicit in 'perf'. (and you'll probably also notice that perf
> > stat is a lot faster at following fast-forking or
> > context-switching workloads than is pfmon, because it's not ptrace
> > based.) ]
>
> What about threads? I didn't find any way to get per-thread
> counters.
>
> Ideally, I'd like to be able to see no perf-related output on
> stdout/stderr at runtime, and later have a look at per-thread
> counters like 'perf stat' does at runtime.

That's not possible yet either, but makes a lot of sense.

How many threads does your workload typically run, and how do you
get their stats displayed?

Per thread info is currently available in the profile output:

perf report --sort comm,pid,symbol

But it would be nice to either extend perf report with a --stat
option:

perf report --stat

or to extend perf stat to take an input file via -i:

perf stat -i perf.data

Ingo


\
 
 \ /
  Last update: 2009-06-23 16:55    [W:0.098 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site