Hi,

I wanted to update people on the progress of libpfm4.

This is a major redesign over libpfm3.

It is NOT backward compatible with libpfm3.

Based on the current situation between perfmon and
perf_counters, I have decided that libpfm4 will be a
perf_counter ONLY release (for the time-being).
Perfmon users will keep going with libpfm3 (for now).

This new version has a much tighter API. I have simplified
it to the maximum yet I have added a lot more flexibility.
Users can now express events, unit masks, and optional
filter options using strings. For instance, on Intel Core:

$ showevtinfo RS_UOPS_DISPATCHED
Name     : RS_UOPS_DISPATCHED
Desc      : Number of micro-ops dispatched for execution
Code      : 0xa0
Attr-00    : 0x00 : [u] : monitor at priv level 1, 2, 3 (boolean)
Attr-01    : 0x01 : [k] : monitor at priv level 0 (boolean)
Attr-02    : 0x02 : [i] : invert (boolean)
Attr-03    : 0x03 : [e] : edge level (boolean
Attr-04    : 0x04 : [c] : counter-mask ([0-255])


 $ self  RS_UOPS_DISPATCHED:u:k:c=2:i
[0x2d300a0 event_sel=0xa0 umask=0x0 os=1 usr=1 en=1 int=1 inv=1 edge=0
cnt_mask=2] RS_UOPS_DISPATCHED
PERF[type=4 val=0x2d300a0 e_u=0 e_k=0 e_hv=1] RS_UOPS_DISPATCHED:u:k:c=2:i

This measures the number of cycles in which less than 2 uops
are dispatched per cycle at user or kernel level. Compare to libpfm3,
the "self" program does not need to know anything about the
invert, counter-mask filters, they can be used transparently.

Given that the library is targeted for perf_counters, it will
initialize the perf_counter_attr properly based on the event
string. The call is very simple:

int pfm_get_perf_counter_attr(const char *e, struct perf_counter_attr *attr);

The library will also support ALL perf_counters generic,
software, hardware, cache, tracepoint, events.

The Intel X86 code has been completely refactored. All existing
AMD and Intel X86 processors are supported. Validity of the counts
for some events is not guaranteed given the simplistic implementation
of event -> counter assignment in the kernel.

Support for other architectures will be added later on also
based on availability of kernel support.

Thanks.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to