summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-05-12 09:47:25 +0900
committerJiri Olsa <jolsa@kernel.org>2014-05-12 11:09:50 +0200
commitbac1e4d103f7e3d82e5dc7423c04edcb8c899c22 (patch)
treefce15665bba3941bb2e1c71f751d2071694a8b03 /tools/perf/builtin-record.c
parent4560471053a9eb1586d0091066016a5cbcef4b6b (diff)
downloadblackbird-op-linux-bac1e4d103f7e3d82e5dc7423c04edcb8c899c22.tar.gz
blackbird-op-linux-bac1e4d103f7e3d82e5dc7423c04edcb8c899c22.zip
perf tools: Get rid of on_exit() feature test
The on_exit() function was only used in perf record but it's gone in previous patch. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Stephane Eranian <eranian@google.com> Cc: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> Cc: Irina Tirdea <irina.tirdea@intel.com> Link: http://lkml.kernel.org/r/1399855645-25815-2-git-send-email-namhyung@kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 2e0d484068d2..e4c85b8f46c2 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -30,37 +30,6 @@
#include <sched.h>
#include <sys/mman.h>
-#ifndef HAVE_ON_EXIT_SUPPORT
-#ifndef ATEXIT_MAX
-#define ATEXIT_MAX 32
-#endif
-static int __on_exit_count = 0;
-typedef void (*on_exit_func_t) (int, void *);
-static on_exit_func_t __on_exit_funcs[ATEXIT_MAX];
-static void *__on_exit_args[ATEXIT_MAX];
-static int __exitcode = 0;
-static void __handle_on_exit_funcs(void);
-static int on_exit(on_exit_func_t function, void *arg);
-#define exit(x) (exit)(__exitcode = (x))
-
-static int on_exit(on_exit_func_t function, void *arg)
-{
- if (__on_exit_count == ATEXIT_MAX)
- return -ENOMEM;
- else if (__on_exit_count == 0)
- atexit(__handle_on_exit_funcs);
- __on_exit_funcs[__on_exit_count] = function;
- __on_exit_args[__on_exit_count++] = arg;
- return 0;
-}
-
-static void __handle_on_exit_funcs(void)
-{
- int i;
- for (i = 0; i < __on_exit_count; i++)
- __on_exit_funcs[i] (__exitcode, __on_exit_args[i]);
-}
-#endif
struct record {
struct perf_tool tool;
OpenPOWER on IntegriCloud