All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix perf build breakages in 3.13
@ 2014-02-06  0:59 Ben Hutchings
  2014-02-06  1:00 ` [PATCH 1/3] Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg" Ben Hutchings
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Ben Hutchings @ 2014-02-06  0:59 UTC (permalink / raw)
  To: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo
  Cc: linux-kernel, stable

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

perf no longer compiles on powerpc and sparc due to changes in the trace
sub-command.  This series fixes those compile errors; I compile-tested
in Debian sid on armhf, i386, powerpc and sparc.

I would much prefer not to revert the tty ioctl decoding but I think
it's going to take a much more sophisticated approach to do it right
across all supported architectures.

Ben.

Ben Hutchings (3):
  Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg"
  perf trace: Add fallback definition of EFD_SEMAPHORE
  perf trace: Decode architecture-specific signal numbers

 tools/perf/builtin-trace.c | 48 ++++++++++++++--------------------------------
 1 file changed, 14 insertions(+), 34 deletions(-)


-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert Einstein

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

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

* [PATCH 1/3] Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg"
  2014-02-06  0:59 [PATCH 0/3] Fix perf build breakages in 3.13 Ben Hutchings
@ 2014-02-06  1:00 ` Ben Hutchings
  2014-02-06  1:00 ` [PATCH 2/3] perf trace: Add fallback definition of EFD_SEMAPHORE Ben Hutchings
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Ben Hutchings @ 2014-02-06  1:00 UTC (permalink / raw)
  To: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo
  Cc: linux-kernel, stable

[-- Attachment #1: Type: text/plain, Size: 3144 bytes --]

This reverts commit 78645cf3ed32860a3e83b8e35aa469f5b844a4ba,
which is incorrect for many architectures and has broken
compilation on at least powerpc and sparc.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: <stable@vger.kernel.org>
---
 tools/perf/builtin-trace.c | 34 +---------------------------------
 1 file changed, 1 insertion(+), 33 deletions(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 8be17fc..c9671bd 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -275,14 +275,6 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size,
 
 #define SCA_STRARRAY syscall_arg__scnprintf_strarray
 
-static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size,
-						 struct syscall_arg *arg)
-{
-	return __syscall_arg__scnprintf_strarray(bf, size, "%#x", arg);
-}
-
-#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray
-
 static size_t syscall_arg__scnprintf_fd(char *bf, size_t size,
 					struct syscall_arg *arg);
 
@@ -835,28 +827,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
 
 #define SCA_SIGNUM syscall_arg__scnprintf_signum
 
-#define TCGETS		0x5401
-
-static const char *tioctls[] = {
-	"TCGETS", "TCSETS", "TCSETSW", "TCSETSF", "TCGETA", "TCSETA", "TCSETAW",
-	"TCSETAF", "TCSBRK", "TCXONC", "TCFLSH", "TIOCEXCL", "TIOCNXCL",
-	"TIOCSCTTY", "TIOCGPGRP", "TIOCSPGRP", "TIOCOUTQ", "TIOCSTI",
-	"TIOCGWINSZ", "TIOCSWINSZ", "TIOCMGET", "TIOCMBIS", "TIOCMBIC",
-	"TIOCMSET", "TIOCGSOFTCAR", "TIOCSSOFTCAR", "FIONREAD", "TIOCLINUX",
-	"TIOCCONS", "TIOCGSERIAL", "TIOCSSERIAL", "TIOCPKT", "FIONBIO",
-	"TIOCNOTTY", "TIOCSETD", "TIOCGETD", "TCSBRKP", [0x27] = "TIOCSBRK",
-	"TIOCCBRK", "TIOCGSID", "TCGETS2", "TCSETS2", "TCSETSW2", "TCSETSF2",
-	"TIOCGRS485", "TIOCSRS485", "TIOCGPTN", "TIOCSPTLCK",
-	"TIOCGDEV||TCGETX", "TCSETX", "TCSETXF", "TCSETXW", "TIOCSIG",
-	"TIOCVHANGUP", "TIOCGPKT", "TIOCGPTLCK", "TIOCGEXCL",
-	[0x50] = "FIONCLEX", "FIOCLEX", "FIOASYNC", "TIOCSERCONFIG",
-	"TIOCSERGWILD", "TIOCSERSWILD", "TIOCGLCKTRMIOS", "TIOCSLCKTRMIOS",
-	"TIOCSERGSTRUCT", "TIOCSERGETLSR", "TIOCSERGETMULTI", "TIOCSERSETMULTI",
-	"TIOCMIWAIT", "TIOCGICOUNT", [0x60] = "FIOQSIZE",
-};
-
-static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401);
-
 #define STRARRAY(arg, name, array) \
 	  .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \
 	  .arg_parm	 = { [arg] = &strarray__##array, }
@@ -937,9 +907,7 @@ static struct syscall_fmt {
 	{ .name	    = "getrlimit",  .errmsg = true, STRARRAY(0, resource, rlimit_resources), },
 	{ .name	    = "ioctl",	    .errmsg = true,
 	  .arg_scnprintf = { [0] = SCA_FD, /* fd */ 
-			     [1] = SCA_STRHEXARRAY, /* cmd */
-			     [2] = SCA_HEX, /* arg */ },
-	  .arg_parm	 = { [1] = &strarray__tioctls, /* cmd */ }, },
+			     [2] = SCA_HEX, /* arg */ }, },
 	{ .name	    = "kill",	    .errmsg = true,
 	  .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, },
 	{ .name	    = "linkat",	    .errmsg = true,


-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert Einstein

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

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

* [PATCH 2/3] perf trace: Add fallback definition of EFD_SEMAPHORE
  2014-02-06  0:59 [PATCH 0/3] Fix perf build breakages in 3.13 Ben Hutchings
  2014-02-06  1:00 ` [PATCH 1/3] Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg" Ben Hutchings
