Tamina, On Wed, Jul 15, 2009 at 4:40 PM, Tanima Dey<dey_tr...@yahoo.com> wrote: > Hi, > > Perfmon supports both system-wide and per-thread monitoring session. I have > a conceptual question regarding the per-thread monitoring. > > Consider we have two threads, application thread and monitoring thread. The > appThread will do it work and the monitoring thread will read the counters. > As from the manual, the monitoring thread will be attached to the appThread > by a context. My queation is: > > For the per-thread session, are the counters' values read by monitoring > thread only caused by that particular appThread? Or the monitoring thread > will follow the appThread to whichever core appThread is migrated and read > the counters' value for that core? in details, if the appthread is migrated > from core 0 to core1, the monitoring thread will follow the appthread. The > values of the counters, say last level cache miss, read by the monitoring > thread will be only for that app thread or the core-wide, caused by all the > threads running on that core? In short, does the per-thread session mean it > will read system-side counters following the monitored thread? > In per-thread mode, the perfmon context (which encapsulates the PMU state) is saved and restored on context switch. Thus the counts migrate with the thread. In that sense the counts reflects the events experienced by the thread. That does not mean that all those events are caused by the thread. The thread may be sharing CPU resources with other threads on a multi-core CPU, e.g., the cache. Thus, the count may capture side effects of other thread's activities, e.g, cache thrashing.
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel