Let me introduce the patch's scenario. 1. Suppose we need to capture thread1 (use cpc_bind_pctx to bind to thread1).
2. Kernel allocates a slot array which is big enough to store the required cpc events for thread1 on all cpus. Each slot will store the sampling values for the events on a cpu. 3. When thread1 is migrated to cpuN, kernel programs the hardware counter on cpuN and start counting. 4. When thread1 is switched off cpuN, kernel samples and stops the hardware counter on cpuN. Add the sampling values to the slot which stands for the required events on cpuN. 5. When user needs to get the thread1's sampling value, kernel copies out the content of slot array (slot N means the events on cpuN for thread1). To compatible with the current cpc version, the patch bring a new flag "CPC_FLAG_LWP_ON_CORES" to enable/disable above mentioned function. It should be a simple patch. Does anybody give me some suggestions? Thanks Jin Yao -- This message posted from opensolaris.org _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org