Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1382635

[PATCH 01/14] perf trace: Fix build when DWARF unwind isn't available

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 01/14] perf trace: Fix build when DWARF unwind isn't available
Date Tue, 19 Apr 2016 18:00:02 +0200
Message-ID <rpGee-KT-19@gated-at.bofh.it> (permalink)
References <rpGee-KT-7@gated-at.bofh.it>
X-Mailer git-send-email 2.5.5
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Srs-Rewrite SMTP reverse-path rewritten from <acme@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 43
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo <acme@redhat.com>, Adrian Hunter <adrian.hunter@intel.com>, David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>, Milian Wolff <milian.wolff@kdab.com>, Namhyung Kim <namhyung@kernel.org>, Wang Nan <wangnan0@huawei.com>
X-Original-Date Tue, 19 Apr 2016 12:50:28 -0300
X-Original-Message-ID <1461081041-10580-2-git-send-email-acme@kernel.org>
X-Original-References <1461081041-10580-1-git-send-email-acme@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1382635

Show key headers only | View raw


From: Arnaldo Carvalho de Melo <acme@redhat.com>

The variable is initialized and then conditionally set to a different
value, but not used when DWARF unwinding is not available, bummer, write
1000 times: "Run make -C tools/perf build-test"...

  builtin-trace.c: In function ‘cmd_trace’:
  builtin-trace.c:3112:6: error: variable ‘max_stack_user_set’ set but not
  used [-Werror=unused-but-set-variable]
    bool max_stack_user_set = true;
        ^
  cc1: all warnings being treated as err

Fix it by marking it as __maybe_unused.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 056149932602 ("perf trace: Make --(min,max}-stack imply "--call-graph dwarf"")
Link: http://lkml.kernel.org/n/tip-85r40c5hhv6jnmph77l1hgsr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 026ec0c749b0..0e3c1cecef1b 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -3109,7 +3109,7 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
 			"per thread proc mmap processing timeout in ms"),
 	OPT_END()
 	};
-	bool max_stack_user_set = true;
+	bool __maybe_unused max_stack_user_set = true;
 	bool mmap_pages_user_set = true;
 	const char * const trace_subcommands[] = { "record", NULL };
 	int err;
-- 
2.5.5

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 01/14] perf trace: Fix build when DWARF unwind isn't available Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-19 18:00 +0200

csiph-web