On Mon, Aug 9, 2010 at 8:41 PM, Kristen Walcott <kr...@cs.virginia.edu> wrote:
> Hi,
> I'm trying to modify the sample period during test execution (after
> perf_event_open has been called) from code similar to pebs_smpl.  I would
> like to do it based on certain conditions as the samples are read in.  Is
> there a simple way to do this?
For that, you need the user level to get notified on each sample.
That is possible with perf_events. Take a look at notify_self.c for
an example on how to set this up. As for updating the sampling period
you can do this via ioctl(fd, PERF_EVENT_IOC_PERIOD, new_period)


> I saw in kernel/perf_event.c that there is a perf_adjust_period function,
> but I couldn't find anything similar at the user level.

Yes, but that's for something else. perf_events supports a rate and fixed
period sampling mode. I recommend using fixed period.

> Thanks for the help
> - Kristen
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to