@ 2014-02-06  1:00 ` Ben Hutchings
  2014-02-22 17:55   ` [tip:perf/core] " tip-bot for Ben Hutchings
  2014-02-06  1:00 ` [PATCH 3/3] perf trace: Decode architecture-specific signal numbers Ben Hutchings
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Ben Hutchings @ 2014-02-06  1:00 UTC (permalink / raw)
  To: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo
  Cc: linux-kernel, stable

[-- Attachment #1: Type: text/plain, Size: 766 bytes --]

glibc 2.17 is missing this on sparc, despite the fact that it's
not architecture-specific.

Fixes: 49af9e93adfa ('perf trace: Beautify eventfd2 'flags' arg')
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: <stable@vger.kernel.org>
---
 tools/perf/builtin-trace.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index c9671bd..5c32dcf 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -35,6 +35,10 @@
 # define MADV_UNMERGEABLE	13
 #endif
 
+#ifndef EFD_SEMAPHORE
+# define EFD_SEMAPHORE		1
+#endif
+
 struct tp_field {
 	int offset;
 	union {


-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert Einstein

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

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

* [PATCH 3/3] perf trace: Decode architecture-specific signal numbers
  2014-02-06  0:59 [PATCH 0/3] Fix perf build breakages in 3.13 Ben Hutchings
  2014-02-06  1:00 ` [PATCH 1/3] Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg" Ben Hutchings
  2014-02-06  1:00 ` [PATCH 2/3] perf trace: Add fallback definition of EFD_SEMAPHORE Ben Hutchings
@ 2014-02-06  1:00 ` Ben Hutchings
  2014-03-09 13:55   ` Ben Hutchings
  2014-03-11 10:16   ` [tip:perf/urgent] " tip-bot for Ben Hutchings
  2014-02-06 13:41 ` [PATCH 0/3] Fix perf build breakages in 3.13 Arnaldo Carvalho de Melo
  2014-02-06 13:48 ` Arnaldo Carvalho de Melo
  4 siblings, 2 replies; 14+ messages in thread
From: Ben Hutchings @ 2014-02-06  1:00 UTC (permalink / raw)
  To: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo
  Cc: linux-kernel, stable

[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]

SIGSTKFLT is not defined on alpha, mips or sparc.
SIGEMT and SIGSWI are defined on some architectures and should be
decoded here if so.

Fixes: 8bad5b0abfdb ('perf trace: Beautify signal number arg in several syscalls')
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: <stable@vger.kernel.org>
---
 tools/perf/builtin-trace.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 5c32dcf..25ea64c 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -807,7 +807,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
 	P_SIGNUM(PIPE);
 	P_SIGNUM(ALRM);
 	P_SIGNUM(TERM);
-	P_SIGNUM(STKFLT);
 	P_SIGNUM(CHLD);
 	P_SIGNUM(CONT);
 	P_SIGNUM(STOP);
@@ -823,6 +822,15 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
 	P_SIGNUM(IO);
 	P_SIGNUM(PWR);
 	P_SIGNUM(SYS);
+#ifdef SIGEMT
+	P_SIGNUM(EMT);
+#endif
+#ifdef SIGSTKFLT
+	P_SIGNUM(STKFLT);
+#endif
+#ifdef SIGSWI
+	P_SIGNUM(SWI);
+#endif
 	default: break;
 	}
 

-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert Einstein

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

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

* Re: [PATCH 0/3] Fix perf build breakages in 3.13
  2014-02-06  0:59 [PATCH 0/3] Fix perf build breakages in 3.13 Ben Hutchings
                   ` (2 preceding siblings ...)
  2014-02-06  1:00 ` [PATCH 3/3] perf trace: Decode architecture-specific signal numbers Ben Hutchings
@ 2014-02-06 13:41 ` Arnaldo Carvalho de Melo
  2014-02-06 13:48 ` Arnaldo Carvalho de Melo
  4 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-02-06 13:41 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, linux-kernel, stable

Em Thu, Feb 06, 2014 at 12:59:21AM +0000, Ben Hutchings escreveu:
> perf no longer compiles on powerpc and sparc due to changes in the trace
> sub-command.  This series fixes those compile errors; I compile-tested
> in Debian sid on armhf, i386, powerpc and sparc.
> 
> I would much prefer not to revert the tty ioctl decoding but I think
> it's going to take a much more sophisticated approach to do it right
> across all supported architectures.

Not a problem, we can work on that later, applying your series, thanks.

- Arnaldo
 
> Ben.
> 
> Ben Hutchings (3):
>   Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg"
>   perf trace: Add fallback definition of EFD_SEMAPHORE
>   perf trace: Decode architecture-specific signal numbers
> 
>  tools/perf/builtin-trace.c | 48 ++++++++++++++--------------------------------
>  1 file changed, 14 insertions(+), 34 deletions(-)
> 
> 
> -- 
> Ben Hutchings
> It is a miracle that curiosity survives formal education. - Albert Einstein



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

* Re: [PATCH 0/3] Fix perf build breakages in 3.13
  2014-02-06  0:59 [PATCH 0/3] Fix perf build breakages in 3.13 Ben Hutchings
                   ` (3 preceding siblings ...)
  2014-02-06 13:41 ` [PATCH 0/3] Fix perf build breakages in 3.13 Arnaldo Carvalho de Melo
@ 2014-02-06 13:48 ` Arnaldo Carvalho de Melo
  2014-02-06 14:13   ` Ben Hutchings
  4 siblings, 1 reply; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-02-06 13:48 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, linux-kernel, stable

Em Thu, Feb 06, 2014 at 12:59:21AM +0000, Ben Hutchings escreveu:
> perf no longer compiles on powerpc and sparc due to changes in the trace
> sub-command.  This series fixes those compile errors; I compile-tested
> in Debian sid on armhf, i386, powerpc and sparc.
> 
> I would much prefer not to revert the tty ioctl decoding but I think
> it's going to take a much more sophisticated approach to do it right
> across all supported architectures.

Second thought on the revert one:

Do you have a problem of switching the big hammer to one that makes this
work just on x86/x86-64?

That way at least those on these arches can have this while the correct
solution is worked out.

- Arnaldo
 
> Ben.
> 
> Ben Hutchings (3):
>   Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg"
>   perf trace: Add fallback definition of EFD_SEMAPHORE
>   perf trace: Decode architecture-specific signal numbers
> 
>  tools/perf/builtin-trace.c | 48 ++++++++++++++--------------------------------
>  1 file changed, 14 insertions(+), 34 deletions(-)
> 
> 
> -- 
> Ben Hutchings
> It is a miracle that curiosity survives formal education. - Albert Einstein



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

