On Wed, Nov 10, 2010 at 3:10 AM, stephane eranian <eran...@googlemail.com>wrote:
> 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.
If I understand correctly if there are other threads running on that CPU,
that will be counted as well -- which is not desirable for my purpose. Can I
enforce only the threads run on that particular core but nothing else?
> 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.
>
In fact, I would like to stop exactly at that point and do something else
before resume the execution.
Is it possible?
Thanks
Heechul
------------------------------------------------------------------------------
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