mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 03/11] perf session: Use appropriate pointer type instead of silly typecasting
Date: Tue, 30 Nov 2010 18:10:48 -0200	[thread overview]
Message-ID: <1291147856-17459-4-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1291147856-17459-1-git-send-email-acme@infradead.org>

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


  parent reply	other threads:[~2010-11-30 20:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30 20:10 [GIT PULL 00/11] perf/core performance improvements Arnaldo Carvalho de Melo
2010-11-30 20:10 ` [PATCH 01/11] perf events: Precalculate the header space for PERF_SAMPLE_ fields Arnaldo Carvalho de Melo
2010-11-30 20:10 ` [PATCH 02/11] perf session: Fix list sort algorithm Arnaldo Carvalho de Melo
2010-11-30 20:10 ` Arnaldo Carvalho de Melo [this message]
2010-11-30 20:10 ` [PATCH 04/11] perf session: Cleanup __perf_session__process_events() Arnaldo Carvalho de Melo
2010-11-30 20:10 ` [PATCH 05/11] perf session: Move ui_progress_update in __perf_session__process_events() Arnaldo Carvalho de Melo
2010-11-30 20:10 ` [PATCH 06/11] perf session: Simplify termination checks Arnaldo Carvalho de Melo
2010-11-30 20:10 ` [PATCH 07/11] perf session: Use sensible mmap size Arnaldo Carvalho de Melo
2010-11-30 20:10 ` [PATCH 08/11] perf session: Keep file mmaped instead of malloc/memcpy Arnaldo Carvalho de Melo
2010-11-30 20:10 ` [PATCH 09/11] perf session: Cache sample objects Arnaldo Carvalho de Melo
2010-11-30 20:10 ` [PATCH 10/11] perf session: Allocate chunks of " Arnaldo Carvalho de Melo
2010-11-30 20:10 ` [PATCH 11/11] perf debug: Simplify trace_event Arnaldo Carvalho de Melo
2010-12-01  8:22 ` [GIT PULL 00/11] perf/core performance improvements Ingo Molnar

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=1291147856-17459-4-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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®