* Re: [PATCH 0/3] Fix perf build breakages in 3.13
  2014-02-06 13:48 ` Arnaldo Carvalho de Melo
@ 2014-02-06 14:13   ` Ben Hutchings
  2014-02-06 14:40     ` Arnaldo Carvalho de Melo
  2014-02-10 17:52     ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 14+ messages in thread
From: Ben Hutchings @ 2014-02-06 14:13 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, linux-kernel, stable

[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

On Thu, 2014-02-06 at 10:48 -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Feb 06, 2014 at 12:59:21AM +0000, Ben Hutchings escreveu:
> > perf no longer compiles on powerpc and sparc due to changes in the trace
> > sub-command.  This series fixes those compile errors; I compile-tested
> > in Debian sid on armhf, i386, powerpc and sparc.
> > 
> > I would much prefer not to revert the tty ioctl decoding but I think
> > it's going to take a much more sophisticated approach to do it right
> > across all supported architectures.
> 
> Second thought on the revert one:
> 
> Do you have a problem of switching the big hammer to one that makes this
> work just on x86/x86-64?

That seems reasonable as a temporary measure.

Ben.

> That way at least those on these arches can have this while the correct
> solution is worked out.
> 
> - Arnaldo
>  
> > Ben.
> > 
> > Ben Hutchings (3):
> >   Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg"
> >   perf trace: Add fallback definition of EFD_SEMAPHORE
> >   perf trace: Decode architecture-specific signal numbers
> > 
> >  tools/perf/builtin-trace.c | 48 ++++++++++++++--------------------------------
> >  1 file changed, 14 insertions(+), 34 deletions(-)
> > 
> > 
> > -- 
> > Ben Hutchings
> > It is a miracle that curiosity survives formal education. - Albert Einstein
> 
> 

-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert Einstein

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

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

* Re: [PATCH 0/3] Fix perf build breakages in 3.13
  2014-02-06 14:13   ` Ben Hutchings
@ 2014-02-06 14:40     ` Arnaldo Carvalho de Melo
  2014-02-10 17:52     ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-02-06 14:40 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, linux-kernel, stable

Em Thu, Feb 06, 2014 at 02:13:15PM +0000, Ben Hutchings escreveu:
> On Thu, 2014-02-06 at 10:48 -0300, Arnaldo Carvalho de Melo wrote:
> > Em Thu, Feb 06, 2014 at 12:59:21AM +0000, Ben Hutchings escreveu:
> > > perf no longer compiles on powerpc and sparc due to changes in the trace
> > > sub-command.  This series fixes those compile errors; I compile-tested
> > > in Debian sid on armhf, i386, powerpc and sparc.
> > > 
> > > I would much prefer not to revert the tty ioctl decoding but I think
> > > it's going to take a much more sophisticated approach to do it right
> > > across all supported architectures.
> > 
> > Second thought on the revert one:
> > 
> > Do you have a problem of switching the big hammer to one that makes this
> > work just on x86/x86-64?
> 
> That seems reasonable as a temporary measure.

Thank you, I'll do that then and hope to work on the right fix in the
near future, if nobody does it first.

- Arnaldo
 
> Ben.
> 
> > That way at least those on these arches can have this while the correct
> > solution is worked out.
> > 
> > - Arnaldo
> >  
> > > Ben.
> > > 
> > > Ben Hutchings (3):
> > >   Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg"
> > >   perf trace: Add fallback definition of EFD_SEMAPHORE
> > >   perf trace: Decode architecture-specific signal numbers
> > > 
> > >  tools/perf/builtin-trace.c | 48 ++++++++++++++--------------------------------
> > >  1 file changed, 14 insertions(+), 34 deletions(-)
> > > 
> > > 
> > > -- 
> > > Ben Hutchings
> > > It is a miracle that curiosity survives formal education. - Albert Einstein
> > 
> > 
> 
> -- 
> Ben Hutchings
> It is a miracle that curiosity survives formal education. - Albert Einstein



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

* Re: [PATCH 0/3] Fix perf build breakages in 3.13
  2014-02-06 14:13   ` Ben Hutchings
  2014-02-06 14:40     ` Arnaldo Carvalho de Melo
@ 2014-02-10 17:52     ` Arnaldo Carvalho de Melo
  2014-02-10 21:32       ` Ben Hutchings
  1 sibling, 1 reply; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-02-10 17:52 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, linux-kernel, stable

Em Thu, Feb 06, 2014 at 02:13:15PM +0000, Ben Hutchings escreveu:
> On Thu, 2014-02-06 at 10:48 -0300, Arnaldo Carvalho de Melo wrote:
> > Em Thu, Feb 06, 2014 at 12:59:21AM +0000, Ben Hutchings escreveu:
> > > perf no longer compiles on powerpc and sparc due to changes in the trace
> > > sub-command.  This series fixes those compile errors; I compile-tested
> > > in Debian sid on armhf, i386, powerpc and sparc.
> > > 
> > > I would much prefer not to revert the tty ioctl decoding but I think
> > > it's going to take a much more sophisticated approach to do it right
> > > across all supported architectures.
> > 
> > Second thought on the revert one:
> > 
> > Do you have a problem of switching the big hammer to one that makes this
> > work just on x86/x86-64?
> 
> That seems reasonable as a temporary measure.

Applying this to my perf/urgent branch, ack?

- Arnaldo

commit 57f7077f41104c5499a89803f58b5886ee51555f
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date:   Mon Feb 10 14:09:48 2014 -0300

    perf trace: Fix ioctl 'request' beautifier build problems on !(i386 || x86_64) arches
    
    Supporting decoding the ioctl 'request' parameter needs more work to
    properly support more architectures, the current approach doesn't work
    on at least powerpc and sparc, as reported by Ben Hutchings in
    http://lkml.kernel.org/r/1391593985.3003.48.camel@deadeye.wl.decadent.org.uk .
    
    Work around that by making it to be ifdefed for the architectures known
    to work with the current, limited approach, i386 and x86_64 till better
    code is written.
    
    Reported-by: Ben Hutchings <ben@decadent.org.uk>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Link: http://lkml.kernel.org/n/tip-ss04k11insqlu329xh5g02q0@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 619d11c47a91..6aa6fb6f7bd9 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -283,6 +283,11 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size,
 
 #define SCA_STRARRAY syscall_arg__scnprintf_strarray
 
+#if defined(__i386__) || defined(__x86_64__)
+/*
+ * FIXME: Make this available to all arches as soon as the ioctl beautifier
+ * 	  gets rewritten to support all arches.
+ */
 static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size,
 						 struct syscall_arg *arg)
 {
@@ -290,6 +295,7 @@ static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size,
 }
 
 #define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray
+#endif /* defined(__i386__) || defined(__x86_64__) */
 
 static size_t syscall_arg__scnprintf_fd(char *bf, size_t size,
 					struct syscall_arg *arg);
@@ -843,6 +849,10 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
 
 #define SCA_SIGNUM syscall_arg__scnprintf_signum
 
+#if defined(__i386__) || defined(__x86_64__)
+/*
+ * FIXME: Make this available to all arches.
+ */
 #define TCGETS		0x5401
 
 static const char *tioctls[] = {
@@ -864,6 +874,7 @@ static const char *tioctls[] = {
 };
 
 static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401);
+#endif /* defined(__i386__) || defined(__x86_64__) */
 
 #define STRARRAY(arg, name, array) \
 	  .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \
@@ -945,9 +956,16 @@ static struct syscall_fmt {
 	{ .name	    = "getrlimit",  .errmsg = true, STRARRAY(0, resource, rlimit_resources), },
 	{ .name	    = "ioctl",	    .errmsg = true,
 	  .arg_scnprintf = { [0] = SCA_FD, /* fd */ 
+#if defined(__i386__) || defined(__x86_64__)
+/*
+ * FIXME: Make this available to all arches.
+ */
 			     [1] = SCA_STRHEXARRAY, /* cmd */
 			     [2] = SCA_HEX, /* arg */ },
 	  .arg_parm	 = { [1] = &strarray__tioctls, /* cmd */ }, },
+#else
+			     [2] = SCA_HEX, /* arg */ }, },
+#endif
 	{ .name	    = "kill",	    .errmsg = true,
 	  .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, },
 	{ .name	    = "linkat",	    .errmsg = true,

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

* Re: [PATCH 0/3] Fix perf build breakages in 3.13
  2014-02-10 17:52     ` Arnaldo Carvalho de Melo
@ 2014-02-10 21:32       ` Ben Hutchings
  0 siblings, 0 replies; 14+ messages in thread
From: Ben Hutchings @ 2014-02-10 21:32 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, linux-kernel, stable

[-- Attachment #1: Type: text/plain, Size: 2564 bytes --]

On Mon, 2014-02-10 at 14:52 -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Feb 06, 2014 at 02:13:15PM +0000, Ben Hutchings escreveu:
> > On Thu, 2014-02-06 at 10:48 -0300, Arnaldo Carvalho de Melo wrote:
> > > Em Thu, Feb 06, 2014 at 12:59:21AM +0000, Ben Hutchings escreveu:
> > > > perf no longer compiles on powerpc and sparc due to changes in the trace
> > > > sub-command.  This series fixes those compile errors; I compile-tested
> > > > in Debian sid on armhf, i386, powerpc and sparc.
> > > > 
> > > > I would much prefer not to revert the tty ioctl decoding but I think
> > > > it's going to take a much more sophisticated approach to do it right
> > > > across all supported architectures.
> > > 
> > > Second thought on the revert one:
> > > 
> > > Do you have a problem of switching the big hammer to one that makes this
> > > work just on x86/x86-64?
> > 
> > That seems reasonable as a temporary measure.
> 
> Applying this to my perf/urgent branch, ack?
>
> - Arnaldo
> 
> commit 57f7077f41104c5499a89803f58b5886ee51555f
> Author: Arnaldo Carvalho de Melo <acme@redhat.com>
> Date:   Mon Feb 10 14:09:48 2014 -0300
> 
>     perf trace: Fix ioctl 'request' beautifier build problems on !(i386 || x86_64) arches
>     
>     Supporting decoding the ioctl 'request' parameter needs more work to
>     properly support more architectures, the current approach doesn't work
>     on at least powerpc and sparc, as reported by Ben Hutchings in
>     http://lkml.kernel.org/r/1391593985.3003.48.camel@deadeye.wl.decadent.org.uk .
>     
>     Work around that by making it to be ifdefed for the architectures known
>     to work with the current, limited approach, i386 and x86_64 till better
>     code is written.
>     
>     Reported-by: Ben Hutchings <ben@decadent.org.uk>
>     Cc: Adrian Hunter <adrian.hunter@intel.com>
>     Cc: David Ahern <dsahern@gmail.com>
>     Cc: Frederic Weisbecker <fweisbec@gmail.com>
>     Cc: Jiri Olsa <jolsa@redhat.com>
>     Cc: Mike Galbraith <efault@gmx.de>
>     Cc: Namhyung Kim <namhyung@kernel.org>
>     Cc: Paul Mackerras <paulus@samba.org>
>     Cc: Peter Zijlstra <peterz@infradead.org>
>     Cc: Stephane Eranian <eranian@google.com>
[...]

Please add:

Cc: <stable@vger.kernel.org> # 3.13
Fixes: 78645cf3ed32 ("perf trace: Initial beautifier for ioctl's 'cmd' arg")

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                              - Albert Camus

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

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

* [tip:perf/core] perf trace: Add fallback definition of EFD_SEMAPHORE
  2014-02-06  1:00 ` [PATCH 2/3] perf trace: Add fallback definition of EFD_SEMAPHORE Ben Hutchings
@ 2014-02-22 17:55   ` tip-bot for Ben Hutchings
  0 siblings, 0 replies; 14+ messages in thread
From: tip-bot for Ben Hutchings @ 2014-02-22 17:55 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, paulus, mingo, hpa, mingo, a.p.zijlstra,
	stable, ben, tglx

Commit-ID:  79d26a6a19ace19faabf8d8d27d3430be2e26d34
Gitweb:     http://git.kernel.org/tip/79d26a6a19ace19faabf8d8d27d3430be2e26d34
Author:     Ben Hutchings <ben@decadent.org.uk>
AuthorDate: Thu, 6 Feb 2014 01:00:35 +0000
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 10 Feb 2014 11:34:31 -0300

perf trace: Add fallback definition of EFD_SEMAPHORE

glibc 2.17 is missing this on sparc, despite the fact that it's not
architecture-specific.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Fixes: 49af9e93adfa ('perf trace: Beautify eventfd2 'flags' arg')
Cc: <stable@vger.kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1391648435.3003.100.camel@deadeye.wl.decadent.org.uk
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-trace.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 896f270..619d11c 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -37,6 +37,10 @@
 # define MADV_UNMERGEABLE	13
 #endif
 
+#ifndef EFD_SEMAPHORE
+# define EFD_SEMAPHORE		1
+#endif
+
 struct tp_field {
 	int offset;
 	union {

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

* Re: [PATCH 3/3] perf trace: Decode architecture-specific signal numbers
  2014-02-06  1:00 ` [PATCH 3/3] perf trace: Decode architecture-specific signal numbers Ben Hutchings
@ 2014-03-09 13:55   ` Ben Hutchings
  2014-03-10 14:14     ` Arnaldo Carvalho de Melo
  2014-03-11 10:16   ` [tip:perf/urgent] " tip-bot for Ben Hutchings
  1 sibling, 1 reply; 14+ messages in thread
From: Ben Hutchings @ 2014-03-09 13:55 UTC (permalink / raw)
  To: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo
  Cc: linux-kernel, stable

[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]

What's happening with this patch?  perf fails to build on alpha or sparc
since 3.13.

Ben.

On Thu, 2014-02-06 at 01:00 +0000, Ben Hutchings wrote:
> SIGSTKFLT is not defined on alpha, mips or sparc.
> SIGEMT and SIGSWI are defined on some architectures and should be
> decoded here if so.
> 
> Fixes: 8bad5b0abfdb ('perf trace: Beautify signal number arg in several syscalls')
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> Cc: <stable@vger.kernel.org>
> ---
>  tools/perf/builtin-trace.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index 5c32dcf..25ea64c 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -807,7 +807,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
>  	P_SIGNUM(PIPE);
>  	P_SIGNUM(ALRM);
>  	P_SIGNUM(TERM);
> -	P_SIGNUM(STKFLT);
>  	P_SIGNUM(CHLD);
>  	P_SIGNUM(CONT);
>  	P_SIGNUM(STOP);
> @@ -823,6 +822,15 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
>  	P_SIGNUM(IO);
>  	P_SIGNUM(PWR);
>  	P_SIGNUM(SYS);
> +#ifdef SIGEMT
> +	P_SIGNUM(EMT);
> +#endif
> +#ifdef SIGSTKFLT
> +	P_SIGNUM(STKFLT);
> +#endif
> +#ifdef SIGSWI
> +	P_SIGNUM(SWI);
> +#endif
>  	default: break;
>  	}
>  
> 

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.  It's the only way to be sure.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

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

* Re: [PATCH 3/3] perf trace: Decode architecture-specific signal numbers
  2014-03-09 13:55   ` Ben Hutchings
@ 2014-03-10 14:14     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-03-10 14:14 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, linux-kernel, stable

Em Sun, Mar 09, 2014 at 01:55:33PM +0000, Ben Hutchings escreveu:
> What's happening with this patch?  perf fails to build on alpha or sparc
> since 3.13.

Grrr, I thought I had processed all of these, but this got missed, did
it now, will push soon.

- Arnaldo
 
> Ben.
> 
> On Thu, 2014-02-06 at 01:00 +0000, Ben Hutchings wrote:
> > SIGSTKFLT is not defined on alpha, mips or sparc.
> > SIGEMT and SIGSWI are defined on some architectures and should be
> > decoded here if so.
> > 
> > Fixes: 8bad5b0abfdb ('perf trace: Beautify signal number arg in several syscalls')
> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > Cc: <stable@vger.kernel.org>
> > ---
> >  tools/perf/builtin-trace.c | 10 +++++++++-
> >  1 file changed, 9 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> > index 5c32dcf..25ea64c 100644
> > --- a/tools/perf/builtin-trace.c
> > +++ b/tools/perf/builtin-trace.c
> > @@ -807,7 +807,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
> >  	P_SIGNUM(PIPE);
> >  	P_SIGNUM(ALRM);
> >  	P_SIGNUM(TERM);
> > -	P_SIGNUM(STKFLT);
> >  	P_SIGNUM(CHLD);
> >  	P_SIGNUM(CONT);
> >  	P_SIGNUM(STOP);
> > @@ -823,6 +822,15 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
> >  	P_SIGNUM(IO);
> >  	P_SIGNUM(PWR);
> >  	P_SIGNUM(SYS);
> > +#ifdef SIGEMT
> > +	P_SIGNUM(EMT);
> > +#endif
> > +#ifdef SIGSTKFLT
> > +	P_SIGNUM(STKFLT);
> > +#endif
> > +#ifdef SIGSWI
> > +	P_SIGNUM(SWI);
> > +#endif
> >  	default: break;
> >  	}
> >  
> > 
> 
> -- 
> Ben Hutchings
> I say we take off; nuke the site from orbit.  It's the only way to be sure.



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

