mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Paul Mackerras <paulus@samba.org>, Mike Galbraith <efault@gmx.de>
Subject: Re: [PATCH 1/1] perf tools: Unify debug messages mechanisms
Date: Fri, 23 Oct 2009 08:20:00 +0200	[thread overview]
Message-ID: <20091023062000.GB1389@elte.hu> (raw)
In-Reply-To: <1256153646-10097-1-git-send-email-acme@redhat.com>


* Arnaldo Carvalho de Melo <acme@redhat.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@gmail.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Mike Galbraith <efault@gmx.de>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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

  reply	other threads:[~2009-10-23  6:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 19:34 Arnaldo Carvalho de Melo
2009-10-23  6:20 ` Ingo Molnar [this message]
2009-10-24  1:04 ` [tip:branch?] " tip-bot for Arnaldo Carvalho de Melo
2009-10-24  1:04 ` [tip:branch?] perf probe: Print debug messages using pr_*() tip-bot for Arnaldo Carvalho de Melo

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=20091023062000.GB1389@elte.hu \
    --to=mingo@elte.hu \
    --cc=acme@redhat.com \
    --cc=efault@gmx.de \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.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®