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


Groups > linux.kernel > #1363714

[PATCH 13/23] perf tools: Simplify die() mechanism

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 13/23] perf tools: Simplify die() mechanism
Date 2016-03-23 22:30 +0100
Message-ID <rfYvM-Xc-21@gated-at.bofh.it> (permalink)
References <rfYm5-S2-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

This should die altogether, but for now lets remove a bit of this stuff,
as it is not used at all.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ade3n99xscldhg5mx2vzd8p3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/usage.c | 8 +-------
 tools/perf/util/util.h  | 1 -
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/tools/perf/util/usage.c b/tools/perf/util/usage.c
index 6adfa18cdd4e..996046a66fe5 100644
--- a/tools/perf/util/usage.c
+++ b/tools/perf/util/usage.c
@@ -41,15 +41,9 @@ static void warn_builtin(const char *warn, va_list params)
 /* If we are in a dlopen()ed .so write to a global variable would segfault
  * (ugh), so keep things static. */
 static void (*usage_routine)(const char *err) NORETURN = usage_builtin;
-static void (*die_routine)(const char *err, va_list params) NORETURN = die_builtin;
 static void (*error_routine)(const char *err, va_list params) = error_builtin;
 static void (*warn_routine)(const char *err, va_list params) = warn_builtin;
 
-void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN)
-{
-	die_routine = routine;
-}
-
 void set_warning_routine(void (*routine)(const char *err, va_list params))
 {
 	warn_routine = routine;
@@ -65,7 +59,7 @@ void die(const char *err, ...)
 	va_list params;
 
 	va_start(params, err);
-	die_routine(err, params);
+	die_builtin(err, params);
 	va_end(params);
 }
 
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 1b06216d31df..2080142d7244 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -140,7 +140,6 @@ extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)))
 
 #include "../../../include/linux/stringify.h"
 
-extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN);
 extern void set_warning_routine(void (*routine)(const char *err, va_list params));
 
 extern int prefixcmp(const char *str, const char *prefix);
-- 
2.5.5

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


Thread

[GIT PULL 00/23] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:20 +0100
  [PATCH 03/23] perf symbols: Record text offset in dso to calculate objdump address Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:20 +0100
  [PATCH 06/23] perf tools: Remove misplaced __maybe_unused Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 17/23] perf tools: Do not include stringify.h from the kernel sources Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 04/23] perf bench numa: Fix assertion for nodes bitfield Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 13/23] perf tools: Simplify die() mechanism Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 10/23] perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 14/23] perf tools: Remove needless 'extern' from function prototypes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 07/23] perf tests: Forward the perf_sample in the dwarf unwind test Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 18/23] perf tools: Remove unused perf_pathdup, xstrdup functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 12/23] perf tools: Remove unused DIE_IF macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 01/23] perf test: Remove 'core_id' check in topo test Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 11/23] perf script: Remove lots of unused arguments Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 15/23] tools lib traceevent: Remove redundant CPU output Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 02/23] tools: Move utilities.mak from perf to tools/scripts/ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 09/23] perf machine: Rename perf_event__preprocess_sample to machine__resolve Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 19/23] perf help: Use asprintf instead of adhoc equivalents Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  [PATCH 20/23] perf probe: No need to use formatting strbuf method Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100
  Re: [GIT PULL 00/23] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-03-24 08:40 +0100

csiph-web