lkml.org 
[lkml]   [2013]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Perf: Correct Assumptions about Sample Timestamps in Passes
On 11/14/13, 7:44 AM, Peter Zijlstra wrote:
> On Thu, Nov 14, 2013 at 07:26:06AM -0700, David Ahern wrote:
>> On 11/14/13, 3:05 AM, Ingo Molnar wrote:
>>
>>> What am I missing?
>>
>> I have spent quite a bit of time on this problem on this well. I think the
>> flush time needs to be based on the start time of each round, not the
>> minimum time observed across mmaps. I have tried the minimum time stamp
>> route and it still fails often enough to be annoying.
>>
>> See builtin-kvm.c, perf_kvm__mmap_read(). The problem is that it takes time
>> to move from mmap to mmap and sample can come in behind you - an mmap that
>> has already be scanned with a timestamp less than what is determined to be
>> the lowest minimum for the samples actually read. 'perf kvm stat live' in a
>> nested environment is a stress test for the problem.
>
> In which case you need the sliding sort window to be n*buf_size, where n
> is the number of buffers flushed into the one file. Or move to one file
> per buffer and merge sort the lot, buffers should be monotonic.

The one file per buffer does not work for live commands -- like perf-top
and kvm-stat-live. perf-trace is not using the ordered samples code, but
I think it needs to - especially for system wide.

David



\
 
 \ /
  Last update: 2013-11-14 16:41    [W:1.634 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site