diff options
author | Wang Nan <wangnan0@huawei.com> | 2015-07-31 09:35:33 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-08-06 14:30:38 -0400 |
commit | 0af0885ef69c182d1fa6bb201cd0570e9aa384eb (patch) | |
tree | 28dd434361f2e9055ac1282cc0b249f666714445 | |
parent | 04a22fae4cbc1f7d3f7471e9b36359f98bd3f043 (diff) |
perf tools: Introduce veprintf
va_args alternative to eprintf().
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David Ahern <dsahern@gmail.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kaixu Xia <xiakaixu@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/n/1436445342-1402-19-git-send-email-wangnan0@huawei.com
[ split from another patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/debug.c | 5 | ||||
-rw-r--r-- | tools/perf/util/debug.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index 2da5581ec74d..86d9c7302598 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c | |||
@@ -36,6 +36,11 @@ static int _eprintf(int level, int var, const char *fmt, va_list args) | |||
36 | return ret; | 36 | return ret; |
37 | } | 37 | } |
38 | 38 | ||
39 | int veprintf(int level, int var, const char *fmt, va_list args) | ||
40 | { | ||
41 | return _eprintf(level, var, fmt, args); | ||
42 | } | ||
43 | |||
39 | int eprintf(int level, int var, const char *fmt, ...) | 44 | int eprintf(int level, int var, const char *fmt, ...) |
40 | { | 45 | { |
41 | va_list args; | 46 | va_list args; |
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h index caac2fdc6105..8b9a088c32ab 100644 --- a/tools/perf/util/debug.h +++ b/tools/perf/util/debug.h | |||
@@ -50,6 +50,7 @@ void pr_stat(const char *fmt, ...); | |||
50 | 50 | ||
51 | int eprintf(int level, int var, const char *fmt, ...) __attribute__((format(printf, 3, 4))); | 51 | int eprintf(int level, int var, const char *fmt, ...) __attribute__((format(printf, 3, 4))); |
52 | int eprintf_time(int level, int var, u64 t, const char *fmt, ...) __attribute__((format(printf, 4, 5))); | 52 | int eprintf_time(int level, int var, u64 t, const char *fmt, ...) __attribute__((format(printf, 4, 5))); |
53 | int veprintf(int level, int var, const char *fmt, va_list args); | ||
53 | 54 | ||
54 | int perf_debug_option(const char *str); | 55 | int perf_debug_option(const char *str); |
55 | 56 | ||