[PATCH 03/11] perf session: Use appropriate pointer type instead of silly typecasting

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Arnaldo Carvalho de Melo
Date: Tuesday, November 30, 2010 - 1:10 pm

From: Thomas Gleixner <tglx@linutronix.de>

There is no reason to use a struct sample_event pointer in struct sample_queue
and type cast it when flushing the queue.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20101130163819.969462809@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/session.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index daca557..525bcf6 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -386,7 +386,7 @@ static event__swap_op event__swap_ops[] = {
 
 struct sample_queue {
 	u64			timestamp;
-	struct sample_event	*event;
+	event_t			*event;
 	struct list_head	list;
 };
 
@@ -406,7 +406,7 @@ static void flush_sample_queue(struct perf_session *s,
 		if (iter->timestamp > limit)
 			break;
 
-		ops->sample((event_t *)iter->event, s);
+		ops->sample(iter->event, s);
 
 		os->last_flush = iter->timestamp;
 		list_del(&iter->list);
-- 
1.6.2.5

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PULL 00/11] perf/core performance improvements, Arnaldo Carvalho de Melo, (Tue Nov 30, 1:10 pm)
[PATCH 03/11] perf session: Use appropriate pointer type i ..., Arnaldo Carvalho de Melo, (Tue Nov 30, 1:10 pm)
[PATCH 05/11] perf session: Move ui_progress_update in __p ..., Arnaldo Carvalho de Melo, (Tue Nov 30, 1:10 pm)
[PATCH 06/11] perf session: Simplify termination checks, Arnaldo Carvalho de Melo, (Tue Nov 30, 1:10 pm)
[PATCH 09/11] perf session: Cache sample objects, Arnaldo Carvalho de Melo, (Tue Nov 30, 1:10 pm)