* [tip:perf/urgent] perf trace: Decode architecture-specific signal numbers
  2014-02-06  1:00 ` [PATCH 3/3] perf trace: Decode architecture-specific signal numbers Ben Hutchings
  2014-03-09 13:55   ` Ben Hutchings
@ 2014-03-11 10:16   ` tip-bot for Ben Hutchings
  1 sibling, 0 replies; 14+ messages in thread
From: tip-bot for Ben Hutchings @ 2014-03-11 10:16 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, paulus, mingo, hpa, mingo, a.p.zijlstra, ben, tglx

Commit-ID:  02c5bb4a352a4cca56e9b5d3a2a57d61062eb2e1
Gitweb:     http://git.kernel.org/tip/02c5bb4a352a4cca56e9b5d3a2a57d61062eb2e1
Author:     Ben Hutchings <ben@decadent.org.uk>
AuthorDate: Thu, 6 Feb 2014 01:00:41 +0000
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 10 Mar 2014 11:10:45 -0300

perf trace: Decode architecture-specific signal numbers

SIGSTKFLT is not defined on alpha, mips or sparc.

SIGEMT and SIGSWI are defined on some architectures and should be
decoded here if so.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Fixes: 8bad5b0abfdb ('perf trace: Beautify signal number arg in several syscalls')
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1391648441.3003.101.camel@deadeye.wl.decadent.org.uk
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-trace.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 6aa6fb6..f954c26 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -825,7 +825,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
 	P_SIGNUM(PIPE);
 	P_SIGNUM(ALRM);
 	P_SIGNUM(TERM);
-	P_SIGNUM(STKFLT);
 	P_SIGNUM(CHLD);
 	P_SIGNUM(CONT);
 	P_SIGNUM(STOP);
@@ -841,6 +840,15 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
 	P_SIGNUM(IO);
 	P_SIGNUM(PWR);
 	P_SIGNUM(SYS);
+#ifdef SIGEMT
+	P_SIGNUM(EMT);
+#endif
+#ifdef SIGSTKFLT
+	P_SIGNUM(STKFLT);
+#endif
+#ifdef SIGSWI
+	P_SIGNUM(SWI);
+#endif
 	default: break;
 	}
 

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

end of thread, other threads:[~2014-03-11 10:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-06  0:59 [PATCH 0/3] Fix perf build breakages in 3.13 Ben Hutchings
2014-02-06  1:00 ` [PATCH 1/3] Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg" Ben Hutchings
2014-02-06  1:00 ` [PATCH 2/3] perf trace: Add fallback definition of EFD_SEMAPHORE Ben Hutchings
2014-02-22 17:55   ` [tip:perf/core] " tip-bot for Ben Hutchings
2014-02-06  1:00 ` [PATCH 3/3] perf trace: Decode architecture-specific signal numbers Ben Hutchings
2014-03-09 13:55   ` Ben Hutchings
2014-03-10 14:14     ` Arnaldo Carvalho de Melo
2014-03-11 10:16   ` [tip:perf/urgent] " tip-bot for Ben Hutchings
2014-02-06 13:41 ` [PATCH 0/3] Fix perf build breakages in 3.13 Arnaldo Carvalho de Melo
2014-02-06 13:48 ` Arnaldo Carvalho de Melo
2014-02-06 14:13   ` Ben Hutchings
2014-02-06 14:40     ` Arnaldo Carvalho de Melo
2014-02-10 17:52     ` Arnaldo Carvalho de Melo
2014-02-10 21:32       ` Ben Hutchings

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.