2003-03-10 23:52:22

by Mikael Pettersson

[permalink] [raw]
Subject: perfctr-2.5.0 released

Version 2.5.0 of perfctr, the Linux/x86 performance
monitoring counters driver, is now available at the usual
place: http://www.csd.uu.se/~mikpe/linux/perfctr/

Quick guide to porting source code from perfctr-2.4 to perfctr-2.5:
1. 'evntsel_aux[]' in the x86 struct perfctr_cpu_control is
now 'p4.escr[]' (moved to sub-struct and renamed).
2. 'nrcpus' is gone from the perfctr info struct. It can be
computed from the 'cpus' bitmask.
3. 'version[]' in perfctr info is now 'driver_version[]'.
4. The VPERFCTR_STOP ioctl is gone. Use VPERFCTR_CONTROL instead.
The library's vperfctr_stop() procedure still works.
5. The API to global-mode performance counters has changed.
The target CPU number is now included in the per-cpu
control and state arrays. See examples/global/global.c.

Other noteworthy changes from perfctr-2.4:
1. The patch kit supports aliases, which allows kernels to share
patch files. The 'update-kernel' script handles this.
2. 'make install' will now install the library, include files,
and the 'perfex' example program at user-specified locations.
3. The library will now check that the ABI the library was
compiled for is compatible with the kernel driver.
4. A preliminary library API for remote access to other processes'
virtual performance counters has been added.
5. The library now contains proper data structures with event set
and unit mask descriptions. This handles all supported CPUs
except for P4 (mostly done, but some tricky details remain).
6. A perfctr-patched kernel can now be compiled on non-x86 archs
without causing compilation errors.
7. Global-mode (non pre-process) counters now work in 2.5 kernels,
and on hyper-threaded P4s. Several API changes were needed for this.

Version 2.5.0, 2003-03-10
- Added a simple user-space library API for accessing other
processes' virtual performance counters. This uses a new
type and a new set of operations since remote access has
different requirements than accessing one's own counters.
Following Mike Marty's suggestion, I left out the process
control calls needed around these operations (ptrace() and
wait()), so applications must handle that themselves.
- Added 'make install' support for the user-space components.
- Driver API cleanups. The 'eventsel_aux[]' array in 'struct
perfctr_cpu_control' has been renamed as 'escr[]' and has been
moved into the 'p4' sub-structure. (The change highlights the
fact that this field was and is P4-only.) The 'version[]' string
in 'struct perfctr_info' has been renamed to 'driver_version[]',
since perfctr_info now also contains an 'abi_version' field.
Some changes in the driver ABI: while not strictly necessary,
they clean things up and make room for future changes. The ABI
changed anyway from perfctr-2.4, so this shouldn't be a problem.
- Added a perfctr_cpu_control_print() procedure to the library,
and updated the example programs to use it.
- Updated the perfex example program's help text to describe the
syntax and meaning of event specifiers.
- Patch kit updates for 2.2.24/2.4.18-26(RedHat)/2.5.64 kernels.

/ Mikael Pettersson


2003-03-14 01:14:18

by J.A. Magallon

[permalink] [raw]
Subject: Re: perfctr-2.5.0 released


On 03.11, Mikael Pettersson wrote:
> Version 2.5.0 of perfctr, the Linux/x86 performance
> monitoring counters driver, is now available at the usual
> place: http://www.csd.uu.se/~mikpe/linux/perfctr/
>

Perhaps this has been asked for a million times, but I'm new to
perfctrs...
Is there any tool available to profile a program based on this ?
I have seen perfex, but that gives total counts. I would like something
like gprof... We are now optimizing some software and I would like to
make my colleagues leave Windows (they use Intel's VTune) and go to
Linux.
Or at least compare the same kind of things between VTune on win and
'something' in Linux that also uses the counters. They don't seem to
trust gprof. And, looking at the results, I'm beginning to untrust
VTune...

TIA

--
J.A. Magallon <[email protected]> \ Software is
like sex:
werewolf.able.es \ It's better when
it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.21-pre5-jam0 (gcc 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk))

2003-03-14 04:26:09

by Randy.Dunlap

[permalink] [raw]
Subject: Re: perfctr-2.5.0 released

>
> On 03.11, Mikael Pettersson wrote:
>> Version 2.5.0 of perfctr, the Linux/x86 performance
>> monitoring counters driver, is now available at the usual
>> place: http://www.csd.uu.se/~mikpe/linux/perfctr/
>>
>
> Perhaps this has been asked for a million times, but I'm new to
> perfctrs...
> Is there any tool available to profile a program based on this ?
> I have seen perfex, but that gives total counts. I would like something like
> gprof... We are now optimizing some software and I would like to make my
> colleagues leave Windows (they use Intel's VTune) and go to Linux.
> Or at least compare the same kind of things between VTune on win and
> 'something' in Linux that also uses the counters. They don't seem to trust
> gprof. And, looking at the results, I'm beginning to untrust VTune...

I hope that Mikael knows of some native Linux tools for this.
However, Intel did announce Vtune for Linux recently (might still be
in beta test), and there was a SuSE patch for it posted at
kernelnewbies.org also. See:

http://www.linuxhardware.org/comments.pl?sid=364&cid=530
http://www.linuxhardware.org/articles/03/01/17/1633229.shtml
http://kernelnewbies.org/kernels/SuSE81/SOURCES/patches.i386/50_vtune-ia32
(warning: this is for 2.4.19)

or google for "+vtune +linux".

~Randy



2003-03-16 16:38:15

by Hiro Yoshioka

[permalink] [raw]
Subject: Re: [Perfctr-devel] Re: perfctr-2.5.0 released

Hi,

We have made a memory profiling tool based on the perfctr 2.5.0.
http://downloads.sourceforge.jp/hardmeter/2646/hardmeter-030314.tar.gz

The tool (hardmeter) is
1) patch to perfctr 2.5.0
2) ebs (PEBS (Precise Event Based Sampling) memory profiling tool)
3) API

Thanks,
Hiro

> >
> > On 03.11, Mikael Pettersson wrote:
> >> Version 2.5.0 of perfctr, the Linux/x86 performance
> >> monitoring counters driver, is now available at the usual
> >> place: http://www.csd.uu.se/~mikpe/linux/perfctr/
> >>
> >
> > Perhaps this has been asked for a million times, but I'm new to
> > perfctrs...
> > Is there any tool available to profile a program based on this ?
> > I have seen perfex, but that gives total counts. I would like something like
> > gprof... We are now optimizing some software and I would like to make my
> > colleagues leave Windows (they use Intel's VTune) and go to Linux.
> > Or at least compare the same kind of things between VTune on win and
> > 'something' in Linux that also uses the counters. They don't seem to trust
> > gprof. And, looking at the results, I'm beginning to untrust VTune...
>
> I hope that Mikael knows of some native Linux tools for this.
> However, Intel did announce Vtune for Linux recently (might still be
> in beta test), and there was a SuSE patch for it posted at
> kernelnewbies.org also. See:
>
> http://www.linuxhardware.org/comments.pl?sid=364&cid=530
> http://www.linuxhardware.org/articles/03/01/17/1633229.shtml
> http://kernelnewbies.org/kernels/SuSE81/SOURCES/patches.i386/50_vtune-ia32
> (warning: this is for 2.4.19)
>
> or google for "+vtune +linux".
>
> ~Randy