summaryrefslogtreecommitdiff
path: root/tools/perf/perf.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-08-31 21:44:13 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-09-25 15:51:49 +0300
commit428dab813a56ce9402f359dc35a3ccdfcaea9429 (patch)
treed8d659636eb5722cf9a926bf9e3f3e2e50a83913 /tools/perf/perf.c
parentfb4bf51fcc153f74c86e08ce1d17e9f1a1a71ba0 (diff)
downloadlinux-428dab813a56ce9402f359dc35a3ccdfcaea9429.tar.xz
libperf: Merge libperf_set_print() into libperf_init()
The libperf_set_print() function needs to be called in any case so let's merge it with libperf_init(), so we have just one init function. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lore.kernel.org/lkml/20190913132355.21634-34-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/perf.c')
-rw-r--r--tools/perf/perf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index c012ceb64ff9..27f94b0bb874 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -430,6 +430,12 @@ void pthread__unblock_sigwinch(void)
pthread_sigmask(SIG_UNBLOCK, &set, NULL);
}
+static int libperf_print(enum libperf_print_level level,
+ const char *fmt, va_list ap)
+{
+ return eprintf(level, verbose, fmt, ap);
+}
+
int main(int argc, const char **argv)
{
int err;
@@ -440,7 +446,7 @@ int main(int argc, const char **argv)
exec_cmd_init("perf", PREFIX, PERF_EXEC_PATH, EXEC_PATH_ENVIRONMENT);
pager_init(PERF_PAGER_ENVIRONMENT);
- libperf_init();
+ libperf_init(libperf_print);
cmd = extract_argv0_path(argv[0]);
if (!cmd)