Re: [perfmon2] pfmon doesn't execute the command properly with -e DISPATCHED_FPU on Phenom 9600 Bla
Status: Beta
Brought to you by:
seranian
From: stephane e. <er...@go...> - 2008-02-27 09:54:22
|
Benton, On Wed, Feb 27, 2008 at 10:41 AM, Benton Lam <ca...@gm...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > > > stephane eranian wrote: > | This is on an AMD, I assume. > | > | Could you send the output of the showreginfo example from libpfm? > | > | I tried this myself on 2.6.24 AMD BArcelona and it works. > | > > I didn't quite find what is directly referred as showreginfo example, > but was the loop that uses pfm_get_event_name() the one that you were > asking? > Go in the source tree of libpfm. Are look at the examples subdir. > I modified that example into a simple application: > > #include <perfmon/pfmlib.h> > #include <stdio.h> > > int main(){ > ~ unsigned int i, count; > ~ char name[256]; > ~ if(pfm_get_num_events(&count)!=PFMLIB_SUCCESS){ > ~ printf("Getting count failed\n"); > ~ return 1; > ~ } > ~ for(i=0;i < count; i++) > ~ { > ~ pfm_get_event_name(i, name, 256); > ~ printf("%s\n", name); > ~ } > } > > and compiled using gcc -lpfm -g -o test test.c > > It comes back with "getting count failed". > That's because you need to initialize the library first by calling pfm_initialize(). > > Benton Lam > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFHxTBD4myJbw0vtb4RAsxeAJ0VqF6ewOAFY2uolrgNrsFYhFWLgQCeJzZX > 32z9YjPwq4VYzaB+tODJeWs= > =PNai > -----END PGP SIGNATURE----- > |