public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ia64 support for tools/perf/
@ 2009-11-17 17:05 Luck, Tony
  2009-11-17 17:18 ` [tip:perf/core] perf tools: Add " tip-bot for Luck, Tony
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Luck, Tony @ 2009-11-17 17:05 UTC (permalink / raw)
  To: Peter Zijlstra, Paul Mackerras, Ingo Molnar; +Cc: linux-kernel

Compiler on ia64 rejects the "-m64" option.
Add arch specific pieces to perf.h

Signed-off-by: Tony Luck <tony.luck@intel.com>

---

I expect there is a more elegant solution to the Makefile issue. Feel
free to throw away that part of this patch and replace it with something
prettier :-)

 tools/perf/Makefile |    8 +++++---
 tools/perf/perf.h   |    6 ++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 7e190d5..078bcef 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -164,10 +164,12 @@ ifdef NO_64BIT
   MBITS := -m32
 else
   #
-  # If we're on a 64-bit kernel, use -m64:
+  # If we're on a 64-bit kernel (except ia64), use -m64:
   #
-  ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
-    MBITS := -m64
+  ifneq ($(uname_M),ia64)
+    ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
+      MBITS := -m64
+    endif
   endif
 endif
 
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 8cc4623..26be918 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -47,6 +47,12 @@
 #define cpu_relax()	asm volatile("":::"memory")
 #endif
 
+#ifdef __ia64__
+#include "../../arch/ia64/include/asm/unistd.h"
+#define rmb()		asm volatile ("mf" ::: "memory")
+#define cpu_relax()	asm volatile ("hint @pause" ::: "memory")
+#endif
+
 #include <time.h>
 #include <unistd.h>
 #include <sys/types.h>

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [tip:perf/core] perf tools: Add ia64 support for tools/perf/
  2009-11-17 17:05 [PATCH] ia64 support for tools/perf/ Luck, Tony
@ 2009-11-17 17:18 ` tip-bot for Luck, Tony
  2009-11-17 17:21 ` [PATCH] " Ingo Molnar
  2009-11-19  5:30 ` [tip:perf/core] perf tools: Add " tip-bot for Luck, Tony
  2 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Luck, Tony @ 2009-11-17 17:18 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, paulus, hpa, mingo, a.p.zijlstra, tony.luck, tglx,
	mingo

Commit-ID:  5960a8b22f5015d6e36b2a095c47bc27e8e685c8
Gitweb:     http://git.kernel.org/tip/5960a8b22f5015d6e36b2a095c47bc27e8e685c8
Author:     Luck, Tony <tony.luck@intel.com>
AuthorDate: Tue, 17 Nov 2009 09:05:56 -0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 17 Nov 2009 18:14:24 +0100

perf tools: Add ia64 support for tools/perf/

Compiler on ia64 rejects the "-m64" option.
Add arch specific pieces to perf.h

Signed-off-by: Tony Luck <tony.luck@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <4b02d7f43514327a@agluck-desktop.sc.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 tools/perf/Makefile |    8 +++++---
 tools/perf/perf.h   |    6 ++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index b356987..53e663a 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -166,10 +166,12 @@ ifdef NO_64BIT
   MBITS := -m32
 else
   #
-  # If we're on a 64-bit kernel, use -m64:
+  # If we're on a 64-bit kernel (except ia64), use -m64:
   #
-  ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
-    MBITS := -m64
+  ifneq ($(uname_M),ia64)
+    ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
+      MBITS := -m64
+    endif
   endif
 endif
 
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 216bdb2..454d5d5 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -53,6 +53,12 @@
 #define cpu_relax()	asm volatile("" ::: "memory")
 #endif
 
+#ifdef __ia64__
+#include "../../arch/ia64/include/asm/unistd.h"
+#define rmb()		asm volatile ("mf" ::: "memory")
+#define cpu_relax()	asm volatile ("hint @pause" ::: "memory")
+#endif
+
 #include <time.h>
 #include <unistd.h>
 #include <sys/types.h>

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ia64 support for tools/perf/
  2009-11-17 17:05 [PATCH] ia64 support for tools/perf/ Luck, Tony
  2009-11-17 17:18 ` [tip:perf/core] perf tools: Add " tip-bot for Luck, Tony
@ 2009-11-17 17:21 ` Ingo Molnar
  2009-11-17 17:25   ` Luck, Tony
  2009-11-19  5:30 ` [tip:perf/core] perf tools: Add " tip-bot for Luck, Tony
  2 siblings, 1 reply; 7+ messages in thread
From: Ingo Molnar @ 2009-11-17 17:21 UTC (permalink / raw)
  To: Luck, Tony; +Cc: Peter Zijlstra, Paul Mackerras, linux-kernel


* Luck, Tony <tony.luck@intel.com> wrote:

> Compiler on ia64 rejects the "-m64" option.
> Add arch specific pieces to perf.h
> 
> Signed-off-by: Tony Luck <tony.luck@intel.com>

Applied, thanks Tony!

> ---
> 
> I expect there is a more elegant solution to the Makefile issue. Feel 
> free to throw away that part of this patch and replace it with 
> something prettier :-)

We looked into including the barrier definition from the kernel header 
but that looks a bit messy too.

Btw., are you planning HAVE_PERF_EVENTS support for IA64? (It's nice 
stuff, i can only recommend it! ;-)

	Ingo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] ia64 support for tools/perf/
  2009-11-17 17:21 ` [PATCH] " Ingo Molnar
@ 2009-11-17 17:25   ` Luck, Tony
  2009-11-18 16:56     ` Peter Zijlstra
  0 siblings, 1 reply; 7+ messages in thread
From: Luck, Tony @ 2009-11-17 17:25 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, Paul Mackerras, linux-kernel@vger.kernel.org

> Btw., are you planning HAVE_PERF_EVENTS support for IA64? (It's nice 
> stuff, i can only recommend it! ;-)

My first goal is getting the s/w events hooked up and working.  I'm still
wondering about how to get the h/w counters to co-exist with perfmon (which
has been part of ia64 API for many years).

-Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] ia64 support for tools/perf/
  2009-11-17 17:25   ` Luck, Tony
@ 2009-11-18 16:56     ` Peter Zijlstra
  2009-11-18 19:39       ` Ingo Molnar
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Zijlstra @ 2009-11-18 16:56 UTC (permalink / raw)
  To: Luck, Tony; +Cc: Ingo Molnar, Paul Mackerras, linux-kernel@vger.kernel.org

On Tue, 2009-11-17 at 09:25 -0800, Luck, Tony wrote:
> > Btw., are you planning HAVE_PERF_EVENTS support for IA64? (It's nice 
> > stuff, i can only recommend it! ;-)
> 
> My first goal is getting the s/w events hooked up and working.  I'm still
> wondering about how to get the h/w counters to co-exist with perfmon (which
> has been part of ia64 API for many years).

A first approach could be to make them mutually exclusive at runtime.
When there's a perf_event user, perfmon users get FAIL and vs.

This is basically the state for x86 perf_event vs oprofile atm.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ia64 support for tools/perf/
  2009-11-18 16:56     ` Peter Zijlstra
@ 2009-11-18 19:39       ` Ingo Molnar
  0 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2009-11-18 19:39 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Luck, Tony, Paul Mackerras, linux-kernel@vger.kernel.org


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Tue, 2009-11-17 at 09:25 -0800, Luck, Tony wrote:
> > > Btw., are you planning HAVE_PERF_EVENTS support for IA64? (It's nice 
> > > stuff, i can only recommend it! ;-)
> > 
> > My first goal is getting the s/w events hooked up and working.  I'm 
> > still wondering about how to get the h/w counters to co-exist with 
> > perfmon (which has been part of ia64 API for many years).
> 
> A first approach could be to make them mutually exclusive at runtime. 
> When there's a perf_event user, perfmon users get FAIL and vs.
> 
> This is basically the state for x86 perf_event vs oprofile atm.

Yep, this is probably the least intrusive approach. Mixing the 
implementations beyond trivial exclusion would probably be pain.

	Ingo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [tip:perf/core] perf tools: Add ia64 support for tools/perf/
  2009-11-17 17:05 [PATCH] ia64 support for tools/perf/ Luck, Tony
  2009-11-17 17:18 ` [tip:perf/core] perf tools: Add " tip-bot for Luck, Tony
  2009-11-17 17:21 ` [PATCH] " Ingo Molnar
@ 2009-11-19  5:30 ` tip-bot for Luck, Tony
  2 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Luck, Tony @ 2009-11-19  5:30 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, paulus, hpa, mingo, a.p.zijlstra, tony.luck, tglx,
	mingo

Commit-ID:  11ada26c78febe4662a8e848f3bff74e3200c920
Gitweb:     http://git.kernel.org/tip/11ada26c78febe4662a8e848f3bff74e3200c920
Author:     Luck, Tony <tony.luck@intel.com>
AuthorDate: Tue, 17 Nov 2009 09:05:56 -0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 19 Nov 2009 06:03:33 +0100

perf tools: Add ia64 support for tools/perf/

Compiler on ia64 rejects the "-m64" option.
Add arch specific pieces to perf.h

Signed-off-by: Tony Luck <tony.luck@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <4b02d7f43514327a@agluck-desktop.sc.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 tools/perf/Makefile |    8 +++++---
 tools/perf/perf.h   |    6 ++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 5d1a8b0..3f0666a 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -166,10 +166,12 @@ ifdef NO_64BIT
   MBITS := -m32
 else
   #
-  # If we're on a 64-bit kernel, use -m64:
+  # If we're on a 64-bit kernel (except ia64), use -m64:
   #
-  ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
-    MBITS := -m64
+  ifneq ($(uname_M),ia64)
+    ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
+      MBITS := -m64
+    endif
   endif
 endif
 
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 216bdb2..454d5d5 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -53,6 +53,12 @@
 #define cpu_relax()	asm volatile("" ::: "memory")
 #endif
 
+#ifdef __ia64__
+#include "../../arch/ia64/include/asm/unistd.h"
+#define rmb()		asm volatile ("mf" ::: "memory")
+#define cpu_relax()	asm volatile ("hint @pause" ::: "memory")
+#endif
+
 #include <time.h>
 #include <unistd.h>
 #include <sys/types.h>

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-19  5:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-17 17:05 [PATCH] ia64 support for tools/perf/ Luck, Tony
2009-11-17 17:18 ` [tip:perf/core] perf tools: Add " tip-bot for Luck, Tony
2009-11-17 17:21 ` [PATCH] " Ingo Molnar
2009-11-17 17:25   ` Luck, Tony
2009-11-18 16:56     ` Peter Zijlstra
2009-11-18 19:39       ` Ingo Molnar
2009-11-19  5:30 ` [tip:perf/core] perf tools: Add " tip-bot for Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox