hi, I am writing my own app using the libpfm 3.10 API (interface v2.x) on a X86 system.
I setup a sampling context for the target-process to sample every 1 million insts retired. Traditionally, I should wait for the buffer overflow message and process with the sampling buffer and then restart. But I use another different mechanism (I will explain why, later) that I setup another timer to count for a while (1s) and then stop the target-process with PTRACE_ATTACH. I set the buffer big enough to ensure it would not overflow before the timer expires. After reading the sampling entries, I try to reset the buffer using pfm_restart(), but it failed with error EBUSY (hdr_count field in the buffer header didn't reset). So, how to reset sampling buffer before it overflows? I do this because actually I am monitoring multiple processes that run concurrently, I would like a inst-based sampling for each process. However, due to their IPC difference, their sampling buffers won't overflow simultaneously. That would involves CPU fragment if I wait for all the buffers to overflow in my single-threaded program. Thanks very much! ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel