All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 0/3] Fix perf build breakages in 3.13
Date: Mon, 10 Feb 2014 14:52:15 -0300	[thread overview]
Message-ID: <20140210175215.GD20833@ghostprotocols.net> (raw)
In-Reply-To: <1391695995.3003.108.camel@deadeye.wl.decadent.org.uk>

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,

  parent reply	other threads:[~2014-02-10 17:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-02-10 21:32       ` Ben Hutchings

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=20140210175215.GD20833@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ben@decadent.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=stable@vger.kernel.org \
    /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.