Steve

The PFM_VERSION_FLAG in my config.mk file was set to PFMLIB_VERSION_24
so I changed it to PFMLIB_VERSION_22 then rebuilt and reran the self
test.  It does not seem to have made any difference.  I am
still getting the bad fd and it is still compiling the
#else (PFMLIB_VERSION_22 not defined) clause in the function
pfm_create_context in file pfmlib_os_linux.c.  I have
also tried just adding a "#define PFMLIB_VERSION_22 1"
to perfmon.h and this seems to correct the fd problem,
but it fails with a different message on the very next
call to perfmon.  At least it seems to have returned the
correct fd.

Stephane

I actually had problems with syscall numbers not matching
when I first loaded my rebuilt kernel.  Perhaps I did
not "fix" this issue correctly.  My version of the patches
that add the syscall numbers to the kernel look like this:

diff -urp linux-2.6.18.base/include/asm-x86_64/unistd.h linux-2.6.18
/include/asm-x86_64/unistd.h
--- linux-2.6.18.base/include/asm-x86_64/unistd.h   2006-09-21
23:45:38.000000000 -0700
+++ linux-2.6.18/include/asm-x86_64/unistd.h    2006-09-22
02:00:55.000000000 -0700
@@ -619,10 +619,34 @@ __SYSCALL(__NR_sync_file_range, sys_sync
 __SYSCALL(__NR_vmsplice, sys_vmsplice)
 #define __NR_move_pages        279
 __SYSCALL(__NR_move_pages, sys_move_pages)
-
+#define __NR_pfm_create_context    286
+ __SYSCALL(__NR_pfm_create_context, sys_pfm_create_context)


Is it important that __NR_pfm_create_context be one larger than
__NR_move_pages (which I think it was before I tried to fix this issue) ??

The value being used by libpfm was 286 so I changed to kernel patch to
match
what libpfm was using.  Now I seem to be getting to the right kernel
functions
when libpfm does the syscalls but if there is another side effect of the
syscall
numbers not being contiguous, I should probably change libpfm and put the
kernel
back to 280.  What would you suggest for this ??

When you say to add a case statement to the switch for my arch, are you
referring to the switch in the function adjust_sys_base ??

Thanks
Gary

[EMAIL PROTECTED] wrote on 08/15/2008 03:06:46
PM:

> Make sure that the make macro
>
> PFM_VERSION_FLAG is set to PFMLIB_VERSION_22
>
> when libpfm is made!!  This yields the correct data structures and
> pfm_create_context arguments for perfmon v2.2.
>
> On Fri, 15 Aug 2008, stephane eranian wrote:
>
> > Date: Fri, 15 Aug 2008 23:42:40 +0200
> > From: stephane eranian <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Cc: perfmon2-devel@lists.sourceforge.net
> > Subject: Re: [perfmon2] Using perfmon v2.2 with a 2.6.18 kernel on
x86_64
> >     architecture.
> >
> > Gary,
> >
> > On Fri, Aug 15, 2008 at 11:22 PM,  <[EMAIL PROTECTED]> wrote:
> >>
> >> I am trying to put the perfmon v2.2 patches into a redhat 2.6.18
kernel and
> >> not having a lot of success.
> >> I have been able to build and load the kernel but both pfmon and some
of
> >> the examples delivered
> >> with libpfm have problems running.
> >>
> >> I have tried with libpfm/pfmon versions of 3.4 and 3.5 but both seem
to get
> >> the same results.
> >>
> >> I found the following statement in the libpfm README file:
> >>
> >> To run the programs in the examples subdir, you MUST be using a linux
> >> kernel version of
> >>  2.6.24 or later with the corresponding perfmon new code base patch
> >> installed.
> >>
> >> Is this comment accurate and if so does it also apply to other tools
that
> >> use libpfm ???
> >>
> > The comment refers mostly to the syscall numbers. The libpfm has
knowledge
> > of syscall number for 2.6.24 and up. Older kernels will likely
> need adjustments
> > in pfmlib_os_linux.c. This may be your problem, so let's check that
first.
> >
> > You need to make sure that the pfm_create_context syscall number
matches
> > the one used in the kernel. On x86-64, it is in
> > include/asm-x86_64/unistd.h. If not
> > then add a case to the corresponding switch statement in
> pfmlib_os_linux.c for
> > your arch.
> >
> >
-------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move
Developer'schallenge
> > Build the coolest Linux based applications with Moblin SDK & win
> great prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > perfmon2-devel mailing list
> > perfmon2-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
> >
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
> Build the coolest Linux based applications with Moblin SDK & win great
prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to