* [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON
@ 2016-02-17 18:39 Andi Kleen
2016-02-17 18:52 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2016-02-17 18:39 UTC (permalink / raw)
To: acme; +Cc: jolsa, linux-kernel, Andi Kleen
From: Andi Kleen <ak@linux.intel.com>
In my set up (separate objdir, DEBUG=1) tip perf doesn't build without this change.
It may be that in some other setups asm/bug.h is implicitely included.
But always include it into builtin-stat.c
builtin-stat.c: In function ‘set_maps’:
builtin-stat.c:2126:6: error: implicit declaration of function ‘WARN_ONCE’ [-Werror=implicit-function-declaration]
if (WARN_ONCE(st->maps_allocated, "stats double allocation\n"))
^
builtin-stat.c:2126:2: error: nested extern declaration of ‘WARN_ONCE’ [-Werror=nested-externs]
if (WARN_ONCE(st->maps_allocated, "stats double allocation\n"))
^
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/builtin-stat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 6f24a96..a570e6d 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -60,6 +60,7 @@
#include "util/thread_map.h"
#include "util/counts.h"
#include "util/group.h"
+#include "asm/bug.h"
#include <api/fs/fs.h>
#include <stdlib.h>
--
2.5.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON 2016-02-17 18:39 [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON Andi Kleen @ 2016-02-17 18:52 ` Arnaldo Carvalho de Melo 2016-02-17 18:56 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 6+ messages in thread From: Arnaldo Carvalho de Melo @ 2016-02-17 18:52 UTC (permalink / raw) To: Andi Kleen; +Cc: jolsa, linux-kernel, Andi Kleen Em Wed, Feb 17, 2016 at 10:39:08AM -0800, Andi Kleen escreveu: > From: Andi Kleen <ak@linux.intel.com> > > In my set up (separate objdir, DEBUG=1) tip perf doesn't build without this change. > It may be that in some other setups asm/bug.h is implicitely included. Doesn't matter, as there is usage of something defined in that header, so we must have it included Thanks, applying your fix, after making it build on acme/perf/core: [acme@jouet linux]$ patch -p1 < /wb/1.patch patching file tools/perf/builtin-stat.c Hunk #1 FAILED at 60. 1 out of 1 hunk FAILED -- saving rejects to file tools/perf/builtin-stat.c.rej [acme@jouet linux]$ > But always include it into builtin-stat.c > > builtin-stat.c: In function ‘set_maps’: > builtin-stat.c:2126:6: error: implicit declaration of function ‘WARN_ONCE’ [-Werror=implicit-function-declaration] > if (WARN_ONCE(st->maps_allocated, "stats double allocation\n")) > ^ > builtin-stat.c:2126:2: error: nested extern declaration of ‘WARN_ONCE’ [-Werror=nested-externs] > if (WARN_ONCE(st->maps_allocated, "stats double allocation\n")) > ^ > > Signed-off-by: Andi Kleen <ak@linux.intel.com> > --- > tools/perf/builtin-stat.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c > index 6f24a96..a570e6d 100644 > --- a/tools/perf/builtin-stat.c > +++ b/tools/perf/builtin-stat.c > @@ -60,6 +60,7 @@ > #include "util/thread_map.h" > #include "util/counts.h" > #include "util/group.h" > +#include "asm/bug.h" > > #include <api/fs/fs.h> > #include <stdlib.h> > -- > 2.5.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON 2016-02-17 18:52 ` Arnaldo Carvalho de Melo @ 2016-02-17 18:56 ` Arnaldo Carvalho de Melo 2016-02-17 19:15 ` Andi Kleen 0 siblings, 1 reply; 6+ messages in thread From: Arnaldo Carvalho de Melo @ 2016-02-17 18:56 UTC (permalink / raw) To: Andi Kleen; +Cc: jolsa, linux-kernel, Andi Kleen Em Wed, Feb 17, 2016 at 03:52:09PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Feb 17, 2016 at 10:39:08AM -0800, Andi Kleen escreveu: > > In my set up (separate objdir, DEBUG=1) tip perf doesn't build without this change. > > It may be that in some other setups asm/bug.h is implicitely included. > Thanks, applying your fix, after making it build on acme/perf/core: I take that back, it is already there: [acme@jouet linux]$ git blame tools/perf/builtin-stat.c | grep -w bug\.h ba6039b6c8fcc tools/perf/builtin-stat.c (Jiri Olsa 2015-11-05 15:40:55 +0100 64) #include "asm/bug.h" [acme@jouet linux]$ git log --oneline -1 ba6039b6c8fcc ba6039b6c8fc perf stat report: Add report command [acme@jouet linux]$ git tag --contains ba6039b6c8fcc v4.5-rc1 v4.5-rc2 v4.5-rc3 v4.5-rc4 [acme@jouet linux]$ - Arnaldo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON 2016-02-17 18:56 ` Arnaldo Carvalho de Melo @ 2016-02-17 19:15 ` Andi Kleen 2016-02-17 19:24 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 6+ messages in thread From: Andi Kleen @ 2016-02-17 19:15 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: Andi Kleen, jolsa, linux-kernel, Andi Kleen On Wed, Feb 17, 2016 at 03:56:21PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Feb 17, 2016 at 03:52:09PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Wed, Feb 17, 2016 at 10:39:08AM -0800, Andi Kleen escreveu: > > > In my set up (separate objdir, DEBUG=1) tip perf doesn't build without this change. > > > It may be that in some other setups asm/bug.h is implicitely included. > > > Thanks, applying your fix, after making it build on acme/perf/core: > > I take that back, it is already there: Ok, but not in tip/perf/core. Can you push it there please? -Andi ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON 2016-02-17 19:15 ` Andi Kleen @ 2016-02-17 19:24 ` Arnaldo Carvalho de Melo 2016-02-17 21:22 ` Andi Kleen 0 siblings, 1 reply; 6+ messages in thread From: Arnaldo Carvalho de Melo @ 2016-02-17 19:24 UTC (permalink / raw) To: Andi Kleen; +Cc: jolsa, linux-kernel, Andi Kleen Em Wed, Feb 17, 2016 at 08:15:35PM +0100, Andi Kleen escreveu: > On Wed, Feb 17, 2016 at 03:56:21PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Wed, Feb 17, 2016 at 03:52:09PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Wed, Feb 17, 2016 at 10:39:08AM -0800, Andi Kleen escreveu: > > > > In my set up (separate objdir, DEBUG=1) tip perf doesn't build without this change. > > > > It may be that in some other setups asm/bug.h is implicitely included. > > > > > Thanks, applying your fix, after making it build on acme/perf/core: > > > > I take that back, it is already there: > > Ok, but not in tip/perf/core. Can you push it there please? Huh? I can't, this is not my tree, its Ingo's. But lemme check there... [acme@jouet linux]$ git remote update tip Fetching tip remote: Counting objects: 13, done. remote: Compressing objects: 100% (13/13), done. remote: Total 13 (delta 11), reused 0 (delta 0) Unpacking objects: 100% (13/13), done. >From git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 5eaa0c926246..d7c926f699aa master -> tip/master + e2c90dd7e11e...65c23c65bee4 x86/efi -> tip/x86/efi (forced update) 605a46ee8353..8f8e2aec9944 x86/platform -> tip/x86/platform [acme@jouet linux]$ git checkout -b aktest tip/perf/core Branch aktest set up to track remote branch perf/core from tip. Switched to a new branch 'aktest' [acme@jouet linux]$ git blame tools/perf/builtin-stat.c | grep -w bug\.h ba6039b6c8fcc tools/perf/builtin-stat.c (Jiri Olsa 2015-11-05 15:40:55 +0100 64) #include "asm/bug.h" [acme@jouet linux]$ git remote -v | grep tip tip git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git (fetch) tip git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git (push) [acme@jouet linux]$ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON 2016-02-17 19:24 ` Arnaldo Carvalho de Melo @ 2016-02-17 21:22 ` Andi Kleen 0 siblings, 0 replies; 6+ messages in thread From: Andi Kleen @ 2016-02-17 21:22 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: Andi Kleen, jolsa, linux-kernel, Andi Kleen On Wed, Feb 17, 2016 at 04:24:44PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Feb 17, 2016 at 08:15:35PM +0100, Andi Kleen escreveu: > > On Wed, Feb 17, 2016 at 03:56:21PM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Wed, Feb 17, 2016 at 03:52:09PM -0300, Arnaldo Carvalho de Melo escreveu: > > > > Em Wed, Feb 17, 2016 at 10:39:08AM -0800, Andi Kleen escreveu: > > > > > In my set up (separate objdir, DEBUG=1) tip perf doesn't build without this change. > > > > > It may be that in some other setups asm/bug.h is implicitely included. > > > > > > > Thanks, applying your fix, after making it build on acme/perf/core: > > > > > > I take that back, it is already there: > > > > Ok, but not in tip/perf/core. Can you push it there please? > > Huh? I can't, this is not my tree, its Ingo's. But lemme check there... Never mind. Ended up being a local problem. Thanks for checking. -Andi ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-17 21:22 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-17 18:39 [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON Andi Kleen 2016-02-17 18:52 ` Arnaldo Carvalho de Melo 2016-02-17 18:56 ` Arnaldo Carvalho de Melo 2016-02-17 19:15 ` Andi Kleen 2016-02-17 19:24 ` Arnaldo Carvalho de Melo 2016-02-17 21:22 ` Andi Kleen
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.