[PATCH] tools/perf/inject: fix dwarf support detection

2017-12-06 Thread Stephane Eranian
will be generated in the output .so files from the jitted code. Signed-off-by: Stephane Eranian --- tools/build/feature/Makefile | 8 +++- tools/perf/builtin-inject.c | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile

Re: [PATCH 3/3] tools/perf/jvmti: generate correct debug information for inlined code

2017-11-29 Thread Stephane Eranian
On Thu, Nov 23, 2017 at 7:22 AM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Nov 22, 2017 at 06:25:41PM -0600, Kim Phillips escreveu: > > From: Ben Gainey > > @@ -405,7 +405,9 @@ jvmti_write_debug_info(void *agent, uint64_t code, > > const char *file, > >

Re: [PATCH 3/3] tools/perf/jvmti: generate correct debug information for inlined code

2017-11-29 Thread Stephane Eranian
On Thu, Nov 23, 2017 at 7:22 AM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Nov 22, 2017 at 06:25:41PM -0600, Kim Phillips escreveu: > > From: Ben Gainey > > @@ -405,7 +405,9 @@ jvmti_write_debug_info(void *agent, uint64_t code, > > const char *file, > > return -1; > > } >

Re: [RFC] perf script: modify field selection option

2017-11-20 Thread Stephane Eranian
On Mon, Nov 20, 2017 at 2:50 PM, Milian Wolff <milian.wo...@kdab.com> wrote: > On Montag, 20. November 2017 21:53:04 CET Stephane Eranian wrote: >> Hi, >> >> I have been using the perf script -F option on the latest perf and I >> find it not very convenient to use

Re: [RFC] perf script: modify field selection option

2017-11-20 Thread Stephane Eranian
On Mon, Nov 20, 2017 at 2:50 PM, Milian Wolff wrote: > On Montag, 20. November 2017 21:53:04 CET Stephane Eranian wrote: >> Hi, >> >> I have been using the perf script -F option on the latest perf and I >> find it not very convenient to use. I appreciate the + and

[RFC] perf script: modify field selection option

2017-11-20 Thread Stephane Eranian
Hi, I have been using the perf script -F option on the latest perf and I find it not very convenient to use. I appreciate the + and - prefix to field names to add or suppress them. But most of the time, I want to print only one or two fields and I have to guess which ones are there by default so

[RFC] perf script: modify field selection option

2017-11-20 Thread Stephane Eranian
Hi, I have been using the perf script -F option on the latest perf and I find it not very convenient to use. I appreciate the + and - prefix to field names to add or suppress them. But most of the time, I want to print only one or two fields and I have to guess which ones are there by default so

[PATCH v4 1/5] perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type

2017-11-08 Thread Stephane Eranian
oth at the same time. This patch makes this possible by specifying PERF_SAMPLE_IP|PERF_SAMPLE_SKID_IP. Signed-off-by: Stephane Eranian <eran...@google.com> --- include/linux/perf_event.h | 2 ++ include/uapi/linux/perf_event.h | 4 +++- kernel/events/core.c| 14

[PATCH v4 1/5] perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type

2017-11-08 Thread Stephane Eranian
oth at the same time. This patch makes this possible by specifying PERF_SAMPLE_IP|PERF_SAMPLE_SKID_IP. Signed-off-by: Stephane Eranian --- include/linux/perf_event.h | 2 ++ include/uapi/linux/perf_event.h | 4 +++- kernel/events/core.c| 14 ++ 3 files changed,

[PATCH v4 3/5] perf/tools: add support for PERF_SAMPLE_SKID_IP

2017-11-08 Thread Stephane Eranian
This patch adds the support code to handle the PERF_SAMPLE_SKID_IP record type. This is done as an event term and as such can be enabled per event: cpu/event=xxx,skid-ip=1/. This is a boolean term which is false by default. Signed-off-by: Stephane Eranian <eran...@google.com> --- tools/i

[PATCH v4 3/5] perf/tools: add support for PERF_SAMPLE_SKID_IP

2017-11-08 Thread Stephane Eranian
This patch adds the support code to handle the PERF_SAMPLE_SKID_IP record type. This is done as an event term and as such can be enabled per event: cpu/event=xxx,skid-ip=1/. This is a boolean term which is false by default. Signed-off-by: Stephane Eranian --- tools/include/uapi/linux

[PATCH v4 4/5] perf/record: add documentation for using PERF_SAMPLE_SKID_IP

2017-11-08 Thread Stephane Eranian
branches and their target. Signed-off-by: Stephane Eranian <eran...@google.com> --- tools/perf/Documentation/perf-record.txt | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt index 5a626ef666c2..f0e363

[PATCH v4 4/5] perf/record: add documentation for using PERF_SAMPLE_SKID_IP

2017-11-08 Thread Stephane Eranian
branches and their target. Signed-off-by: Stephane Eranian --- tools/perf/Documentation/perf-record.txt | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt index 5a626ef666c2..f0e3636dc4be 100644 --- a/tools

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

2017-11-08 Thread Stephane Eranian
This atch adds support for SKID_IP to Intel x86 processors in PEBS mode. Signed-off-by: Stephane Eranian <eran...@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 3674a4

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

2017-11-08 Thread Stephane Eranian
This atch adds support for SKID_IP to Intel x86 processors in PEBS mode. Signed-off-by: Stephane Eranian --- 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 3674a4b6f8bd..dd248ceda452 100644

[PATCH v4 0/5] perf: add support for capturing skid IP

2017-11-08 Thread Stephane Eranian
. The new way to specify skid ip is per event: $ perf record -e cpu/event=0xc5,skid-ip=1/ In V4, we fix document of the ski-ip event option and move a session.c change to the correct patch as per Jiri's remark. Stephane Eranian (5): perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type perf

[PATCH v4 5/5] perf/script: add support for PERF_SAMPLE_SKID_IP

2017-11-08 Thread Stephane Eranian
This patch adds a skid_ip field to perf script to dump the raw value of the PERF_SAMPLE_SKID_IP field in each sample. $ perf script -F +ip,+skid_ip .. The field is not enabled by default. Signed-off-by: Stephane Eranian <eran...@google.com> --- tools/perf/Documentation/perf-script.tx

[PATCH v4 5/5] perf/script: add support for PERF_SAMPLE_SKID_IP

2017-11-08 Thread Stephane Eranian
This patch adds a skid_ip field to perf script to dump the raw value of the PERF_SAMPLE_SKID_IP field in each sample. $ perf script -F +ip,+skid_ip .. The field is not enabled by default. Signed-off-by: Stephane Eranian --- tools/perf/Documentation/perf-script.txt | 2 +- tools/perf

[PATCH v4 0/5] perf: add support for capturing skid IP

2017-11-08 Thread Stephane Eranian
. The new way to specify skid ip is per event: $ perf record -e cpu/event=0xc5,skid-ip=1/ In V4, we fix document of the ski-ip event option and move a session.c change to the correct patch as per Jiri's remark. Stephane Eranian (5): perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type perf

Re: [PATCH v3 4/5] perf/record: add documentation for sampling skid ip

2017-11-08 Thread Stephane Eranian
On Wed, Nov 8, 2017 at 12:56 PM, Andi Kleen wrote: >> diff --git a/tools/perf/Documentation/perf-record.txt >> b/tools/perf/Documentation/perf-record.txt >> index 5a626ef666c2..3b156fa03c99 100644 >> --- a/tools/perf/Documentation/perf-record.txt >> +++

Re: [PATCH v3 4/5] perf/record: add documentation for sampling skid ip

2017-11-08 Thread Stephane Eranian
On Wed, Nov 8, 2017 at 12:56 PM, Andi Kleen wrote: >> diff --git a/tools/perf/Documentation/perf-record.txt >> b/tools/perf/Documentation/perf-record.txt >> index 5a626ef666c2..3b156fa03c99 100644 >> --- a/tools/perf/Documentation/perf-record.txt >> +++ b/tools/perf/Documentation/perf-record.txt

[PATCH v3 1/5] perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type

2017-11-07 Thread Stephane Eranian
oth at the same time. This patch makes this possible by specifying PERF_SAMPLE_IP|PERF_SAMPLE_SKID_IP. Signed-off-by: Stephane Eranian <eran...@google.com> --- include/linux/perf_event.h | 2 ++ include/uapi/linux/perf_event.h | 4 +++- kernel/events/core.c| 14

[PATCH v3 1/5] perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type

2017-11-07 Thread Stephane Eranian
oth at the same time. This patch makes this possible by specifying PERF_SAMPLE_IP|PERF_SAMPLE_SKID_IP. Signed-off-by: Stephane Eranian --- include/linux/perf_event.h | 2 ++ include/uapi/linux/perf_event.h | 4 +++- kernel/events/core.c| 14 ++ 3 files changed,

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

2017-11-07 Thread Stephane Eranian
This patch adds support for SKID_IP for Intel x86 processors when PEBS mode is enabled. Signed-off-by: Stephane Eranian <eran...@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

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

2017-11-07 Thread Stephane Eranian
This patch adds support for SKID_IP for Intel x86 processors when PEBS mode is enabled. Signed-off-by: Stephane Eranian --- 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 3674a4b6f8bd

[PATCH v3 3/5] perf/tools: add support for PERF_SAMPLE_SKID_IP

2017-11-07 Thread Stephane Eranian
This patch adds the support code to handle the PERF_SAMPLE_SKID_IP record type. This is done as an event term and as such can be enabled per event: cpu/event=xxx,skid-ip=1/. This is a boolean term which is false by default. Signed-off-by: Stephane Eranian <eran...@google.com> --- tools/i

[PATCH v3 3/5] perf/tools: add support for PERF_SAMPLE_SKID_IP

2017-11-07 Thread Stephane Eranian
This patch adds the support code to handle the PERF_SAMPLE_SKID_IP record type. This is done as an event term and as such can be enabled per event: cpu/event=xxx,skid-ip=1/. This is a boolean term which is false by default. Signed-off-by: Stephane Eranian --- tools/include/uapi/linux

[PATCH v3 4/5] perf/record: add documentation for sampling skid ip

2017-11-07 Thread Stephane Eranian
branches and their target. Signed-off-by: Stephane Eranian <eran...@google.com> --- tools/perf/Documentation/perf-record.txt | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt index 5a626ef666c2..3b156f

[PATCH v3 4/5] perf/record: add documentation for sampling skid ip

2017-11-07 Thread Stephane Eranian
branches and their target. Signed-off-by: Stephane Eranian --- tools/perf/Documentation/perf-record.txt | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt index 5a626ef666c2..3b156fa03c99 100644 --- a/tools

[PATCH v3 5/5] perf/script: add support for skid ip

2017-11-07 Thread Stephane Eranian
This patch adds a skid_ip field to perf script to dump the raw value of the PERF_SAMPLE_SKID_IP field in each sample. $ perf script -F +ip,+skid_ip .. The field is not enabled by default. Signed-off-by: Stephane Eranian <eran...@google.com> --- tools/perf/Documentation/perf-script.tx

[PATCH v3 5/5] perf/script: add support for skid ip

2017-11-07 Thread Stephane Eranian
This patch adds a skid_ip field to perf script to dump the raw value of the PERF_SAMPLE_SKID_IP field in each sample. $ perf script -F +ip,+skid_ip .. The field is not enabled by default. Signed-off-by: Stephane Eranian --- tools/perf/Documentation/perf-script.txt | 2 +- tools/perf

[PATCH v3 0/5] perf: add support for capturing skid IP

2017-11-07 Thread Stephane Eranian
. The new way to specify skid ip is per event: $ perf record -e cpu/event=0xc5,skid-ip=1/ Stephane Eranian (5): perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type perf/x86: add PERF_SAMPLE_SKID_IP support for X86 PEBS perf/tools: add support for PERF_SAMPLE_SKID_IP perf/record: add

[PATCH v3 0/5] perf: add support for capturing skid IP

2017-11-07 Thread Stephane Eranian
. The new way to specify skid ip is per event: $ perf record -e cpu/event=0xc5,skid-ip=1/ Stephane Eranian (5): perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type perf/x86: add PERF_SAMPLE_SKID_IP support for X86 PEBS perf/tools: add support for PERF_SAMPLE_SKID_IP perf/record: add

Re: [PATCH v2 1/5] perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type

2017-11-02 Thread Stephane Eranian
On Thu, Nov 2, 2017 at 11:59 AM, Peter Zijlstra <pet...@infradead.org> wrote: > On Thu, Nov 02, 2017 at 11:15:55AM -0700, Stephane Eranian wrote: > >> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h >> index 874b71a70058..772530501025 100644 >> --

Re: [PATCH v2 1/5] perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type

2017-11-02 Thread Stephane Eranian
On Thu, Nov 2, 2017 at 11:59 AM, Peter Zijlstra wrote: > On Thu, Nov 02, 2017 at 11:15:55AM -0700, Stephane Eranian wrote: > >> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h >> index 874b71a70058..772530501025 100644 >> --- a/include/linux/perf_

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

2017-11-02 Thread Stephane Eranian
From: Stephane Eranian <eran...@gmail.com> This atch adds support for SKID_IP to Intel x86 processors in PEBS mode. Signed-off-by: Stephane Eranian <eran...@google.com> --- arch/x86/events/intel/ds.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/events/intel

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

2017-11-02 Thread Stephane Eranian
From: Stephane Eranian This atch adds support for SKID_IP to Intel x86 processors in PEBS mode. Signed-off-by: Stephane Eranian --- 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 e1965e5ff570

[PATCH v2 1/5] perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type

2017-11-02 Thread Stephane Eranian
From: Stephane Eranian <eran...@gmail.com> This patchs adds a new sample record type. The goal is to record the interrupted instruction pointer (IP) as seen by the kernel and reflected in the machine state (pt_regs). On some architectures, it is possible to avoid the IP skid using ha

[PATCH v2 1/5] perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type

2017-11-02 Thread Stephane Eranian
From: Stephane Eranian This patchs adds a new sample record type. The goal is to record the interrupted instruction pointer (IP) as seen by the kernel and reflected in the machine state (pt_regs). On some architectures, it is possible to avoid the IP skid using hardware support. For instance

[PATCH v2 0/5] perf: add support for capturing skid IP

2017-11-02 Thread Stephane Eranian
to collect both IPs in a single run to determine how often the conditional branch is taken vs. non-taken. Understanding the skid is also interesting for other precise events. In V2, we rebased to 10d94ff4d558 (v4.14-rc7). Stephane Eranian (5): perf/core: add PERF_RECORD_SAMPLE_SKID_IP record

[PATCH v2 0/5] perf: add support for capturing skid IP

2017-11-02 Thread Stephane Eranian
to collect both IPs in a single run to determine how often the conditional branch is taken vs. non-taken. Understanding the skid is also interesting for other precise events. In V2, we rebased to 10d94ff4d558 (v4.14-rc7). Stephane Eranian (5): perf/core: add PERF_RECORD_SAMPLE_SKID_IP record

[PATCH v2 4/5] perf/record: add support for sampling skid ip

2017-11-02 Thread Stephane Eranian
on the event and precise sampling mode. $ perf record --skid-ip . Signed-off-by: Stephane Eranian <eran...@google.com> --- tools/perf/Documentation/perf-record.txt | 8 tools/perf/builtin-record.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/tools/perf/Documen

[PATCH v2 4/5] perf/record: add support for sampling skid ip

2017-11-02 Thread Stephane Eranian
on the event and precise sampling mode. $ perf record --skid-ip . Signed-off-by: Stephane Eranian --- tools/perf/Documentation/perf-record.txt | 8 tools/perf/builtin-record.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/tools/perf/Documentation/perf-record.txt b

[PATCH v2 5/5] perf/script: add support for skid ip

2017-11-02 Thread Stephane Eranian
From: Stephane Eranian <eran...@gmail.com> This patch adds a skid_ip field to perf script to dump the raw value of the PERF_SAMPLE_SKID_IP field in each sample. $ perf script -F +ip,+skid_ip .. Signed-off-by: Stephane Eranian <eran...@google.com> --- tools/perf/builtin-

[PATCH v2 3/5] perf/tools: add support for PERF_SAMPLE_SKID_IP

2017-11-02 Thread Stephane Eranian
This patch adds the support code to handle the PERF_SAMPLE_SKID_IP record type. Signed-off-by: Stephane Eranian <eran...@google.com> --- tools/include/uapi/linux/perf_event.h | 4 +++- tools/perf/perf.h | 1 + tools/perf/util/event.h | 1 + tools/per

[PATCH v2 5/5] perf/script: add support for skid ip

2017-11-02 Thread Stephane Eranian
From: Stephane Eranian This patch adds a skid_ip field to perf script to dump the raw value of the PERF_SAMPLE_SKID_IP field in each sample. $ perf script -F +ip,+skid_ip .. Signed-off-by: Stephane Eranian --- tools/perf/builtin-script.c | 6 ++ tools/perf/util/session.c | 2 +- 2

[PATCH v2 3/5] perf/tools: add support for PERF_SAMPLE_SKID_IP

2017-11-02 Thread Stephane Eranian
This patch adds the support code to handle the PERF_SAMPLE_SKID_IP record type. Signed-off-by: Stephane Eranian --- tools/include/uapi/linux/perf_event.h | 4 +++- tools/perf/perf.h | 1 + tools/perf/util/event.h | 1 + tools/perf/util/evsel.c

Re: [PATCH] perf script: add script to profile and resolve physical mem type

2017-10-17 Thread Stephane Eranian
On Tue, Oct 17, 2017 at 12:54 PM, Liang, Kan wrote: >> On Mon, Oct 16, 2017 at 3:26 PM, wrote: >> > From: Kan Liang >> > >> > There could be different types of memory in the system. E.g normal >> > System Memory, Persistent Memory.

Re: [PATCH] perf script: add script to profile and resolve physical mem type

2017-10-17 Thread Stephane Eranian
On Tue, Oct 17, 2017 at 12:54 PM, Liang, Kan wrote: >> On Mon, Oct 16, 2017 at 3:26 PM, wrote: >> > From: Kan Liang >> > >> > There could be different types of memory in the system. E.g normal >> > System Memory, Persistent Memory. To understand how the workload >> maps to >> > those memories,

Re: [PATCH] perf script: add script to profile and resolve physical mem type

2017-10-17 Thread Stephane Eranian
On Mon, Oct 16, 2017 at 3:26 PM, wrote: > From: Kan Liang > > There could be different types of memory in the system. E.g normal > System Memory, Persistent Memory. To understand how the workload maps to > those memories, it's important to know the I/O

Re: [PATCH] perf script: add script to profile and resolve physical mem type

2017-10-17 Thread Stephane Eranian
On Mon, Oct 16, 2017 at 3:26 PM, wrote: > From: Kan Liang > > There could be different types of memory in the system. E.g normal > System Memory, Persistent Memory. To understand how the workload maps to > those memories, it's important to know the I/O statistics on different > type of memorys.

Re: [RFC][PATCH] perf: Rewrite enabled/running timekeeping

2017-09-05 Thread Stephane Eranian
On Thu, Aug 31, 2017 at 12:51 PM, Stephane Eranian <eran...@google.com> wrote: > Hi, > > On Thu, Aug 31, 2017 at 10:18 AM, Peter Zijlstra <pet...@infradead.org> wrote: >> On Wed, Aug 23, 2017 at 11:54:15AM +0300, Alexey Budankov wrote: >>> On 22.08.2017 23:47

Re: [RFC][PATCH] perf: Rewrite enabled/running timekeeping

2017-09-05 Thread Stephane Eranian
On Thu, Aug 31, 2017 at 12:51 PM, Stephane Eranian wrote: > Hi, > > On Thu, Aug 31, 2017 at 10:18 AM, Peter Zijlstra wrote: >> On Wed, Aug 23, 2017 at 11:54:15AM +0300, Alexey Budankov wrote: >>> On 22.08.2017 23:47, Peter Zijlstra wrote: >>> > On Thu, Aug

Re: [PATCH] perf record: enable multiplexing scaling via -R

2017-09-01 Thread Stephane Eranian
On Fri, Sep 1, 2017 at 12:59 AM, Jiri Olsa <jo...@redhat.com> wrote: > On Wed, Aug 30, 2017 at 11:21:23PM -0700, Stephane Eranian wrote: >> Hi, >> >> >> On Mon, Aug 28, 2017 at 1:41 PM, Andi Kleen <a...@firstfloor.org> wrote: >> >> So I think

Re: [PATCH] perf record: enable multiplexing scaling via -R

2017-09-01 Thread Stephane Eranian
On Fri, Sep 1, 2017 at 12:59 AM, Jiri Olsa wrote: > On Wed, Aug 30, 2017 at 11:21:23PM -0700, Stephane Eranian wrote: >> Hi, >> >> >> On Mon, Aug 28, 2017 at 1:41 PM, Andi Kleen wrote: >> >> So I think we are good to go. to capture multiplexing scaling fact

Re: [RFC][PATCH] perf: Rewrite enabled/running timekeeping

2017-08-31 Thread Stephane Eranian
Hi, On Thu, Aug 31, 2017 at 10:18 AM, Peter Zijlstra wrote: > On Wed, Aug 23, 2017 at 11:54:15AM +0300, Alexey Budankov wrote: >> On 22.08.2017 23:47, Peter Zijlstra wrote: >> > On Thu, Aug 10, 2017 at 06:57:43PM +0300, Alexey Budankov wrote: >> >> The key thing in the

Re: [RFC][PATCH] perf: Rewrite enabled/running timekeeping

2017-08-31 Thread Stephane Eranian
Hi, On Thu, Aug 31, 2017 at 10:18 AM, Peter Zijlstra wrote: > On Wed, Aug 23, 2017 at 11:54:15AM +0300, Alexey Budankov wrote: >> On 22.08.2017 23:47, Peter Zijlstra wrote: >> > On Thu, Aug 10, 2017 at 06:57:43PM +0300, Alexey Budankov wrote: >> >> The key thing in the patch is explicit updating

Re: [PATCH] perf record: enable multiplexing scaling via -R

2017-08-31 Thread Stephane Eranian
Hi, On Mon, Aug 28, 2017 at 1:41 PM, Andi Kleen wrote: >> So I think we are good to go. to capture multiplexing scaling factor >> when sampling simply use the S >> modifier. >> But to my surprise, newer kernels are not happy with the cmdline: >> $ perf record -e cycles:S

Re: [PATCH] perf record: enable multiplexing scaling via -R

2017-08-31 Thread Stephane Eranian
Hi, On Mon, Aug 28, 2017 at 1:41 PM, Andi Kleen wrote: >> So I think we are good to go. to capture multiplexing scaling factor >> when sampling simply use the S >> modifier. >> But to my surprise, newer kernels are not happy with the cmdline: >> $ perf record -e cycles:S noploop 1 >> Error: >>

Re: [PATCH] perf record: enable multiplexing scaling via -R

2017-08-28 Thread Stephane Eranian
Hi, On Tue, Aug 22, 2017 at 12:24 AM, Stephane Eranian <eran...@google.com> wrote: > On Tue, Aug 22, 2017 at 12:03 AM, Jiri Olsa <jo...@redhat.com> wrote: >> >> On Mon, Aug 21, 2017 at 06:25:45PM -0700, Andi Kleen wrote: >> > On Mon, Aug 21, 2017 at 05:1

Re: [PATCH] perf record: enable multiplexing scaling via -R

2017-08-28 Thread Stephane Eranian
Hi, On Tue, Aug 22, 2017 at 12:24 AM, Stephane Eranian wrote: > On Tue, Aug 22, 2017 at 12:03 AM, Jiri Olsa wrote: >> >> On Mon, Aug 21, 2017 at 06:25:45PM -0700, Andi Kleen wrote: >> > On Mon, Aug 21, 2017 at 05:13:29PM -0700, Stephane Eranian wrote: >> >

Re: [PATCH V6] perf: Add PERF_SAMPLE_PHYS_ADDR

2017-08-23 Thread Stephane Eranian
On Wed, Aug 23, 2017 at 7:39 AM, Peter Zijlstra wrote: > On Wed, Aug 23, 2017 at 04:33:08PM +0200, Peter Zijlstra wrote: >> > @@ -6145,6 +6183,9 @@ void perf_prepare_sample(struct perf_event_header >> > *header, >> > >> > header->size += size; >> > } >> > +

Re: [PATCH V6] perf: Add PERF_SAMPLE_PHYS_ADDR

2017-08-23 Thread Stephane Eranian
On Wed, Aug 23, 2017 at 7:39 AM, Peter Zijlstra wrote: > On Wed, Aug 23, 2017 at 04:33:08PM +0200, Peter Zijlstra wrote: >> > @@ -6145,6 +6183,9 @@ void perf_prepare_sample(struct perf_event_header >> > *header, >> > >> > header->size += size; >> > } >> > + >> > + if

Re: [PATCH] perf record: enable multiplexing scaling via -R

2017-08-22 Thread Stephane Eranian
On Tue, Aug 22, 2017 at 12:03 AM, Jiri Olsa <jo...@redhat.com> wrote: > > On Mon, Aug 21, 2017 at 06:25:45PM -0700, Andi Kleen wrote: > > On Mon, Aug 21, 2017 at 05:13:29PM -0700, Stephane Eranian wrote: > > > On Mon, Aug 21, 2017 at 4:02 PM, Andi Kleen

Re: [PATCH] perf record: enable multiplexing scaling via -R

2017-08-22 Thread Stephane Eranian
On Tue, Aug 22, 2017 at 12:03 AM, Jiri Olsa wrote: > > On Mon, Aug 21, 2017 at 06:25:45PM -0700, Andi Kleen wrote: > > On Mon, Aug 21, 2017 at 05:13:29PM -0700, Stephane Eranian wrote: > > > On Mon, Aug 21, 2017 at 4:02 PM, Andi Kleen wrote: > > > >

Re: [PATCH] perf record: enable multiplexing scaling via -R

2017-08-21 Thread Stephane Eranian
On Mon, Aug 21, 2017 at 4:02 PM, Andi Kleen <a...@firstfloor.org> wrote: > > Stephane Eranian <eran...@google.com> writes: > > > > To activate, the user must use: > > $ perf record -a -R > > I don't know why you're overloading the existing raw mod

Re: [PATCH] perf record: enable multiplexing scaling via -R

2017-08-21 Thread Stephane Eranian
On Mon, Aug 21, 2017 at 4:02 PM, Andi Kleen wrote: > > Stephane Eranian writes: > > > > To activate, the user must use: > > $ perf record -a -R > > I don't know why you're overloading the existing raw mode? > > It has nothing to do with that. >

[PATCH] perf record: enable multiplexing scaling via -R

2017-08-21 Thread Stephane Eranian
and do not add yet another option. With this patch, it is possible to evaluate the total number of occurrences of each sampling event even when multiplexing is active. Signed-off-by: Stephane Eranian <eran...@google.com> --- tools/perf/Documentation/perf-record.txt | 2 ++ tools/perf/util/e

[PATCH] perf record: enable multiplexing scaling via -R

2017-08-21 Thread Stephane Eranian
and do not add yet another option. With this patch, it is possible to evaluate the total number of occurrences of each sampling event even when multiplexing is active. Signed-off-by: Stephane Eranian --- tools/perf/Documentation/perf-record.txt | 2 ++ tools/perf/util/evsel.c | 5

Re: [PATCH V4] perf: Add PERF_SAMPLE_PHYS_ADDR

2017-08-17 Thread Stephane Eranian
On Thu, Aug 17, 2017 at 8:51 AM, wrote: > From: Kan Liang > > For understanding how the workload maps to memory channels and hardware > behavior, it's very important to collect address maps with physical > addresses. For example, 3D XPoint access can

Re: [PATCH V4] perf: Add PERF_SAMPLE_PHYS_ADDR

2017-08-17 Thread Stephane Eranian
On Thu, Aug 17, 2017 at 8:51 AM, wrote: > From: Kan Liang > > For understanding how the workload maps to memory channels and hardware > behavior, it's very important to collect address maps with physical > addresses. For example, 3D XPoint access can only be found by filtering > the physical

Re: [PATCH V3] perf: Add PERF_SAMPLE_PHYS_ADDR

2017-08-17 Thread Stephane Eranian
On Wed, Aug 9, 2017 at 1:42 PM, wrote: > From: Kan Liang > > For understanding how the workload maps to memory channels and hardware > behavior, it's very important to collect address maps with physical > addresses. For example, 3D XPoint access can

Re: [PATCH V3] perf: Add PERF_SAMPLE_PHYS_ADDR

2017-08-17 Thread Stephane Eranian
On Wed, Aug 9, 2017 at 1:42 PM, wrote: > From: Kan Liang > > For understanding how the workload maps to memory channels and hardware > behavior, it's very important to collect address maps with physical > addresses. For example, 3D XPoint access can only be found by filtering > the physical

[tip:perf/urgent] perf/x86/intel/uncore: Fix Skylake UPI PMU event masks

2017-07-24 Thread tip-bot for Stephane Eranian
Commit-ID: b3625980a65db6b6b6bbd5790a77ab95ce6397c5 Gitweb: http://git.kernel.org/tip/b3625980a65db6b6b6bbd5790a77ab95ce6397c5 Author: Stephane Eranian <eran...@google.com> AuthorDate: Thu, 13 Jul 2017 10:35:45 -0700 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Mon,

[tip:perf/urgent] perf/x86/intel/uncore: Fix Skylake UPI PMU event masks

2017-07-24 Thread tip-bot for Stephane Eranian
Commit-ID: b3625980a65db6b6b6bbd5790a77ab95ce6397c5 Gitweb: http://git.kernel.org/tip/b3625980a65db6b6b6bbd5790a77ab95ce6397c5 Author: Stephane Eranian AuthorDate: Thu, 13 Jul 2017 10:35:45 -0700 Committer: Ingo Molnar CommitDate: Mon, 24 Jul 2017 11:13:17 +0200 perf/x86/intel/uncore

[tip:perf/urgent] perf/x86/intel/uncore: Fix missing marker for skx_uncore_cha_extra_regs

2017-07-24 Thread tip-bot for Stephane Eranian
Commit-ID: ba883b4abc9cd837441b01eb9cf8d9196181294d Gitweb: http://git.kernel.org/tip/ba883b4abc9cd837441b01eb9cf8d9196181294d Author: Stephane Eranian <eran...@google.com> AuthorDate: Thu, 13 Jul 2017 10:35:50 -0700 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Mon,

[tip:perf/urgent] perf/x86/intel/uncore: Fix missing marker for skx_uncore_cha_extra_regs

2017-07-24 Thread tip-bot for Stephane Eranian
Commit-ID: ba883b4abc9cd837441b01eb9cf8d9196181294d Gitweb: http://git.kernel.org/tip/ba883b4abc9cd837441b01eb9cf8d9196181294d Author: Stephane Eranian AuthorDate: Thu, 13 Jul 2017 10:35:50 -0700 Committer: Ingo Molnar CommitDate: Mon, 24 Jul 2017 11:13:18 +0200 perf/x86/intel/uncore

[tip:perf/urgent] perf/x86/intel/uncore: Fix SKX CHA event extra regs

2017-07-24 Thread tip-bot for Stephane Eranian
Commit-ID: 8aa7b7b4b4a601978672dce6604b9f5630b2eeb8 Gitweb: http://git.kernel.org/tip/8aa7b7b4b4a601978672dce6604b9f5630b2eeb8 Author: Stephane Eranian <eran...@google.com> AuthorDate: Thu, 13 Jul 2017 10:35:49 -0700 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Mon,

[tip:perf/urgent] perf/x86/intel/uncore: Fix SKX CHA event extra regs

2017-07-24 Thread tip-bot for Stephane Eranian
Commit-ID: 8aa7b7b4b4a601978672dce6604b9f5630b2eeb8 Gitweb: http://git.kernel.org/tip/8aa7b7b4b4a601978672dce6604b9f5630b2eeb8 Author: Stephane Eranian AuthorDate: Thu, 13 Jul 2017 10:35:49 -0700 Committer: Ingo Molnar CommitDate: Mon, 24 Jul 2017 11:13:18 +0200 perf/x86/intel/uncore

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-16 Thread Stephane Eranian
On Fri, Jun 16, 2017 at 10:50 AM, Andi Kleen wrote: >> > Yeah, I think it is easier and more portable, especially on hardware with a >> > PEBS-like mechanism but no branch buffer (like LBR). FYI, I did do a test >> > implementation yesterday to evaluate the difficulty. >> >

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-16 Thread Stephane Eranian
On Fri, Jun 16, 2017 at 10:50 AM, Andi Kleen wrote: >> > Yeah, I think it is easier and more portable, especially on hardware with a >> > PEBS-like mechanism but no branch buffer (like LBR). FYI, I did do a test >> > implementation yesterday to evaluate the difficulty. >> > >> A more generalized

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-16 Thread Stephane Eranian
On Fri, Jun 16, 2017 at 10:08 AM, Stephane Eranian <eran...@google.com> wrote: > On Fri, Jun 16, 2017 at 9:06 AM, Andi Kleen <a...@linux.intel.com> wrote: >> On Thu, Jun 15, 2017 at 11:52:07PM -0700, Stephane Eranian wrote: >>> Andi, >>> >>

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-16 Thread Stephane Eranian
On Fri, Jun 16, 2017 at 10:08 AM, Stephane Eranian wrote: > On Fri, Jun 16, 2017 at 9:06 AM, Andi Kleen wrote: >> On Thu, Jun 15, 2017 at 11:52:07PM -0700, Stephane Eranian wrote: >>> Andi, >>> >>> On Thu, Jun 15, 2017 at 4:18 PM, Andi Kleen wrote: >&

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-16 Thread Stephane Eranian
On Fri, Jun 16, 2017 at 9:06 AM, Andi Kleen <a...@linux.intel.com> wrote: > On Thu, Jun 15, 2017 at 11:52:07PM -0700, Stephane Eranian wrote: >> Andi, >> >> On Thu, Jun 15, 2017 at 4:18 PM, Andi Kleen <a...@linux.intel.com> wrote: >> >>

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-16 Thread Stephane Eranian
On Fri, Jun 16, 2017 at 9:06 AM, Andi Kleen wrote: > On Thu, Jun 15, 2017 at 11:52:07PM -0700, Stephane Eranian wrote: >> Andi, >> >> On Thu, Jun 15, 2017 at 4:18 PM, Andi Kleen wrote: >> >> Looking at this approach, the user interface is straightforward, >

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-16 Thread Stephane Eranian
Andi, On Thu, Jun 15, 2017 at 4:18 PM, Andi Kleen wrote: >> Looking at this approach, the user interface is straightforward, >> implementation in the x86 code is a bit more hairy because of the way >> the branch_stack is captured, via the cpuc->lbr_entries. If you assume >>

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-16 Thread Stephane Eranian
Andi, On Thu, Jun 15, 2017 at 4:18 PM, Andi Kleen wrote: >> Looking at this approach, the user interface is straightforward, >> implementation in the x86 code is a bit more hairy because of the way >> the branch_stack is captured, via the cpuc->lbr_entries. If you assume >> that SKID_IP cannot

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-15 Thread Stephane Eranian
On Thu, Jun 15, 2017 at 1:20 PM, Stephane Eranian <eran...@google.com> wrote: > On Thu, Jun 15, 2017 at 1:02 PM, Andi Kleen <a...@linux.intel.com> wrote: >> On Thu, Jun 15, 2017 at 12:35:39PM -0700, Stephane Eranian wrote: >>> On Thu, Jun 15, 2017 at 10:23 AM, An

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-15 Thread Stephane Eranian
On Thu, Jun 15, 2017 at 1:20 PM, Stephane Eranian wrote: > On Thu, Jun 15, 2017 at 1:02 PM, Andi Kleen wrote: >> On Thu, Jun 15, 2017 at 12:35:39PM -0700, Stephane Eranian wrote: >>> On Thu, Jun 15, 2017 at 10:23 AM, Andi Kleen wrote: >>> > On Thu, Jun 15, 2017

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-15 Thread Stephane Eranian
On Thu, Jun 15, 2017 at 1:02 PM, Andi Kleen <a...@linux.intel.com> wrote: > On Thu, Jun 15, 2017 at 12:35:39PM -0700, Stephane Eranian wrote: >> On Thu, Jun 15, 2017 at 10:23 AM, Andi Kleen <a...@linux.intel.com> wrote: >> > On Thu, Jun 15, 2017 at 09:44:07AM

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-15 Thread Stephane Eranian
On Thu, Jun 15, 2017 at 1:02 PM, Andi Kleen wrote: > On Thu, Jun 15, 2017 at 12:35:39PM -0700, Stephane Eranian wrote: >> On Thu, Jun 15, 2017 at 10:23 AM, Andi Kleen wrote: >> > On Thu, Jun 15, 2017 at 09:44:07AM -0700, Stephane Eranian wrote: >> >> On Thu, Jun 1

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-15 Thread Stephane Eranian
On Thu, Jun 15, 2017 at 10:23 AM, Andi Kleen <a...@linux.intel.com> wrote: > On Thu, Jun 15, 2017 at 09:44:07AM -0700, Stephane Eranian wrote: >> On Thu, Jun 15, 2017 at 8:10 AM, Andi Kleen <a...@linux.intel.com> wrote: >> > On Thu, Jun 15, 2017 at 06:56:24AM

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-15 Thread Stephane Eranian
On Thu, Jun 15, 2017 at 10:23 AM, Andi Kleen wrote: > On Thu, Jun 15, 2017 at 09:44:07AM -0700, Stephane Eranian wrote: >> On Thu, Jun 15, 2017 at 8:10 AM, Andi Kleen wrote: >> > On Thu, Jun 15, 2017 at 06:56:24AM -0700, Stephane Eranian wrote: >> >> This patchs

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

2017-06-15 Thread Stephane Eranian
Hi, On Thu, Jun 15, 2017 at 9:39 AM, Stephane Eranian <eran...@google.com> wrote: > On Thu, Jun 15, 2017 at 8:40 AM, Liang, Kan <kan.li...@intel.com> wrote: >> >> >>> This patch adds support for SKID_IP to Intel x86 processors in PEBS mode. In >>> tha

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

2017-06-15 Thread Stephane Eranian
Hi, On Thu, Jun 15, 2017 at 9:39 AM, Stephane Eranian wrote: > On Thu, Jun 15, 2017 at 8:40 AM, Liang, Kan 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

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-15 Thread Stephane Eranian
On Thu, Jun 15, 2017 at 8:10 AM, Andi Kleen <a...@linux.intel.com> wrote: > On Thu, Jun 15, 2017 at 06:56:24AM -0700, Stephane Eranian wrote: >> This patchs adds a new sample record type called >> PERF_SAMPLE_SKID_IP. The goal is to record >> the unmodified interrup

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-15 Thread Stephane Eranian
On Thu, Jun 15, 2017 at 8:10 AM, Andi Kleen wrote: > On Thu, Jun 15, 2017 at 06:56:24AM -0700, Stephane Eranian wrote: >> This patchs adds a new sample record type called >> PERF_SAMPLE_SKID_IP. The goal is to record >> the unmodified interrupted instruction pointer (IP) as

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

2017-06-15 Thread Stephane Eranian
ferent 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 <eran...@g

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

2017-06-15 Thread Stephane Eranian
p 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 >> --- >> arch/x86/events/

[PATCH 0/5] perf: add support for capturing skid IP

2017-06-15 Thread Stephane Eranian
. With precise=1, the IP would point to 0x42c2f3. It is interesting to collect both IPs in a single run to determine how often the conditional branch is taken vs. non-taken. Stephane Eranian (5): perf/core: add PERF_SAMPLE_SKID_IP record type perf/x86: add PERF_SAMPLE_SKID_IP support for X86 PEBS perf

<    1   2   3   4   5   6   7   8   9   10   >