Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1583415 > unrolled thread

Re: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to perf_aux_output_end

Started byAlexander Shishkin <alexander.shishkin@linux.intel.com>
First post2017-02-17 14:50 +0100
Last post2017-02-17 16:10 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to perf_aux_output_end Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-17 14:50 +0100
    Re: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to  perf_aux_output_end Will Deacon <will.deacon@arm.com> - 2017-02-17 15:10 +0100
      Re: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to perf_aux_output_end Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-17 15:20 +0100
        Re: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to  perf_aux_output_end Will Deacon <will.deacon@arm.com> - 2017-02-17 15:50 +0100
          Re: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to perf_aux_output_end Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-02-17 16:10 +0100

#1583415 — Re: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to perf_aux_output_end

FromAlexander Shishkin <alexander.shishkin@linux.intel.com>
Date2017-02-17 14:50 +0100
SubjectRe: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to perf_aux_output_end
Message-ID<tbR57-4Vq-15@gated-at.bofh.it>
Will Deacon <will.deacon@arm.com> writes:

> @@ -485,7 +485,8 @@ int intel_bts_interrupt(void)
>  		return handled;
>  
>  	perf_aux_output_end(&bts->handle, local_xchg(&buf->data_size, 0),
> -			    !!local_xchg(&buf->lost, 0));
> +			    local_xchg(&buf->lost, 0) ?
> +			    PERF_AUX_FLAG_OVERWRITE : 0);

Heh, this one would have taken some time to debug. :)

Regards,
--
Alex

[toc] | [next] | [standalone]


#1583431 — Re: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to perf_aux_output_end

FromWill Deacon <will.deacon@arm.com>
Date2017-02-17 15:10 +0100
SubjectRe: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to perf_aux_output_end
Message-ID<tbRou-5iA-23@gated-at.bofh.it>
In reply to#1583415
On Fri, Feb 17, 2017 at 03:40:23PM +0200, Alexander Shishkin wrote:
> Will Deacon <will.deacon@arm.com> writes:
> 
> > @@ -485,7 +485,8 @@ int intel_bts_interrupt(void)
> >  		return handled;
> >  
> >  	perf_aux_output_end(&bts->handle, local_xchg(&buf->data_size, 0),
> > -			    !!local_xchg(&buf->lost, 0));
> > +			    local_xchg(&buf->lost, 0) ?
> > +			    PERF_AUX_FLAG_OVERWRITE : 0);
> 
> Heh, this one would have taken some time to debug. :)

Don't worry, this isn't a bug fix! This patch changes the prototype for
perf_aux_output_end so that it takes the flag instead of a "bool truncated"
parameter, so this is just fixing up the callers at the same time.

Will

[toc] | [prev] | [next] | [standalone]


#1583445

FromAlexander Shishkin <alexander.shishkin@linux.intel.com>
Date2017-02-17 15:20 +0100
Message-ID<tbRya-5mq-23@gated-at.bofh.it>
In reply to#1583431
Will Deacon <will.deacon@arm.com> writes:

> On Fri, Feb 17, 2017 at 03:40:23PM +0200, Alexander Shishkin wrote:
>> Will Deacon <will.deacon@arm.com> writes:
>> 
>> > @@ -485,7 +485,8 @@ int intel_bts_interrupt(void)
>> >  		return handled;
>> >  
>> >  	perf_aux_output_end(&bts->handle, local_xchg(&buf->data_size, 0),
>> > -			    !!local_xchg(&buf->lost, 0));
>> > +			    local_xchg(&buf->lost, 0) ?
>> > +			    PERF_AUX_FLAG_OVERWRITE : 0);
>> 
>> Heh, this one would have taken some time to debug. :)
>
> Don't worry, this isn't a bug fix! This patch changes the prototype for
> perf_aux_output_end so that it takes the flag instead of a "bool truncated"
> parameter, so this is just fixing up the callers at the same time.

Yeah, I got that, what I'm saying is that the above should be
PERF_AUX_FLAG_TRUNCATED, not OVERWRITE. I only spotted it by accident.

Regards,
--
Alex

[toc] | [prev] | [next] | [standalone]


#1583494 — Re: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to perf_aux_output_end

FromWill Deacon <will.deacon@arm.com>
Date2017-02-17 15:50 +0100
SubjectRe: [PATCH 07/10] perf: Directly pass PERF_AUX_* flags to perf_aux_output_end
Message-ID<tbS1c-5xl-39@gated-at.bofh.it>
In reply to#1583445
On Fri, Feb 17, 2017 at 04:06:59PM +0200, Alexander Shishkin wrote:
> Will Deacon <will.deacon@arm.com> writes:
> 
> > On Fri, Feb 17, 2017 at 03:40:23PM +0200, Alexander Shishkin wrote:
> >> Will Deacon <will.deacon@arm.com> writes:
> >> 
> >> > @@ -485,7 +485,8 @@ int intel_bts_interrupt(void)
> >> >  		return handled;
> >> >  
> >> >  	perf_aux_output_end(&bts->handle, local_xchg(&buf->data_size, 0),
> >> > -			    !!local_xchg(&buf->lost, 0));
> >> > +			    local_xchg(&buf->lost, 0) ?
> >> > +			    PERF_AUX_FLAG_OVERWRITE : 0);
> >> 
> >> Heh, this one would have taken some time to debug. :)
> >
> > Don't worry, this isn't a bug fix! This patch changes the prototype for
> > perf_aux_output_end so that it takes the flag instead of a "bool truncated"
> > parameter, so this is just fixing up the callers at the same time.
> 
> Yeah, I got that, what I'm saying is that the above should be
> PERF_AUX_FLAG_TRUNCATED, not OVERWRITE. I only spotted it by accident.

D'oh, quite right, I'll fix that now. Thanks for having a look.

Will

[toc] | [prev] | [next] | [standalone]


#1583503

FromAlexander Shishkin <alexander.shishkin@linux.intel.com>
Date2017-02-17 16:10 +0100
Message-ID<tbSkx-5TK-7@gated-at.bofh.it>
In reply to#1583494
Will Deacon <will.deacon@arm.com> writes:

> On Fri, Feb 17, 2017 at 04:06:59PM +0200, Alexander Shishkin wrote:
>> Will Deacon <will.deacon@arm.com> writes:
>> 
>> > On Fri, Feb 17, 2017 at 03:40:23PM +0200, Alexander Shishkin wrote:
>> >> Will Deacon <will.deacon@arm.com> writes:
>> >> 
>> >> > @@ -485,7 +485,8 @@ int intel_bts_interrupt(void)
>> >> >  		return handled;
>> >> >  
>> >> >  	perf_aux_output_end(&bts->handle, local_xchg(&buf->data_size, 0),
>> >> > -			    !!local_xchg(&buf->lost, 0));
>> >> > +			    local_xchg(&buf->lost, 0) ?
>> >> > +			    PERF_AUX_FLAG_OVERWRITE : 0);
>> >> 
>> >> Heh, this one would have taken some time to debug. :)
>> >
>> > Don't worry, this isn't a bug fix! This patch changes the prototype for
>> > perf_aux_output_end so that it takes the flag instead of a "bool truncated"
>> > parameter, so this is just fixing up the callers at the same time.
>> 
>> Yeah, I got that, what I'm saying is that the above should be
>> PERF_AUX_FLAG_TRUNCATED, not OVERWRITE. I only spotted it by accident.
>
> D'oh, quite right, I'll fix that now. Thanks for having a look.

Wait a bit with the fixing, I'm about to post an amended version.

Regards,
--
Alex

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web