lkml.org 
[lkml]   [2009]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 5/6] perf_counter: add more context information

    Peter Zijlstra wrote:
    > On Thu, 2009-04-02 at 11:12 +0200, Peter Zijlstra wrote:
    >> plain text document attachment (perf_counter_callchain_context.patch)
    >> Put in counts to tell which ips belong to what context.
    >>
    >> -----
    >> | | hv
    >> | --
    >> nr | | kernel
    >> | --
    >> | | user
    >> -----
    >
    > Right, just realized that PERF_RECORD_IP needs something similar if one
    > if not able to derive the context from the IP itself..
    >
    Three individual bits would suffice, or you could use a two-bit code -
    00 = user
    01 = kernel
    10 = hypervisor
    11 = reserved (or perhaps unknown)

    Unfortunately, because of alignment, it would need to take up another 64
    bit word, wouldn't it? Too bad you cannot sneak the bits into the IP in
    a machine independent way.

    And since you probably need a separate word, that effectively doubles
    the amount of space taken up by IP samples (if we add a "no event
    header" option). Should we add another bit in the record_type field -
    PERF_RECORD_IP_LEVEL (or similar) so that user-space apps don't have to
    get this if they don't need it?

    Regards,

    - Corey




    \
     
     \ /
      Last update: 2009-04-03 20:29    [W:4.057 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site