stephane eranian | 3 Nov 2008 22:43

linux-next git tree

Hello everyone,

Based upon a request from Stephen Rothwell, the owner of the linux-next tree,
I have setup a new perfmon GIT tree called linux-next.git. It will be
used to push
patches into Stephen's tree which eventually ends up in the mainline kernel.

I have populated the tree with the latest mainline kernel which is v2.6.28-rc3.
I have also integrated the latest quilt patch series into this tree
(with updates
for 2.6.28-rc3).

I will tell Stephen to pull from this tree in the coming day or two.

If you have time, it would be nice if you could pull form that tree, compile
and test on your system. Note that this tree contains the minimal perfmon3
interface (per-thread counting only) and support for Intel architectural PMU
and AMD AMD64 processors only. To test with pfmon, you need branch
perfmon3 of libpfm and pfmon (enable CONFIG_PFMON_PFMV3=y).

Trying to get this piece in 2.6.29...

To get the tree:
    git clone git://git.kernel.org/pub/scm/linux/kernel/git/eranian/linux-next.git

Thanks.

-------------------------------------------------------------------------
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
(Continue reading)

Vince Weaver | 5 Nov 2008 19:07
Picon
Favicon

[patch] 2.6.27 perfmon x86_64 fix

Hello

I needed this patch (which is possibly incorrect) in order to compile 
2.6.27/perfmon2 on the x86_64 architecture (both on an AMD Phenom
machine and also on an Intel Core2 Duo).

Vince

--- ./include/asm-x86/perfmon_kern.h.orig	2008-11-04 15:58:35.000000000 -0500
+++ ./include/asm-x86/perfmon_kern.h	2008-11-04 16:00:03.000000000 -0500
 <at>  <at>  -28,6 +28,7  <at>  <at> 

  #ifdef CONFIG_PERFMON
  #include <linux/unistd.h>
+#include <asm/ia32_unistd.h>
  #ifdef CONFIG_4KSTACKS
  #define PFM_ARCH_PMD_STK_ARG	2
  #define PFM_ARCH_PMC_STK_ARG	2

-------------------------------------------------------------------------
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=/
stephane eranian | 5 Nov 2008 19:29

Re: [patch] 2.6.27 perfmon x86_64 fix

Vince,

Strange. This is a special file to handle 32-bit syscall numbers on a
64-bit kernel.
Which kernel version is this for?

On Wed, Nov 5, 2008 at 7:07 PM, Vince Weaver <vince <at> csl.cornell.edu> wrote:
> Hello
>
> I needed this patch (which is possibly incorrect) in order to compile
> 2.6.27/perfmon2 on the x86_64 architecture (both on an AMD Phenom
> machine and also on an Intel Core2 Duo).
>
> Vince
>
> --- ./include/asm-x86/perfmon_kern.h.orig       2008-11-04 15:58:35.000000000 -0500
> +++ ./include/asm-x86/perfmon_kern.h    2008-11-04 16:00:03.000000000 -0500
>  <at>  <at>  -28,6 +28,7  <at>  <at> 
>
>  #ifdef CONFIG_PERFMON
>  #include <linux/unistd.h>
> +#include <asm/ia32_unistd.h>
>  #ifdef CONFIG_4KSTACKS
>  #define PFM_ARCH_PMD_STK_ARG  2
>  #define PFM_ARCH_PMC_STK_ARG  2
>
> -------------------------------------------------------------------------
> 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
(Continue reading)

Vince Weaver | 5 Nov 2008 19:36
Picon
Favicon

Re: [patch] 2.6.27 perfmon x86_64 fix

On Wed, 5 Nov 2008, stephane eranian wrote:

> Vince,
>
> Strange. This is a special file to handle 32-bit syscall numbers on a
> 64-bit kernel.
> Which kernel version is this for?

This is for stock 2.6.27.4 with perfmon-new-base-081013 applied.

Without my patch, it gives the following error on x86_64 systems:

   CC      arch/x86/kernel/process_64.o
In file included from include/linux/perfmon_kern.h:375,
                  from arch/x86/kernel/process_64.c:39:
include/asm/perfmon_kern.h: In function ‘pfm_arch_get_base_syscall’:
include/asm/perfmon_kern.h:533: error: ‘__NR_ia32_pfm_create_context’ undeclared (first use
in this function)
include/asm/perfmon_kern.h:533: error: (Each undeclared identifier is reported only once
include/asm/perfmon_kern.h:533: error: for each function it appears in.)
make[1]: *** [arch/x86/kernel/process_64.o] Error 1
make: *** [arch/x86/kernel] Error 2

Vince
-------------------------------------------------------------------------
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=/
(Continue reading)

stephane eranian | 6 Nov 2008 00:17

Re: [patch] 2.6.27 perfmon x86_64 fix

Let me try on a fresh kernel. I always build in the GIT tree.

On Wed, Nov 5, 2008 at 7:36 PM, Vince Weaver <vince <at> csl.cornell.edu> wrote:
> On Wed, 5 Nov 2008, stephane eranian wrote:
>
>> Vince,
>>
>> Strange. This is a special file to handle 32-bit syscall numbers on a
>> 64-bit kernel.
>> Which kernel version is this for?
>
> This is for stock 2.6.27.4 with perfmon-new-base-081013 applied.
>
> Without my patch, it gives the following error on x86_64 systems:
>
>  CC      arch/x86/kernel/process_64.o
> In file included from include/linux/perfmon_kern.h:375,
>                 from arch/x86/kernel/process_64.c:39:
> include/asm/perfmon_kern.h: In function 'pfm_arch_get_base_syscall':
> include/asm/perfmon_kern.h:533: error: '__NR_ia32_pfm_create_context'
> undeclared (first use in this function)
> include/asm/perfmon_kern.h:533: error: (Each undeclared identifier is
> reported only once
> include/asm/perfmon_kern.h:533: error: for each function it appears in.)
> make[1]: *** [arch/x86/kernel/process_64.o] Error 1
> make: *** [arch/x86/kernel] Error 2
>
> Vince

-------------------------------------------------------------------------
(Continue reading)

stephane eranian | 6 Nov 2008 00:38

Re: [patch] 2.6.27 perfmon x86_64 fix

Vince,

On Wed, Nov 5, 2008 at 7:36 PM, Vince Weaver <vince <at> csl.cornell.edu> wrote:
> On Wed, 5 Nov 2008, stephane eranian wrote:
>
>> Vince,
>>
>> Strange. This is a special file to handle 32-bit syscall numbers on a
>> 64-bit kernel.
>> Which kernel version is this for?
>
> This is for stock 2.6.27.4 with perfmon-new-base-081013 applied.
>
> Without my patch, it gives the following error on x86_64 systems:
>

I tried with 2.6.27.4 and x86_64 and it worked. So I think this may
come from a difference in the .config which may be pulling in different
headers.

In any case, I think I need to include ia32_unistd.h in asm/perfmon_kern.h
to be on the safe side. I will do that for 2.6.28.

