Dan, You can do this with perf_events. There are examples in libpfm4: notify_self.c, task_smpl.c. One of the events is the sampling event. In each sample you collect the value of the other events in the group. You want all events to be in the same group. That means, the number of events is restricted by the actual number of counters.
On Mon, Jul 12, 2010 at 5:27 PM, Dan Upton <up...@virginia.edu> wrote: > Just wanted to follow up on this - is there any way to mix sampling and > counting modes in the performance counters? For instance, I might want to > collect the number of mispredicted branches every million instructions, and > actually get it every million instructions rather than collecting over some > larger period and then getting an average misses per million. > > I didn't see any obvious examples in the distribution, but maybe I missed > something? > > -dan > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > perfmon2-devel mailing list > perfmon2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perfmon2-devel > > ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel