ia64 support for tools/perf/
PATCH 1/1 ia64 support for tools/perf/
Compiler on ia64 rejects the "-m64" option.
Add arch specific pieces to perf.h
---
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(-)
tools/perf/Makefile +5 -3
@@ -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
tools/perf/perf.h +6 -0
@@ -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>
[tip:perf/core] perf tools: Add ia64 support for tools/perf/
Commit-ID: 5960a8b22f5015d6e36b2a095c47bc27e8e685c8 Gitweb: http://git.kernel.org/tip/5960a8b22f5015d6e36b2a095c47bc27e8e685c8 Author: Luck, Tony <[email protected]> AuthorDate: Tue, 17 Nov 2009 09:05:56 -0800 Committer: Ingo Molnar <[email protected]> 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
LKML-Reference: <[email protected]>
--- tools/perf/Makefile | 8 +++++--- tools/perf/perf.h | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-)
tools/perf/Makefile +5 -3
@@ -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
tools/perf/perf.h +6 -0
@@ -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>
Ingo Molnar
AppliedQuoted 4 lines · Luck, Tony
Compiler on ia64 rejects the "-m64" option.
Add arch specific pieces toperf.hSigned-off-by Tony Luck <[email protected]>
Applied, thanks Tony!
Quoted 5 lines
---
I expect there is a more elegant solution to the
Makefileissue. 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
Quoted 2 lines
Btw., are you planning
HAVE_PERF_EVENTSsupport 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
Peter Zijlstra
maintainerQuoted 6 lines · Tony
Quoted 2 lines
Btw., are you planning
HAVE_PERF_EVENTSsupport 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.
Quoted 4 lines · Peter Zijlstra
Quoted 3 lines · Tony
Quoted 2 lines
Btw., are you planning
HAVE_PERF_EVENTSsupport for IA64? (It's nice stuff, i can only recommend it! ;-)
Quoted 8 lines
Quoted 3 lines
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_eventuser, perfmon users get FAIL and vs.This is basically the state for x86
perf_eventvs oprofile atm.
Yep, this is probably the least intrusive approach. Mixing the implementations beyond trivial exclusion would probably be pain.
Ingo
[tip:perf/core] perf tools: Add ia64 support for tools/perf/
In reply to Luck, TonyCommit-ID: 11ada26c78febe4662a8e848f3bff74e3200c920 Gitweb: http://git.kernel.org/tip/11ada26c78febe4662a8e848f3bff74e3200c920 Author: Luck, Tony <[email protected]> AuthorDate: Tue, 17 Nov 2009 09:05:56 -0800 Committer: Ingo Molnar <[email protected]> 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
LKML-Reference: <[email protected]>
--- tools/perf/Makefile | 8 +++++--- tools/perf/perf.h | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-)
tools/perf/Makefile +5 -3
@@ -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
tools/perf/perf.h +6 -0
@@ -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>