>  CC      arch/x86/kernel/process_64.o
> In file included from include/linux/perfmon_kern.h:375,
>                 from arch/x86/kernel/process_64.c:39:
> include/asm/perfmon_kern.h: In function 'pfm_arch_get_base_syscall':
> include/asm/perfmon_kern.h:533: error: '__NR_ia32_pfm_create_context'
> undeclared (first use in this function)
> include/asm/perfmon_kern.h:533: error: (Each undeclared identifier is
(Continue reading)

Andrej van der Zee | 6 Nov 2008 00:41
Picon

Re: kernel 2.6.27 support?

Hi,

I will release the 2.6.27 patch this week. The patch is always against
mainline 2.6.27.
I don't know how hard it would be to apply the patch against Ubuntu
2.6.27, hopefully
not too difficult.

Ubuntu 8.10 came out last week with kernel 2.6.7.2 and I could patch it with the latest perfmon-2.6.27.diff without any conflicts. I thought it might be worthy to know...

Best regards,
Andrej

-------------------------------------------------------------------------
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 <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
stephane eranian | 6 Nov 2008 00:45

Re: kernel 2.6.27 support?

Andrej,

Thanks for the update. I also tried with 2.6.27.4 given Vince's
question and it applies seamlessly as well.

On Thu, Nov 6, 2008 at 12:41 AM, Andrej van der Zee
<andrejvanderzee <at> gmail.com> wrote:
> Hi,
>
>> I will release the 2.6.27 patch this week. The patch is always against
>> mainline 2.6.27.
>> I don't know how hard it would be to apply the patch against Ubuntu
>> 2.6.27, hopefully
>> not too difficult.
>
> Ubuntu 8.10 came out last week with kernel 2.6.7.2 and I could patch it with
> the latest perfmon-2.6.27.diff without any conflicts. I thought it might be
> worthy to know...
>
> Best regards,
> Andrej
>
>

-------------------------------------------------------------------------
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=/
stephane eranian | 6 Nov 2008 19:06

perfmon merge news

Hello everyone,

I wanted to update you on the status of the merge with upstream kernel.

As of yesterday, the perfmon3 minimal patchset as posted on LKML and
as available in the perfmon linux-next GIT has been included by Stephen
Rothwell into the official linux-next GIT tree.

What does that mean?

It means that, if all goes well, the first building block for perfmon3 will be
merged upstream with 2.6.29, so about 3 months from now.

Just to remind people of what this patchset include:
    - perfmon3 syscall API (5 syscalls)
    - only support for counting
    - only support for per-thread monitoring
    - only support for AMD64 and Intel architectural PMUs (32 and 64-bit)
    - no event set, no multiplexing
    - no PMU description modules (all builtin)

Once this is in, it will be much easier to submit incremental changes.
I think we should add new architecture support first, then add system-wide,
sampling, multiplexing.

As of now, if you are contributing code against this linux-next/perfmon3, then
it needs to be posted on LKML as well as the perfmon2 mailing list.

I will keep updating the perfmon2 tree. The perfmon3 branch will be used for
all  new developments from now on.

As for user level tools, pfmon 3.6 is already v3.0 ready if you enable support.
Libpfm also has support in the v3 branch. I am planning on merging the v3.0
changes into the HEAD branch, that will minimize maintenance overhead.

We are getting there...

-------------------------------------------------------------------------
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=/
Corey J Ashford | 6 Nov 2008 19:51
Picon
Favicon

Re: perfmon merge news

This is excellent news and progress, Stephane!

It wasn't clear to me from your more recent postings to LKML whether or 
not you were planning to do those architecture posts yourself, or to rely 
on the other contributors to do that. 

Obviously, we have the advantage of being able to test arch (Power in our 
case) patches first.  Do you think I should create patches relative to 
linux-next to get Power arch support in before perfmon makes it upstream 
to 2.6.29?

Regards,

- Corey

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

"stephane eranian" <eranian <at> googlemail.com> wrote on 11/06/2008 10:06:36 
AM:

> Hello everyone,
> 
> I wanted to update you on the status of the merge with upstream kernel.
> 
> As of yesterday, the perfmon3 minimal patchset as posted on LKML and
> as available in the perfmon linux-next GIT has been included by Stephen
> Rothwell into the official linux-next GIT tree.
> 
> What does that mean?
> 
> It means that, if all goes well, the first building block for perfmon3 
will be
> merged upstream with 2.6.29, so about 3 months from now.
> 
> Just to remind people of what this patchset include:
>     - perfmon3 syscall API (5 syscalls)
>     - only support for counting
>     - only support for per-thread monitoring
>     - only support for AMD64 and Intel architectural PMUs (32 and 
64-bit)
>     - no event set, no multiplexing
>     - no PMU description modules (all builtin)
> 
> Once this is in, it will be much easier to submit incremental changes.
> I think we should add new architecture support first, then add 
system-wide,
> sampling, multiplexing.
> 
> As of now, if you are contributing code against this 
linux-next/perfmon3, then
> it needs to be posted on LKML as well as the perfmon2 mailing list.
> 
> I will keep updating the perfmon2 tree. The perfmon3 branch will be used 
for
> all  new developments from now on.
> 
> As for user level tools, pfmon 3.6 is already v3.0 ready if you 
> enable support.
> Libpfm also has support in the v3 branch. I am planning on merging the 
v3.0
> changes into the HEAD branch, that will minimize maintenance overhead.
> 
> 
> We are getting there...
> 
> 
-------------------------------------------------------------------------
> 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 <at> 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=/

Gmane