Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1666857

Re: [PATCH 2/5] perf/x86: add PERF_SAMPLE_SKID_IP support for X86 PEBS

From Stephane Eranian <eranian@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/5] perf/x86: add PERF_SAMPLE_SKID_IP support for X86 PEBS
Date 2017-06-15 18:40 +0200
Message-ID <tSFYl-4Nd-9@gated-at.bofh.it> (permalink)
References <tSDtv-39X-3@gated-at.bofh.it> <tSDtv-39X-13@gated-at.bofh.it> <tSFbX-4fG-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 15, 2017 at 8:40 AM, Liang, Kan <kan.liang@intel.com> wrote:
>
>
>> This patch adds support for SKID_IP to Intel x86 processors in PEBS mode. In
>> that case, the off-by-1 IP from PEBS is returned in the SKID_IP field.
>
> It looks we can only get different skid_ip and ip with :pp event (attr.precise = 2).
> With the :p event (attr.precise = 1), the skid_ip and ip are the same. Right?
>
Correct, because skid_ip would be equal to the pebs->ip.

> Thanks,
> Kan
>
>>
>> Signed-off-by: Stephane Eranian <eranian@google.com>
>> ---
>>  arch/x86/events/intel/ds.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c index
>> c6d23ffe422d..ee17de5d6b8d 100644
>> --- a/arch/x86/events/intel/ds.c
>> +++ b/arch/x86/events/intel/ds.c
>> @@ -1169,6 +1169,13 @@ static void setup_pebs_sample_data(struct
>> perf_event *event,
>>           x86_pmu.intel_cap.pebs_format >= 1)
>>               data->addr = pebs->dla;
>>
>> +     /*
>> +      * unmodified, skid IP which is guaranteed to be the next
>> +      * dyanmic instruction
>> +      */
>> +     if (sample_type & PERF_SAMPLE_SKID_IP)
>> +             data->skid_ip = pebs->ip;
>> +
>>       if (x86_pmu.intel_cap.pebs_format >= 2) {
>>               /* Only set the TSX weight when no memory weight. */
>>               if ((sample_type & PERF_SAMPLE_WEIGHT) && !fll)
>> --
>> 2.13.1.518.g3df882009-goog
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] perf: add support for capturing skid IP Stephane Eranian <eranian@google.com> - 2017-06-15 16:00 +0200
  [PATCH 2/5] perf/x86: add PERF_SAMPLE_SKID_IP support for X86 PEBS Stephane Eranian <eranian@google.com> - 2017-06-15 16:00 +0200
    RE: [PATCH 2/5] perf/x86: add PERF_SAMPLE_SKID_IP support for X86  PEBS "Liang, Kan" <kan.liang@intel.com> - 2017-06-15 17:50 +0200
      Re: [PATCH 2/5] perf/x86: add PERF_SAMPLE_SKID_IP support for X86 PEBS Stephane Eranian <eranian@google.com> - 2017-06-15 18:40 +0200
        RE: [PATCH 2/5] perf/x86: add PERF_SAMPLE_SKID_IP support for X86  PEBS "Liang, Kan" <kan.liang@intel.com> - 2017-06-15 19:20 +0200
        Re: [PATCH 2/5] perf/x86: add PERF_SAMPLE_SKID_IP support for X86 PEBS Stephane Eranian <eranian@google.com> - 2017-06-15 21:20 +0200
  [PATCH 3/5] perf/tools: add support for PERF_SAMPLE_SKID_IP Stephane Eranian <eranian@google.com> - 2017-06-15 16:00 +0200
  [PATCH 4/5] perf/record: add support for sampling skid ip Stephane Eranian <eranian@google.com> - 2017-06-15 16:00 +0200
  Re: [PATCH 0/5] perf: add support for capturing skid IP Andi Kleen <ak@linux.intel.com> - 2017-06-15 17:20 +0200
    Re: [PATCH 0/5] perf: add support for capturing skid IP Stephane Eranian <eranian@google.com> - 2017-06-15 18:50 +0200
      Re: [PATCH 0/5] perf: add support for capturing skid IP Andi Kleen <ak@linux.intel.com> - 2017-06-15 19:30 +0200
        Re: [PATCH 0/5] perf: add support for capturing skid IP Stephane Eranian <eranian@google.com> - 2017-06-15 21:40 +0200
          Re: [PATCH 0/5] perf: add support for capturing skid IP Andi Kleen <ak@linux.intel.com> - 2017-06-15 22:10 +0200
            Re: [PATCH 0/5] perf: add support for capturing skid IP Stephane Eranian <eranian@google.com> - 2017-06-15 22:30 +0200
              Re: [PATCH 0/5] perf: add support for capturing skid IP Stephane Eranian <eranian@google.com> - 2017-06-16 00:30 +0200
                Re: [PATCH 0/5] perf: add support for capturing skid IP Andi Kleen <ak@linux.intel.com> - 2017-06-16 01:20 +0200
                Re: [PATCH 0/5] perf: add support for capturing skid IP Stephane Eranian <eranian@google.com> - 2017-06-16 09:00 +0200
                Re: [PATCH 0/5] perf: add support for capturing skid IP Andi Kleen <ak@linux.intel.com> - 2017-06-16 18:10 +0200
                Re: [PATCH 0/5] perf: add support for capturing skid IP Stephane Eranian <eranian@google.com> - 2017-06-16 19:10 +0200
                Re: [PATCH 0/5] perf: add support for capturing skid IP Stephane Eranian <eranian@google.com> - 2017-06-16 19:20 +0200
                Re: [PATCH 0/5] perf: add support for capturing skid IP Andi Kleen <ak@linux.intel.com> - 2017-06-16 20:00 +0200
                Re: [PATCH 0/5] perf: add support for capturing skid IP Stephane Eranian <eranian@google.com> - 2017-06-16 21:20 +0200

csiph-web