On Fri, Nov 5, 2010 at 10:24 PM, heechul Yun <heec...@illinois.edu> wrote: > Hi, > I have a question on monitoring multiple threads. > Specifically, I have three worker threads all running on a single processor > (via taskset -c x) > The three worker threads are cooperatively scheduled (via yield). > Can I set up a signal when the executed instructions (all three threads > combined) reach at a certain number (say 1billion) ?
I assume that by signal you mean some notification coming from the monitoring subsystem. In your case, you have 3 threads pinned to a single CPU. If you want to get a notification after 1b instructions retired from all 3 threads, then you can use per-cpu mode of either perfmon or perf_events. You attach monitoring only to the CPU you are interested in and set the sampling period to 1b instructions_retired. Note that the thread that is running at the time the counter overflows won't be stopped. But you will get an idea of the time delta for executing 1b instr. which is what you are after, I suspect. ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel