lkml.org 
[lkml]   [2010]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch 2/9] perf: Use appropriate pointer type instead of silly typecasting
Em Tue, Nov 30, 2010 at 05:49:35PM -0000, Thomas Gleixner escreveu:
> There is no reason to use a struct sample_event pointer in struct sample_queue
> and type cast it when flushing the queue.

> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

I touched that code in a branch I'm working on, same change :-\ Well,
testing the other patches, thanks!

- Arnaldo

> tools/perf/util/session.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux-2.6-tip/tools/perf/util/session.c
> ===================================================================
> --- linux-2.6-tip.orig/tools/perf/util/session.c
> +++ linux-2.6-tip/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 pe
> 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);
>


\
 
 \ /
  Last update: 2010-11-30 19:35    [W:0.894 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site