All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <robert.richter@amd.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org,
	oprofile-list@lists.sourceforge.net, Ingo Molnar <mingo@elte.hu>
Subject: Re: Please pull arch perfmon update
Date: Mon, 13 Oct 2008 20:35:56 +0200	[thread overview]
Message-ID: <20081013183556.GD23557@erda.amd.com> (raw)
In-Reply-To: <20080929235253.GA31074@one.firstfloor.org>

On 30.09.08 01:52:53, Andi Kleen wrote:
> Robert,
> 
> Here are the arch perfmon changes ported to your latest oprofile tree.
> I didn't include the forcepmu=... change yet, that will come later.
> Right now the force option is just removed. Please pull.
> 
> Thanks,
> -Andi
> 
> The following changes since commit 22d87103484983035cf46891428819573ec7508d:
>   Robert Richter (1):
>         Merge branch 'oprofile/powerpc-for-paul' into oprofile/master
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc-2.6.git arch-perfmon2
> 
> Andi Kleen (4):
>       oprofile: drop const in num counters field
>       oprofile: Don't report Nehalem as core_2
>       oprofile: Implement Intel architectural perfmon support
>       oprofile: discover counters for op ppro too

Thanks Andi,

I applied your patches to the x86-oprofile-for-tip branch of
git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git

I added a follow on patch (446223f) on branch arch-perfmon that
changes the initialization so that it uses the init function in
op_x86_model_spec (see below). Please give it a try, it is compile
tested only. If it works for you, I will add it to the tip branch too.

There is one question to patch "oprofile: discover counters for op
ppro too". arch_perfmon_setup_counters() is actually never called for
ppro, so there is no code that changes the numbers in
op_ppro_spec. The patch as it is has no effect (except then loading
additional module code).

Thanks,

-Robert

commit 446223f8d1454e647b54160584c5dec8f83fdddc
Author: Robert Richter <robert.richter@amd.com>
Date:   Sun Oct 12 15:12:34 2008 -0400

    x86/oprofile: moving arch perfmon counter setup to op_x86_model_spec.init
    
    Cc: Andi Kleen <ak@linux.intel.com>
    Signed-off-by: Robert Richter <robert.richter@amd.com>

diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index 12d6f85..fd902b8 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -435,7 +435,6 @@ static int __init arch_perfmon_init(char **cpu_type)
                return 0;
        *cpu_type = "i386/arch_perfmon";
        model = &op_arch_perfmon_spec;
-       arch_perfmon_setup_counters();
        return 1;
 }
 
diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c
index f5a2268..3266795 100644
--- a/arch/x86/oprofile/op_model_ppro.c
+++ b/arch/x86/oprofile/op_model_ppro.c
@@ -220,7 +220,7 @@ struct op_x86_model_spec op_ppro_spec = {
  * the specific CPU.
  */
 
-void arch_perfmon_setup_counters(void)
+static int arch_perfmon_setup_counters(struct oprofile_operations *ignore)
 {
        union cpuid10_eax eax;
 
@@ -240,9 +240,12 @@ void arch_perfmon_setup_counters(void)
        op_arch_perfmon_spec.num_controls = num_counters;
        op_ppro_spec.num_counters = num_counters;
        op_ppro_spec.num_controls = num_counters;
+
+       return 0;
 }
 
 struct op_x86_model_spec op_arch_perfmon_spec = {
+       .init = &arch_perfmon_setup_counters,
        /* num_counters/num_controls filled in at runtime */
        .fill_in_addresses = &ppro_fill_in_addresses,
        /* user space does the cpuid check for available events */
diff --git a/arch/x86/oprofile/op_x86_model.h b/arch/x86/oprofile/op_x86_model.h
index 596de7a..418c2d0 100644
--- a/arch/x86/oprofile/op_x86_model.h
+++ b/arch/x86/oprofile/op_x86_model.h
@@ -51,6 +51,4 @@ extern struct op_x86_model_spec const op_p4_ht2_spec;
 extern struct op_x86_model_spec const op_amd_spec;
 extern struct op_x86_model_spec op_arch_perfmon_spec;
 
-extern void arch_perfmon_setup_counters(void);
-
 #endif /* OP_X86_MODEL_H */


-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com


  reply	other threads:[~2008-10-13 18:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-29 23:52 Please pull arch perfmon update Andi Kleen
2008-10-13 18:35 ` Robert Richter [this message]
2008-10-13 20:29   ` Andi Kleen
2008-10-14 14:05     ` Robert Richter
2008-10-14 14:15       ` Andi Kleen
2008-10-14 14:35         ` Robert Richter
2008-10-14 16:01     ` Robert Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081013183556.GD23557@erda.amd.com \
    --to=robert.richter@amd.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oprofile-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.