mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john smith <whalajam@yahoo.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <peterz@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: perf report for .ko files
Date: Fri, 29 Jan 2010 13:59:35 -0800 (PST)	[thread overview]
Message-ID: <202042.73614.qm@web55003.mail.re4.yahoo.com> (raw)
In-Reply-To: <20100129191558.GA9990@ghostprotocols.net>

> > I did setup attr->exclude_hv, exclude_idle,
> exclude_user = 1 in
> > create_counter() just before "try_again:" label, no
> difference in
> > results, on a 2.6.31 (too old? "perf buildid-list" is
> not available)
> > kernel version:
>  
> > # perf record -f -e cycles fio fio_script
> 
> > (for more than a minute, I increased the sample
> frequency with
> > different -c values, some locked the machine -
> expectedly)
> > and
> > # perf report --verbose
> --dso=/my_module_path/my_module.ko
> > (--verbose doesn't provide any more info)
> 
> This isn't going to work, you need to do:
> 
> perf report --verbose --dso='[my_module]'
> 
> I.e. as it appear on /proc/modules + brackets. Arguably we
> need to get
> it to work also with both 'my_module.ko' and the full
> path.

I've tried:
"perf report --verbose --dso='[my_module]'"
and also:
"perf report --verbose --dso='[sg]'"
same result as before.

New question:

Is this the minimal set of api that I can use from within the kernel (for specific module sections of interest) to read the counters? 

{
int perf_event_release_kernel(struct perf_event *event);
struct perf_event *perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu);
u64 perf_event_read_value(struct perf_event *event);
}

Any good example of useage of these api's (struct initialization)?

John
  



      

  reply	other threads:[~2010-01-29 21:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26  0:34 john smith
2010-01-26 19:21 ` Peter Zijlstra
2010-01-26 21:05   ` Arnaldo Carvalho de Melo
2010-01-29 18:55     ` john smith
2010-01-29 19:15       ` Arnaldo Carvalho de Melo
2010-01-29 21:59         ` john smith [this message]
2010-01-30  6:45         ` Mike Galbraith
2010-02-03 17:28           ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202042.73614.qm@web55003.mail.re4.yahoo.com \
    --to=whalajam@yahoo.com \
    --cc=acme@ghostprotocols.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®