2017-12-18 13:04:05

by Stephane Eranian

[permalink] [raw]
Subject: perf record: regression with latest PT fix

Hi,


The following patch:

f785657b0fbe perf report: Fix regression when decoding Intel-PT traces

is breaking perf report for me. I get no samples reported from perf report
when running simple perf record commands:

$ perf record -e cycles noploop

Reverting the patch fixes the problem.

Are you seeing this as well?


2017-12-18 14:25:56

by Adrian Hunter

[permalink] [raw]
Subject: Re: perf record: regression with latest PT fix

On 18/12/17 15:28, Alexander Shishkin wrote:
> On Mon, Dec 18, 2017 at 05:03:53AM -0800, Stephane Eranian wrote:
>> Hi,
>>
>>
>> The following patch:
>>
>> f785657b0fbe perf report: Fix regression when decoding Intel-PT traces
>
> Cc'ing Adrian in case he missed the patch.

Doesn't seem to have much to do with Intel PT, but the patch logic looks wrong:

ret = perf_evlist__parse_sample_timestamp(evlist, event, &timestamp);
- if (ret)
+ if (ret != -1)
return ret;

Shouldn't that be:

ret = perf_evlist__parse_sample_timestamp(evlist, event, &timestamp);
- if (ret)
+ if (ret && ret != -1)
return ret;


>
>> is breaking perf report for me. I get no samples reported from perf report
>> when running simple perf record commands:
>>
>> $ perf record -e cycles noploop
>>
>> Reverting the patch fixes the problem.
>>
>> Are you seeing this as well?
>

2017-12-18 15:23:54

by Mathieu Poirier

[permalink] [raw]
Subject: Re: perf record: regression with latest PT fix

On 18 December 2017 at 07:25, Adrian Hunter <[email protected]> wrote:
> On 18/12/17 15:28, Alexander Shishkin wrote:
>> On Mon, Dec 18, 2017 at 05:03:53AM -0800, Stephane Eranian wrote:
>>> Hi,
>>>
>>>
>>> The following patch:
>>>
>>> f785657b0fbe perf report: Fix regression when decoding Intel-PT traces
>>
>> Cc'ing Adrian in case he missed the patch.
>
> Doesn't seem to have much to do with Intel PT, but the patch logic looks wrong:
>
> ret = perf_evlist__parse_sample_timestamp(evlist, event, &timestamp);
> - if (ret)
> + if (ret != -1)
> return ret;
>
> Shouldn't that be:
>
> ret = perf_evlist__parse_sample_timestamp(evlist, event, &timestamp);
> - if (ret)
> + if (ret && ret != -1)
> return ret;

Of course!

Ingo, how do you want to proceed? Should I send a V3?

>
>
>>
>>> is breaking perf report for me. I get no samples reported from perf report
>>> when running simple perf record commands:
>>>
>>> $ perf record -e cycles noploop
>>>
>>> Reverting the patch fixes the problem.
>>>
>>> Are you seeing this as well?
>>
>

2017-12-18 16:44:40

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: perf record: regression with latest PT fix

Em Mon, Dec 18, 2017 at 08:23:46AM -0700, Mathieu Poirier escreveu:
> On 18 December 2017 at 07:25, Adrian Hunter <[email protected]> wrote:
> > On 18/12/17 15:28, Alexander Shishkin wrote:
> >> On Mon, Dec 18, 2017 at 05:03:53AM -0800, Stephane Eranian wrote:
> >>> Hi,
> >>>
> >>>
> >>> The following patch:
> >>>
> >>> f785657b0fbe perf report: Fix regression when decoding Intel-PT traces
> >>
> >> Cc'ing Adrian in case he missed the patch.
> >
> > Doesn't seem to have much to do with Intel PT, but the patch logic looks wrong:
> >
> > ret = perf_evlist__parse_sample_timestamp(evlist, event, &timestamp);
> > - if (ret)
> > + if (ret != -1)
> > return ret;
> >
> > Shouldn't that be:
> >
> > ret = perf_evlist__parse_sample_timestamp(evlist, event, &timestamp);
> > - if (ret)
> > + if (ret && ret != -1)
> > return ret;
>
> Of course!
>
> Ingo, how do you want to proceed? Should I send a V3?

Probably, I've run into this as well, as has Ingo, after I reverted it,
things got back working.

Back to vacations... :-)

- Arnaldo

> >>> is breaking perf report for me. I get no samples reported from perf report
> >>> when running simple perf record commands:
> >>>
> >>> $ perf record -e cycles noploop
> >>>
> >>> Reverting the patch fixes the problem.
> >>>
> >>> Are you seeing this as well?
> >>
> >