lkml.org 
[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH -tip v5 2/5] perf: set correct value to perf_event_header.misc for BTS
    From
    Date
    On Mon, 2012-01-30 at 13:43 +0900, Akihiro Nagai wrote:
    > @@ -330,6 +342,14 @@ int intel_pmu_drain_bts_buffer(void)
    > return 1;
    >
    > for (; at < top; at++) {
    > + /*
    > + * To resolve user space symbols and DSOs correctly, set
    > + * PERF_RECORD_MISC_USER if from_addr or to_addr is user space.
    > + */
    > + if (!kernel_ip(data.ip) || !kernel_ip(data.addr)) {
    > + header.misc &= ~PERF_RECORD_MISC_CPUMODE_MASK;
    > + header.misc |= PERF_RECORD_MISC_USER;
    > + }
    > data.ip = at->from;
    > data.addr = at->to;

    Why not key off of the from? If its a jump from userspace its a user
    event, its a jump from kernel space its a kernel event?


    \
     
     \ /
      Last update: 2012-01-30 10:37    [W:0.022 / U:0.516 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site