On 19/10/15 11:08, Ingo Molnar wrote:
> 
> * Adrian Hunter <[email protected]> wrote:
> 
>> Commit b20112edeadf ("perf/x86: Improve accuracy of perf/sched clock")
>> allowed the time_shift value in perf_event_mmap_page to be as much
>> as 32.  Unfortunately the documented algorithms for using time_shift
>> have it shifting an integer, whereas to work correctly with the value
>> 32, the type must be u64.
>>
>> Fix by limiting the shift to 31 and adjusting the multiplier accordingly.
>>
>> Also update the documentation of perf_event_mmap_page so that new code
>> based on it will be more future-proof.
>>
>> Fixes: b20112edeadf ("perf/x86: Improve accuracy of perf/sched clock")
>> Signed-off-by: Adrian Hunter <[email protected]>
> 
> Would be nice to point out via what symptoms the code misbehaves and how 
> users 
> notice.

In the case of perf tools, Intel PT decodes correctly but the timestamps
that are output (for example by perf script) have lost 32-bits of
granularity so they look like they are not changing at all.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to