From: Suravee S. <Sur...@am...> - 2009-08-06 20:13:06
|
========== Revision 1 ========== * Initial design review ============= Introduction ============= The goal of event multiplexing (MUX) is to overcome the issue of limited number of hardware counters on many architectures. The propose solution is to group events into multiple sets and periodically schedule each set of events onto the hardware counters during the profile session. In this revision, users can configure multiplexing rate and specify up to 32 events. ======================== Driver Interface Changes ======================== The "/dev/oprofile/" interface has been extended up to 32 events (may be lower on some architectures). Event scheduling mechanism is handled in the driver using workqueue. The MUX time interval can be configured through "/dev/oprofile/time_slice" in millisecond which then converted to jiffies before configuring the workqueue. (The MUX supported kernel can be found here. http://lkml.org/lkml/2009/7/28/312) =================== "opcontrol" Changes =================== Users can specify the events via existing "opcontrol --event" option as normal. In addition , the option --mux-interval=<ms> is added. ============= libop Changes ============= The algorithm for mapping events to counters has been modified to support up to 32 events. The maximum number of event MUX for each architecture is equal to the largest number divisible by the number of hardware counter. Example: - event0x1 can be mapped to counter 1. - event0x2 can be mapped to counter 1. - event0x3 can be mapped to counter 0. - This architecture has 3 counters. Therefore, only MUX limit is 30 (10 sets). - The mapping result will be: * event 0x1 is mapped to counter 1 * event 0x2 is mapped to counter 4 * event 0x3 is mapped to counter 0 Note: In this case, only 10 of events, which can be programed onto counter 0, can be configure at the same time. ======= Credits ======= This patch was first developed by Jason Yeh. ============== Known Problems ============== 1. "make distcheck" fails due to the fact that it expects error when try to map multiple events on to the same counters instead of doing multiplex mapping. |