lkml.org 
[lkml]   [2010]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Subjectperf: Timestamp COMM and MMAP events for correct attribution
    Date
    This patch series fixes a bug introduced with the per-task-per-cpu event
    support in perf where PERF_RECORD_COMM and PERF_RECORD_MMAP events would arrive
    and be recorded via one CPUs buffer much later than samples corresponding to
    them arriving on another CPUs buffer, and would cause perf to mis-attribute
    those events.

    This has been observed on multiple systems, but is more common the more CPUs
    present - on 64 CPU systems it is extremely common (one system tested occurred
    ~50% of the time, while another was >99%), while on my quad Intel i7 it is much
    rarer (but I have observed it several times). Examining the data file with perf
    report -D shows the COMM and MMAP events a long way through the file (80% or
    more), well after many previous events.

    This series introduces an ABI change to perf to add the timestamps to the MMAP
    and COMM events so that they can be correlated with the samples corresponding
    to them. The timestamps are requested from the kernel by setting the all_timed
    bit in the attributes when opening the events and is placed just after the
    event header of the events in question.

    While not necessary to fix this bug (or any other AFAIK), I have also included
    changes to the PERF_RECORD_READ and PERF_RECORD_LOST events to add the
    timestamp in the same manner. This could be useful to support and if we did
    eventually want to add it it would be easier to change all the events in
    question at once. Those changes are in separate patches from the COMM and MMAP
    changes so they can easily be dropped when merging this upstream if they are
    unwanted.



    \
     
     \ /
      Last update: 2010-11-23 06:39    [W:0.020 / U:243.364 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site