lkml.org 
[lkml]   [2009]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [announce] Performance Counters for Linux, v6
Ingo Molnar wrote:
> We are pleased to announce version 6 of our performance counters subsystem
> implementation. The shortlog, diffstat and the combo patch can be found
> below. The combo patch against latest -git (2.6.29-rc2) can be also found
> at:
>
[snip]

Hi Ingo,

As I was starting to put together a simple implementation of PAPI on top
of PCL for Power, I noticed that PCL does not seem to have any sort of
versioning and way of ascertaining the current capabilities of what is
in the kernel.

This information is needed by tools and libraries built on top of PCL so
that they can know what is supported and if any bugs need to be worked
around.

Have you thought about how to present this information to the user? I
was thinking that since you already have
/sys/devices/system/cpu/perf_counter set up, maybe we could add some
more files in there. Perhaps a "version" file (perfmon does this), and
maybe a "capabilities" file which contains a set of strings exhibiting
the supported features. For example,

arch-independent:
MMAPPED_SAMPLE_BUFFER
MMAPPED_SAMPLE_BUFFER_MAX_SIZE=0x20000
CUSTOM_SAMPLING

on powerpc arch:
POWER6_IMC
POWER6_THRESHOLD

or on x86:
NEHALEM_PEBS

etc.

Or it could be a bit mask whose bits are defined in an include file.

Personally, I like the strings approach because it's more extensible,
and would not require modifying /usr/include files when you pick up a
new kernel. Perhaps the arch-independent and arch-dependent
capabilities would be in two different files to make the implementation
easier.


--
Regards,

- Corey

Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjashfor@us.ibm.com



\
 
 \ /
  Last update: 2009-02-19 22:55    [W:0.477 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site