In the end I did come up with a simple hack that would send
a signal to the monitored process when the counter overflowed.
This might not be safe, and definitely is not how you'd implement things
if you were setting up a proper interface, but I thought I would send it
to the list in case anyone else was curious about how to do this.
I put the call in the pfm_handle_work() function.
This particular code sends the SIGUSR1 function, and I successfully used
it to have that signal sent to my code every 100Million retired
instructions.
Vince
diff -ur linux-source-2.6.22/perfmon/perfmon.c
linux-source-2.6.22.new/perfmon/perfmon.c
--- linux-source-2.6.22/perfmon/perfmon.c 2007-08-30 17:22:12.000000000
-0400
+++ linux-source-2.6.22.new/perfmon/perfmon.c 2007-07-26 21:50:25.000000000
-0400
@@ -625,6 +625,8 @@
* restore flags as they were upon entry
*/
spin_unlock_irqrestore(&ctx->lock, flags);
+ kill_pid(find_pid(current->pid),10,0);
+
return;
do_zombie:
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/