From: Corey Ashford <cjashfor@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>
Subject: perf_counter: resetting a event counter
Date: Mon, 04 May 2009 15:15:11 -0700 [thread overview]
Message-ID: <49FF68EF.40300@linux.vnet.ibm.com> (raw)
Hi,
In implementing the PAPI_reset function, whose purpose is to reset all
of the counters in an event set, I found that [it appears] there is no
straight-forward way to implement this function using "Performance
Couunters for Linux". My current implementation just closes the
counters and reopens them again. This is not a elegant solution, nor is
the other alternative that occurred to me: maintain a "virtual" counter
in user space, maintained using a base count, which is subtracted off of
the current perf_counter value of a particular counter.
Is there a way that I missed to reset an event counter? If not, I'd
like to request that a new ioctl command be added to support this ability.
Thanks for your consideration,
- Corey
Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjashfor@us.ibm.com
next reply other threads:[~2009-05-04 22:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-04 22:15 Corey Ashford [this message]
2009-05-05 6:52 ` perf_counter: resetting a event counter Ingo Molnar
2009-05-05 7:34 ` Peter Zijlstra
2009-05-05 7:42 ` Ingo Molnar
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=49FF68EF.40300@linux.vnet.ibm.com \
--to=cjashfor@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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