lkml.org 
[lkml]   [2015]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [6/9] powerpc/hv-24x7: Define add_event_to_24x7_request()
Date
On Tue, 2015-17-02 at 22:00:31 UTC, Sukadev Bhattiprolu wrote:
> Move code that maps a perf_event to a 24x7 request buffer into a
> separate function, add_event_to_24x7_request().
>
> diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
> index e78b127..76c649a 100644
> --- a/arch/powerpc/perf/hv-24x7.c
> +++ b/arch/powerpc/perf/hv-24x7.c
> @@ -1052,7 +1077,6 @@ static unsigned long single_24x7_request(struct perf_event *event, u64 *count)
> }
>
> resb = &result_buffer->results[0];
> -
> *count = be64_to_cpu(resb->elements[0].element_data[0]);
> out:
> return ret;
> @@ -1150,6 +1174,7 @@ static void h_24x7_event_read(struct perf_event *event)
> {
> s64 prev;
> u64 now;
> +
> now = h_24x7_get_value(event);
> prev = local64_xchg(&event->hw.prev_count, now);
> local64_add(now - prev, &event->count);

I'm a fan of whitespace for readability in cases like this, but do it as a
separate patch.

cheers


\
 
 \ /
  Last update: 2015-03-17 03:21    [W:0.096 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site