public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf timechart: Use pr_debug to report unknown header types
@ 2009-10-23 17:50 Arnaldo Carvalho de Melo
  2009-10-23 17:55 ` Arjan van de Ven
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2009-10-23 17:50 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Arjan van de Ven,
	Frederic Weisbecker, Peter Zijlstra, Paul Mackerras,
	Mike Galbraith

It was using eprintf that checked if verbose was !zero, when I converted
to pr_*() I made the mistake of changing it to pr_warning which caused
'perf timechart' output to be way too verbose.

Cc: Arjan van de Ven <arjan@linux.intel.com>
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-timechart.c         |    8 ++++----
 tools/perf/util/debug.h                |    2 --
 tools/perf/util/include/linux/kernel.h |    3 +++
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 0a2f222..1a616e8 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -1162,10 +1162,10 @@ more:
 	size = event->header.size;
 
 	if (!size || process_event(event) < 0) {
-		pr_warning("%p [%p]: skipping unknown header type: %d\n",
-			   (void *)(offset + head),
-			   (void *)(long)(event->header.size),
-			   event->header.type);
+		pr_debug("%p [%p]: skipping unknown header type: %d\n",
+			 (void *)(offset + head),
+			 (void *)(long)(event->header.size),
+			 event->header.type);
 		/*
 		 * assume we lost track of the stream, check alignment, and
 		 * increment a single u64 in the hope to catch on again 'soon'.
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h
index e8b18a1..5864073 100644
--- a/tools/perf/util/debug.h
+++ b/tools/perf/util/debug.h
@@ -5,8 +5,6 @@
 extern int verbose;
 extern int dump_trace;
 
-int eprintf(int level,
-	    const char *fmt, ...) __attribute__((format(printf, 2, 3)));
 int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
 void trace_event(event_t *event);
 
diff --git a/tools/perf/util/include/linux/kernel.h b/tools/perf/util/include/linux/kernel.h
index 21c0274..9bc107f 100644
--- a/tools/perf/util/include/linux/kernel.h
+++ b/tools/perf/util/include/linux/kernel.h
@@ -85,6 +85,9 @@ simple_strtoul(const char *nptr, char **endptr, int base)
 	return strtoul(nptr, endptr, base);
 }
 
+int eprintf(int level,
+	    const char *fmt, ...) __attribute__((format(printf, 2, 3)));
+
 #ifndef pr_fmt
 #define pr_fmt(fmt) fmt
 #endif
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf timechart: Use pr_debug to report unknown header types
  2009-10-23 17:50 [PATCH] perf timechart: Use pr_debug to report unknown header types Arnaldo Carvalho de Melo
@ 2009-10-23 17:55 ` Arjan van de Ven
  2009-10-23 18:31   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 5+ messages in thread
From: Arjan van de Ven @ 2009-10-23 17:55 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Frederic Weisbecker, Peter Zijlstra,
	Paul Mackerras, Mike Galbraith

Arnaldo Carvalho de Melo wrote:
> It was using eprintf that checked if verbose was !zero, when I converted
> to pr_*() I made the mistake of changing it to pr_warning which caused
> 'perf timechart' output to be way too verbose.
> 


nack...

if you EVER hit one of these you have a very very serious problem.
hiding that is never the right thing to do. I should make this a fatal
event instead.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf timechart: Use pr_debug to report unknown header types
  2009-10-23 17:55 ` Arjan van de Ven
@ 2009-10-23 18:31   ` Arnaldo Carvalho de Melo
  2009-10-23 18:37     ` Arjan van de Ven
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2009-10-23 18:31 UTC (permalink / raw)
  To: Arjan van de Ven
  Cc: Ingo Molnar, linux-kernel, Frederic Weisbecker, Peter Zijlstra,
	Paul Mackerras, Mike Galbraith

Em Fri, Oct 23, 2009 at 10:55:39AM -0700, Arjan van de Ven escreveu:
> Arnaldo Carvalho de Melo wrote:
>> It was using eprintf that checked if verbose was !zero, when I converted
>> to pr_*() I made the mistake of changing it to pr_warning which caused
>> 'perf timechart' output to be way too verbose.
>>
> nack...
>
> if you EVER hit one of these you have a very very serious problem.
> hiding that is never the right thing to do. I should make this a fatal
> event instead.

OK, so I actually fixed a bug as those messages weren't being noticed if
-v wasn't used! :-)

Please take a look at latest tip to see all those messages.

- Arnaldo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf timechart: Use pr_debug to report unknown header types
  2009-10-23 18:31   ` Arnaldo Carvalho de Melo
@ 2009-10-23 18:37     ` Arjan van de Ven
  2009-10-23 18:56       ` Frederic Weisbecker
  0 siblings, 1 reply; 5+ messages in thread
From: Arjan van de Ven @ 2009-10-23 18:37 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Frederic Weisbecker, Peter Zijlstra,
	Paul Mackerras, Mike Galbraith

Arnaldo Carvalho de Melo wrote:
> Em Fri, Oct 23, 2009 at 10:55:39AM -0700, Arjan van de Ven escreveu:
>> Arnaldo Carvalho de Melo wrote:
>>> It was using eprintf that checked if verbose was !zero, when I converted
>>> to pr_*() I made the mistake of changing it to pr_warning which caused
>>> 'perf timechart' output to be way too verbose.
>>>
>> nack...
>>
>> if you EVER hit one of these you have a very very serious problem.
>> hiding that is never the right thing to do. I should make this a fatal
>> event instead.
> 
> OK, so I actually fixed a bug as those messages weren't being noticed if
> -v wasn't used! :-)
> 
> Please take a look at latest tip to see all those messages.
> 
> - Arnaldo

I'm pretty sure latest -tip broke timechart; Frederic tends to have a habit of doing so occasionally :)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf timechart: Use pr_debug to report unknown header types
  2009-10-23 18:37     ` Arjan van de Ven
@ 2009-10-23 18:56       ` Frederic Weisbecker
  0 siblings, 0 replies; 5+ messages in thread
From: Frederic Weisbecker @ 2009-10-23 18:56 UTC (permalink / raw)
  To: Arjan van de Ven
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel,
	Peter Zijlstra, Paul Mackerras, Mike Galbraith

On Fri, Oct 23, 2009 at 11:37:59AM -0700, Arjan van de Ven wrote:
> Arnaldo Carvalho de Melo wrote:
>> Em Fri, Oct 23, 2009 at 10:55:39AM -0700, Arjan van de Ven escreveu:
>>> Arnaldo Carvalho de Melo wrote:
>>>> It was using eprintf that checked if verbose was !zero, when I converted
>>>> to pr_*() I made the mistake of changing it to pr_warning which caused
>>>> 'perf timechart' output to be way too verbose.
>>>>
>>> nack...
>>>
>>> if you EVER hit one of these you have a very very serious problem.
>>> hiding that is never the right thing to do. I should make this a fatal
>>> event instead.
>>
>> OK, so I actually fixed a bug as those messages weren't being noticed if
>> -v wasn't used! :-)
>>
>> Please take a look at latest tip to see all those messages.
>>
>> - Arnaldo
>
> I'm pretty sure latest -tip broke timechart; Frederic tends to have a habit of doing so occasionally :)
>


Yeah but I usually fix what I break. Because I need the things to be working
again if I want to happily continue breaking them :o)

/me wonders if he hasn't played too much legos when he was a child. That
may have provided him a strange vision of the world.

That said I've tested timechart few days ago and it worked very well. (That
was also the first time it worked for me).

So I guess it should be fine.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-10-23 18:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-23 17:50 [PATCH] perf timechart: Use pr_debug to report unknown header types Arnaldo Carvalho de Melo
2009-10-23 17:55 ` Arjan van de Ven
2009-10-23 18:31   ` Arnaldo Carvalho de Melo
2009-10-23 18:37     ` Arjan van de Ven
2009-10-23 18:56       ` Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox