From: Andi Kleen <andi@firstfloor.org>
To: Karim Yaghmour <karim.yaghmour@opersys.com>
Cc: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
mingo@elte.hu
Subject: Re: Reading perf counters at ftrace trace boundaries
Date: Sun, 11 Aug 2013 18:23:10 -0700 [thread overview]
Message-ID: <87haevog75.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: <5208263D.2080205@opersys.com> (Karim Yaghmour's message of "Sun, 11 Aug 2013 21:03:09 -0300")
Karim Yaghmour <karim.yaghmour@opersys.com> writes:
> Wondering if there's a way for reading perf counters in the kernel. I'd
> like to read/record perf counters on ftrace function tracing
> entries/exits to provide a rundown of the value of various counters on
> function call boundaries.
KVM does it, see arch/x86/kvm/pmu.c. Essentially it would be doing RDPMC.
But the overhead will be likely very high, some sampling approach
is likely better.
-Andi
--
ak@linux.intel.com -- Speaking for myself only
next prev parent reply other threads:[~2013-08-12 1:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 0:03 Reading perf counters at ftrace trace boundaries Karim Yaghmour
2013-08-12 1:23 ` Andi Kleen [this message]
2013-08-12 1:39 ` Karim Yaghmour
2013-08-12 1:47 ` Andi Kleen
2013-08-12 1:59 ` Karim Yaghmour
2013-08-12 2:24 ` zhangwei(Jovi)
2013-08-12 15:26 ` Karim Yaghmour
2013-08-13 7:12 ` zhangwei(Jovi)
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=87haevog75.fsf@tassilo.jf.intel.com \
--to=andi@firstfloor.org \
--cc=karim.yaghmour@opersys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.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