Hello everyone, Following the series started with Markus Metzger ds.c interface, I would like to report that I have now successfully connected perfmon to Roland McGrath's utrace interface using 2.6.25 + utrace patch.
Utrace is an internal kernel subsystem which makes it easy to control user threads and trace events such as fork, exec, signals. In particular it provides an interface to stop and resume user threads (quiesce). This is a key property for perfmon as certain syscalls need to operate on the PMU state, e.g. pfm_write_pmcs(). A thread can either be the current thread in which case the operation is trivial. But it can be another thread, in which case, the thread must be stopped before its machine can be modified. In the current code base, perfmon does not internally stop a thread when it detects non self-monitoring. Some syscalls fail unless the application has stopped the thread using the ptrace() interface. Utrace allows perfmon to internally stop the thread if necessary, which is not a trivial operation. Utrace is not a user interface. The ptrace() interface can be built on top of utrace. That means that a utrace kernel can support existing perfmon applications which are using ptrace(). But new per-thread tools can now call perfmon directly without using ptrace() to stop/resume threads. That can greatly simplify writing per-thread tools. I have not yet measured the performance impact of that when the context is attached. Overall, I found the utrace interface very easy to use. It provides a nice improvement to perfmon. I will add the support as an option for the 2.6.26 kernel patch. Thanks. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ perfmon2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
