Vivek,

On Tue, Oct 02, 2007 at 01:59:12PM -0400, [EMAIL PROTECTED] wrote:
> 
> I have to start and stop monitoring multiple times in my program and  I am 
> using perfmonctl (the older interface) to do that. But I find that the 
> perfmonctl(PFM_START,....) gives me an error starting from the second call.
> 
> So, abstractly my sequence is :
> 
> start loop:
> ...
> perfmonctl(PFM_START,...)
> 
> 
> < Some code used to monitor the hw counters >
> 
> 
> perfmonctl(PFM_STOP,...)
> 
> goto start_loop:
> 
> It happens that if i don't have a lot of code in between, then everything is 
> fine, i get all the overflow interrupts that i want. However, normally my 
> iteration takes  around 12 seconds after which i find that the 
> perfmonctl(PFM_START,...) fails with invalid argument as the error. There is 
> only argument of relevance which is pfm_fd.  Can you suggest me what could be 
> the cause of this ?
> 
Are you using a kernel-level sampling buffer or are you handling this completly
at the user level?

I can see a problem if you issue PFM_START and you have a pending overflow.
I will go back to the code and check this. There maybe a bug there or a special
case to handle. This is an interesting issue.

Thanks.

-- 

-Stephane
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to