[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091023062000.GB1389@elte.hu>
Date: Fri, 23 Oct 2009 08:20:00 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Frederic Weisbecker <fweisbec@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Paul Mackerras <paulus@...ba.org>,
Mike Galbraith <efault@....de>
Subject: Re: [PATCH 1/1] perf tools: Unify debug messages mechanisms
* Arnaldo Carvalho de Melo <acme@...hat.com> wrote:
> We were using eprintf in some places, that looks at a global 'verbose'
> level, and at other places passing a 'v' parameter to specify the
> verbosity level, unify it by introducing pr_{err,warning,debug,etc},
> just like in the kernel.
>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Mike Galbraith <efault@....de>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> ---
> tools/perf/builtin-annotate.c | 3 +-
> tools/perf/builtin-probe.c | 20 +++---
> tools/perf/builtin-record.c | 2 +-
> tools/perf/builtin-report.c | 9 +-
> tools/perf/builtin-sched.c | 4 +-
> tools/perf/builtin-timechart.c | 13 ++--
> tools/perf/builtin-top.c | 2 +-
> tools/perf/builtin-trace.c | 4 +-
> tools/perf/util/callchain.c | 2 +-
> tools/perf/util/debug.c | 4 +-
> tools/perf/util/debug.h | 3 +-
> tools/perf/util/event.h | 3 +-
> tools/perf/util/header.c | 2 +-
> tools/perf/util/include/linux/kernel.h | 17 ++++
> tools/perf/util/map.c | 17 ++--
> tools/perf/util/probe-finder.c | 12 ++--
> tools/perf/util/symbol.c | 134 ++++++++++++++------------------
> tools/perf/util/symbol.h | 5 +-
> tools/perf/util/thread.c | 6 +-
> 19 files changed, 130 insertions(+), 132 deletions(-)
>
> diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
> index 99bac6a..6d63c2e 100644
> --- a/tools/perf/builtin-annotate.c
> +++ b/tools/perf/builtin-annotate.c
> @@ -203,8 +203,7 @@ static int
> process_mmap_event(event_t *event, unsigned long offset, unsigned long head)
> {
> struct map *map = map__new(&event->mmap, NULL, 0,
> - sizeof(struct sym_priv), symbol_filter,
> - verbose);
> + sizeof(struct sym_priv), symbol_filter);
> struct thread *thread = threads__findnew(event->mmap.pid);
>
> dump_printf("%p [%p]: PERF_RECORD_MMAP %d: [%p(%p) @ %p]: %s\n",
> diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
> index b5ad86a..dcb406c 100644
> --- a/tools/perf/builtin-probe.c
> +++ b/tools/perf/builtin-probe.c
> @@ -78,7 +78,7 @@ static int parse_probepoint(const struct option *opt __used,
> if (!str) /* The end of probe points */
> return 0;
>
> - eprintf("probe-definition(%d): %s\n", session.nr_probe, str);
> + pr_debug("probe-definition(%d): %s\n", session.nr_probe, str);
Very nice! That verbose global/local overlap has always bothered me,
thanks for fixing it!
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists