From: Namhyung Kim <namhyung@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 04/17] tools lib traceevent: Get rid of die() finally!!
Date: Wed, 15 Jan 2014 10:45:27 +0900 [thread overview]
Message-ID: <1389750340-15965-5-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1389750340-15965-1-git-send-email-namhyung@kernel.org>
Now all of its users were gone. :)
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/lib/traceevent/event-utils.h | 4 ----
tools/lib/traceevent/parse-utils.c | 44 --------------------------------------
2 files changed, 48 deletions(-)
diff --git a/tools/lib/traceevent/event-utils.h b/tools/lib/traceevent/event-utils.h
index e76c9acb92cd..d1dc2170e402 100644
--- a/tools/lib/traceevent/event-utils.h
+++ b/tools/lib/traceevent/event-utils.h
@@ -23,18 +23,14 @@
#include <ctype.h>
/* Can be overridden */
-void die(const char *fmt, ...);
-void *malloc_or_die(unsigned int size);
void warning(const char *fmt, ...);
void pr_stat(const char *fmt, ...);
void vpr_stat(const char *fmt, va_list ap);
/* Always available */
-void __die(const char *fmt, ...);
void __warning(const char *fmt, ...);
void __pr_stat(const char *fmt, ...);
-void __vdie(const char *fmt, ...);
void __vwarning(const char *fmt, ...);
void __vpr_stat(const char *fmt, ...);
diff --git a/tools/lib/traceevent/parse-utils.c b/tools/lib/traceevent/parse-utils.c
index bba701cf10e6..eda07fa31dca 100644
--- a/tools/lib/traceevent/parse-utils.c
+++ b/tools/lib/traceevent/parse-utils.c
@@ -25,40 +25,6 @@
#define __weak __attribute__((weak))
-void __vdie(const char *fmt, va_list ap)
-{
- int ret = errno;
-
- if (errno)
- perror("trace-cmd");
- else
- ret = -1;
-
- fprintf(stderr, " ");
- vfprintf(stderr, fmt, ap);
-
- fprintf(stderr, "\n");
- exit(ret);
-}
-
-void __die(const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- __vdie(fmt, ap);
- va_end(ap);
-}
-
-void __weak die(const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- __vdie(fmt, ap);
- va_end(ap);
-}
-
void __vwarning(const char *fmt, va_list ap)
{
if (errno)
@@ -117,13 +83,3 @@ void __weak pr_stat(const char *fmt, ...)
__vpr_stat(fmt, ap);
va_end(ap);
}
-
-void __weak *malloc_or_die(unsigned int size)
-{
- void *data;
-
- data = malloc(size);
- if (!data)
- die("malloc");
- return data;
-}
--
1.7.11.7
next prev parent reply other threads:[~2014-01-15 1:49 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 1:45 [PATCHSET 00/17] tools lib traceevent: Plugin unload enhancement Namhyung Kim
2014-01-15 1:45 ` [PATCH 01/17] tools lib traceevent: Add state member to struct trace_seq Namhyung Kim
2014-01-15 2:00 ` Steven Rostedt
2014-01-15 2:49 ` Namhyung Kim
2014-01-15 2:56 ` Steven Rostedt
2014-01-15 5:03 ` Namhyung Kim
2014-01-15 14:15 ` Arnaldo Carvalho de Melo
2014-01-15 14:25 ` Steven Rostedt
2014-01-16 13:37 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-01-15 1:45 ` [PATCH 02/17] tools lib traceevent: Check return value of realloc() Namhyung Kim
2014-01-15 2:03 ` Steven Rostedt
2014-01-16 13:37 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-01-15 1:45 ` [PATCH 03/17] tools lib traceevent: Get rid of malloc_or_die() in trace_seq_init() Namhyung Kim
2014-01-15 2:05 ` Steven Rostedt
2014-01-16 13:37 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-01-15 1:45 ` Namhyung Kim [this message]
2014-01-16 13:38 ` [tip:perf/core] tools lib traceevent: Get rid of die() finally!! tip-bot for Namhyung Kim
2014-01-15 1:45 ` [PATCH 05/17] tools lib traceevent: Make plugin unload function receive pevent Namhyung Kim
2014-01-15 2:24 ` Steven Rostedt
2014-01-16 13:38 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-01-15 1:45 ` [PATCH 06/17] tools lib traceevent: Add pevent_unregister_event_handler() Namhyung Kim
2014-01-15 16:18 ` Steven Rostedt
2014-01-15 18:12 ` Arnaldo Carvalho de Melo
2014-01-16 0:00 ` Namhyung Kim
2014-01-16 1:52 ` Steven Rostedt
2014-01-16 1:58 ` Namhyung Kim
2014-01-16 2:05 ` Steven Rostedt
2014-01-15 1:45 ` [PATCH 07/17] tools lib traceevent: Add pevent_unregister_print_function() Namhyung Kim
2014-01-15 16:19 ` Steven Rostedt
2014-01-15 1:45 ` [PATCH 08/17] tools lib traceevent: Unregister handler when function plugin unloaded Namhyung Kim
2014-01-15 16:21 ` Steven Rostedt
2014-01-15 1:45 ` [PATCH 09/17] tools lib traceevent: Unregister handler when hrtimer " Namhyung Kim
2014-01-15 16:21 ` Steven Rostedt
2014-01-15 1:45 ` [PATCH 10/17] tools lib traceevent: Unregister handler when kmem " Namhyung Kim
2014-01-15 1:45 ` [PATCH 11/17] tools lib traceevent: Unregister handler when kvm " Namhyung Kim
2014-01-15 1:45 ` [PATCH 12/17] tools lib traceevent: Unregister handler when sched_switch " Namhyung Kim
2014-01-15 1:45 ` [PATCH 13/17] tools lib traceevent: Unregister handler when mac80211 " Namhyung Kim
2014-01-15 20:32 ` Steven Rostedt
2014-01-15 1:45 ` [PATCH 14/17] tools lib traceevent: Unregister handler when cfg80211 " Namhyung Kim
2014-01-15 20:34 ` Steven Rostedt
2014-01-15 1:45 ` [PATCH 15/17] tools lib traceevent: Unregister handler when jbd2 " Namhyung Kim
2014-01-15 20:35 ` Steven Rostedt
2014-01-15 1:45 ` [PATCH 16/17] tools lib traceevent: Unregister handler when scsi " Namhyung Kim
2014-01-15 20:36 ` Steven Rostedt
2014-01-15 1:45 ` [PATCH 17/17] tools lib traceevent: Unregister handler when xen " Namhyung Kim
2014-01-15 13:39 ` [PATCHSET 00/17] tools lib traceevent: Plugin unload enhancement Jiri Olsa
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=1389750340-15965-5-git-send-email-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®