All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 00/11] perf/core improvements and fixes
@ 2012-08-08 17:13 Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 01/11] perf tools: Fix version file for perf documentation with OUTPUT variable set Arnaldo Carvalho de Melo
                   ` (10 more replies)
  0 siblings, 11 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Arnaldo Carvalho de Melo, David Ahern, Feng Tang, Peter Zijlstra,
	Robert Richter, Stephane Eranian, arnaldo.melo

Hi Ingo,

	Please consider pulling, on top of my latest pull request,

- Arnaldo

-- 
1.7.9.2.358.g22243

The following changes since commit 9782243353ec135327a80c76c63464e592949cd1:

  perf script: Stop using pevent directly (2012-08-07 23:50:21 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to 0076d546b4f9b5c15121c6959d108a83fe43fa9a:

  perf scripts python: Add event_analyzing_sample.py as a sample for general event handling (2012-08-08 12:55:38 -0300)

----------------------------------------------------------------
perf/core improvements

. Assorted fixes for Documentation and build in 32 bit, from Robert Richter

. Add support for non-tracepoint events in perf script python, from Feng Tang

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Feng Tang (5):
      perf script: Add general python handler to process non-tracepoint events
      perf script: Replace "struct thread" with "struct addr_location" as a parameter for "process_event()"
      perf scripts python: Pass event/thread/dso name and symbol info to event handler in python
      perf scripts python: Add a python library EventClass.py
      perf scripts python: Add event_analyzing_sample.py as a sample for general event handling

Robert Richter (6):
      perf tools: Fix version file for perf documentation with OUTPUT variable set
      perf tools: Fix lib/traceevent build dir with OUTPUT variable set
      perf tools: Fix parsing of 64 bit raw config value for 32 bit
      tools lib traceevent: Fix cast from pointer to integer for 32 bit
      perf list: Update documentation about raw event setup
      perf list: Document precise event sampling for AMD IBS

 tools/lib/traceevent/event-parse.c                 |    3 +-
 tools/perf/Documentation/Makefile                  |    6 +-
 tools/perf/Documentation/perf-list.txt             |   48 +++--
 tools/perf/Makefile                                |    8 +-
 tools/perf/builtin-script.c                        |    5 +-
 .../Perf-Trace-Util/lib/Perf/Trace/EventClass.py   |   94 ++++++++++
 .../perf/scripts/python/event_analyzing_sample.py  |  193 ++++++++++++++++++++
 tools/perf/util/parse-events.c                     |    6 +-
 tools/perf/util/parse-events.h                     |    6 +-
 tools/perf/util/parse-events.l                     |    4 +-
 tools/perf/util/parse-events.y                     |   10 +-
 .../perf/util/scripting-engines/trace-event-perl.c |   11 +-
 .../util/scripting-engines/trace-event-python.c    |   85 ++++++++-
 tools/perf/util/trace-event-scripting.c            |    2 +-
 tools/perf/util/trace-event.h                      |    5 +-
 15 files changed, 441 insertions(+), 45 deletions(-)
 create mode 100755 tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
 create mode 100644 tools/perf/scripts/python/event_analyzing_sample.py

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [PATCH 01/11] perf tools: Fix version file for perf documentation with OUTPUT variable set
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 02/11] perf tools: Fix lib/traceevent build dir " Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Robert Richter, Arnaldo Carvalho de Melo

From: Robert Richter <robert.richter@amd.com>

Fixes the following:

 + make OUTPUT=/.../.build/perf-user/ DESTDIR=/.../.install/perf-user/ man install-man
 make -C Documentation man
 make[1]: Entering directory `/.../.source/linux.perf/tools/perf/Documentation'
 make[2]: Entering directory `/.../.source/linux.perf/tools/perf'
 make[2]: *** No rule to make target `PERF-VERSION-FILE'.  Stop.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1344361396-7237-2-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/Makefile |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index ca600e0..9f2e44f 100644
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -195,10 +195,10 @@ install-pdf: pdf
 #install-html: html
 #	'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)
 
-../PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
-	$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) PERF-VERSION-FILE
+$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
+	$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) $(OUTPUT)PERF-VERSION-FILE
 
--include ../PERF-VERSION-FILE
+-include $(OUTPUT)PERF-VERSION-FILE
 
 #
 # Determine "include::" file references in asciidoc files.
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [PATCH 02/11] perf tools: Fix lib/traceevent build dir with OUTPUT variable set
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 01/11] perf tools: Fix version file for perf documentation with OUTPUT variable set Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 03/11] perf tools: Fix parsing of 64 bit raw config value for 32 bit Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Robert Richter, Arnaldo Carvalho de Melo

From: Robert Richter <robert.richter@amd.com>

With the OUTPUT variable set the libtraceevent.a file is wrongly built
in the source directory:

 + make -d OUTPUT=/.../.build/perf-user/ DESTDIR=/.../.install/perf-user/
 ...
     Considering target file `../lib/traceevent//libtraceevent.a'.
      File `../lib/traceevent//libtraceevent.a' does not exist.
      Finished prerequisites of target file `../lib/traceevent//libtraceevent.a'.
     Must remake target `../lib/traceevent//libtraceevent.a'.
 Invoking recipe from Makefile:837 to update target `../lib/traceevent//libtraceevent.a'.
 Putting child 0x703850 (../lib/traceevent//libtraceevent.a) PID 8365 on the chain.
 Live child 0x703850 (../lib/traceevent//libtraceevent.a) PID 8365
     SUBDIR ../lib/traceevent/

 $ git clean -nxd
 Would remove tools/lib/traceevent/.event-parse.d
 Would remove tools/lib/traceevent/.parse-filter.d
 Would remove tools/lib/traceevent/.parse-utils.d
 Would remove tools/lib/traceevent/.trace-seq.d
 Would remove tools/lib/traceevent/event-parse.o
 Would remove tools/lib/traceevent/libtraceevent.a
 Would remove tools/lib/traceevent/parse-filter.o
 Would remove tools/lib/traceevent/parse-utils.o
 Would remove tools/lib/traceevent/trace-seq.o

This patch fixes this.

Note: Though this should already work with O=$outputdir we better use
the OUTPUT variable directly.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1344361396-7237-3-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 35655c3..2d4bf6e 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -186,10 +186,10 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH))
 
 TRACE_EVENT_DIR = ../lib/traceevent/
 
-ifeq ("$(origin O)", "command line")
-	TE_PATH=$(OUTPUT)/
+ifneq ($(OUTPUT),)
+	TE_PATH=$(OUTPUT)
 else
-	TE_PATH=$(TRACE_EVENT_DIR)/
+	TE_PATH=$(TRACE_EVENT_DIR)
 endif
 
 LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
@@ -842,7 +842,7 @@ $(LIB_FILE): $(LIB_OBJS)
 
 # libtraceevent.a
 $(LIBTRACEEVENT):
-	$(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(QUIET_SUBDIR1) $(COMMAND_O) libtraceevent.a
+	$(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) libtraceevent.a
 
 help:
 	@echo 'Perf make targets:'
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [PATCH 03/11] perf tools: Fix parsing of 64 bit raw config value for 32 bit
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 01/11] perf tools: Fix version file for perf documentation with OUTPUT variable set Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 02/11] perf tools: Fix lib/traceevent build dir " Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 04/11] tools lib traceevent: Fix cast from pointer to integer " Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Robert Richter, Arnaldo Carvalho de Melo

From: Robert Richter <robert.richter@amd.com>

perf record fails on 32 bit with:

 invalid or unsupported event: 'r40000F7E0'

Fixing this by parsing 64 bit num values.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1344361396-7237-4-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/parse-events.c |    6 +++---
 tools/perf/util/parse-events.h |    6 +++---
 tools/perf/util/parse-events.l |    4 ++--
 tools/perf/util/parse-events.y |   10 +++++-----
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 74a5af4..8bdfa3e 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -551,7 +551,7 @@ static int config_attr(struct perf_event_attr *attr,
 }
 
 int parse_events_add_numeric(struct list_head **list, int *idx,
-			     unsigned long type, unsigned long config,
+			     u32 type, u64 config,
 			     struct list_head *head_config)
 {
 	struct perf_event_attr attr;
@@ -1005,7 +1005,7 @@ int parse_events__is_hardcoded_term(struct parse_events__term *term)
 
 static int new_term(struct parse_events__term **_term, int type_val,
 		    int type_term, char *config,
-		    char *str, long num)
+		    char *str, u64 num)
 {
 	struct parse_events__term *term;
 
@@ -1034,7 +1034,7 @@ static int new_term(struct parse_events__term **_term, int type_val,
 }
 
 int parse_events__term_num(struct parse_events__term **term,
-			   int type_term, char *config, long num)
+			   int type_term, char *config, u64 num)
 {
 	return new_term(term, PARSE_EVENTS__TERM_TYPE_NUM, type_term,
 			config, NULL, num);
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index ee9c218..163aad4 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -55,7 +55,7 @@ struct parse_events__term {
 	char *config;
 	union {
 		char *str;
-		long  num;
+		u64  num;
 	} val;
 	int type_val;
 	int type_term;
@@ -73,7 +73,7 @@ struct parse_events_data__terms {
 
 int parse_events__is_hardcoded_term(struct parse_events__term *term);
 int parse_events__term_num(struct parse_events__term **_term,
-			   int type_term, char *config, long num);
+			   int type_term, char *config, u64 num);
 int parse_events__term_str(struct parse_events__term **_term,
 			   int type_term, char *config, char *str);
 int parse_events__term_clone(struct parse_events__term **new,
@@ -83,7 +83,7 @@ int parse_events_modifier(struct list_head *list, char *str);
 int parse_events_add_tracepoint(struct list_head **list, int *idx,
 				char *sys, char *event);
 int parse_events_add_numeric(struct list_head **list, int *idx,
-			     unsigned long type, unsigned long config,
+			     u32 type, u64 config,
 			     struct list_head *head_config);
 int parse_events_add_cache(struct list_head **list, int *idx,
 			   char *type, char *op_result1, char *op_result2);
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index 384ca74..e4abdf2 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -15,10 +15,10 @@ YYSTYPE *parse_events_get_lval(yyscan_t yyscanner);
 
 static int __value(YYSTYPE *yylval, char *str, int base, int token)
 {
-	long num;
+	u64 num;
 
 	errno = 0;
-	num = strtoul(str, NULL, base);
+	num = strtoull(str, NULL, base);
 	if (errno)
 		return PE_ERROR;
 
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 2bc5fbf..423d331 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -57,7 +57,7 @@ do { \
 %union
 {
 	char *str;
-	unsigned long num;
+	u64 num;
 	struct list_head *head;
 	struct parse_events__term *term;
 }
@@ -207,7 +207,7 @@ PE_VALUE ':' PE_VALUE
 	struct parse_events_data__events *data = _data;
 	struct list_head *list = NULL;
 
-	ABORT_ON(parse_events_add_numeric(&list, &data->idx, $1, $3, NULL));
+	ABORT_ON(parse_events_add_numeric(&list, &data->idx, (u32)$1, $3, NULL));
 	$$ = list;
 }
 
@@ -282,7 +282,7 @@ PE_TERM '=' PE_NAME
 {
 	struct parse_events__term *term;
 
-	ABORT_ON(parse_events__term_str(&term, $1, NULL, $3));
+	ABORT_ON(parse_events__term_str(&term, (int)$1, NULL, $3));
 	$$ = term;
 }
 |
@@ -290,7 +290,7 @@ PE_TERM '=' PE_VALUE
 {
 	struct parse_events__term *term;
 
-	ABORT_ON(parse_events__term_num(&term, $1, NULL, $3));
+	ABORT_ON(parse_events__term_num(&term, (int)$1, NULL, $3));
 	$$ = term;
 }
 |
@@ -298,7 +298,7 @@ PE_TERM
 {
 	struct parse_events__term *term;
 
-	ABORT_ON(parse_events__term_num(&term, $1, NULL, 1));
+	ABORT_ON(parse_events__term_num(&term, (int)$1, NULL, 1));
 	$$ = term;
 }
 
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [PATCH 04/11] tools lib traceevent: Fix cast from pointer to integer for 32 bit
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2012-08-08 17:13 ` [PATCH 03/11] perf tools: Fix parsing of 64 bit raw config value for 32 bit Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 05/11] perf list: Update documentation about raw event setup Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Robert Richter, Arnaldo Carvalho de Melo

From: Robert Richter <robert.richter@amd.com>

Fixing the integer cast reported by the following warning:

 tools/lib/traceevent/event-parse.c:3488:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1344361396-7237-5-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/event-parse.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 5f34aa3..b7c2c49 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -31,6 +31,7 @@
 #include <stdarg.h>
 #include <ctype.h>
 #include <errno.h>
+#include <stdint.h>
 
 #include "event-parse.h"
 #include "event-utils.h"
@@ -3485,7 +3486,7 @@ process_defined_func(struct trace_seq *s, void *data, int size,
 			if (!string->str)
 				die("malloc str");
 
-			args[i] = (unsigned long long)string->str;
+			args[i] = (uintptr_t)string->str;
 			strings = string;
 			trace_seq_destroy(&str);
 			break;
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [PATCH 05/11] perf list: Update documentation about raw event setup
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2012-08-08 17:13 ` [PATCH 04/11] tools lib traceevent: Fix cast from pointer to integer " Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 06/11] perf list: Document precise event sampling for AMD IBS Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Robert Richter, Arnaldo Carvalho de Melo

From: Robert Richter <robert.richter@amd.com>

It was missing that only certain bit fields are passed to the config
value which confused users. Updating it.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1344361396-7237-6-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-list.txt |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/Documentation/perf-list.txt b/tools/perf/Documentation/perf-list.txt
index ddc2252..232be51 100644
--- a/tools/perf/Documentation/perf-list.txt
+++ b/tools/perf/Documentation/perf-list.txt
@@ -15,6 +15,7 @@ DESCRIPTION
 This command displays the symbolic event types which can be selected in the
 various perf commands with the -e option.
 
+[[EVENT_MODIFIERS]]
 EVENT MODIFIERS
 ---------------
 
@@ -44,6 +45,11 @@ layout of IA32_PERFEVTSELx MSRs (see [Intel® 64 and IA-32 Architectures Softwar
 of IA32_PERFEVTSELx MSRs) or AMD's PerfEvtSeln (see [AMD64 Architecture Programmer’s Manual Volume 2: System Programming], Page 344,
 Figure 13-7 Performance Event-Select Register (PerfEvtSeln)).
 
+Note: Only the following bit fields can be set in x86 counter
+registers: event, umask, edge, inv, cmask. Esp. guest/host only and
+OS/user mode flags must be setup using <<EVENT_MODIFIERS, EVENT
+MODIFIERS>>.
+
 Example:
 
 If the Intel docs for a QM720 Core i7 describe an event as:
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [PATCH 06/11] perf list: Document precise event sampling for AMD IBS
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2012-08-08 17:13 ` [PATCH 05/11] perf list: Update documentation about raw event setup Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 07/11] perf script: Add general python handler to process non-tracepoint events Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Robert Richter, Arnaldo Carvalho de Melo

From: Robert Richter <robert.richter@amd.com>

Updating man perf-list.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1344361396-7237-7-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-list.txt |   42 +++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 12 deletions(-)

diff --git a/tools/perf/Documentation/perf-list.txt b/tools/perf/Documentation/perf-list.txt
index 232be51..d1e39dc 100644
--- a/tools/perf/Documentation/perf-list.txt
+++ b/tools/perf/Documentation/perf-list.txt
@@ -20,20 +20,38 @@ EVENT MODIFIERS
 ---------------
 
 Events can optionally have a modifer by appending a colon and one or
-more modifiers.  Modifiers allow the user to restrict when events are
-counted with 'u' for user-space, 'k' for kernel, 'h' for hypervisor.
-Additional modifiers are 'G' for guest counting (in KVM guests) and 'H'
-for host counting (not in KVM guests).
+more modifiers. Modifiers allow the user to restrict the events to be
+counted. The following modifiers exist:
+
+ u - user-space counting
+ k - kernel counting
+ h - hypervisor counting
+ G - guest counting (in KVM guests)
+ H - host counting (not in KVM guests)
+ p - precise level
 
 The 'p' modifier can be used for specifying how precise the instruction
-address should be. The 'p' modifier is currently only implemented for
-Intel PEBS and can be specified multiple times:
-  0 - SAMPLE_IP can have arbitrary skid
-  1 - SAMPLE_IP must have constant skid
-  2 - SAMPLE_IP requested to have 0 skid
-  3 - SAMPLE_IP must have 0 skid
+address should be. The 'p' modifier can be specified multiple times:
+
+ 0 - SAMPLE_IP can have arbitrary skid
+ 1 - SAMPLE_IP must have constant skid
+ 2 - SAMPLE_IP requested to have 0 skid
+ 3 - SAMPLE_IP must have 0 skid
+
+For Intel systems precise event sampling is implemented with PEBS
+which supports up to precise-level 2.
+
+On AMD systems it is implemented using IBS (up to precise-level 2).
+The precise modifier works with event types 0x76 (cpu-cycles, CPU
+clocks not halted) and 0xC1 (micro-ops retired). Both events map to
+IBS execution sampling (IBS op) with the IBS Op Counter Control bit
+(IbsOpCntCtl) set respectively (see AMD64 Architecture Programmer’s
+Manual Volume 2: System Programming, 13.3 Instruction-Based
+Sampling). Examples to use IBS:
 
-The PEBS implementation now supports up to 2.
+ perf record -a -e cpu-cycles:p ...    # use ibs op counting cycles
+ perf record -a -e r076:p ...          # same as -e cpu-cycles:p
+ perf record -a -e r0C1:p ...          # use ibs op counting micro-ops
 
 RAW HARDWARE EVENT DESCRIPTOR
 -----------------------------
@@ -97,4 +115,4 @@ SEE ALSO
 linkperf:perf-stat[1], linkperf:perf-top[1],
 linkperf:perf-record[1],
 http://www.intel.com/Assets/PDF/manual/253669.pdf[Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3B: System Programming Guide],
-http://support.amd.com/us/Processor_TechDocs/24593.pdf[AMD64 Architecture Programmer’s Manual Volume 2: System Programming]
+http://support.amd.com/us/Processor_TechDocs/24593_APM_v2.pdf[AMD64 Architecture Programmer’s Manual Volume 2: System Programming]
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [PATCH 07/11] perf script: Add general python handler to process non-tracepoint events
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2012-08-08 17:13 ` [PATCH 06/11] perf list: Document precise event sampling for AMD IBS Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 08/11] perf script: Replace "struct thread" with "struct addr_location" as a parameter for "process_event()" Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Feng Tang, Andi Kleen, David Ahern, Ingo Molnar,
	Peter Zijlstra, Robert Richter, Stephane Eranian,
	Arnaldo Carvalho de Melo

From: Feng Tang <feng.tang@intel.com>

This patch just follows Robert Richter's idea and the commit 37a058ea0
	"perf script: Add generic perl handler to process events"
to similarly add a python handler for general events other than tracepoints.

For non-tracepoint events, this patch will try to find a function named
"process_event" in the python script, and pass the event attribute,
perf_sample, raw_data in format of raw string. And the python script can
use "struct" module's unpack function to disasemble the needed info and process.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1344419875-21665-2-git-send-email-feng.tang@intel.com
[ committer note: Fixed up wrt da37896, i.e. pevent parm in script event handlers ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 .../util/scripting-engines/trace-event-python.c    |   59 +++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index df7d33d..b9010d8 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -32,6 +32,7 @@
 #include "../event.h"
 #include "../thread.h"
 #include "../trace-event.h"
+#include "../evsel.h"
 
 PyMODINIT_FUNC initperf_trace_context(void);
 
@@ -220,7 +221,7 @@ static inline struct event_format *find_cache_event(struct perf_evsel *evsel)
 	return event;
 }
 
-static void python_process_event(union perf_event *perf_event __unused,
+static void python_process_tracepoint(union perf_event *perf_event __unused,
 				 struct perf_sample *sample,
 				 struct perf_evsel *evsel,
 				 struct machine *machine __unused,
@@ -337,6 +338,62 @@ static void python_process_event(union perf_event *perf_event __unused,
 	Py_DECREF(t);
 }
 
+static void python_process_general_event(union perf_event *perf_event __unused,
+					 struct perf_sample *sample,
+					 struct perf_evsel *evsel,
+					 struct machine *machine __unused,
+					 struct thread *thread __unused)
+{
+	PyObject *handler, *retval, *t;
+	static char handler_name[64];
+	unsigned n = 0;
+	void *data = sample->raw_data;
+
+	t = PyTuple_New(MAX_FIELDS);
+	if (!t)
+		Py_FatalError("couldn't create Python tuple");
+
+	snprintf(handler_name, sizeof(handler_name), "%s", "process_event");
+
+	handler = PyDict_GetItemString(main_dict, handler_name);
+	if (handler && !PyCallable_Check(handler)) {
+		handler = NULL;
+		goto exit;
+	}
+
+	/* Pass 3 parameters: event_attr, perf_sample, raw data */
+	PyTuple_SetItem(t, n++, PyString_FromStringAndSize((void *)&evsel->attr, sizeof(evsel->attr)));
+	PyTuple_SetItem(t, n++, PyString_FromStringAndSize((void *)sample, sizeof(*sample)));
+	PyTuple_SetItem(t, n++, PyString_FromStringAndSize(data, sample->raw_size));
+
+	if (_PyTuple_Resize(&t, n) == -1)
+		Py_FatalError("error resizing Python tuple");
+
+	retval = PyObject_CallObject(handler, t);
+	if (retval == NULL)
+		handler_call_die(handler_name);
+exit:
+	Py_DECREF(t);
+}
+
+static void python_process_event(union perf_event *perf_event,
+				 struct perf_sample *sample,
+				 struct perf_evsel *evsel,
+				 struct machine *machine,
+				 struct thread *thread)
+{
+	switch (evsel->attr.type) {
+	case PERF_TYPE_TRACEPOINT:
+		python_process_tracepoint(perf_event, sample, evsel,
+					  machine, thread);
+		break;
+	/* Reserve for future process_hw/sw/raw APIs */
+	default:
+		python_process_general_event(perf_event, sample, evsel,
+					     machine, thread);
+	}
+}
+
 static int run_start_sub(void)
 {
 	PyObject *handler, *retval;
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [PATCH 08/11] perf script: Replace "struct thread" with "struct addr_location" as a parameter for "process_event()"
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2012-08-08 17:13 ` [PATCH 07/11] perf script: Add general python handler to process non-tracepoint events Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 09/11] perf scripts python: Pass event/thread/dso name and symbol info to event handler in python Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Feng Tang, Andi Kleen, David Ahern, Ingo Molnar,
	Peter Zijlstra, Robert Richter, Stephane Eranian,
	Arnaldo Carvalho de Melo

From: Feng Tang <feng.tang@intel.com>

Both perl and python script start processing events other than trace
points, and it's useful to pass the resolved symbol and the dso info to
the event handler in script for better analysis and statistics.

Struct thread is already a member of struct addr_location, using
addr_location will keep the thread info, while providing additional
symbol and dso info if exist, so that the script itself doesn't need to
bother to do the symbol resolving and dso searching work.

Tested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1344419875-21665-3-git-send-email-feng.tang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-script.c                        |    5 +++--
 .../perf/util/scripting-engines/trace-event-perl.c |   11 ++++++-----
 .../util/scripting-engines/trace-event-python.c    |   13 +++++++------
 tools/perf/util/trace-event-scripting.c            |    2 +-
 tools/perf/util/trace-event.h                      |    5 +++--
 5 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 6425612..30a9cb8 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -396,9 +396,10 @@ static void print_sample_bts(union perf_event *event,
 
 static void process_event(union perf_event *event, struct perf_sample *sample,
 			  struct perf_evsel *evsel, struct machine *machine,
-			  struct thread *thread)
+			  struct addr_location *al)
 {
 	struct perf_event_attr *attr = &evsel->attr;
+	struct thread *thread = al->thread;
 
 	if (output[attr->type].fields == 0)
 		return;
@@ -511,7 +512,7 @@ static int process_sample_event(struct perf_tool *tool __used,
 	if (cpu_list && !test_bit(sample->cpu, cpu_bitmap))
 		return 0;
 
-	scripting_ops->process_event(event, sample, evsel, machine, thread);
+	scripting_ops->process_event(event, sample, evsel, machine, &al);
 
 	evsel->hists.stats.total_period += sample->period;
 	return 0;
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c
index 52580d0..d280010 100644
--- a/tools/perf/util/scripting-engines/trace-event-perl.c
+++ b/tools/perf/util/scripting-engines/trace-event-perl.c
@@ -261,7 +261,7 @@ static void perl_process_tracepoint(union perf_event *perf_event __unused,
 				    struct perf_sample *sample,
 				    struct perf_evsel *evsel,
 				    struct machine *machine __unused,
-				    struct thread *thread)
+				    struct addr_location *al)
 {
 	struct format_field *field;
 	static char handler[256];
@@ -272,6 +272,7 @@ static void perl_process_tracepoint(union perf_event *perf_event __unused,
 	int cpu = sample->cpu;
 	void *data = sample->raw_data;
 	unsigned long long nsecs = sample->time;
+	struct thread *thread = al->thread;
 	char *comm = thread->comm;
 
 	dSP;
@@ -349,7 +350,7 @@ static void perl_process_event_generic(union perf_event *event,
 				       struct perf_sample *sample,
 				       struct perf_evsel *evsel,
 				       struct machine *machine __unused,
-				       struct thread *thread __unused)
+				       struct addr_location *al __unused)
 {
 	dSP;
 
@@ -375,10 +376,10 @@ static void perl_process_event(union perf_event *event,
 			       struct perf_sample *sample,
 			       struct perf_evsel *evsel,
 			       struct machine *machine,
-			       struct thread *thread)
+			       struct addr_location *al)
 {
-	perl_process_tracepoint(event, sample, evsel, machine, thread);
-	perl_process_event_generic(event, sample, evsel, machine, thread);
+	perl_process_tracepoint(event, sample, evsel, machine, al);
+	perl_process_event_generic(event, sample, evsel, machine, al);
 }
 
 static void run_start_sub(void)
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index b9010d8..24711b3 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -225,7 +225,7 @@ static void python_process_tracepoint(union perf_event *perf_event __unused,
 				 struct perf_sample *sample,
 				 struct perf_evsel *evsel,
 				 struct machine *machine __unused,
-				 struct thread *thread)
+				 struct addr_location *al)
 {
 	PyObject *handler, *retval, *context, *t, *obj, *dict = NULL;
 	static char handler_name[256];
@@ -238,6 +238,7 @@ static void python_process_tracepoint(union perf_event *perf_event __unused,
 	int cpu = sample->cpu;
 	void *data = sample->raw_data;
 	unsigned long long nsecs = sample->time;
+	struct thread *thread = al->thread;
 	char *comm = thread->comm;
 
 	t = PyTuple_New(MAX_FIELDS);
@@ -342,7 +343,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 					 struct perf_sample *sample,
 					 struct perf_evsel *evsel,
 					 struct machine *machine __unused,
-					 struct thread *thread __unused)
+					 struct addr_location *al __unused)
 {
 	PyObject *handler, *retval, *t;
 	static char handler_name[64];
@@ -361,7 +362,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 		goto exit;
 	}
 
-	/* Pass 3 parameters: event_attr, perf_sample, raw data */
+	/* Pass 4 parameters: event_attr, perf_sample, raw data, thread name */
 	PyTuple_SetItem(t, n++, PyString_FromStringAndSize((void *)&evsel->attr, sizeof(evsel->attr)));
 	PyTuple_SetItem(t, n++, PyString_FromStringAndSize((void *)sample, sizeof(*sample)));
 	PyTuple_SetItem(t, n++, PyString_FromStringAndSize(data, sample->raw_size));
@@ -380,17 +381,17 @@ static void python_process_event(union perf_event *perf_event,
 				 struct perf_sample *sample,
 				 struct perf_evsel *evsel,
 				 struct machine *machine,
-				 struct thread *thread)
+				 struct addr_location *al)
 {
 	switch (evsel->attr.type) {
 	case PERF_TYPE_TRACEPOINT:
 		python_process_tracepoint(perf_event, sample, evsel,
-					  machine, thread);
+					  machine, al);
 		break;
 	/* Reserve for future process_hw/sw/raw APIs */
 	default:
 		python_process_general_event(perf_event, sample, evsel,
-					     machine, thread);
+					     machine, al);
 	}
 }
 
diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c
index aceb8ee..302ff26 100644
--- a/tools/perf/util/trace-event-scripting.c
+++ b/tools/perf/util/trace-event-scripting.c
@@ -39,7 +39,7 @@ static void process_event_unsupported(union perf_event *event __unused,
 				      struct perf_sample *sample __unused,
 				      struct perf_evsel *evsel __unused,
 				      struct machine *machine __unused,
-				      struct thread *thread __unused)
+				      struct addr_location *al __unused)
 {
 }
 
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index cee1635..7575dfd 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -9,7 +9,6 @@ struct machine;
 struct perf_sample;
 union perf_event;
 struct perf_tool;
-struct thread;
 
 extern int header_page_size_size;
 extern int header_page_ts_size;
@@ -76,6 +75,8 @@ struct tracing_data *tracing_data_get(struct list_head *pattrs,
 void tracing_data_put(struct tracing_data *tdata);
 
 
+struct addr_location;
+
 struct scripting_ops {
 	const char *name;
 	int (*start_script) (const char *script, int argc, const char **argv);
@@ -84,7 +85,7 @@ struct scripting_ops {
 			       struct perf_sample *sample,
 			       struct perf_evsel *evsel,
 			       struct machine *machine,
-			       struct thread *thread);
+			       struct addr_location *al);
 	int (*generate_script) (struct pevent *pevent, const char *outfile);
 };
 
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [PATCH 09/11] perf scripts python: Pass event/thread/dso name and symbol info to event handler in python
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2012-08-08 17:13 ` [PATCH 08/11] perf script: Replace "struct thread" with "struct addr_location" as a parameter for "process_event()" Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 10/11] perf scripts python: Add a python library EventClass.py Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 11/11] perf scripts python: Add event_analyzing_sample.py as a sample for general event handling Arnaldo Carvalho de Melo
  10 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Feng Tang, Andi Kleen, David Ahern, Ingo Molnar,
	Peter Zijlstra, Robert Richter, Stephane Eranian,
	Arnaldo Carvalho de Melo

From: Feng Tang <feng.tang@intel.com>

Also as suggested by Arnaldo, pack all these parameters to a dictionary,
which is more expandable for adding new parameters while keeping the
compatibility for old scripts.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1344419875-21665-4-git-send-email-feng.tang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 .../util/scripting-engines/trace-event-python.c    |   35 ++++++++++++++++----
 1 file changed, 29 insertions(+), 6 deletions(-)

diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 24711b3..7e3f576 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -345,15 +345,23 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 					 struct machine *machine __unused,
 					 struct addr_location *al __unused)
 {
-	PyObject *handler, *retval, *t;
+	PyObject *handler, *retval, *t, *dict;
 	static char handler_name[64];
 	unsigned n = 0;
-	void *data = sample->raw_data;
+	struct thread *thread = al->thread;
 
+	/*
+	 * Use the MAX_FIELDS to make the function expandable, though
+	 * currently there is only one itme for the tuple.
+	 */
 	t = PyTuple_New(MAX_FIELDS);
 	if (!t)
 		Py_FatalError("couldn't create Python tuple");
 
+	dict = PyDict_New();
+	if (!dict)
+		Py_FatalError("couldn't create Python dictionary");
+
 	snprintf(handler_name, sizeof(handler_name), "%s", "process_event");
 
 	handler = PyDict_GetItemString(main_dict, handler_name);
@@ -362,11 +370,25 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 		goto exit;
 	}
 
-	/* Pass 4 parameters: event_attr, perf_sample, raw data, thread name */
-	PyTuple_SetItem(t, n++, PyString_FromStringAndSize((void *)&evsel->attr, sizeof(evsel->attr)));
-	PyTuple_SetItem(t, n++, PyString_FromStringAndSize((void *)sample, sizeof(*sample)));
-	PyTuple_SetItem(t, n++, PyString_FromStringAndSize(data, sample->raw_size));
+	PyDict_SetItemString(dict, "ev_name", PyString_FromString(perf_evsel__name(evsel)));
+	PyDict_SetItemString(dict, "attr", PyString_FromStringAndSize(
+			(const char *)&evsel->attr, sizeof(evsel->attr)));
+	PyDict_SetItemString(dict, "sample", PyString_FromStringAndSize(
+			(const char *)sample, sizeof(*sample)));
+	PyDict_SetItemString(dict, "raw_buf", PyString_FromStringAndSize(
+			(const char *)sample->raw_data, sample->raw_size));
+	PyDict_SetItemString(dict, "comm",
+			PyString_FromString(thread->comm));
+	if (al->map) {
+		PyDict_SetItemString(dict, "dso",
+			PyString_FromString(al->map->dso->name));
+	}
+	if (al->sym) {
+		PyDict_SetItemString(dict, "symbol",
+			PyString_FromString(al->sym->name));
+	}
 
+	PyTuple_SetItem(t, n++, dict);
 	if (_PyTuple_Resize(&t, n) == -1)
 		Py_FatalError("error resizing Python tuple");
 
@@ -374,6 +396,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 	if (retval == NULL)
 		handler_call_die(handler_name);
 exit:
+	Py_DECREF(dict);
 	Py_DECREF(t);
 }
 
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [PATCH 10/11] perf scripts python: Add a python library EventClass.py
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2012-08-08 17:13 ` [PATCH 09/11] perf scripts python: Pass event/thread/dso name and symbol info to event handler in python Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-08 17:13 ` [PATCH 11/11] perf scripts python: Add event_analyzing_sample.py as a sample for general event handling Arnaldo Carvalho de Melo
  10 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Feng Tang, Andi Kleen, David Ahern, Ingo Molnar,
	Peter Zijlstra, Robert Richter, Stephane Eranian,
	Arnaldo Carvalho de Melo

From: Feng Tang <feng.tang@intel.com>

This library defines several class types for perf events which could
help to better analyze the event samples. Currently there are just a few
classes, PerfEvent is the base class for all perf events,  PebsEvent is
a HW base Intel x86 PEBS event, and user could add more SW/HW event
classes based on requriements.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1344419875-21665-5-git-send-email-feng.tang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 .../Perf-Trace-Util/lib/Perf/Trace/EventClass.py   |   94 ++++++++++++++++++++
 1 file changed, 94 insertions(+)
 create mode 100755 tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py

diff --git a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
new file mode 100755
index 0000000..6372431
--- /dev/null
+++ b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
@@ -0,0 +1,94 @@
+# EventClass.py
+#
+# This is a libray defining some events typs classes, which could
+# be used by other scripts to analyzing the perf samples.
+#
+# Currently there are just a few classes defined for examples,
+# PerfEvent is the base class for all perf event sample, PebsEvent
+# is a HW base Intel x86 PEBS event, and user could add more SW/HW
+# event classes based on requriements.
+
+import struct
+
+# Event types, user could add more here
+EVTYPE_GENERIC  = 0
+EVTYPE_PEBS     = 1     # Basic PEBS event
+EVTYPE_PEBS_LL  = 2     # PEBS event with load latency info
+EVTYPE_IBS      = 3
+
+#
+# Currently we don't have good way to tell the event type, but by
+# the size of raw buffer, raw PEBS event with load latency data's
+# size is 176 bytes, while the pure PEBS event's size is 144 bytes.
+#
+def create_event(name, comm, dso, symbol, raw_buf):
+        if (len(raw_buf) == 144):
+                event = PebsEvent(name, comm, dso, symbol, raw_buf)
+        elif (len(raw_buf) == 176):
+                event = PebsNHM(name, comm, dso, symbol, raw_buf)
+        else:
+                event = PerfEvent(name, comm, dso, symbol, raw_buf)
+
+        return event
+
+class PerfEvent(object):
+        event_num = 0
+        def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_GENERIC):
+                self.name       = name
+                self.comm       = comm
+                self.dso        = dso
+                self.symbol     = symbol
+                self.raw_buf    = raw_buf
+                self.ev_type    = ev_type
+                PerfEvent.event_num += 1
+
+        def show(self):
+                print "PMU event: name=%12s, symbol=%24s, comm=%8s, dso=%12s" % (self.name, self.symbol, self.comm, self.dso)
+
+#
+# Basic Intel PEBS (Precise Event-based Sampling) event, whose raw buffer
+# contains the context info when that event happened: the EFLAGS and
+# linear IP info, as well as all the registers.
+#
+class PebsEvent(PerfEvent):
+        pebs_num = 0
+        def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_PEBS):
+                tmp_buf=raw_buf[0:80]
+                flags, ip, ax, bx, cx, dx, si, di, bp, sp = struct.unpack('QQQQQQQQQQ', tmp_buf)
+                self.flags = flags
+                self.ip    = ip
+                self.ax    = ax
+                self.bx    = bx
+                self.cx    = cx
+                self.dx    = dx
+                self.si    = si
+                self.di    = di
+                self.bp    = bp
+                self.sp    = sp
+
+                PerfEvent.__init__(self, name, comm, dso, symbol, raw_buf, ev_type)
+                PebsEvent.pebs_num += 1
+                del tmp_buf
+
+#
+# Intel Nehalem and Westmere support PEBS plus Load Latency info which lie
+# in the four 64 bit words write after the PEBS data:
+#       Status: records the IA32_PERF_GLOBAL_STATUS register value
+#       DLA:    Data Linear Address (EIP)
+#       DSE:    Data Source Encoding, where the latency happens, hit or miss
+#               in L1/L2/L3 or IO operations
+#       LAT:    the actual latency in cycles
+#
+class PebsNHM(PebsEvent):
+        pebs_nhm_num = 0
+        def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_PEBS_LL):
+                tmp_buf=raw_buf[144:176]
+                status, dla, dse, lat = struct.unpack('QQQQ', tmp_buf)
+                self.status = status
+                self.dla = dla
+                self.dse = dse
+                self.lat = lat
+
+                PebsEvent.__init__(self, name, comm, dso, symbol, raw_buf, ev_type)
+                PebsNHM.pebs_nhm_num += 1
+                del tmp_buf
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [PATCH 11/11] perf scripts python: Add event_analyzing_sample.py as a sample for general event handling
  2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2012-08-08 17:13 ` [PATCH 10/11] perf scripts python: Add a python library EventClass.py Arnaldo Carvalho de Melo
@ 2012-08-08 17:13 ` Arnaldo Carvalho de Melo
  2012-08-09  3:01   ` Namhyung Kim
  10 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-08-08 17:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Feng Tang, Andi Kleen, David Ahern, Ingo Molnar,
	Peter Zijlstra, Robert Richter, Stephane Eranian,
	Arnaldo Carvalho de Melo

From: Feng Tang <feng.tang@intel.com>

Currently only trace point events are supported in perf/python script,
the first 3 patches of this serie add the support for all types of
events. This script is just a simple sample to show how to gather the
basic information of the events and analyze them.

This script will create one object for each event sample and insert them
into a table in a database, then leverage the simple SQL commands to
sort/group them. User can modify or write their brand new functions
according to their specific requirment.

Here is the sample of how to use the script:

 $ perf record -a tree
 $ perf script -s process_event.py

There is 100 records in gen_events table
Statistics about the general events grouped by thread/symbol/dso:

            comm   number         histgram
==========================================
         swapper       56     ######
            tree       20     #####
            perf       10     ####
            sshd        8     ####
     kworker/7:2        4     ###
     ksoftirqd/7        1     #
 plugin-containe        1     #

                          symbol   number         histgram
==========================================================
           native_write_msr_safe       40     ######
                  __lock_acquire        8     ####
             ftrace_graph_caller        4     ###
           prepare_ftrace_return        4     ###
                      intel_idle        3     ##
              native_sched_clock        3     ##
                  Unknown_symbol        2     ##
                      do_softirq        2     ##
                    lock_release        2     ##
           lock_release_holdtime        2     ##
               trace_graph_entry        2     ##
                        _IO_putc        1     #
                  __d_lookup_rcu        1     #
                      __do_fault        1     #
                      __schedule        1     #
                  _raw_spin_lock        1     #
                       delay_tsc        1     #
             generic_exec_single        1     #
                generic_fillattr        1     #

                                     dso   number         histgram
==================================================================
                       [kernel.kallsyms]       95     #######
                     /lib/libc-2.12.1.so        5     ###

Signed-off-by: Feng Tang <feng.tang@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1344419875-21665-6-git-send-email-feng.tang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 .../perf/scripts/python/event_analyzing_sample.py  |  193 ++++++++++++++++++++
 1 file changed, 193 insertions(+)
 create mode 100644 tools/perf/scripts/python/event_analyzing_sample.py

diff --git a/tools/perf/scripts/python/event_analyzing_sample.py b/tools/perf/scripts/python/event_analyzing_sample.py
new file mode 100644
index 0000000..46f05aa
--- /dev/null
+++ b/tools/perf/scripts/python/event_analyzing_sample.py
@@ -0,0 +1,193 @@
+# process_event.py: general event handler in python
+#
+# Current perf report is alreay very powerful with the anotation integrated,
+# and this script is not trying to be as powerful as perf report, but
+# providing end user/developer a flexible way to analyze the events other
+# than trace points.
+#
+# The 2 database related functions in this script just show how to gather
+# the basic information, and users can modify and write their own functions
+# according to their specific requirment.
+#
+# The first sample "show_general_events" just does a baisc grouping for all
+# generic events with the help of sqlite, and the 2nd one "show_pebs_ll" is
+# for a x86 HW PMU event: PEBS with load latency data.
+#
+
+import os
+import sys
+import math
+import struct
+import sqlite3
+
+sys.path.append(os.environ['PERF_EXEC_PATH'] + \
+        '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
+
+from perf_trace_context import *
+from EventClass import *
+
+#
+# If the perf.data has a big number of samples, then the insert operation
+# will be very time consuming (about 10+ minutes for 10000 samples) if the
+# .db database is on disk. Move the .db file to RAM based FS to speedup
+# the handling, which will cut the time down to several seconds.
+#
+con = sqlite3.connect("/dev/shm/perf.db")
+con.isolation_level = None
+
+def trace_begin():
+	print "In trace_begin:\n"
+
+        #
+        # Will create several tables at the start, pebs_ll is for PEBS data with
+        # load latency info, while gen_events is for general event.
+        #
+        con.execute("""
+                create table if not exists gen_events (
+                        name text,
+                        symbol text,
+                        comm text,
+                        dso text
+                );""")
+        con.execute("""
+                create table if not exists pebs_ll (
+                        name text,
+                        symbol text,
+                        comm text,
+                        dso text,
+                        flags integer,
+                        ip integer,
+                        status integer,
+                        dse integer,
+                        dla integer,
+                        lat integer
+                );""")
+
+#
+# Create and insert event object to a database so that user could
+# do more analysis with simple database commands.
+#
+def process_event(param_dict):
+        event_attr = param_dict["attr"]
+        sample     = param_dict["sample"]
+        raw_buf    = param_dict["raw_buf"]
+        comm       = param_dict["comm"]
+        name       = param_dict["ev_name"]
+
+        # Symbol and dso info are not always resolved
+        if (param_dict.has_key("dso")):
+                dso = param_dict["dso"]
+        else:
+                dso = "Unknown_dso"
+
+        if (param_dict.has_key("symbol")):
+                symbol = param_dict["symbol"]
+        else:
+                symbol = "Unknown_symbol"
+
+        # Creat the event object and insert it to the right table in database
+        event = create_event(name, comm, dso, symbol, raw_buf)
+        insert_db(event)
+
+def insert_db(event):
+        if event.ev_type == EVTYPE_GENERIC:
+                con.execute("insert into gen_events values(?, ?, ?, ?)",
+                                (event.name, event.symbol, event.comm, event.dso))
+        elif event.ev_type == EVTYPE_PEBS_LL:
+                event.ip &= 0x7fffffffffffffff
+                event.dla &= 0x7fffffffffffffff
+                con.execute("insert into pebs_ll values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
+                        (event.name, event.symbol, event.comm, event.dso, event.flags,
+                                event.ip, event.status, event.dse, event.dla, event.lat))
+
+def trace_end():
+	print "In trace_end:\n"
+        # We show the basic info for the 2 type of event classes
+        show_general_events()
+        show_pebs_ll()
+        con.close()
+
+#
+# As the event number may be very big, so we can't use linear way
+# to show the histgram in real number, but use a log2 algorithm.
+#
+
+def num2sym(num):
+        # Each number will have at least one '#'
+        snum = '#' * (int)(math.log(num, 2) + 1)
+        return snum
+
+def show_general_events():
+
+        # Check the total record number in the table
+        count = con.execute("select count(*) from gen_events")
+        for t in count:
+                print "There is %d records in gen_events table" % t[0]
+                if t[0] == 0:
+                        return
+
+        print "Statistics about the general events grouped by thread/symbol/dso: \n"
+
+         # Group by thread
+        commq = con.execute("select comm, count(comm) from gen_events group by comm order by -count(comm)")
+        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histgram", "="*42)
+        for row in commq:
+             print "%16s %8d     %s" % (row[0], row[1], num2sym(row[1]))
+
+        # Group by symbol
+        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histgram", "="*58)
+        symbolq = con.execute("select symbol, count(symbol) from gen_events group by symbol order by -count(symbol)")
+        for row in symbolq:
+             print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
+
+        # Group by dso
+        print "\n%40s %8s %16s\n%s" % ("dso", "number", "histgram", "="*74)
+        dsoq = con.execute("select dso, count(dso) from gen_events group by dso order by -count(dso)")
+        for row in dsoq:
+             print "%40s %8d     %s" % (row[0], row[1], num2sym(row[1]))
+
+#
+# This function just shows the basic info, and we could do more with the
+# data in the tables, like checking the function parameters when some
+# big latency events happen.
+#
+def show_pebs_ll():
+
+        count = con.execute("select count(*) from pebs_ll")
+        for t in count:
+                print "There is %d records in pebs_ll table" % t[0]
+                if t[0] == 0:
+                        return
+
+        print "Statistics about the PEBS Load Latency events grouped by thread/symbol/dse/latency: \n"
+
+        # Group by thread
+        commq = con.execute("select comm, count(comm) from pebs_ll group by comm order by -count(comm)")
+        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histgram", "="*42)
+        for row in commq:
+             print "%16s %8d     %s" % (row[0], row[1], num2sym(row[1]))
+
+        # Group by symbol
+        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histgram", "="*58)
+        symbolq = con.execute("select symbol, count(symbol) from pebs_ll group by symbol order by -count(symbol)")
+        for row in symbolq:
+             print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
+
+        # Group by dse
+        dseq = con.execute("select dse, count(dse) from pebs_ll group by dse order by -count(dse)")
+        print "\n%32s %8s %16s\n%s" % ("dse", "number", "histgram", "="*58)
+        for row in dseq:
+             print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
+
+        # Group by latency
+        latq = con.execute("select lat, count(lat) from pebs_ll group by lat order by lat")
+        print "\n%32s %8s %16s\n%s" % ("latency", "number", "histgram", "="*58)
+        for row in latq:
+             print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
+
+def trace_unhandled(event_name, context, event_fields_dict):
+		print ' '.join(['%s=%s'%(k,str(v))for k,v in sorted(event_fields_dict.items())])
+
+def print_header(event_name, cpu, secs, nsecs, pid, comm):
+	print "%-20s %5u %05u.%09u %8u %-20s " % \
+	(event_name, cpu, secs, nsecs, pid, comm),
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 76+ messages in thread

* Re: [PATCH 11/11] perf scripts python: Add event_analyzing_sample.py as a sample for general event handling
  2012-08-08 17:13 ` [PATCH 11/11] perf scripts python: Add event_analyzing_sample.py as a sample for general event handling Arnaldo Carvalho de Melo
@ 2012-08-09  3:01   ` Namhyung Kim
  2012-08-09  5:24     ` [PATCH] perf script python: Correct handler check and spelling errors Feng Tang
  0 siblings, 1 reply; 76+ messages in thread
From: Namhyung Kim @ 2012-08-09  3:01 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Feng Tang, Andi Kleen, David Ahern,
	Ingo Molnar, Peter Zijlstra, Robert Richter, Stephane Eranian,
	Arnaldo Carvalho de Melo

Hi Arnaldo and Ingo,

On Wed,  8 Aug 2012 14:13:48 -0300, Arnaldo Carvalho de Melo wrote:
> From: Feng Tang <feng.tang@intel.com>
>
> Currently only trace point events are supported in perf/python script,
> the first 3 patches of this serie add the support for all types of
> events. This script is just a simple sample to show how to gather the
> basic information of the events and analyze them.
>
> This script will create one object for each event sample and insert them
> into a table in a database, then leverage the simple SQL commands to
> sort/group them. User can modify or write their brand new functions
> according to their specific requirment.
>
> Here is the sample of how to use the script:
>
>  $ perf record -a tree
>  $ perf script -s process_event.py

Please edit the script name to event_analyzing_sample.py at least to
prevent future confusion. For other issues, please see my review
comments on Feng's original posts. (They can be incremental.)

>
> There is 100 records in gen_events table
> Statistics about the general events grouped by thread/symbol/dso:
>
>             comm   number         histgram
> ==========================================
>          swapper       56     ######
>             tree       20     #####
>             perf       10     ####
>             sshd        8     ####
>      kworker/7:2        4     ###
>      ksoftirqd/7        1     #
>  plugin-containe        1     #
>
>                           symbol   number         histgram
> ==========================================================
>            native_write_msr_safe       40     ######
>                   __lock_acquire        8     ####
>              ftrace_graph_caller        4     ###
>            prepare_ftrace_return        4     ###
>                       intel_idle        3     ##
>               native_sched_clock        3     ##
>                   Unknown_symbol        2     ##
>                       do_softirq        2     ##
>                     lock_release        2     ##
>            lock_release_holdtime        2     ##
>                trace_graph_entry        2     ##
>                         _IO_putc        1     #
>                   __d_lookup_rcu        1     #
>                       __do_fault        1     #
>                       __schedule        1     #
>                   _raw_spin_lock        1     #
>                        delay_tsc        1     #
>              generic_exec_single        1     #
>                 generic_fillattr        1     #
>
>                                      dso   number         histgram
> ==================================================================
>                        [kernel.kallsyms]       95     #######
>                      /lib/libc-2.12.1.so        5     ###
>
> Signed-off-by: Feng Tang <feng.tang@intel.com>
> Cc: Andi Kleen <andi@firstfloor.org>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Robert Richter <robert.richter@amd.com>
> Cc: Stephane Eranian <eranian@google.com>
> Link: http://lkml.kernel.org/r/1344419875-21665-6-git-send-email-feng.tang@intel.com
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  .../perf/scripts/python/event_analyzing_sample.py  |  193 ++++++++++++++++++++
>  1 file changed, 193 insertions(+)
>  create mode 100644 tools/perf/scripts/python/event_analyzing_sample.py
>
> diff --git a/tools/perf/scripts/python/event_analyzing_sample.py b/tools/perf/scripts/python/event_analyzing_sample.py
> new file mode 100644
> index 0000000..46f05aa
> --- /dev/null
> +++ b/tools/perf/scripts/python/event_analyzing_sample.py
> @@ -0,0 +1,193 @@
> +# process_event.py: general event handler in python

Hopefully here also.

Thanks,
Namhyung


> +#
> +# Current perf report is alreay very powerful with the anotation integrated,
> +# and this script is not trying to be as powerful as perf report, but
> +# providing end user/developer a flexible way to analyze the events other
> +# than trace points.
> +#
> +# The 2 database related functions in this script just show how to gather
> +# the basic information, and users can modify and write their own functions
> +# according to their specific requirment.
> +#
> +# The first sample "show_general_events" just does a baisc grouping for all
> +# generic events with the help of sqlite, and the 2nd one "show_pebs_ll" is
> +# for a x86 HW PMU event: PEBS with load latency data.
> +#
> +
> +import os
> +import sys
> +import math
> +import struct
> +import sqlite3
> +
> +sys.path.append(os.environ['PERF_EXEC_PATH'] + \
> +        '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
> +
> +from perf_trace_context import *
> +from EventClass import *
> +
> +#
> +# If the perf.data has a big number of samples, then the insert operation
> +# will be very time consuming (about 10+ minutes for 10000 samples) if the
> +# .db database is on disk. Move the .db file to RAM based FS to speedup
> +# the handling, which will cut the time down to several seconds.
> +#
> +con = sqlite3.connect("/dev/shm/perf.db")
> +con.isolation_level = None
> +
> +def trace_begin():
> +	print "In trace_begin:\n"
> +
> +        #
> +        # Will create several tables at the start, pebs_ll is for PEBS data with
> +        # load latency info, while gen_events is for general event.
> +        #
> +        con.execute("""
> +                create table if not exists gen_events (
> +                        name text,
> +                        symbol text,
> +                        comm text,
> +                        dso text
> +                );""")
> +        con.execute("""
> +                create table if not exists pebs_ll (
> +                        name text,
> +                        symbol text,
> +                        comm text,
> +                        dso text,
> +                        flags integer,
> +                        ip integer,
> +                        status integer,
> +                        dse integer,
> +                        dla integer,
> +                        lat integer
> +                );""")
> +
> +#
> +# Create and insert event object to a database so that user could
> +# do more analysis with simple database commands.
> +#
> +def process_event(param_dict):
> +        event_attr = param_dict["attr"]
> +        sample     = param_dict["sample"]
> +        raw_buf    = param_dict["raw_buf"]
> +        comm       = param_dict["comm"]
> +        name       = param_dict["ev_name"]
> +
> +        # Symbol and dso info are not always resolved
> +        if (param_dict.has_key("dso")):
> +                dso = param_dict["dso"]
> +        else:
> +                dso = "Unknown_dso"
> +
> +        if (param_dict.has_key("symbol")):
> +                symbol = param_dict["symbol"]
> +        else:
> +                symbol = "Unknown_symbol"
> +
> +        # Creat the event object and insert it to the right table in database
> +        event = create_event(name, comm, dso, symbol, raw_buf)
> +        insert_db(event)
> +
> +def insert_db(event):
> +        if event.ev_type == EVTYPE_GENERIC:
> +                con.execute("insert into gen_events values(?, ?, ?, ?)",
> +                                (event.name, event.symbol, event.comm, event.dso))
> +        elif event.ev_type == EVTYPE_PEBS_LL:
> +                event.ip &= 0x7fffffffffffffff
> +                event.dla &= 0x7fffffffffffffff
> +                con.execute("insert into pebs_ll values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
> +                        (event.name, event.symbol, event.comm, event.dso, event.flags,
> +                                event.ip, event.status, event.dse, event.dla, event.lat))
> +
> +def trace_end():
> +	print "In trace_end:\n"
> +        # We show the basic info for the 2 type of event classes
> +        show_general_events()
> +        show_pebs_ll()
> +        con.close()
> +
> +#
> +# As the event number may be very big, so we can't use linear way
> +# to show the histgram in real number, but use a log2 algorithm.
> +#
> +
> +def num2sym(num):
> +        # Each number will have at least one '#'
> +        snum = '#' * (int)(math.log(num, 2) + 1)
> +        return snum
> +
> +def show_general_events():
> +
> +        # Check the total record number in the table
> +        count = con.execute("select count(*) from gen_events")
> +        for t in count:
> +                print "There is %d records in gen_events table" % t[0]
> +                if t[0] == 0:
> +                        return
> +
> +        print "Statistics about the general events grouped by thread/symbol/dso: \n"
> +
> +         # Group by thread
> +        commq = con.execute("select comm, count(comm) from gen_events group by comm order by -count(comm)")
> +        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histgram", "="*42)
> +        for row in commq:
> +             print "%16s %8d     %s" % (row[0], row[1], num2sym(row[1]))
> +
> +        # Group by symbol
> +        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histgram", "="*58)
> +        symbolq = con.execute("select symbol, count(symbol) from gen_events group by symbol order by -count(symbol)")
> +        for row in symbolq:
> +             print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
> +
> +        # Group by dso
> +        print "\n%40s %8s %16s\n%s" % ("dso", "number", "histgram", "="*74)
> +        dsoq = con.execute("select dso, count(dso) from gen_events group by dso order by -count(dso)")
> +        for row in dsoq:
> +             print "%40s %8d     %s" % (row[0], row[1], num2sym(row[1]))
> +
> +#
> +# This function just shows the basic info, and we could do more with the
> +# data in the tables, like checking the function parameters when some
> +# big latency events happen.
> +#
> +def show_pebs_ll():
> +
> +        count = con.execute("select count(*) from pebs_ll")
> +        for t in count:
> +                print "There is %d records in pebs_ll table" % t[0]
> +                if t[0] == 0:
> +                        return
> +
> +        print "Statistics about the PEBS Load Latency events grouped by thread/symbol/dse/latency: \n"
> +
> +        # Group by thread
> +        commq = con.execute("select comm, count(comm) from pebs_ll group by comm order by -count(comm)")
> +        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histgram", "="*42)
> +        for row in commq:
> +             print "%16s %8d     %s" % (row[0], row[1], num2sym(row[1]))
> +
> +        # Group by symbol
> +        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histgram", "="*58)
> +        symbolq = con.execute("select symbol, count(symbol) from pebs_ll group by symbol order by -count(symbol)")
> +        for row in symbolq:
> +             print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
> +
> +        # Group by dse
> +        dseq = con.execute("select dse, count(dse) from pebs_ll group by dse order by -count(dse)")
> +        print "\n%32s %8s %16s\n%s" % ("dse", "number", "histgram", "="*58)
> +        for row in dseq:
> +             print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
> +
> +        # Group by latency
> +        latq = con.execute("select lat, count(lat) from pebs_ll group by lat order by lat")
> +        print "\n%32s %8s %16s\n%s" % ("latency", "number", "histgram", "="*58)
> +        for row in latq:
> +             print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
> +
> +def trace_unhandled(event_name, context, event_fields_dict):
> +		print ' '.join(['%s=%s'%(k,str(v))for k,v in sorted(event_fields_dict.items())])
> +
> +def print_header(event_name, cpu, secs, nsecs, pid, comm):
> +	print "%-20s %5u %05u.%09u %8u %-20s " % \
> +	(event_name, cpu, secs, nsecs, pid, comm),

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [PATCH] perf script python: Correct handler check and spelling errors
  2012-08-09  3:01   ` Namhyung Kim
@ 2012-08-09  5:24     ` Feng Tang
  2012-08-09  5:35       ` Namhyung Kim
  0 siblings, 1 reply; 76+ messages in thread
From: Feng Tang @ 2012-08-09  5:24 UTC (permalink / raw)
  To: Namhyung Kim, Arnaldo Carvalho de Melo, Ingo Molnar
  Cc: linux-kernel, Andi Kleen, David Ahern, Ingo Molnar,
	Peter Zijlstra, Robert Richter, Stephane Eranian,
	Arnaldo Carvalho de Melo

>From 3332f03c6e8f641e26430a25704c364c2f30d833 Mon Sep 17 00:00:00 2001
From: Feng Tang <feng.tang@intel.com>
Date: Thu, 9 Aug 2012 12:50:56 +0800
Subject: [PATCH] perf script python: Correct handler check and spelling errors

Correct the checking for handler returned by PyDict_GetItemString(), also
fix some spelling error and remove some data code in event_analyzing_sample.py,
as suggested by Namhyung Kim.

Signed-off-by: Feng Tang <feng.tang@intel.com>
---
 .../Perf-Trace-Util/lib/Perf/Trace/EventClass.py   |    4 +-
 .../perf/scripts/python/event_analyzing_sample.py  |   33 ++++++++------------
 .../util/scripting-engines/trace-event-python.c    |    8 ++---
 3 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
index 6372431..9e09857 100755
--- a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
+++ b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
@@ -1,12 +1,12 @@
 # EventClass.py
 #
-# This is a libray defining some events typs classes, which could
+# This is a library defining some events types classes, which could
 # be used by other scripts to analyzing the perf samples.
 #
 # Currently there are just a few classes defined for examples,
 # PerfEvent is the base class for all perf event sample, PebsEvent
 # is a HW base Intel x86 PEBS event, and user could add more SW/HW
-# event classes based on requriements.
+# event classes based on requirements.
 
 import struct
 
diff --git a/tools/perf/scripts/python/event_analyzing_sample.py b/tools/perf/scripts/python/event_analyzing_sample.py
index 46f05aa..15555bc 100644
--- a/tools/perf/scripts/python/event_analyzing_sample.py
+++ b/tools/perf/scripts/python/event_analyzing_sample.py
@@ -1,15 +1,15 @@
-# process_event.py: general event handler in python
+# event_analyzing_sample.py: general event handler in python
 #
-# Current perf report is alreay very powerful with the anotation integrated,
+# Current perf report is already very powerful with the annotation integrated,
 # and this script is not trying to be as powerful as perf report, but
 # providing end user/developer a flexible way to analyze the events other
 # than trace points.
 #
 # The 2 database related functions in this script just show how to gather
 # the basic information, and users can modify and write their own functions
-# according to their specific requirment.
+# according to their specific requirement.
 #
-# The first sample "show_general_events" just does a baisc grouping for all
+# The first function "show_general_events" just does a basic grouping for all
 # generic events with the help of sqlite, and the 2nd one "show_pebs_ll" is
 # for a x86 HW PMU event: PEBS with load latency data.
 #
@@ -85,7 +85,7 @@ def process_event(param_dict):
         else:
                 symbol = "Unknown_symbol"
 
-        # Creat the event object and insert it to the right table in database
+        # Create the event object and insert it to the right table in database
         event = create_event(name, comm, dso, symbol, raw_buf)
         insert_db(event)
 
@@ -109,7 +109,7 @@ def trace_end():
 
 #
 # As the event number may be very big, so we can't use linear way
-# to show the histgram in real number, but use a log2 algorithm.
+# to show the histogram in real number, but use a log2 algorithm.
 #
 
 def num2sym(num):
@@ -130,18 +130,18 @@ def show_general_events():
 
          # Group by thread
         commq = con.execute("select comm, count(comm) from gen_events group by comm order by -count(comm)")
-        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histgram", "="*42)
+        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histogram", "="*42)
         for row in commq:
              print "%16s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by symbol
-        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histogram", "="*58)
         symbolq = con.execute("select symbol, count(symbol) from gen_events group by symbol order by -count(symbol)")
         for row in symbolq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by dso
-        print "\n%40s %8s %16s\n%s" % ("dso", "number", "histgram", "="*74)
+        print "\n%40s %8s %16s\n%s" % ("dso", "number", "histogram", "="*74)
         dsoq = con.execute("select dso, count(dso) from gen_events group by dso order by -count(dso)")
         for row in dsoq:
              print "%40s %8d     %s" % (row[0], row[1], num2sym(row[1]))
@@ -163,31 +163,24 @@ def show_pebs_ll():
 
         # Group by thread
         commq = con.execute("select comm, count(comm) from pebs_ll group by comm order by -count(comm)")
-        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histgram", "="*42)
+        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histogram", "="*42)
         for row in commq:
              print "%16s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by symbol
-        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histogram", "="*58)
         symbolq = con.execute("select symbol, count(symbol) from pebs_ll group by symbol order by -count(symbol)")
         for row in symbolq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by dse
         dseq = con.execute("select dse, count(dse) from pebs_ll group by dse order by -count(dse)")
-        print "\n%32s %8s %16s\n%s" % ("dse", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("dse", "number", "histogram", "="*58)
         for row in dseq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by latency
         latq = con.execute("select lat, count(lat) from pebs_ll group by lat order by lat")
-        print "\n%32s %8s %16s\n%s" % ("latency", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("latency", "number", "histogram", "="*58)
         for row in latq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
-
-def trace_unhandled(event_name, context, event_fields_dict):
-		print ' '.join(['%s=%s'%(k,str(v))for k,v in sorted(event_fields_dict.items())])
-
-def print_header(event_name, cpu, secs, nsecs, pid, comm):
-	print "%-20s %5u %05u.%09u %8u %-20s " % \
-	(event_name, cpu, secs, nsecs, pid, comm),
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 7e3f576..afba097 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -343,7 +343,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 					 struct perf_sample *sample,
 					 struct perf_evsel *evsel,
 					 struct machine *machine __unused,
-					 struct addr_location *al __unused)
+					 struct addr_location *al)
 {
 	PyObject *handler, *retval, *t, *dict;
 	static char handler_name[64];
@@ -352,7 +352,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 
 	/*
 	 * Use the MAX_FIELDS to make the function expandable, though
-	 * currently there is only one itme for the tuple.
+	 * currently there is only one item for the tuple.
 	 */
 	t = PyTuple_New(MAX_FIELDS);
 	if (!t)
@@ -365,10 +365,8 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 	snprintf(handler_name, sizeof(handler_name), "%s", "process_event");
 
 	handler = PyDict_GetItemString(main_dict, handler_name);
-	if (handler && !PyCallable_Check(handler)) {
-		handler = NULL;
+	if (!handler || !PyCallable_Check(handler))
 		goto exit;
-	}
 
 	PyDict_SetItemString(dict, "ev_name", PyString_FromString(perf_evsel__name(evsel)));
 	PyDict_SetItemString(dict, "attr", PyString_FromStringAndSize(
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 76+ messages in thread

* Re: [PATCH] perf script python: Correct handler check and spelling errors
  2012-08-09  5:24     ` [PATCH] perf script python: Correct handler check and spelling errors Feng Tang
@ 2012-08-09  5:35       ` Namhyung Kim
  2012-08-09  5:46         ` [PATCH v2] " Feng Tang
  0 siblings, 1 reply; 76+ messages in thread
From: Namhyung Kim @ 2012-08-09  5:35 UTC (permalink / raw)
  To: Feng Tang
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel, Andi Kleen,
	David Ahern, Ingo Molnar, Peter Zijlstra, Robert Richter,
	Stephane Eranian, Arnaldo Carvalho de Melo

On Thu, 9 Aug 2012 13:24:01 +0800, Feng Tang wrote:
> From 3332f03c6e8f641e26430a25704c364c2f30d833 Mon Sep 17 00:00:00 2001
> From: Feng Tang <feng.tang@intel.com>
> Date: Thu, 9 Aug 2012 12:50:56 +0800
> Subject: [PATCH] perf script python: Correct handler check and spelling errors
>
> Correct the checking for handler returned by PyDict_GetItemString(), also
> fix some spelling error and remove some data code in event_analyzing_sample.py,
> as suggested by Namhyung Kim.
>
> Signed-off-by: Feng Tang <feng.tang@intel.com>
> ---
[SNIP]
> -
> -def trace_unhandled(event_name, context, event_fields_dict):
> -		print ' '.join(['%s=%s'%(k,str(v))for k,v in sorted(event_fields_dict.items())])

I guess we need to have the trace_unhandled as a safety net since it can
be called from the scripting-engine?

Thanks,
Namhyung


> -
> -def print_header(event_name, cpu, secs, nsecs, pid, comm):
> -	print "%-20s %5u %05u.%09u %8u %-20s " % \
> -	(event_name, cpu, secs, nsecs, pid, comm),
> diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
> index 7e3f576..afba097 100644
> --- a/tools/perf/util/scripting-engines/trace-event-python.c
> +++ b/tools/perf/util/scripting-engines/trace-event-python.c
> @@ -343,7 +343,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
>  					 struct perf_sample *sample,
>  					 struct perf_evsel *evsel,
>  					 struct machine *machine __unused,
> -					 struct addr_location *al __unused)
> +					 struct addr_location *al)
>  {
>  	PyObject *handler, *retval, *t, *dict;
>  	static char handler_name[64];
> @@ -352,7 +352,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
>  
>  	/*
>  	 * Use the MAX_FIELDS to make the function expandable, though
> -	 * currently there is only one itme for the tuple.
> +	 * currently there is only one item for the tuple.
>  	 */
>  	t = PyTuple_New(MAX_FIELDS);
>  	if (!t)
> @@ -365,10 +365,8 @@ static void python_process_general_event(union perf_event *perf_event __unused,
>  	snprintf(handler_name, sizeof(handler_name), "%s", "process_event");
>  
>  	handler = PyDict_GetItemString(main_dict, handler_name);
> -	if (handler && !PyCallable_Check(handler)) {
> -		handler = NULL;
> +	if (!handler || !PyCallable_Check(handler))
>  		goto exit;
> -	}
>  
>  	PyDict_SetItemString(dict, "ev_name", PyString_FromString(perf_evsel__name(evsel)));
>  	PyDict_SetItemString(dict, "attr", PyString_FromStringAndSize(

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [PATCH v2] perf script python: Correct handler check and spelling errors
  2012-08-09  5:35       ` Namhyung Kim
@ 2012-08-09  5:46         ` Feng Tang
  2012-08-09  6:15           ` Namhyung Kim
  2012-08-21 15:37           ` [tip:perf/core] " tip-bot for Feng Tang
  0 siblings, 2 replies; 76+ messages in thread
From: Feng Tang @ 2012-08-09  5:46 UTC (permalink / raw)
  To: Namhyung Kim, Arnaldo Carvalho de Melo, Ingo Molnar
  Cc: linux-kernel, Andi Kleen, David Ahern, Ingo Molnar,
	Peter Zijlstra, Robert Richter, Stephane Eranian,
	Arnaldo Carvalho de Melo

>From efbf00591514aa1d6134a3b940dc627d1a7cc8f8 Mon Sep 17 00:00:00 2001
From: Feng Tang <feng.tang@intel.com>
Date: Thu, 9 Aug 2012 12:50:56 +0800
Subject: [PATCH] perf script python: Correct handler check and spelling errors

Correct the checking for handler returned by PyDict_GetItemString(), also
fix some spelling error and remove some data code in event_analyzing_sample.py,
as suggested by Namhyung Kim.

v2: restore back the wrongly removed trace_unhandled() func

Signed-off-by: Feng Tang <feng.tang@intel.com>
---
 .../Perf-Trace-Util/lib/Perf/Trace/EventClass.py   |    4 +-
 .../perf/scripts/python/event_analyzing_sample.py  |   30 ++++++++-----------
 .../util/scripting-engines/trace-event-python.c    |    8 ++---
 3 files changed, 18 insertions(+), 24 deletions(-)

diff --git a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
index 6372431..9e09857 100755
--- a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
+++ b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
@@ -1,12 +1,12 @@
 # EventClass.py
 #
-# This is a libray defining some events typs classes, which could
+# This is a library defining some events types classes, which could
 # be used by other scripts to analyzing the perf samples.
 #
 # Currently there are just a few classes defined for examples,
 # PerfEvent is the base class for all perf event sample, PebsEvent
 # is a HW base Intel x86 PEBS event, and user could add more SW/HW
-# event classes based on requriements.
+# event classes based on requirements.
 
 import struct
 
diff --git a/tools/perf/scripts/python/event_analyzing_sample.py b/tools/perf/scripts/python/event_analyzing_sample.py
index 46f05aa..163c39f 100644
--- a/tools/perf/scripts/python/event_analyzing_sample.py
+++ b/tools/perf/scripts/python/event_analyzing_sample.py
@@ -1,15 +1,15 @@
-# process_event.py: general event handler in python
+# event_analyzing_sample.py: general event handler in python
 #
-# Current perf report is alreay very powerful with the anotation integrated,
+# Current perf report is already very powerful with the annotation integrated,
 # and this script is not trying to be as powerful as perf report, but
 # providing end user/developer a flexible way to analyze the events other
 # than trace points.
 #
 # The 2 database related functions in this script just show how to gather
 # the basic information, and users can modify and write their own functions
-# according to their specific requirment.
+# according to their specific requirement.
 #
-# The first sample "show_general_events" just does a baisc grouping for all
+# The first function "show_general_events" just does a basic grouping for all
 # generic events with the help of sqlite, and the 2nd one "show_pebs_ll" is
 # for a x86 HW PMU event: PEBS with load latency data.
 #
@@ -85,7 +85,7 @@ def process_event(param_dict):
         else:
                 symbol = "Unknown_symbol"
 
-        # Creat the event object and insert it to the right table in database
+        # Create the event object and insert it to the right table in database
         event = create_event(name, comm, dso, symbol, raw_buf)
         insert_db(event)
 
@@ -109,7 +109,7 @@ def trace_end():
 
 #
 # As the event number may be very big, so we can't use linear way
-# to show the histgram in real number, but use a log2 algorithm.
+# to show the histogram in real number, but use a log2 algorithm.
 #
 
 def num2sym(num):
@@ -130,18 +130,18 @@ def show_general_events():
 
          # Group by thread
         commq = con.execute("select comm, count(comm) from gen_events group by comm order by -count(comm)")
-        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histgram", "="*42)
+        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histogram", "="*42)
         for row in commq:
              print "%16s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by symbol
-        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histogram", "="*58)
         symbolq = con.execute("select symbol, count(symbol) from gen_events group by symbol order by -count(symbol)")
         for row in symbolq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by dso
-        print "\n%40s %8s %16s\n%s" % ("dso", "number", "histgram", "="*74)
+        print "\n%40s %8s %16s\n%s" % ("dso", "number", "histogram", "="*74)
         dsoq = con.execute("select dso, count(dso) from gen_events group by dso order by -count(dso)")
         for row in dsoq:
              print "%40s %8d     %s" % (row[0], row[1], num2sym(row[1]))
@@ -163,31 +163,27 @@ def show_pebs_ll():
 
         # Group by thread
         commq = con.execute("select comm, count(comm) from pebs_ll group by comm order by -count(comm)")
-        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histgram", "="*42)
+        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histogram", "="*42)
         for row in commq:
              print "%16s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by symbol
-        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histogram", "="*58)
         symbolq = con.execute("select symbol, count(symbol) from pebs_ll group by symbol order by -count(symbol)")
         for row in symbolq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by dse
         dseq = con.execute("select dse, count(dse) from pebs_ll group by dse order by -count(dse)")
-        print "\n%32s %8s %16s\n%s" % ("dse", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("dse", "number", "histogram", "="*58)
         for row in dseq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by latency
         latq = con.execute("select lat, count(lat) from pebs_ll group by lat order by lat")
-        print "\n%32s %8s %16s\n%s" % ("latency", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("latency", "number", "histogram", "="*58)
         for row in latq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
 def trace_unhandled(event_name, context, event_fields_dict):
 		print ' '.join(['%s=%s'%(k,str(v))for k,v in sorted(event_fields_dict.items())])
-
-def print_header(event_name, cpu, secs, nsecs, pid, comm):
-	print "%-20s %5u %05u.%09u %8u %-20s " % \
-	(event_name, cpu, secs, nsecs, pid, comm),
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 7e3f576..afba097 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -343,7 +343,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 					 struct perf_sample *sample,
 					 struct perf_evsel *evsel,
 					 struct machine *machine __unused,
-					 struct addr_location *al __unused)
+					 struct addr_location *al)
 {
 	PyObject *handler, *retval, *t, *dict;
 	static char handler_name[64];
@@ -352,7 +352,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 
 	/*
 	 * Use the MAX_FIELDS to make the function expandable, though
-	 * currently there is only one itme for the tuple.
+	 * currently there is only one item for the tuple.
 	 */
 	t = PyTuple_New(MAX_FIELDS);
 	if (!t)
@@ -365,10 +365,8 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 	snprintf(handler_name, sizeof(handler_name), "%s", "process_event");
 
 	handler = PyDict_GetItemString(main_dict, handler_name);
-	if (handler && !PyCallable_Check(handler)) {
-		handler = NULL;
+	if (!handler || !PyCallable_Check(handler))
 		goto exit;
-	}
 
 	PyDict_SetItemString(dict, "ev_name", PyString_FromString(perf_evsel__name(evsel)));
 	PyDict_SetItemString(dict, "attr", PyString_FromStringAndSize(
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 76+ messages in thread

* Re: [PATCH v2] perf script python: Correct handler check and spelling errors
  2012-08-09  5:46         ` [PATCH v2] " Feng Tang
@ 2012-08-09  6:15           ` Namhyung Kim
  2012-08-21 15:37           ` [tip:perf/core] " tip-bot for Feng Tang
  1 sibling, 0 replies; 76+ messages in thread
From: Namhyung Kim @ 2012-08-09  6:15 UTC (permalink / raw)
  To: Feng Tang
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel, Andi Kleen,
	David Ahern, Ingo Molnar, Peter Zijlstra, Robert Richter,
	Stephane Eranian, Arnaldo Carvalho de Melo

On Thu, 9 Aug 2012 13:46:13 +0800, Feng Tang wrote:
> From efbf00591514aa1d6134a3b940dc627d1a7cc8f8 Mon Sep 17 00:00:00 2001
> From: Feng Tang <feng.tang@intel.com>
> Date: Thu, 9 Aug 2012 12:50:56 +0800
> Subject: [PATCH] perf script python: Correct handler check and spelling errors
>
> Correct the checking for handler returned by PyDict_GetItemString(), also
> fix some spelling error and remove some data code in event_analyzing_sample.py,
> as suggested by Namhyung Kim.
>
> v2: restore back the wrongly removed trace_unhandled() func
>
> Signed-off-by: Feng Tang <feng.tang@intel.com>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks!

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [tip:perf/core] perf script python: Correct handler check and spelling errors
  2012-08-09  5:46         ` [PATCH v2] " Feng Tang
  2012-08-09  6:15           ` Namhyung Kim
@ 2012-08-21 15:37           ` tip-bot for Feng Tang
  1 sibling, 0 replies; 76+ messages in thread
From: tip-bot for Feng Tang @ 2012-08-21 15:37 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, eranian, hpa, mingo, andi, peterz, namhyung,
	robert.richter, dsahern, tglx, feng.tang

Commit-ID:  87b6a3ad40ba304ec468b972e979e7e410852476
Gitweb:     http://git.kernel.org/tip/87b6a3ad40ba304ec468b972e979e7e410852476
Author:     Feng Tang <feng.tang@intel.com>
AuthorDate: Thu, 9 Aug 2012 13:46:13 +0800
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 9 Aug 2012 13:26:19 -0300

perf script python: Correct handler check and spelling errors

Correct the checking for handler returned by PyDict_GetItemString(),
also fix some spelling error and remove some data code in
event_analyzing_sample.py, as suggested by Namhyung Kim.

v2: restore back the wrongly removed trace_unhandled() func

Signed-off-by: Feng Tang <feng.tang@intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20120809134613.067104c4@feng-i7
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 .../Perf-Trace-Util/lib/Perf/Trace/EventClass.py   |    4 +-
 .../perf/scripts/python/event_analyzing_sample.py  |   30 ++++++++-----------
 .../util/scripting-engines/trace-event-python.c    |    8 ++---
 3 files changed, 18 insertions(+), 24 deletions(-)

diff --git a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
index 6372431..9e098579 100755
--- a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
+++ b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
@@ -1,12 +1,12 @@
 # EventClass.py
 #
-# This is a libray defining some events typs classes, which could
+# This is a library defining some events types classes, which could
 # be used by other scripts to analyzing the perf samples.
 #
 # Currently there are just a few classes defined for examples,
 # PerfEvent is the base class for all perf event sample, PebsEvent
 # is a HW base Intel x86 PEBS event, and user could add more SW/HW
-# event classes based on requriements.
+# event classes based on requirements.
 
 import struct
 
diff --git a/tools/perf/scripts/python/event_analyzing_sample.py b/tools/perf/scripts/python/event_analyzing_sample.py
index 46f05aa..163c39f 100644
--- a/tools/perf/scripts/python/event_analyzing_sample.py
+++ b/tools/perf/scripts/python/event_analyzing_sample.py
@@ -1,15 +1,15 @@
-# process_event.py: general event handler in python
+# event_analyzing_sample.py: general event handler in python
 #
-# Current perf report is alreay very powerful with the anotation integrated,
+# Current perf report is already very powerful with the annotation integrated,
 # and this script is not trying to be as powerful as perf report, but
 # providing end user/developer a flexible way to analyze the events other
 # than trace points.
 #
 # The 2 database related functions in this script just show how to gather
 # the basic information, and users can modify and write their own functions
-# according to their specific requirment.
+# according to their specific requirement.
 #
-# The first sample "show_general_events" just does a baisc grouping for all
+# The first function "show_general_events" just does a basic grouping for all
 # generic events with the help of sqlite, and the 2nd one "show_pebs_ll" is
 # for a x86 HW PMU event: PEBS with load latency data.
 #
@@ -85,7 +85,7 @@ def process_event(param_dict):
         else:
                 symbol = "Unknown_symbol"
 
-        # Creat the event object and insert it to the right table in database
+        # Create the event object and insert it to the right table in database
         event = create_event(name, comm, dso, symbol, raw_buf)
         insert_db(event)
 
@@ -109,7 +109,7 @@ def trace_end():
 
 #
 # As the event number may be very big, so we can't use linear way
-# to show the histgram in real number, but use a log2 algorithm.
+# to show the histogram in real number, but use a log2 algorithm.
 #
 
 def num2sym(num):
@@ -130,18 +130,18 @@ def show_general_events():
 
          # Group by thread
         commq = con.execute("select comm, count(comm) from gen_events group by comm order by -count(comm)")
-        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histgram", "="*42)
+        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histogram", "="*42)
         for row in commq:
              print "%16s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by symbol
-        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histogram", "="*58)
         symbolq = con.execute("select symbol, count(symbol) from gen_events group by symbol order by -count(symbol)")
         for row in symbolq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by dso
-        print "\n%40s %8s %16s\n%s" % ("dso", "number", "histgram", "="*74)
+        print "\n%40s %8s %16s\n%s" % ("dso", "number", "histogram", "="*74)
         dsoq = con.execute("select dso, count(dso) from gen_events group by dso order by -count(dso)")
         for row in dsoq:
              print "%40s %8d     %s" % (row[0], row[1], num2sym(row[1]))
@@ -163,31 +163,27 @@ def show_pebs_ll():
 
         # Group by thread
         commq = con.execute("select comm, count(comm) from pebs_ll group by comm order by -count(comm)")
-        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histgram", "="*42)
+        print "\n%16s %8s %16s\n%s" % ("comm", "number", "histogram", "="*42)
         for row in commq:
              print "%16s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by symbol
-        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("symbol", "number", "histogram", "="*58)
         symbolq = con.execute("select symbol, count(symbol) from pebs_ll group by symbol order by -count(symbol)")
         for row in symbolq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by dse
         dseq = con.execute("select dse, count(dse) from pebs_ll group by dse order by -count(dse)")
-        print "\n%32s %8s %16s\n%s" % ("dse", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("dse", "number", "histogram", "="*58)
         for row in dseq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
         # Group by latency
         latq = con.execute("select lat, count(lat) from pebs_ll group by lat order by lat")
-        print "\n%32s %8s %16s\n%s" % ("latency", "number", "histgram", "="*58)
+        print "\n%32s %8s %16s\n%s" % ("latency", "number", "histogram", "="*58)
         for row in latq:
              print "%32s %8d     %s" % (row[0], row[1], num2sym(row[1]))
 
 def trace_unhandled(event_name, context, event_fields_dict):
 		print ' '.join(['%s=%s'%(k,str(v))for k,v in sorted(event_fields_dict.items())])
-
-def print_header(event_name, cpu, secs, nsecs, pid, comm):
-	print "%-20s %5u %05u.%09u %8u %-20s " % \
-	(event_name, cpu, secs, nsecs, pid, comm),
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 7e3f576..afba097 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -343,7 +343,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 					 struct perf_sample *sample,
 					 struct perf_evsel *evsel,
 					 struct machine *machine __unused,
-					 struct addr_location *al __unused)
+					 struct addr_location *al)
 {
 	PyObject *handler, *retval, *t, *dict;
 	static char handler_name[64];
@@ -352,7 +352,7 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 
 	/*
 	 * Use the MAX_FIELDS to make the function expandable, though
-	 * currently there is only one itme for the tuple.
+	 * currently there is only one item for the tuple.
 	 */
 	t = PyTuple_New(MAX_FIELDS);
 	if (!t)
@@ -365,10 +365,8 @@ static void python_process_general_event(union perf_event *perf_event __unused,
 	snprintf(handler_name, sizeof(handler_name), "%s", "process_event");
 
 	handler = PyDict_GetItemString(main_dict, handler_name);
-	if (handler && !PyCallable_Check(handler)) {
-		handler = NULL;
+	if (!handler || !PyCallable_Check(handler))
 		goto exit;
-	}
 
 	PyDict_SetItemString(dict, "ev_name", PyString_FromString(perf_evsel__name(evsel)));
 	PyDict_SetItemString(dict, "attr", PyString_FromStringAndSize(

^ permalink raw reply related	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2018-05-16 14:48 ` Arnaldo Carvalho de Melo
  (?)
@ 2018-05-16 15:58   ` Ingo Molnar
  -1 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2018-05-16 15:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
	Agustin Vega-Frias, Alexander Shishkin, Andi Kleen,
	Andy Lutomirski, Daniel Borkmann, Dave Hansen, David Ahern,
	Ganapatrao Kulkarni, H . Peter Anvin, Jin Yao, Jiri Olsa,
	Joerg Roedel, Kan Liang, Masami Hiramatsu, Namhyung Kim, netdev,
	Peter Zijlstra, Ravi Bangoria, Shaokun Zhang, Thomas Gleixner,
	Wang Nan, Will Deacon, x86, YueHaibing, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling, more to come as I go thru Adrian's x86
> PTI series and the C++ support improvements to 'perf probe', from
> Holger,
> 
> Best Regards,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
>   
> The following changes since commit 291c161f6c65530092903fbea58eb07a62b220ba:
> 
>   Merge remote-tracking branch 'tip/perf/urgent' into perf/core (2018-05-15 10:30:17 -0300)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.18-20180516
> 
> for you to fetch changes up to 7a36a287de9fbb1ba906e70573d3f2315f7fd609:
> 
>   perf bpf: Fix NULL return handling in bpf__prepare_load() (2018-05-16 10:01:55 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Add '-e intel_pt//u' test to the 'parse-events' 'perf test' entry,
>   to help avoiding regressions in the events parser such as one
>   that caused a revert in v4.17-rc (Arnaldo Carvalho de Melo)
> 
> - Fix NULL return handling in bpf__prepare_load() (YueHaibing)
> 
> - Warn about 'perf buildid-cache --purge-all' failures (Ravi Bangoria)
> 
> - Add infrastructure to help in writing eBPF C programs to be used
>   with '-e name.c' type events in tools such as 'record' and 'trace',
>   with headers for common constructs and an examples directory that
>   will get populated as we add more such helpers and the 'perf bpf'
>   branch that Jiri Olsa has been working on (Arnaldo Carvalho de Melo)
> 
> - Handle uncore event aliases in small groups properly (Kan Liang)
> 
> - Use the "_stest" symbol to identify the kernel map when loading kcore (Adrian Hunter)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf tools: Use the "_stest" symbol to identify the kernel map when loading kcore
> 
> Arnaldo Carvalho de Melo (7):
>       perf tests parse-events: Add intel_pt parse test
>       perf llvm-utils: Add bpf include path to clang command line
>       perf bpf: Add 'examples' directories
>       perf bpf: Add bpf.h to be used in eBPF proggies
>       perf bpf: Add kprobe example to catch 5s naps
>       perf bpf: Add license(NAME) helper
>       perf bpf: Add probe() helper to reduce kprobes boilerplate
> 
> Kan Liang (1):
>       perf parse-events: Handle uncore event aliases in small groups properly
> 
> Ravi Bangoria (1):
>       perf buildid-cache: Warn --purge-all failures
> 
> YueHaibing (1):
>       perf bpf: Fix NULL return handling in bpf__prepare_load()
> 
>  tools/perf/Makefile.config         |  14 ++++
>  tools/perf/Makefile.perf           |   8 +++
>  tools/perf/builtin-buildid-cache.c |   8 ++-
>  tools/perf/examples/bpf/5sec.c     |  49 ++++++++++++++
>  tools/perf/examples/bpf/empty.c    |   3 +
>  tools/perf/include/bpf/bpf.h       |  13 ++++
>  tools/perf/tests/parse-events.c    |  13 ++++
>  tools/perf/util/Build              |   2 +
>  tools/perf/util/bpf-loader.c       |   6 +-
>  tools/perf/util/evsel.h            |   1 +
>  tools/perf/util/llvm-utils.c       |  19 ++++--
>  tools/perf/util/parse-events.c     | 130 ++++++++++++++++++++++++++++++++++++-
>  tools/perf/util/parse-events.h     |   7 +-
>  tools/perf/util/parse-events.y     |   8 +--
>  tools/perf/util/symbol.c           |  16 ++---
>  15 files changed, 270 insertions(+), 27 deletions(-)
>  create mode 100644 tools/perf/examples/bpf/5sec.c
>  create mode 100644 tools/perf/examples/bpf/empty.c
>  create mode 100644 tools/perf/include/bpf/bpf.h

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
@ 2018-05-16 15:58   ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2018-05-16 15:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
	Agustin Vega-Frias, Alexander Shishkin, Andi Kleen,
	Andy Lutomirski, Daniel Borkmann, Dave Hansen, David Ahern,
	Ganapatrao Kulkarni, H . Peter Anvin, Jin Yao, Jiri Olsa,
	Joerg Roedel, Kan Liang, Masami Hiramatsu, Namhyung Kim, netdev,
	Peter


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling, more to come as I go thru Adrian's x86
> PTI series and the C++ support improvements to 'perf probe', from
> Holger,
> 
> Best Regards,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
>   
> The following changes since commit 291c161f6c65530092903fbea58eb07a62b220ba:
> 
>   Merge remote-tracking branch 'tip/perf/urgent' into perf/core (2018-05-15 10:30:17 -0300)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.18-20180516
> 
> for you to fetch changes up to 7a36a287de9fbb1ba906e70573d3f2315f7fd609:
> 
>   perf bpf: Fix NULL return handling in bpf__prepare_load() (2018-05-16 10:01:55 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Add '-e intel_pt//u' test to the 'parse-events' 'perf test' entry,
>   to help avoiding regressions in the events parser such as one
>   that caused a revert in v4.17-rc (Arnaldo Carvalho de Melo)
> 
> - Fix NULL return handling in bpf__prepare_load() (YueHaibing)
> 
> - Warn about 'perf buildid-cache --purge-all' failures (Ravi Bangoria)
> 
> - Add infrastructure to help in writing eBPF C programs to be used
>   with '-e name.c' type events in tools such as 'record' and 'trace',
>   with headers for common constructs and an examples directory that
>   will get populated as we add more such helpers and the 'perf bpf'
>   branch that Jiri Olsa has been working on (Arnaldo Carvalho de Melo)
> 
> - Handle uncore event aliases in small groups properly (Kan Liang)
> 
> - Use the "_stest" symbol to identify the kernel map when loading kcore (Adrian Hunter)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf tools: Use the "_stest" symbol to identify the kernel map when loading kcore
> 
> Arnaldo Carvalho de Melo (7):
>       perf tests parse-events: Add intel_pt parse test
>       perf llvm-utils: Add bpf include path to clang command line
>       perf bpf: Add 'examples' directories
>       perf bpf: Add bpf.h to be used in eBPF proggies
>       perf bpf: Add kprobe example to catch 5s naps
>       perf bpf: Add license(NAME) helper
>       perf bpf: Add probe() helper to reduce kprobes boilerplate
> 
> Kan Liang (1):
>       perf parse-events: Handle uncore event aliases in small groups properly
> 
> Ravi Bangoria (1):
>       perf buildid-cache: Warn --purge-all failures
> 
> YueHaibing (1):
>       perf bpf: Fix NULL return handling in bpf__prepare_load()
> 
>  tools/perf/Makefile.config         |  14 ++++
>  tools/perf/Makefile.perf           |   8 +++
>  tools/perf/builtin-buildid-cache.c |   8 ++-
>  tools/perf/examples/bpf/5sec.c     |  49 ++++++++++++++
>  tools/perf/examples/bpf/empty.c    |   3 +
>  tools/perf/include/bpf/bpf.h       |  13 ++++
>  tools/perf/tests/parse-events.c    |  13 ++++
>  tools/perf/util/Build              |   2 +
>  tools/perf/util/bpf-loader.c       |   6 +-
>  tools/perf/util/evsel.h            |   1 +
>  tools/perf/util/llvm-utils.c       |  19 ++++--
>  tools/perf/util/parse-events.c     | 130 ++++++++++++++++++++++++++++++++++++-
>  tools/perf/util/parse-events.h     |   7 +-
>  tools/perf/util/parse-events.y     |   8 +--
>  tools/perf/util/symbol.c           |  16 ++---
>  15 files changed, 270 insertions(+), 27 deletions(-)
>  create mode 100644 tools/perf/examples/bpf/5sec.c
>  create mode 100644 tools/perf/examples/bpf/empty.c
>  create mode 100644 tools/perf/include/bpf/bpf.h

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
@ 2018-05-16 15:58   ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2018-05-16 15:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
	Agustin Vega-Frias, Alexander Shishkin, Andi Kleen,
	Andy Lutomirski, Daniel Borkmann, Dave Hansen, David Ahern,
	Ganapatrao Kulkarni, H . Peter Anvin, Jin Yao, Jiri Olsa,
	Joerg Roedel, Kan Liang, Masami Hiramatsu, Namhyung Kim, netdev


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling, more to come as I go thru Adrian's x86
> PTI series and the C++ support improvements to 'perf probe', from
> Holger,
> 
> Best Regards,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
>   
> The following changes since commit 291c161f6c65530092903fbea58eb07a62b220ba:
> 
>   Merge remote-tracking branch 'tip/perf/urgent' into perf/core (2018-05-15 10:30:17 -0300)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.18-20180516
> 
> for you to fetch changes up to 7a36a287de9fbb1ba906e70573d3f2315f7fd609:
> 
>   perf bpf: Fix NULL return handling in bpf__prepare_load() (2018-05-16 10:01:55 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Add '-e intel_pt//u' test to the 'parse-events' 'perf test' entry,
>   to help avoiding regressions in the events parser such as one
>   that caused a revert in v4.17-rc (Arnaldo Carvalho de Melo)
> 
> - Fix NULL return handling in bpf__prepare_load() (YueHaibing)
> 
> - Warn about 'perf buildid-cache --purge-all' failures (Ravi Bangoria)
> 
> - Add infrastructure to help in writing eBPF C programs to be used
>   with '-e name.c' type events in tools such as 'record' and 'trace',
>   with headers for common constructs and an examples directory that
>   will get populated as we add more such helpers and the 'perf bpf'
>   branch that Jiri Olsa has been working on (Arnaldo Carvalho de Melo)
> 
> - Handle uncore event aliases in small groups properly (Kan Liang)
> 
> - Use the "_stest" symbol to identify the kernel map when loading kcore (Adrian Hunter)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf tools: Use the "_stest" symbol to identify the kernel map when loading kcore
> 
> Arnaldo Carvalho de Melo (7):
>       perf tests parse-events: Add intel_pt parse test
>       perf llvm-utils: Add bpf include path to clang command line
>       perf bpf: Add 'examples' directories
>       perf bpf: Add bpf.h to be used in eBPF proggies
>       perf bpf: Add kprobe example to catch 5s naps
>       perf bpf: Add license(NAME) helper
>       perf bpf: Add probe() helper to reduce kprobes boilerplate
> 
> Kan Liang (1):
>       perf parse-events: Handle uncore event aliases in small groups properly
> 
> Ravi Bangoria (1):
>       perf buildid-cache: Warn --purge-all failures
> 
> YueHaibing (1):
>       perf bpf: Fix NULL return handling in bpf__prepare_load()
> 
>  tools/perf/Makefile.config         |  14 ++++
>  tools/perf/Makefile.perf           |   8 +++
>  tools/perf/builtin-buildid-cache.c |   8 ++-
>  tools/perf/examples/bpf/5sec.c     |  49 ++++++++++++++
>  tools/perf/examples/bpf/empty.c    |   3 +
>  tools/perf/include/bpf/bpf.h       |  13 ++++
>  tools/perf/tests/parse-events.c    |  13 ++++
>  tools/perf/util/Build              |   2 +
>  tools/perf/util/bpf-loader.c       |   6 +-
>  tools/perf/util/evsel.h            |   1 +
>  tools/perf/util/llvm-utils.c       |  19 ++++--
>  tools/perf/util/parse-events.c     | 130 ++++++++++++++++++++++++++++++++++++-
>  tools/perf/util/parse-events.h     |   7 +-
>  tools/perf/util/parse-events.y     |   8 +--
>  tools/perf/util/symbol.c           |  16 ++---
>  15 files changed, 270 insertions(+), 27 deletions(-)
>  create mode 100644 tools/perf/examples/bpf/5sec.c
>  create mode 100644 tools/perf/examples/bpf/empty.c
>  create mode 100644 tools/perf/include/bpf/bpf.h

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2018-05-16 14:48 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-05-16 14:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter, Agustin Vega-Frias,
	Alexander Shishkin, Andi Kleen, Andy Lutomirski, Daniel Borkmann,
	Dave Hansen, David Ahern, Ganapatrao Kulkarni, H . Peter Anvin,
	Jin Yao, Jiri Olsa, Joerg Roedel, Kan Liang, Masami Hiramatsu,
	Namhyung Kim, netdev, Peter Zijlstra, Ravi Bangoria,
	Shaokun Zhang, Thomas Gleixner, Wang Nan, Will Deacon, x86,
	YueHaibing, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, more to come as I go thru Adrian's x86
PTI series and the C++ support improvements to 'perf probe', from
Holger,

Best Regards,

- Arnaldo

Test results at the end of this message, as usual.
  
The following changes since commit 291c161f6c65530092903fbea58eb07a62b220ba:

  Merge remote-tracking branch 'tip/perf/urgent' into perf/core (2018-05-15 10:30:17 -0300)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.18-20180516

for you to fetch changes up to 7a36a287de9fbb1ba906e70573d3f2315f7fd609:

  perf bpf: Fix NULL return handling in bpf__prepare_load() (2018-05-16 10:01:55 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

- Add '-e intel_pt//u' test to the 'parse-events' 'perf test' entry,
  to help avoiding regressions in the events parser such as one
  that caused a revert in v4.17-rc (Arnaldo Carvalho de Melo)

- Fix NULL return handling in bpf__prepare_load() (YueHaibing)

- Warn about 'perf buildid-cache --purge-all' failures (Ravi Bangoria)

- Add infrastructure to help in writing eBPF C programs to be used
  with '-e name.c' type events in tools such as 'record' and 'trace',
  with headers for common constructs and an examples directory that
  will get populated as we add more such helpers and the 'perf bpf'
  branch that Jiri Olsa has been working on (Arnaldo Carvalho de Melo)

- Handle uncore event aliases in small groups properly (Kan Liang)

- Use the "_stest" symbol to identify the kernel map when loading kcore (Adrian Hunter)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (1):
      perf tools: Use the "_stest" symbol to identify the kernel map when loading kcore

Arnaldo Carvalho de Melo (7):
      perf tests parse-events: Add intel_pt parse test
      perf llvm-utils: Add bpf include path to clang command line
      perf bpf: Add 'examples' directories
      perf bpf: Add bpf.h to be used in eBPF proggies
      perf bpf: Add kprobe example to catch 5s naps
      perf bpf: Add license(NAME) helper
      perf bpf: Add probe() helper to reduce kprobes boilerplate

Kan Liang (1):
      perf parse-events: Handle uncore event aliases in small groups properly

Ravi Bangoria (1):
      perf buildid-cache: Warn --purge-all failures

YueHaibing (1):
      perf bpf: Fix NULL return handling in bpf__prepare_load()

 tools/perf/Makefile.config         |  14 ++++
 tools/perf/Makefile.perf           |   8 +++
 tools/perf/builtin-buildid-cache.c |   8 ++-
 tools/perf/examples/bpf/5sec.c     |  49 ++++++++++++++
 tools/perf/examples/bpf/empty.c    |   3 +
 tools/perf/include/bpf/bpf.h       |  13 ++++
 tools/perf/tests/parse-events.c    |  13 ++++
 tools/perf/util/Build              |   2 +
 tools/perf/util/bpf-loader.c       |   6 +-
 tools/perf/util/evsel.h            |   1 +
 tools/perf/util/llvm-utils.c       |  19 ++++--
 tools/perf/util/parse-events.c     | 130 ++++++++++++++++++++++++++++++++++++-
 tools/perf/util/parse-events.h     |   7 +-
 tools/perf/util/parse-events.y     |   8 +--
 tools/perf/util/symbol.c           |  16 ++---
 15 files changed, 270 insertions(+), 27 deletions(-)
 create mode 100644 tools/perf/examples/bpf/5sec.c
 create mode 100644 tools/perf/examples/bpf/empty.c
 create mode 100644 tools/perf/include/bpf/bpf.h

Test results:

The first ones are container (docker) based builds of tools/perf with
and without libelf support.  Where clang is available, it is also used
to build perf with/without libelf, and building with LIBCLANGLLVM=1
(built-in clang) with gcc and clang when clang and its devel libraries
are installed.

The objtool and samples/bpf/ builds are disabled now that I'm switching from
using the sources in a local volume to fetching them from a http server to
build it inside the container, to make it easier to build in a container cluster.
Those will come back later.

Several are cross builds, the ones with -x-ARCH and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.

The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.

Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.

  # dm
   1 alpine:3.4                    : Ok   gcc (Alpine 5.3.0) 5.3.0
   2 alpine:3.5                    : Ok   gcc (Alpine 6.2.1) 6.2.1 20160822
   3 alpine:3.6                    : Ok   gcc (Alpine 6.3.0) 6.3.0
   4 alpine:3.7                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   5 alpine:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   6 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   7 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   8 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
   9 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  11 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
  12 centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
  13 debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
  14 debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u1) 4.9.2
  15 debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
  16 debian:experimental           : Ok   gcc (Debian 7.3.0-18) 7.3.0
  17 debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 7.3.0-18) 7.3.0
  18 debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 7.3.0-18) 7.3.0
  19 debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 7.3.0-18) 7.3.0
  20 debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 7.3.0-18) 7.3.0
  21 fedora:20                     : Ok   gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
  22 fedora:21                     : Ok   gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
  23 fedora:22                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  24 fedora:23                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  25 fedora:24                     : Ok   gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
  26 fedora:24-x-ARC-uClibc        : Ok   arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
  27 fedora:25                     : Ok   gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
  28 fedora:26                     : Ok   gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
  29 fedora:27                     : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
  30 fedora:28                     : Ok   gcc (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)
  31 fedora:rawhide                : Ok   gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
  32 gentoo-stage3-amd64:latest    : Ok   gcc (Gentoo 6.4.0-r1 p1.3) 6.4.0
  33 mageia:5                      : Ok   gcc (GCC) 4.9.2
  34 mageia:6                      : Ok   gcc (Mageia 5.5.0-1.mga6) 5.5.0
  35 opensuse:42.1                 : Ok   gcc (SUSE Linux) 4.8.5
  36 opensuse:42.2                 : Ok   gcc (SUSE Linux) 4.8.5
  37 opensuse:42.3                 : Ok   gcc (SUSE Linux) 4.8.5
  38 opensuse:tumbleweed           : Ok   gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
  39 oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18.0.7)
  40 oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)
  41 ubuntu:12.04.5                : Ok   gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  42 ubuntu:14.04.4                : Ok   gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
  43 ubuntu:14.04.4-x-linaro-arm64 : Ok   aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0
  44 ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  45 ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  46 ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  47 ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  48 ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  49 ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  50 ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  51 ubuntu:16.10                  : Ok   gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
  52 ubuntu:17.04                  : Ok   gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
  53 ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
  54 ubuntu:18.04                  : Ok   gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  #

  # uname -a
  Linux jouet 4.17.0-rc5 #21 SMP Mon May 14 15:35:35 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
  # perf test
   1: vmlinux symtab matches kallsyms                       : Ok
   2: Detect openat syscall event                           : Ok
   3: Detect openat syscall event on all cpus               : Ok
   4: Read samples using the mmap interface                 : Ok
   5: Test data source output                               : Ok
   6: Parse event definition strings                        : Ok
   7: Simple expression parser                              : Ok
   8: PERF_RECORD_* events & perf_sample fields             : Ok
   9: Parse perf pmu format                                 : Ok
  10: DSO data read                                         : Ok
  11: DSO data cache                                        : Ok
  12: DSO data reopen                                       : Ok
  13: Roundtrip evsel->name                                 : Ok
  14: Parse sched tracepoints fields                        : Ok
  15: syscalls:sys_enter_openat event fields                : Ok
  16: Setup struct perf_event_attr                          : Ok
  17: Match and link multiple hists                         : Ok
  18: 'import perf' in python                               : Ok
  19: Breakpoint overflow signal handler                    : Ok
  20: Breakpoint overflow sampling                          : Ok
  21: Breakpoint accounting                                 : Ok
  22: Number of exit events of a simple workload            : Ok
  23: Software clock events period values                   : Ok
  24: Object code reading                                   : Ok
  25: Sample parsing                                        : Ok
  26: Use a dummy software event to keep tracking           : Ok
  27: Parse with no sample_id_all bit set                   : Ok
  28: Filter hist entries                                   : Ok
  29: Lookup mmap thread                                    : Ok
  30: Share thread mg                                       : Ok
  31: Sort output of hist entries                           : Ok
  32: Cumulate child hist entries                           : Ok
  33: Track with sched_switch                               : Ok
  34: Filter fds with revents mask in a fdarray             : Ok
  35: Add fd to a fdarray, making it autogrow               : Ok
  36: kmod_path__parse                                      : Ok
  37: Thread map                                            : Ok
  38: LLVM search and compile                               :
  38.1: Basic BPF llvm compile                              : Ok
  38.2: kbuild searching                                    : Ok
  38.3: Compile source for BPF prologue generation          : Ok
  38.4: Compile source for BPF relocation                   : Ok
  39: Session topology                                      : Ok
  40: BPF filter                                            :
  40.1: Basic BPF filtering                                 : Ok
  40.2: BPF pinning                                         : Ok
  40.3: BPF prologue generation                             : Ok
  40.4: BPF relocation checker                              : Ok
  41: Synthesize thread map                                 : Ok
  42: Remove thread map                                     : Ok
  43: Synthesize cpu map                                    : Ok
  44: Synthesize stat config                                : Ok
  45: Synthesize stat                                       : Ok
  46: Synthesize stat round                                 : Ok
  47: Synthesize attr update                                : Ok
  48: Event times                                           : Ok
  49: Read backward ring buffer                             : Ok
  50: Print cpu map                                         : Ok
  51: Probe SDT events                                      : Ok
  52: is_printable_array                                    : Ok
  53: Print bitmap                                          : Ok
  54: perf hooks                                            : Ok
  55: builtin clang support                                 : Skip (not compiled in)
  56: unit_number__scnprintf                                : Ok
  57: mem2node                                              : Ok
  58: x86 rdpmc                                             : Ok
  59: Convert perf time to TSC                              : Ok
  60: DWARF unwind                                          : Ok
  61: x86 instruction decoder - new instructions            : Ok
  62: Use vfs_getname probe to get syscall args filenames   : Ok
  63: Check open filename arg using perf trace + vfs_getname: Ok
  64: probe libc's inet_pton & backtrace it with ping       : Ok
  65: Add vfs_getname probe to get syscall args filenames   : Ok
  #
  
  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/perf/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
        make_with_babeltrace_O: make LIBBABELTRACE=1
                 make_static_O: make LDFLAGS=-static
                   make_tags_O: make tags
                make_install_O: make install
                    make_doc_O: make doc
              make_no_libelf_O: make NO_LIBELF=1
              make_no_libbpf_O: make NO_LIBBPF=1
            make_no_demangle_O: make NO_DEMANGLE=1
              make_clean_all_O: make clean all
               make_no_slang_O: make NO_SLANG=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
                make_no_newt_O: make NO_NEWT=1
             make_no_libnuma_O: make NO_LIBNUMA=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
           make_no_libbionic_O: make NO_LIBBIONIC=1
             make_no_libperl_O: make NO_LIBPERL=1
           make_no_libpython_O: make NO_LIBPYTHON=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
           make_no_backtrace_O: make NO_BACKTRACE=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
                  make_debug_O: make DEBUG=1
             make_util_map_o_O: make util/map.o
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
         make_install_prefix_O: make install prefix=/tmp/krava
                   make_pure_O: make
                 make_perf_o_O: make perf.o
                   make_help_O: make help
                make_no_gtk2_O: make NO_GTK2=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
            make_install_bin_O: make install-bin
            make_no_auxtrace_O: make NO_AUXTRACE=1
  OK
  make: Leaving directory '/home/acme/git/perf/tools/perf'
  $ 

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2018-05-16 14:48 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-05-16 14:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter, Agustin Vega-Frias,
	Alexander Shishkin, Andi Kleen, Andy Lutomirski, Daniel Borkmann,
	Dave Hansen, David Ahern, Ganapatrao Kulkarni, H . Peter Anvin,
	Jin Yao, Jiri Olsa, Joerg Roedel, Kan Liang, Masami Hiramatsu,
	Namhyung Kim

Hi Ingo,

	Please consider pulling, more to come as I go thru Adrian's x86
PTI series and the C++ support improvements to 'perf probe', from
Holger,

Best Regards,

- Arnaldo

Test results at the end of this message, as usual.
  
The following changes since commit 291c161f6c65530092903fbea58eb07a62b220ba:

  Merge remote-tracking branch 'tip/perf/urgent' into perf/core (2018-05-15 10:30:17 -0300)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.18-20180516

for you to fetch changes up to 7a36a287de9fbb1ba906e70573d3f2315f7fd609:

  perf bpf: Fix NULL return handling in bpf__prepare_load() (2018-05-16 10:01:55 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

- Add '-e intel_pt//u' test to the 'parse-events' 'perf test' entry,
  to help avoiding regressions in the events parser such as one
  that caused a revert in v4.17-rc (Arnaldo Carvalho de Melo)

- Fix NULL return handling in bpf__prepare_load() (YueHaibing)

- Warn about 'perf buildid-cache --purge-all' failures (Ravi Bangoria)

- Add infrastructure to help in writing eBPF C programs to be used
  with '-e name.c' type events in tools such as 'record' and 'trace',
  with headers for common constructs and an examples directory that
  will get populated as we add more such helpers and the 'perf bpf'
  branch that Jiri Olsa has been working on (Arnaldo Carvalho de Melo)

- Handle uncore event aliases in small groups properly (Kan Liang)

- Use the "_stest" symbol to identify the kernel map when loading kcore (Adrian Hunter)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (1):
      perf tools: Use the "_stest" symbol to identify the kernel map when loading kcore

Arnaldo Carvalho de Melo (7):
      perf tests parse-events: Add intel_pt parse test
      perf llvm-utils: Add bpf include path to clang command line
      perf bpf: Add 'examples' directories
      perf bpf: Add bpf.h to be used in eBPF proggies
      perf bpf: Add kprobe example to catch 5s naps
      perf bpf: Add license(NAME) helper
      perf bpf: Add probe() helper to reduce kprobes boilerplate

Kan Liang (1):
      perf parse-events: Handle uncore event aliases in small groups properly

Ravi Bangoria (1):
      perf buildid-cache: Warn --purge-all failures

YueHaibing (1):
      perf bpf: Fix NULL return handling in bpf__prepare_load()

 tools/perf/Makefile.config         |  14 ++++
 tools/perf/Makefile.perf           |   8 +++
 tools/perf/builtin-buildid-cache.c |   8 ++-
 tools/perf/examples/bpf/5sec.c     |  49 ++++++++++++++
 tools/perf/examples/bpf/empty.c    |   3 +
 tools/perf/include/bpf/bpf.h       |  13 ++++
 tools/perf/tests/parse-events.c    |  13 ++++
 tools/perf/util/Build              |   2 +
 tools/perf/util/bpf-loader.c       |   6 +-
 tools/perf/util/evsel.h            |   1 +
 tools/perf/util/llvm-utils.c       |  19 ++++--
 tools/perf/util/parse-events.c     | 130 ++++++++++++++++++++++++++++++++++++-
 tools/perf/util/parse-events.h     |   7 +-
 tools/perf/util/parse-events.y     |   8 +--
 tools/perf/util/symbol.c           |  16 ++---
 15 files changed, 270 insertions(+), 27 deletions(-)
 create mode 100644 tools/perf/examples/bpf/5sec.c
 create mode 100644 tools/perf/examples/bpf/empty.c
 create mode 100644 tools/perf/include/bpf/bpf.h

Test results:

The first ones are container (docker) based builds of tools/perf with
and without libelf support.  Where clang is available, it is also used
to build perf with/without libelf, and building with LIBCLANGLLVM=1
(built-in clang) with gcc and clang when clang and its devel libraries
are installed.

The objtool and samples/bpf/ builds are disabled now that I'm switching from
using the sources in a local volume to fetching them from a http server to
build it inside the container, to make it easier to build in a container cluster.
Those will come back later.

Several are cross builds, the ones with -x-ARCH and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.

The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.

Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.

  # dm
   1 alpine:3.4                    : Ok   gcc (Alpine 5.3.0) 5.3.0
   2 alpine:3.5                    : Ok   gcc (Alpine 6.2.1) 6.2.1 20160822
   3 alpine:3.6                    : Ok   gcc (Alpine 6.3.0) 6.3.0
   4 alpine:3.7                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   5 alpine:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   6 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   7 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   8 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
   9 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  11 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
  12 centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
  13 debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
  14 debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u1) 4.9.2
  15 debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
  16 debian:experimental           : Ok   gcc (Debian 7.3.0-18) 7.3.0
  17 debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 7.3.0-18) 7.3.0
  18 debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 7.3.0-18) 7.3.0
  19 debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 7.3.0-18) 7.3.0
  20 debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 7.3.0-18) 7.3.0
  21 fedora:20                     : Ok   gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
  22 fedora:21                     : Ok   gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
  23 fedora:22                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  24 fedora:23                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  25 fedora:24                     : Ok   gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
  26 fedora:24-x-ARC-uClibc        : Ok   arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
  27 fedora:25                     : Ok   gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
  28 fedora:26                     : Ok   gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
  29 fedora:27                     : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
  30 fedora:28                     : Ok   gcc (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)
  31 fedora:rawhide                : Ok   gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
  32 gentoo-stage3-amd64:latest    : Ok   gcc (Gentoo 6.4.0-r1 p1.3) 6.4.0
  33 mageia:5                      : Ok   gcc (GCC) 4.9.2
  34 mageia:6                      : Ok   gcc (Mageia 5.5.0-1.mga6) 5.5.0
  35 opensuse:42.1                 : Ok   gcc (SUSE Linux) 4.8.5
  36 opensuse:42.2                 : Ok   gcc (SUSE Linux) 4.8.5
  37 opensuse:42.3                 : Ok   gcc (SUSE Linux) 4.8.5
  38 opensuse:tumbleweed           : Ok   gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
  39 oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18.0.7)
  40 oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)
  41 ubuntu:12.04.5                : Ok   gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  42 ubuntu:14.04.4                : Ok   gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
  43 ubuntu:14.04.4-x-linaro-arm64 : Ok   aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0
  44 ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  45 ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  46 ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  47 ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  48 ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  49 ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  50 ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  51 ubuntu:16.10                  : Ok   gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
  52 ubuntu:17.04                  : Ok   gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
  53 ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
  54 ubuntu:18.04                  : Ok   gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  #

  # uname -a
  Linux jouet 4.17.0-rc5 #21 SMP Mon May 14 15:35:35 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
  # perf test
   1: vmlinux symtab matches kallsyms                       : Ok
   2: Detect openat syscall event                           : Ok
   3: Detect openat syscall event on all cpus               : Ok
   4: Read samples using the mmap interface                 : Ok
   5: Test data source output                               : Ok
   6: Parse event definition strings                        : Ok
   7: Simple expression parser                              : Ok
   8: PERF_RECORD_* events & perf_sample fields             : Ok
   9: Parse perf pmu format                                 : Ok
  10: DSO data read                                         : Ok
  11: DSO data cache                                        : Ok
  12: DSO data reopen                                       : Ok
  13: Roundtrip evsel->name                                 : Ok
  14: Parse sched tracepoints fields                        : Ok
  15: syscalls:sys_enter_openat event fields                : Ok
  16: Setup struct perf_event_attr                          : Ok
  17: Match and link multiple hists                         : Ok
  18: 'import perf' in python                               : Ok
  19: Breakpoint overflow signal handler                    : Ok
  20: Breakpoint overflow sampling                          : Ok
  21: Breakpoint accounting                                 : Ok
  22: Number of exit events of a simple workload            : Ok
  23: Software clock events period values                   : Ok
  24: Object code reading                                   : Ok
  25: Sample parsing                                        : Ok
  26: Use a dummy software event to keep tracking           : Ok
  27: Parse with no sample_id_all bit set                   : Ok
  28: Filter hist entries                                   : Ok
  29: Lookup mmap thread                                    : Ok
  30: Share thread mg                                       : Ok
  31: Sort output of hist entries                           : Ok
  32: Cumulate child hist entries                           : Ok
  33: Track with sched_switch                               : Ok
  34: Filter fds with revents mask in a fdarray             : Ok
  35: Add fd to a fdarray, making it autogrow               : Ok
  36: kmod_path__parse                                      : Ok
  37: Thread map                                            : Ok
  38: LLVM search and compile                               :
  38.1: Basic BPF llvm compile                              : Ok
  38.2: kbuild searching                                    : Ok
  38.3: Compile source for BPF prologue generation          : Ok
  38.4: Compile source for BPF relocation                   : Ok
  39: Session topology                                      : Ok
  40: BPF filter                                            :
  40.1: Basic BPF filtering                                 : Ok
  40.2: BPF pinning                                         : Ok
  40.3: BPF prologue generation                             : Ok
  40.4: BPF relocation checker                              : Ok
  41: Synthesize thread map                                 : Ok
  42: Remove thread map                                     : Ok
  43: Synthesize cpu map                                    : Ok
  44: Synthesize stat config                                : Ok
  45: Synthesize stat                                       : Ok
  46: Synthesize stat round                                 : Ok
  47: Synthesize attr update                                : Ok
  48: Event times                                           : Ok
  49: Read backward ring buffer                             : Ok
  50: Print cpu map                                         : Ok
  51: Probe SDT events                                      : Ok
  52: is_printable_array                                    : Ok
  53: Print bitmap                                          : Ok
  54: perf hooks                                            : Ok
  55: builtin clang support                                 : Skip (not compiled in)
  56: unit_number__scnprintf                                : Ok
  57: mem2node                                              : Ok
  58: x86 rdpmc                                             : Ok
  59: Convert perf time to TSC                              : Ok
  60: DWARF unwind                                          : Ok
  61: x86 instruction decoder - new instructions            : Ok
  62: Use vfs_getname probe to get syscall args filenames   : Ok
  63: Check open filename arg using perf trace + vfs_getname: Ok
  64: probe libc's inet_pton & backtrace it with ping       : Ok
  65: Add vfs_getname probe to get syscall args filenames   : Ok
  #
  
  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/perf/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
        make_with_babeltrace_O: make LIBBABELTRACE=1
                 make_static_O: make LDFLAGS=-static
                   make_tags_O: make tags
                make_install_O: make install
                    make_doc_O: make doc
              make_no_libelf_O: make NO_LIBELF=1
              make_no_libbpf_O: make NO_LIBBPF=1
            make_no_demangle_O: make NO_DEMANGLE=1
              make_clean_all_O: make clean all
               make_no_slang_O: make NO_SLANG=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
                make_no_newt_O: make NO_NEWT=1
             make_no_libnuma_O: make NO_LIBNUMA=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
           make_no_libbionic_O: make NO_LIBBIONIC=1
             make_no_libperl_O: make NO_LIBPERL=1
           make_no_libpython_O: make NO_LIBPYTHON=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
           make_no_backtrace_O: make NO_BACKTRACE=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
                  make_debug_O: make DEBUG=1
             make_util_map_o_O: make util/map.o
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
         make_install_prefix_O: make install prefix=/tmp/krava
                   make_pure_O: make
                 make_perf_o_O: make perf.o
                   make_help_O: make help
                make_no_gtk2_O: make NO_GTK2=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
            make_install_bin_O: make install-bin
            make_no_auxtrace_O: make NO_AUXTRACE=1
  OK
  make: Leaving directory '/home/acme/git/perf/tools/perf'
  $ 

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2018-05-16 14:48 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-05-16 14:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter, Agustin Vega-Frias,
	Alexander Shishkin, Andi Kleen, Andy Lutomirski, Daniel Borkmann,
	Dave Hansen, David Ahern, Ganapatrao Kulkarni, H . Peter Anvin,
	Jin Yao, Jiri Olsa, Joerg Roedel, Kan Liang, Masami Hiramatsu,
	Namhyung Kim

Hi Ingo,

	Please consider pulling, more to come as I go thru Adrian's x86
PTI series and the C++ support improvements to 'perf probe', from
Holger,

Best Regards,

- Arnaldo

Test results at the end of this message, as usual.
  
The following changes since commit 291c161f6c65530092903fbea58eb07a62b220ba:

  Merge remote-tracking branch 'tip/perf/urgent' into perf/core (2018-05-15 10:30:17 -0300)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.18-20180516

for you to fetch changes up to 7a36a287de9fbb1ba906e70573d3f2315f7fd609:

  perf bpf: Fix NULL return handling in bpf__prepare_load() (2018-05-16 10:01:55 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

- Add '-e intel_pt//u' test to the 'parse-events' 'perf test' entry,
  to help avoiding regressions in the events parser such as one
  that caused a revert in v4.17-rc (Arnaldo Carvalho de Melo)

- Fix NULL return handling in bpf__prepare_load() (YueHaibing)

- Warn about 'perf buildid-cache --purge-all' failures (Ravi Bangoria)

- Add infrastructure to help in writing eBPF C programs to be used
  with '-e name.c' type events in tools such as 'record' and 'trace',
  with headers for common constructs and an examples directory that
  will get populated as we add more such helpers and the 'perf bpf'
  branch that Jiri Olsa has been working on (Arnaldo Carvalho de Melo)

- Handle uncore event aliases in small groups properly (Kan Liang)

- Use the "_stest" symbol to identify the kernel map when loading kcore (Adrian Hunter)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (1):
      perf tools: Use the "_stest" symbol to identify the kernel map when loading kcore

Arnaldo Carvalho de Melo (7):
      perf tests parse-events: Add intel_pt parse test
      perf llvm-utils: Add bpf include path to clang command line
      perf bpf: Add 'examples' directories
      perf bpf: Add bpf.h to be used in eBPF proggies
      perf bpf: Add kprobe example to catch 5s naps
      perf bpf: Add license(NAME) helper
      perf bpf: Add probe() helper to reduce kprobes boilerplate

Kan Liang (1):
      perf parse-events: Handle uncore event aliases in small groups properly

Ravi Bangoria (1):
      perf buildid-cache: Warn --purge-all failures

YueHaibing (1):
      perf bpf: Fix NULL return handling in bpf__prepare_load()

 tools/perf/Makefile.config         |  14 ++++
 tools/perf/Makefile.perf           |   8 +++
 tools/perf/builtin-buildid-cache.c |   8 ++-
 tools/perf/examples/bpf/5sec.c     |  49 ++++++++++++++
 tools/perf/examples/bpf/empty.c    |   3 +
 tools/perf/include/bpf/bpf.h       |  13 ++++
 tools/perf/tests/parse-events.c    |  13 ++++
 tools/perf/util/Build              |   2 +
 tools/perf/util/bpf-loader.c       |   6 +-
 tools/perf/util/evsel.h            |   1 +
 tools/perf/util/llvm-utils.c       |  19 ++++--
 tools/perf/util/parse-events.c     | 130 ++++++++++++++++++++++++++++++++++++-
 tools/perf/util/parse-events.h     |   7 +-
 tools/perf/util/parse-events.y     |   8 +--
 tools/perf/util/symbol.c           |  16 ++---
 15 files changed, 270 insertions(+), 27 deletions(-)
 create mode 100644 tools/perf/examples/bpf/5sec.c
 create mode 100644 tools/perf/examples/bpf/empty.c
 create mode 100644 tools/perf/include/bpf/bpf.h

Test results:

The first ones are container (docker) based builds of tools/perf with
and without libelf support.  Where clang is available, it is also used
to build perf with/without libelf, and building with LIBCLANGLLVM=1
(built-in clang) with gcc and clang when clang and its devel libraries
are installed.

The objtool and samples/bpf/ builds are disabled now that I'm switching from
using the sources in a local volume to fetching them from a http server to
build it inside the container, to make it easier to build in a container cluster.
Those will come back later.

Several are cross builds, the ones with -x-ARCH and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.

The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.

Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.

  # dm
   1 alpine:3.4                    : Ok   gcc (Alpine 5.3.0) 5.3.0
   2 alpine:3.5                    : Ok   gcc (Alpine 6.2.1) 6.2.1 20160822
   3 alpine:3.6                    : Ok   gcc (Alpine 6.3.0) 6.3.0
   4 alpine:3.7                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   5 alpine:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   6 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   7 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   8 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
   9 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  11 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
  12 centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
  13 debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
  14 debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u1) 4.9.2
  15 debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
  16 debian:experimental           : Ok   gcc (Debian 7.3.0-18) 7.3.0
  17 debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 7.3.0-18) 7.3.0
  18 debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 7.3.0-18) 7.3.0
  19 debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 7.3.0-18) 7.3.0
  20 debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 7.3.0-18) 7.3.0
  21 fedora:20                     : Ok   gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
  22 fedora:21                     : Ok   gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
  23 fedora:22                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  24 fedora:23                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  25 fedora:24                     : Ok   gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
  26 fedora:24-x-ARC-uClibc        : Ok   arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
  27 fedora:25                     : Ok   gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
  28 fedora:26                     : Ok   gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
  29 fedora:27                     : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
  30 fedora:28                     : Ok   gcc (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)
  31 fedora:rawhide                : Ok   gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
  32 gentoo-stage3-amd64:latest    : Ok   gcc (Gentoo 6.4.0-r1 p1.3) 6.4.0
  33 mageia:5                      : Ok   gcc (GCC) 4.9.2
  34 mageia:6                      : Ok   gcc (Mageia 5.5.0-1.mga6) 5.5.0
  35 opensuse:42.1                 : Ok   gcc (SUSE Linux) 4.8.5
  36 opensuse:42.2                 : Ok   gcc (SUSE Linux) 4.8.5
  37 opensuse:42.3                 : Ok   gcc (SUSE Linux) 4.8.5
  38 opensuse:tumbleweed           : Ok   gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
  39 oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18.0.7)
  40 oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)
  41 ubuntu:12.04.5                : Ok   gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  42 ubuntu:14.04.4                : Ok   gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
  43 ubuntu:14.04.4-x-linaro-arm64 : Ok   aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0
  44 ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  45 ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  46 ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  47 ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  48 ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  49 ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  50 ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  51 ubuntu:16.10                  : Ok   gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
  52 ubuntu:17.04                  : Ok   gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
  53 ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
  54 ubuntu:18.04                  : Ok   gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  #

  # uname -a
  Linux jouet 4.17.0-rc5 #21 SMP Mon May 14 15:35:35 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
  # perf test
   1: vmlinux symtab matches kallsyms                       : Ok
   2: Detect openat syscall event                           : Ok
   3: Detect openat syscall event on all cpus               : Ok
   4: Read samples using the mmap interface                 : Ok
   5: Test data source output                               : Ok
   6: Parse event definition strings                        : Ok
   7: Simple expression parser                              : Ok
   8: PERF_RECORD_* events & perf_sample fields             : Ok
   9: Parse perf pmu format                                 : Ok
  10: DSO data read                                         : Ok
  11: DSO data cache                                        : Ok
  12: DSO data reopen                                       : Ok
  13: Roundtrip evsel->name                                 : Ok
  14: Parse sched tracepoints fields                        : Ok
  15: syscalls:sys_enter_openat event fields                : Ok
  16: Setup struct perf_event_attr                          : Ok
  17: Match and link multiple hists                         : Ok
  18: 'import perf' in python                               : Ok
  19: Breakpoint overflow signal handler                    : Ok
  20: Breakpoint overflow sampling                          : Ok
  21: Breakpoint accounting                                 : Ok
  22: Number of exit events of a simple workload            : Ok
  23: Software clock events period values                   : Ok
  24: Object code reading                                   : Ok
  25: Sample parsing                                        : Ok
  26: Use a dummy software event to keep tracking           : Ok
  27: Parse with no sample_id_all bit set                   : Ok
  28: Filter hist entries                                   : Ok
  29: Lookup mmap thread                                    : Ok
  30: Share thread mg                                       : Ok
  31: Sort output of hist entries                           : Ok
  32: Cumulate child hist entries                           : Ok
  33: Track with sched_switch                               : Ok
  34: Filter fds with revents mask in a fdarray             : Ok
  35: Add fd to a fdarray, making it autogrow               : Ok
  36: kmod_path__parse                                      : Ok
  37: Thread map                                            : Ok
  38: LLVM search and compile                               :
  38.1: Basic BPF llvm compile                              : Ok
  38.2: kbuild searching                                    : Ok
  38.3: Compile source for BPF prologue generation          : Ok
  38.4: Compile source for BPF relocation                   : Ok
  39: Session topology                                      : Ok
  40: BPF filter                                            :
  40.1: Basic BPF filtering                                 : Ok
  40.2: BPF pinning                                         : Ok
  40.3: BPF prologue generation                             : Ok
  40.4: BPF relocation checker                              : Ok
  41: Synthesize thread map                                 : Ok
  42: Remove thread map                                     : Ok
  43: Synthesize cpu map                                    : Ok
  44: Synthesize stat config                                : Ok
  45: Synthesize stat                                       : Ok
  46: Synthesize stat round                                 : Ok
  47: Synthesize attr update                                : Ok
  48: Event times                                           : Ok
  49: Read backward ring buffer                             : Ok
  50: Print cpu map                                         : Ok
  51: Probe SDT events                                      : Ok
  52: is_printable_array                                    : Ok
  53: Print bitmap                                          : Ok
  54: perf hooks                                            : Ok
  55: builtin clang support                                 : Skip (not compiled in)
  56: unit_number__scnprintf                                : Ok
  57: mem2node                                              : Ok
  58: x86 rdpmc                                             : Ok
  59: Convert perf time to TSC                              : Ok
  60: DWARF unwind                                          : Ok
  61: x86 instruction decoder - new instructions            : Ok
  62: Use vfs_getname probe to get syscall args filenames   : Ok
  63: Check open filename arg using perf trace + vfs_getname: Ok
  64: probe libc's inet_pton & backtrace it with ping       : Ok
  65: Add vfs_getname probe to get syscall args filenames   : Ok
  #
  
  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/perf/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
        make_with_babeltrace_O: make LIBBABELTRACE=1
                 make_static_O: make LDFLAGS=-static
                   make_tags_O: make tags
                make_install_O: make install
                    make_doc_O: make doc
              make_no_libelf_O: make NO_LIBELF=1
              make_no_libbpf_O: make NO_LIBBPF=1
            make_no_demangle_O: make NO_DEMANGLE=1
              make_clean_all_O: make clean all
               make_no_slang_O: make NO_SLANG=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
                make_no_newt_O: make NO_NEWT=1
             make_no_libnuma_O: make NO_LIBNUMA=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
           make_no_libbionic_O: make NO_LIBBIONIC=1
             make_no_libperl_O: make NO_LIBPERL=1
           make_no_libpython_O: make NO_LIBPYTHON=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
           make_no_backtrace_O: make NO_BACKTRACE=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
                  make_debug_O: make DEBUG=1
             make_util_map_o_O: make util/map.o
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
         make_install_prefix_O: make install prefix=/tmp/krava
                   make_pure_O: make
                 make_perf_o_O: make perf.o
                   make_help_O: make help
                make_no_gtk2_O: make NO_GTK2=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
            make_install_bin_O: make install-bin
            make_no_auxtrace_O: make NO_AUXTRACE=1
  OK
  make: Leaving directory '/home/acme/git/perf/tools/perf'
  $ 

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2017-11-24 15:02 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-24 15:02 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Andi Kleen, Balamuruhan S, David Ahern,
	Hansuk Hong, Hendrik Brueckner, Jiri Olsa, Martin Schwidefsky,
	Namhyung Kim, Naveen N . Rao, Satheesh Rajendran,
	Srikar Dronamraju, Thomas Gleixner, Thomas Richter, Wang Nan,
	Arnaldo Carvalho de Melo

Hi Ingo,

	There are some 'perf test' and container failures, but those
don't seem to have been introduced by patches in this series and are
being investigated.

	Please consider pulling,

- Arnaldo

Test results at the end of this message, as usual.

The following changes since commit f6751f178eeaf3da8c156d2a2fd7a0feccfab5ae:

  tools/headers: Synchronize kernel x86 UAPI headers (2017-11-18 09:00:46 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.15-20171124

for you to fetch changes up to 92f4ad912df4ac63f53ed0e95a7e0f51ef6eddfe:

  perf intel-pt: Bring instruction decoder files into line with the kernel (2017-11-23 15:40:48 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

- Improve build messages for Intel PT related files that differ
  from the kernel (Adrian Hunter)

- Bring instruction decoder files into line with the kernel (Adrian Hunter)

- Allow computing 'perf stat' style metrics in 'perf script' (Andi Kleen)

- Fix -D output for user metadata events (Arnaldo Carvalho de Melo)

- Add perf tools tip for using 'perf buildid-cache' to add the Node.js
  USDT probes and have them usable via 'perf probe' (Hansuk Hong)

- Follow the upstream kernel UAPI header version 100% (Ingo Molnar)

- Fixup discontiguous/sparse numa nodes in 'perf bench numa' (Satheesh Rajendran)

- Fix a 'perf test' case and disable one, both for s390x (Thomas Richter)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (2):
      perf intel-pt: Improve build messages for files that differ from the kernel
      perf intel-pt: Bring instruction decoder files into line with the kernel

Andi Kleen (3):
      perf record: Synthesize unit/scale/... in event update
      perf record: Synthesize thread map and cpu map
      perf script: Allow computing 'perf stat' style metrics

Arnaldo Carvalho de Melo (1):
      perf report: Fix -D output for user metadata events

Hansuk Hong (1):
      perf buildid-cache: Document for Node.js USDT

Ingo Molnar (1):
      tools headers: Follow the upstream UAPI header version 100% differ from the kernel

Satheesh Rajendran (1):
      perf bench numa: Fixup discontiguous/sparse numa nodes

Thomas Richter (2):
      perf test: Disable test cases 19 and 20 on s390x
      perf test: Fix test 21 for s390x

 tools/perf/Documentation/perf-script.txt | 10 +++-
 tools/perf/Documentation/tips.txt        |  1 +
 tools/perf/bench/numa.c                  | 56 ++++++++++++++++--
 tools/perf/builtin-record.c              | 24 ++++++++
 tools/perf/builtin-script.c              | 97 +++++++++++++++++++++++++++++++-
 tools/perf/builtin-stat.c                | 62 ++------------------
 tools/perf/check-headers.sh              |  1 -
 tools/perf/tests/bp_signal.c             |  2 +-
 tools/perf/tests/task-exit.c             |  4 ++
 tools/perf/util/header.c                 | 68 ++++++++++++++++++++++
 tools/perf/util/header.h                 |  5 ++
 tools/perf/util/intel-pt-decoder/Build   | 24 +++++---
 tools/perf/util/intel-pt-decoder/inat.h  | 10 ++++
 tools/perf/util/metricgroup.c            |  4 ++
 tools/perf/util/session.c                |  3 +-
 15 files changed, 293 insertions(+), 78 deletions(-)

Test results:

The first ones are container (docker) based builds of tools/perf with and
without libelf support.  Where clang is available, it is also used to build
perf with/without libelf.

The objtool and samples/bpf/ builds are disabled now that I'm switching from
using the sources in a local volume to fetching them from a http server to
build it inside the container, to make it easier to build in a container cluster.
Those will come back later.

Several are cross builds, the ones with -x-ARCH and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.

The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.

Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.


  # dm
   1 alpine:3.4: Ok                    gcc (Alpine 5.3.0) 5.3.0
   2 alpine:3.5: Ok                    gcc (Alpine 6.2.1) 6.2.1 20160822
   3 alpine:3.6: Ok                    gcc (Alpine 6.3.0) 6.3.0
   4 alpine:edge: Ok                   gcc (Alpine 6.4.0) 6.4.0
   5 android-ndk:r12b-arm: Ok          arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
   6 android-ndk:r15c-arm: Ok          arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
   7 centos:5: Ok                      gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
   8 centos:6: Ok                      gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
   9 centos:7: Ok                      gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
  10 debian:7: Ok                      gcc (Debian 4.7.2-5) 4.7.2
  11 debian:8: Ok                      gcc (Debian 4.9.2-10) 4.9.2
  12 debian:9: Ok                      gcc (Debian 6.3.0-18) 6.3.0 20170516
  13 debian:experimental: Ok           gcc (Debian 7.2.0-16) 7.2.0
  14 debian:experimental-x-arm64: Ok   aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
  15 debian:experimental-x-mips: Ok    mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
  16 debian:experimental-x-mips64: Ok  mips64-linux-gnuabi64-gcc (Debian 7.2.0-11) 7.2.0
  17 fedora:20: Ok                     gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
  18 fedora:21: Ok                     gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
  19 fedora:22: Ok                     gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  20 fedora:23: Ok                     gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  21 fedora:24: Ok                     gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
  22 fedora:24-x-ARC-uClibc: Ok        arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
  23 fedora:25: Ok                     gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
  24 fedora:26: Ok                     gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)
  25 fedora:27: FAIL                   gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)

	perl/python hardened build CFLAGS mismatch, Jiri working on a fix.

  26 fedora:rawhide: Ok                gcc (GCC) 7.2.1 20170829 (Red Hat 7.2.1-1)
  27 gentoo-stage3-amd64:latest: Ok    gcc (Gentoo 5.4.0-r3 p1.7, pie-0.6.5) 5.4.0
  28 mageia:5: Ok                      gcc (GCC) 4.9.2
  29 mageia:6: Ok                      gcc (Mageia 5.4.0-5.mga6) 5.4.0
  30 opensuse:42.1: Ok                 gcc (SUSE Linux) 4.8.5
  31 opensuse:42.2: Ok                 gcc (SUSE Linux) 4.8.5
  32 opensuse:42.3: Ok                 gcc (SUSE Linux) 4.8.5
  33  opensuse:tumbleweed: Ok          gcc (SUSE Linux) 7.2.1 20170901 [gcc-7-branch revision 251580]
  34 oraclelinux:6: Ok                 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
  35 oraclelinux:7: Ok                 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
  36 ubuntu:12.04.5: Ok                gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  37 ubuntu:14.04.4: Ok                gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
  38 ubuntu:14.04.4-x-linaro-arm64: Ok aarch64-linux-gnu-gcc
  39 ubuntu:15.04: Ok                  gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2
  40 ubuntu:16.04: Ok                  gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
  41 ubuntu:16.04-x-arm: Ok            arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
  42 ubuntu:16.04-x-arm64: Ok          aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
  43 ubuntu:16.04-x-powerpc: Ok        powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
  44 ubuntu:16.04-x-powerpc64: Ok      powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609
  45 ubuntu:16.04-x-powerpc64el: Ok    powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
  46 ubuntu:16.04-x-s390: Ok           s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
  47 ubuntu:16.10: Ok                  gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
  48 ubuntu:17.04: Ok                  gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
  49 ubuntu:17.10: Ok                  gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
  # 

  The BPF and LLVM test failures are being investigated, perhaps related to updating
  to clang 6.

  # uname -a
  Linux jouet 4.14.0+ #2 SMP Thu Nov 16 12:09:19 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
  # perf test
   1: vmlinux symtab matches kallsyms                       : Ok
   2: Detect openat syscall event                           : Ok
   3: Detect openat syscall event on all cpus               : Ok
   4: Read samples using the mmap interface                 : Ok
   5: Test data source output                               : Ok
   6: Parse event definition strings                        : Ok
   7: Simple expression parser                              : Ok
   8: PERF_RECORD_* events & perf_sample fields             : Ok
   9: Parse perf pmu format                                 : Ok
  10: DSO data read                                         : Ok
  11: DSO data cache                                        : Ok
  12: DSO data reopen                                       : Ok
  13: Roundtrip evsel->name                                 : Ok
  14: Parse sched tracepoints fields                        : Ok
  15: syscalls:sys_enter_openat event fields                : Ok
  16: Setup struct perf_event_attr                          : Ok
  17: Match and link multiple hists                         : Ok
  18: 'import perf' in python                               : Ok
  19: Breakpoint overflow signal handler                    : Ok
  20: Breakpoint overflow sampling                          : Ok
  21: Number of exit events of a simple workload            : Ok
  22: Software clock events period values                   : Ok
  23: Object code reading                                   : Ok
  24: Sample parsing                                        : Ok
  25: Use a dummy software event to keep tracking           : Ok
  26: Parse with no sample_id_all bit set                   : Ok
  27: Filter hist entries                                   : Ok
  28: Lookup mmap thread                                    : Ok
  29: Share thread mg                                       : Ok
  30: Sort output of hist entries                           : Ok
  31: Cumulate child hist entries                           : Ok
  32: Track with sched_switch                               : Ok
  33: Filter fds with revents mask in a fdarray             : Ok
  34: Add fd to a fdarray, making it autogrow               : Ok
  35: kmod_path__parse                                      : Ok
  36: Thread map                                            : Ok
  37: LLVM search and compile                               :
  37.1: Basic BPF llvm compile                              : Ok
  37.2: kbuild searching                                    : FAILED!
  37.3: Compile source for BPF prologue generation          : Skip
  37.4: Compile source for BPF relocation                   : Skip
  38: Session topology                                      : Ok
  39: BPF filter                                            :
  39.1: Basic BPF filtering                                 : FAILED!
  39.2: BPF pinning                                         : Skip
  39.3: BPF prologue generation                             : Skip
  39.4: BPF relocation checker                              : Skip
  40: Synthesize thread map                                 : Ok
  41: Remove thread map                                     : Ok
  42: Synthesize cpu map                                    : Ok
  43: Synthesize stat config                                : Ok
  44: Synthesize stat                                       : Ok
  45: Synthesize stat round                                 : Ok
  46: Synthesize attr update                                : Ok
  47: Event times                                           : Ok
  48: Read backward ring buffer                             : Ok
  49: Print cpu map                                         : Ok
  50: Probe SDT events                                      : Ok
  51: is_printable_array                                    : Ok
  52: Print bitmap                                          : Ok
  53: perf hooks                                            : Ok
  54: builtin clang support                                 : Skip (not compiled in)
  55: unit_number__scnprintf                                : Ok
  56: x86 rdpmc                                             : Ok
  57: Convert perf time to TSC                              : Ok
  58: DWARF unwind                                          : Ok
  59: x86 instruction decoder - new instructions            : Ok
  60: Use vfs_getname probe to get syscall args filenames   : Ok
  61: probe libc's inet_pton & backtrace it with ping       : Ok
  62: Check open filename arg using perf trace + vfs_getname: Ok
  63: Add vfs_getname probe to get syscall args filenames   : Ok
  # 

  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/linux/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
         make_install_prefix_O: make install prefix=/tmp/krava
           make_no_libbionic_O: make NO_LIBBIONIC=1
                   make_tags_O: make tags
                make_no_newt_O: make NO_NEWT=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
           make_no_backtrace_O: make NO_BACKTRACE=1
                make_no_gtk2_O: make NO_GTK2=1
                   make_pure_O: make
             make_util_map_o_O: make util/map.o
                make_install_O: make install
            make_install_bin_O: make install-bin
             make_no_libnuma_O: make NO_LIBNUMA=1
            make_no_demangle_O: make NO_DEMANGLE=1
                 make_perf_o_O: make perf.o
                   make_help_O: make help
              make_no_libelf_O: make NO_LIBELF=1
              make_no_libbpf_O: make NO_LIBBPF=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
           make_no_libpython_O: make NO_LIBPYTHON=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
              make_clean_all_O: make clean all
         make_with_clangllvm_O: make LIBCLANGLLVM=1
            make_no_auxtrace_O: make NO_AUXTRACE=1
                    make_doc_O: make doc
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
               make_no_slang_O: make NO_SLANG=1
                  make_debug_O: make DEBUG=1
             make_no_libperl_O: make NO_LIBPERL=1
                 make_static_O: make LDFLAGS=-static
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2017-03-21  1:16 ` Arnaldo Carvalho de Melo
@ 2017-03-21  6:43   ` Ingo Molnar
  -1 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2017-03-21  6:43 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexander Yarygin, Andi Kleen, Changbin Du, Clark Williams,
	David Ahern, Hemant Kumar, Jiri Olsa, Li Zhong, Marc Zyngier,
	Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Naveen N . Rao,
	Paul Mackerras, Peter Zijlstra, Ravi Bangoria, Scott Wood,
	Srikar Dronamraju, Stephane Eranian, Vijaya Kumar K,
	Vince Weaver, Wang Nan, Yunlong Song, linux-perf-users,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 61f63e383784bd0ab6529cfc95ddc59c713afcc9:
> 
>   Merge tag 'perf-core-for-mingo-4.12-20170316' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-16 17:29:23 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170320
> 
> for you to fetch changes up to affa6c169bae8dc9cb1a2d070c7cd2fe1939c5b8:
> 
>   tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h (2017-03-20 15:02:29 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> Fixes:
> 
> - Fix concat_probe_trace_events() in 'perf probe', it should dereference a
>   pointer, not test its value (Ravi Bangoria)
> 
> User visible:
> 
> - Handle partial AUX records, checking if 'kvm_intel.ko' is loaded and
>   if its 'vmm_exclusive' parameter is set to 0, suggesting tweaking
>   it to reduce gaps (Alexander Shishkin)
> 
> Infrastructure:
> 
> - Sync the kvm.h, cpufeatures.h and perf_event.h tools/ headers copies
>   with the kernel (Arnaldo Carvalho de Melo, Alexander Shishkin)
> 
> - 'perf lock' subcommands should include common options, using
>   OPT_PARENT() (Changbin Du)
> 
> - Ditto for 'perf timechart' (Arnaldo Carvalho de Melo)
> 
> Documentation:
> 
>   Correct 'perf stat --no-aggr' description (Ravi Bangoria)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Alexander Shishkin (3):
>       tools lib api fs: Introduce sysfs__read_bool
>       tools include: Sync {,tools/}include/uapi/linux/perf_event.h
>       perf tools: Handle partial AUX records and print a warning
> 
> Arnaldo Carvalho de Melo (5):
>       perf lock: Make 'f' part of the common 'lock_options'
>       perf timechart: Use OPT_PARENT for common options
>       tools headers: Sync {tools/,}arch/x86/include/asm/cpufeatures.h
>       tools headers: Sync {tools/,}arch/arm{64}/include/uapi/asm/kvm.h
>       tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h
> 
> Changbin Du (1):
>       perf lock: Subcommands should include common options
> 
> Ravi Bangoria (2):
>       perf stat: Correct --no-aggr description
>       perf probe: Fix concat_probe_trace_events
> 
>  tools/arch/arm/include/uapi/asm/kvm.h     | 13 +++++++++++++
>  tools/arch/arm64/include/uapi/asm/kvm.h   | 13 +++++++++++++
>  tools/arch/powerpc/include/uapi/asm/kvm.h | 22 ++++++++++++++++++++++
>  tools/arch/x86/include/asm/cpufeatures.h  |  3 ++-
>  tools/include/uapi/linux/perf_event.h     |  1 +
>  tools/lib/api/fs/fs.c                     | 29 +++++++++++++++++++++++++++++
>  tools/lib/api/fs/fs.h                     |  1 +
>  tools/perf/Documentation/perf-stat.txt    |  3 +--
>  tools/perf/builtin-lock.c                 | 22 ++++++++++++----------
>  tools/perf/builtin-timechart.c            | 16 +++++++---------
>  tools/perf/util/event.c                   |  5 +++--
>  tools/perf/util/event.h                   |  1 +
>  tools/perf/util/probe-event.c             |  2 +-
>  tools/perf/util/session.c                 | 27 ++++++++++++++++++++++++---
>  14 files changed, 130 insertions(+), 28 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
@ 2017-03-21  6:43   ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2017-03-21  6:43 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexander Yarygin, Andi Kleen, Changbin Du, Clark Williams,
	David Ahern, Hemant Kumar, Jiri Olsa, Li Zhong, Marc Zyngier,
	Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Naveen N . Rao,
	Paul Mackerras, Peter Zijlstra, Ravi Bangoria


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 61f63e383784bd0ab6529cfc95ddc59c713afcc9:
> 
>   Merge tag 'perf-core-for-mingo-4.12-20170316' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-16 17:29:23 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170320
> 
> for you to fetch changes up to affa6c169bae8dc9cb1a2d070c7cd2fe1939c5b8:
> 
>   tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h (2017-03-20 15:02:29 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> Fixes:
> 
> - Fix concat_probe_trace_events() in 'perf probe', it should dereference a
>   pointer, not test its value (Ravi Bangoria)
> 
> User visible:
> 
> - Handle partial AUX records, checking if 'kvm_intel.ko' is loaded and
>   if its 'vmm_exclusive' parameter is set to 0, suggesting tweaking
>   it to reduce gaps (Alexander Shishkin)
> 
> Infrastructure:
> 
> - Sync the kvm.h, cpufeatures.h and perf_event.h tools/ headers copies
>   with the kernel (Arnaldo Carvalho de Melo, Alexander Shishkin)
> 
> - 'perf lock' subcommands should include common options, using
>   OPT_PARENT() (Changbin Du)
> 
> - Ditto for 'perf timechart' (Arnaldo Carvalho de Melo)
> 
> Documentation:
> 
>   Correct 'perf stat --no-aggr' description (Ravi Bangoria)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Alexander Shishkin (3):
>       tools lib api fs: Introduce sysfs__read_bool
>       tools include: Sync {,tools/}include/uapi/linux/perf_event.h
>       perf tools: Handle partial AUX records and print a warning
> 
> Arnaldo Carvalho de Melo (5):
>       perf lock: Make 'f' part of the common 'lock_options'
>       perf timechart: Use OPT_PARENT for common options
>       tools headers: Sync {tools/,}arch/x86/include/asm/cpufeatures.h
>       tools headers: Sync {tools/,}arch/arm{64}/include/uapi/asm/kvm.h
>       tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h
> 
> Changbin Du (1):
>       perf lock: Subcommands should include common options
> 
> Ravi Bangoria (2):
>       perf stat: Correct --no-aggr description
>       perf probe: Fix concat_probe_trace_events
> 
>  tools/arch/arm/include/uapi/asm/kvm.h     | 13 +++++++++++++
>  tools/arch/arm64/include/uapi/asm/kvm.h   | 13 +++++++++++++
>  tools/arch/powerpc/include/uapi/asm/kvm.h | 22 ++++++++++++++++++++++
>  tools/arch/x86/include/asm/cpufeatures.h  |  3 ++-
>  tools/include/uapi/linux/perf_event.h     |  1 +
>  tools/lib/api/fs/fs.c                     | 29 +++++++++++++++++++++++++++++
>  tools/lib/api/fs/fs.h                     |  1 +
>  tools/perf/Documentation/perf-stat.txt    |  3 +--
>  tools/perf/builtin-lock.c                 | 22 ++++++++++++----------
>  tools/perf/builtin-timechart.c            | 16 +++++++---------
>  tools/perf/util/event.c                   |  5 +++--
>  tools/perf/util/event.h                   |  1 +
>  tools/perf/util/probe-event.c             |  2 +-
>  tools/perf/util/session.c                 | 27 ++++++++++++++++++++++++---
>  14 files changed, 130 insertions(+), 28 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2017-03-21  1:16 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-03-21  1:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexander Yarygin, Andi Kleen, Changbin Du,
	Clark Williams, David Ahern, Hemant Kumar, Jiri Olsa, Li Zhong,
	Marc Zyngier, Masami Hiramatsu, Michael Ellerman, Namhyung Kim,
	Naveen N . Rao, Paul Mackerras, Peter Zijlstra, Ravi Bangoria,
	Scott Wood, Srikar Dronamraju, Stephane Eranian, Vijaya Kumar K,
	Vince Weaver, Wang Nan, Yunlong Song, linux-perf-users,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

Test results at the end of this message, as usual.

The following changes since commit 61f63e383784bd0ab6529cfc95ddc59c713afcc9:

  Merge tag 'perf-core-for-mingo-4.12-20170316' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-16 17:29:23 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170320

for you to fetch changes up to affa6c169bae8dc9cb1a2d070c7cd2fe1939c5b8:

  tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h (2017-03-20 15:02:29 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

Fixes:

- Fix concat_probe_trace_events() in 'perf probe', it should dereference a
  pointer, not test its value (Ravi Bangoria)

User visible:

- Handle partial AUX records, checking if 'kvm_intel.ko' is loaded and
  if its 'vmm_exclusive' parameter is set to 0, suggesting tweaking
  it to reduce gaps (Alexander Shishkin)

Infrastructure:

- Sync the kvm.h, cpufeatures.h and perf_event.h tools/ headers copies
  with the kernel (Arnaldo Carvalho de Melo, Alexander Shishkin)

- 'perf lock' subcommands should include common options, using
  OPT_PARENT() (Changbin Du)

- Ditto for 'perf timechart' (Arnaldo Carvalho de Melo)

Documentation:

  Correct 'perf stat --no-aggr' description (Ravi Bangoria)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Alexander Shishkin (3):
      tools lib api fs: Introduce sysfs__read_bool
      tools include: Sync {,tools/}include/uapi/linux/perf_event.h
      perf tools: Handle partial AUX records and print a warning

Arnaldo Carvalho de Melo (5):
      perf lock: Make 'f' part of the common 'lock_options'
      perf timechart: Use OPT_PARENT for common options
      tools headers: Sync {tools/,}arch/x86/include/asm/cpufeatures.h
      tools headers: Sync {tools/,}arch/arm{64}/include/uapi/asm/kvm.h
      tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h

Changbin Du (1):
      perf lock: Subcommands should include common options

Ravi Bangoria (2):
      perf stat: Correct --no-aggr description
      perf probe: Fix concat_probe_trace_events

 tools/arch/arm/include/uapi/asm/kvm.h     | 13 +++++++++++++
 tools/arch/arm64/include/uapi/asm/kvm.h   | 13 +++++++++++++
 tools/arch/powerpc/include/uapi/asm/kvm.h | 22 ++++++++++++++++++++++
 tools/arch/x86/include/asm/cpufeatures.h  |  3 ++-
 tools/include/uapi/linux/perf_event.h     |  1 +
 tools/lib/api/fs/fs.c                     | 29 +++++++++++++++++++++++++++++
 tools/lib/api/fs/fs.h                     |  1 +
 tools/perf/Documentation/perf-stat.txt    |  3 +--
 tools/perf/builtin-lock.c                 | 22 ++++++++++++----------
 tools/perf/builtin-timechart.c            | 16 +++++++---------
 tools/perf/util/event.c                   |  5 +++--
 tools/perf/util/event.h                   |  1 +
 tools/perf/util/probe-event.c             |  2 +-
 tools/perf/util/session.c                 | 27 ++++++++++++++++++++++++---
 14 files changed, 130 insertions(+), 28 deletions(-)

Test results:

The first ones are container (docker) based builds of tools/perf with and
without libelf support, objtool where it is supported and samples/bpf/, ditto.
Where clang is available, it is also used to build perf with/without libelf.

Several are cross builds, the ones with -x-ARCH, and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.

The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.

Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.

  # dm
   1 alpine:3.4: Ok
   2 alpine:3.5: Ok
   3 alpine:edge: Ok
   4 android-ndk:r12b-arm: Ok
   5 archlinux:latest: Ok
   6 centos:5: Ok
   7 centos:6: Ok
   8 centos:7: Ok
   9 debian:7: Ok
  10 debian:8: Ok
  11 debian:experimental: Ok
  12 debian:experimental-x-arm64: Ok
  13 debian:experimental-x-mips: Ok
  14 debian:experimental-x-mips64: Ok
  15 debian:experimental-x-mipsel: Ok
  16 fedora:20: Ok
  17 fedora:21: Ok
  18 fedora:22: Ok
  19 fedora:23: Ok
  20 fedora:24: Ok
  21 fedora:24-x-ARC-uClibc: Ok
  22 fedora:25: Ok
  23 fedora:rawhide: Ok
  24 mageia:5: Ok
  25 opensuse:13.2: Ok
  26 opensuse:42.1: Ok
  27 opensuse:tumbleweed: Ok
  28 ubuntu:12.04.5: Ok
  29 ubuntu:14.04.4: Ok
  30 ubuntu:14.04.4-x-linaro-arm64: Ok
  31 ubuntu:15.10: Ok
  32 ubuntu:16.04: Ok
  33 ubuntu:16.04-x-arm: Ok
  34 ubuntu:16.04-x-arm64: Ok
  35 ubuntu:16.04-x-powerpc: Ok
  36 ubuntu:16.04-x-powerpc64: Ok
  37 ubuntu:16.04-x-s390: Ok
  38 ubuntu:16.10: Ok
  39 ubuntu:17.04: Ok

  # uname -a
  Linux felicio.ghostprotocols.net 4.11.0-rc2+ #30 SMP Mon Mar 20 09:47:16 BRT 2017 x86_64 x86_64 x86_64 GNU/Linux
  # Includes peterz's fix that makes "55: Convert perf time to TSC" pass,
  # That fix should go via his tree.
  
  # perf test
   1: vmlinux symtab matches kallsyms            : Ok
   2: Detect openat syscall event                : Ok
   3: Detect openat syscall event on all cpus    : Ok
   4: Read samples using the mmap interface      : Ok
   5: Parse event definition strings             : Ok
   6: PERF_RECORD_* events & perf_sample fields  : Ok
   7: Parse perf pmu format                      : Ok
   8: DSO data read                              : Ok
   9: DSO data cache                             : Ok
  10: DSO data reopen                            : Ok
  11: Roundtrip evsel->name                      : Ok
  12: Parse sched tracepoints fields             : Ok
  13: syscalls:sys_enter_openat event fields     : Ok
  14: Setup struct perf_event_attr               : Ok
  15: Match and link multiple hists              : Ok
  16: 'import perf' in python                    : Ok
  17: Breakpoint overflow signal handler         : Ok
  18: Breakpoint overflow sampling               : Ok
  19: Number of exit events of a simple workload : Ok
  20: Software clock events period values        : Ok
  21: Object code reading                        : Ok
  22: Sample parsing                             : Ok
  23: Use a dummy software event to keep tracking: Ok
  24: Parse with no sample_id_all bit set        : Ok
  25: Filter hist entries                        : Ok
  26: Lookup mmap thread                         : Ok
  27: Share thread mg                            : Ok
  28: Sort output of hist entries                : Ok
  29: Cumulate child hist entries                : Ok
  30: Track with sched_switch                    : Ok
  31: Filter fds with revents mask in a fdarray  : Ok
  32: Add fd to a fdarray, making it autogrow    : Ok
  33: kmod_path__parse                           : Ok
  34: Thread map                                 : Ok
  35: LLVM search and compile                    :
  35.1: Basic BPF llvm compile                    : Ok
  35.2: kbuild searching                          : Ok
  35.3: Compile source for BPF prologue generation: Ok
  35.4: Compile source for BPF relocation         : Ok
  36: Session topology                           : Ok
  37: BPF filter                                 :
  37.1: Basic BPF filtering                      : FAILED!
  37.2: BPF pinning                              : Skip
  37.3: BPF prologue generation                  : Skip
  37.4: BPF relocation checker                   : Skip
  38: Synthesize thread map                      : Ok
  39: Remove thread map                          : Ok
  40: Synthesize cpu map                         : Ok
  41: Synthesize stat config                     : Ok
  42: Synthesize stat                            : Ok
  43: Synthesize stat round                      : Ok
  44: Synthesize attr update                     : Ok
  45: Event times                                : Ok
  46: Read backward ring buffer                  : Ok
  47: Print cpu map                              : Ok
  48: Probe SDT events                           : Ok
  49: is_printable_array                         : Ok
  50: Print bitmap                               : Ok
  51: perf hooks                                 : Ok
  52: builtin clang support                      : Skip (not compiled in)
  53: unit_number__scnprintf                     : Ok
  54: x86 rdpmc                                  : Ok
  55: Convert perf time to TSC                   : Ok
  56: DWARF unwind                               : Ok
  57: x86 instruction decoder - new instructions : Ok
  58: Intel cqm nmi context read                 : Skip
  # 

  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/linux/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
                make_install_O: make install
                    make_doc_O: make doc
              make_no_libelf_O: make NO_LIBELF=1
            make_install_bin_O: make install-bin
             make_util_map_o_O: make util/map.o
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
                 make_perf_o_O: make perf.o
            make_no_auxtrace_O: make NO_AUXTRACE=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
                   make_pure_O: make
           make_no_libpython_O: make NO_LIBPYTHON=1
                  make_debug_O: make DEBUG=1
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
                 make_static_O: make LDFLAGS=-static
               make_no_slang_O: make NO_SLANG=1
                make_no_newt_O: make NO_NEWT=1
            make_no_demangle_O: make NO_DEMANGLE=1
             make_no_libperl_O: make NO_LIBPERL=1
              make_clean_all_O: make clean all
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                make_no_gtk2_O: make NO_GTK2=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
                   make_tags_O: make tags
           make_no_backtrace_O: make NO_BACKTRACE=1
         make_install_prefix_O: make install prefix=/tmp/krava
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
              make_no_libbpf_O: make NO_LIBBPF=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
                   make_help_O: make help
        make_with_babeltrace_O: make LIBBABELTRACE=1
             make_no_libnuma_O: make NO_LIBNUMA=1
           make_no_libbionic_O: make NO_LIBBIONIC=1
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2017-03-21  1:16 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-03-21  1:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexander Yarygin, Andi Kleen, Changbin Du,
	Clark Williams, David Ahern, Hemant Kumar, Jiri Olsa, Li Zhong,
	Marc Zyngier, Masami Hiramatsu, Michael Ellerman, Namhyung Kim,
	Naveen N . Rao, Paul Mackerras, Peter Zijlstra

Hi Ingo,

	Please consider pulling,

- Arnaldo

Test results at the end of this message, as usual.

The following changes since commit 61f63e383784bd0ab6529cfc95ddc59c713afcc9:

  Merge tag 'perf-core-for-mingo-4.12-20170316' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-16 17:29:23 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170320

for you to fetch changes up to affa6c169bae8dc9cb1a2d070c7cd2fe1939c5b8:

  tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h (2017-03-20 15:02:29 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

Fixes:

- Fix concat_probe_trace_events() in 'perf probe', it should dereference a
  pointer, not test its value (Ravi Bangoria)

User visible:

- Handle partial AUX records, checking if 'kvm_intel.ko' is loaded and
  if its 'vmm_exclusive' parameter is set to 0, suggesting tweaking
  it to reduce gaps (Alexander Shishkin)

Infrastructure:

- Sync the kvm.h, cpufeatures.h and perf_event.h tools/ headers copies
  with the kernel (Arnaldo Carvalho de Melo, Alexander Shishkin)

- 'perf lock' subcommands should include common options, using
  OPT_PARENT() (Changbin Du)

- Ditto for 'perf timechart' (Arnaldo Carvalho de Melo)

Documentation:

  Correct 'perf stat --no-aggr' description (Ravi Bangoria)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Alexander Shishkin (3):
      tools lib api fs: Introduce sysfs__read_bool
      tools include: Sync {,tools/}include/uapi/linux/perf_event.h
      perf tools: Handle partial AUX records and print a warning

Arnaldo Carvalho de Melo (5):
      perf lock: Make 'f' part of the common 'lock_options'
      perf timechart: Use OPT_PARENT for common options
      tools headers: Sync {tools/,}arch/x86/include/asm/cpufeatures.h
      tools headers: Sync {tools/,}arch/arm{64}/include/uapi/asm/kvm.h
      tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h

Changbin Du (1):
      perf lock: Subcommands should include common options

Ravi Bangoria (2):
      perf stat: Correct --no-aggr description
      perf probe: Fix concat_probe_trace_events

 tools/arch/arm/include/uapi/asm/kvm.h     | 13 +++++++++++++
 tools/arch/arm64/include/uapi/asm/kvm.h   | 13 +++++++++++++
 tools/arch/powerpc/include/uapi/asm/kvm.h | 22 ++++++++++++++++++++++
 tools/arch/x86/include/asm/cpufeatures.h  |  3 ++-
 tools/include/uapi/linux/perf_event.h     |  1 +
 tools/lib/api/fs/fs.c                     | 29 +++++++++++++++++++++++++++++
 tools/lib/api/fs/fs.h                     |  1 +
 tools/perf/Documentation/perf-stat.txt    |  3 +--
 tools/perf/builtin-lock.c                 | 22 ++++++++++++----------
 tools/perf/builtin-timechart.c            | 16 +++++++---------
 tools/perf/util/event.c                   |  5 +++--
 tools/perf/util/event.h                   |  1 +
 tools/perf/util/probe-event.c             |  2 +-
 tools/perf/util/session.c                 | 27 ++++++++++++++++++++++++---
 14 files changed, 130 insertions(+), 28 deletions(-)

Test results:

The first ones are container (docker) based builds of tools/perf with and
without libelf support, objtool where it is supported and samples/bpf/, ditto.
Where clang is available, it is also used to build perf with/without libelf.

Several are cross builds, the ones with -x-ARCH, and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.

The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.

Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.

  # dm
   1 alpine:3.4: Ok
   2 alpine:3.5: Ok
   3 alpine:edge: Ok
   4 android-ndk:r12b-arm: Ok
   5 archlinux:latest: Ok
   6 centos:5: Ok
   7 centos:6: Ok
   8 centos:7: Ok
   9 debian:7: Ok
  10 debian:8: Ok
  11 debian:experimental: Ok
  12 debian:experimental-x-arm64: Ok
  13 debian:experimental-x-mips: Ok
  14 debian:experimental-x-mips64: Ok
  15 debian:experimental-x-mipsel: Ok
  16 fedora:20: Ok
  17 fedora:21: Ok
  18 fedora:22: Ok
  19 fedora:23: Ok
  20 fedora:24: Ok
  21 fedora:24-x-ARC-uClibc: Ok
  22 fedora:25: Ok
  23 fedora:rawhide: Ok
  24 mageia:5: Ok
  25 opensuse:13.2: Ok
  26 opensuse:42.1: Ok
  27 opensuse:tumbleweed: Ok
  28 ubuntu:12.04.5: Ok
  29 ubuntu:14.04.4: Ok
  30 ubuntu:14.04.4-x-linaro-arm64: Ok
  31 ubuntu:15.10: Ok
  32 ubuntu:16.04: Ok
  33 ubuntu:16.04-x-arm: Ok
  34 ubuntu:16.04-x-arm64: Ok
  35 ubuntu:16.04-x-powerpc: Ok
  36 ubuntu:16.04-x-powerpc64: Ok
  37 ubuntu:16.04-x-s390: Ok
  38 ubuntu:16.10: Ok
  39 ubuntu:17.04: Ok

  # uname -a
  Linux felicio.ghostprotocols.net 4.11.0-rc2+ #30 SMP Mon Mar 20 09:47:16 BRT 2017 x86_64 x86_64 x86_64 GNU/Linux
  # Includes peterz's fix that makes "55: Convert perf time to TSC" pass,
  # That fix should go via his tree.
  
  # perf test
   1: vmlinux symtab matches kallsyms            : Ok
   2: Detect openat syscall event                : Ok
   3: Detect openat syscall event on all cpus    : Ok
   4: Read samples using the mmap interface      : Ok
   5: Parse event definition strings             : Ok
   6: PERF_RECORD_* events & perf_sample fields  : Ok
   7: Parse perf pmu format                      : Ok
   8: DSO data read                              : Ok
   9: DSO data cache                             : Ok
  10: DSO data reopen                            : Ok
  11: Roundtrip evsel->name                      : Ok
  12: Parse sched tracepoints fields             : Ok
  13: syscalls:sys_enter_openat event fields     : Ok
  14: Setup struct perf_event_attr               : Ok
  15: Match and link multiple hists              : Ok
  16: 'import perf' in python                    : Ok
  17: Breakpoint overflow signal handler         : Ok
  18: Breakpoint overflow sampling               : Ok
  19: Number of exit events of a simple workload : Ok
  20: Software clock events period values        : Ok
  21: Object code reading                        : Ok
  22: Sample parsing                             : Ok
  23: Use a dummy software event to keep tracking: Ok
  24: Parse with no sample_id_all bit set        : Ok
  25: Filter hist entries                        : Ok
  26: Lookup mmap thread                         : Ok
  27: Share thread mg                            : Ok
  28: Sort output of hist entries                : Ok
  29: Cumulate child hist entries                : Ok
  30: Track with sched_switch                    : Ok
  31: Filter fds with revents mask in a fdarray  : Ok
  32: Add fd to a fdarray, making it autogrow    : Ok
  33: kmod_path__parse                           : Ok
  34: Thread map                                 : Ok
  35: LLVM search and compile                    :
  35.1: Basic BPF llvm compile                    : Ok
  35.2: kbuild searching                          : Ok
  35.3: Compile source for BPF prologue generation: Ok
  35.4: Compile source for BPF relocation         : Ok
  36: Session topology                           : Ok
  37: BPF filter                                 :
  37.1: Basic BPF filtering                      : FAILED!
  37.2: BPF pinning                              : Skip
  37.3: BPF prologue generation                  : Skip
  37.4: BPF relocation checker                   : Skip
  38: Synthesize thread map                      : Ok
  39: Remove thread map                          : Ok
  40: Synthesize cpu map                         : Ok
  41: Synthesize stat config                     : Ok
  42: Synthesize stat                            : Ok
  43: Synthesize stat round                      : Ok
  44: Synthesize attr update                     : Ok
  45: Event times                                : Ok
  46: Read backward ring buffer                  : Ok
  47: Print cpu map                              : Ok
  48: Probe SDT events                           : Ok
  49: is_printable_array                         : Ok
  50: Print bitmap                               : Ok
  51: perf hooks                                 : Ok
  52: builtin clang support                      : Skip (not compiled in)
  53: unit_number__scnprintf                     : Ok
  54: x86 rdpmc                                  : Ok
  55: Convert perf time to TSC                   : Ok
  56: DWARF unwind                               : Ok
  57: x86 instruction decoder - new instructions : Ok
  58: Intel cqm nmi context read                 : Skip
  # 

  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/linux/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
                make_install_O: make install
                    make_doc_O: make doc
              make_no_libelf_O: make NO_LIBELF=1
            make_install_bin_O: make install-bin
             make_util_map_o_O: make util/map.o
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
                 make_perf_o_O: make perf.o
            make_no_auxtrace_O: make NO_AUXTRACE=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
                   make_pure_O: make
           make_no_libpython_O: make NO_LIBPYTHON=1
                  make_debug_O: make DEBUG=1
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
                 make_static_O: make LDFLAGS=-static
               make_no_slang_O: make NO_SLANG=1
                make_no_newt_O: make NO_NEWT=1
            make_no_demangle_O: make NO_DEMANGLE=1
             make_no_libperl_O: make NO_LIBPERL=1
              make_clean_all_O: make clean all
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                make_no_gtk2_O: make NO_GTK2=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
                   make_tags_O: make tags
           make_no_backtrace_O: make NO_BACKTRACE=1
         make_install_prefix_O: make install prefix=/tmp/krava
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
              make_no_libbpf_O: make NO_LIBBPF=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
                   make_help_O: make help
        make_with_babeltrace_O: make LIBBABELTRACE=1
             make_no_libnuma_O: make NO_LIBNUMA=1
           make_no_libbionic_O: make NO_LIBBIONIC=1
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-07-25 15:57 Arnaldo Carvalho de Melo
@ 2016-07-25 17:49 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2016-07-25 17:49 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andy Lutomirski, Dan Williams,
	David Ahern, H . Peter Anvin, Jiri Olsa, Josh Poimboeuf,
	Masami Hiramatsu, Namhyung Kim, Naveen N . Rao, Peter Zijlstra,
	Stephane Eranian, Stephen Rothwell, Sukadev Bhattiprolu,
	Thomas Gleixner, Wang Nan, X86 ML, Arnaldo Carvalho de Melo,
	Linus Torvalds


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Build news:
> 
> Now the 16.04-x-armhf and 16.04-x-powerpc64 cross build docker images have libz
> and libelf cross built from sources, so that we can cover cross build testing
> more of the codebase.
> 
> In those images objtool is not built, as checking powerpc and arm binaries is
> not supported, so trying to build it will end up in linker errors.
> 
> Build stats:
> 
>   # perf stat dm
>   alpine:3.4: Ok
>   android-ndk:r12b: Ok
>   centos:5: Ok
>   centos:6: Ok
>   centos:7: Ok
>   debian:7: Ok
>   debian:8: Ok
>   debian:experimental: Ok
>   fedora:21: Ok
>   fedora:22: Ok
>   fedora:23: Ok
>   fedora:24: Ok
>   fedora:rawhide: Ok
>   mageia:5: Ok
>   opensuse:13.2: Ok
>   opensuse:42.1: Ok
>   ubuntu:14.04.4: Ok
>   ubuntu:15.10: Ok
>   ubuntu:16.04: Ok
>   ubuntu:16.04-x-armhf: Ok
>   ubuntu:16.04-x-powerpc64: Ok
> 
>    Performance counter stats for 'dm':
> 
>        1940.152756      task-clock (msec)         #    0.002 CPUs utilized          
>             76,985      context-switches          #    0.040 M/sec                  
>              9,189      cpu-migrations            #    0.005 M/sec                  
>             56,641      page-faults               #    0.029 M/sec                  
>      5,631,722,319      cycles                    #    2.903 GHz                    
>      5,382,953,696      instructions              #    0.96  insn per cycle         
>        998,621,403      branches                  #  514.713 M/sec                  
>         17,532,943      branch-misses             #    1.76% of all branches        
> 
>      817.896638265 seconds time elapsed
> 
>   # 
> 
> The following changes since commit 5048c2af078d5976895d521262a8802ea791f3b0:
> 
>   Merge tag 'perf-core-for-mingo-20160718' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-07-19 08:44:38 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160725
> 
> for you to fetch changes up to 4e3ba8af21b00b91b451e7c4a9fa3a63b025dd56:
> 
>   Revert "perf tools: event.h needs asm/perf_regs.h" (2016-07-25 11:58:56 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Add AVX-512 support to the instruction decoder, used by Intel PT,
>   fix vcvtph2ps instruction decoding (Adrian Hunter)
> 
> - Make objtool and vdso2c use the right arch header search path
>   (Stephen Rothwell, Josh Poimboeuf, Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (4):
>       x86/insn: perf tools: Fix vcvtph2ps instruction decoding
>       x86/insn: Add AVX-512 support to the instruction decoder
>       perf tools: Add AVX-512 support to the instruction decoder used by Intel PT
>       perf tools: Add AVX-512 instructions to the new instructions test
> 
> Arnaldo Carvalho de Melo (5):
>       perf tests kmod-path: Fix build on ubuntu:16.04-x-armhf
>       tools build: Add HOSTARCH Makefile variable
>       objtool: Use tools/scripts/Makefile.arch to get ARCH and HOSTARCH
>       objtool: Always use host headers
>       Revert "perf tools: event.h needs asm/perf_regs.h"
> 
> Josh Poimboeuf (1):
>       tools build: Fix objtool build with ARCH=x86_64
> 
> Stephen Rothwell (1):
>       x86: Make the vdso2c compiler use the host architecture headers
> 
>  arch/x86/entry/vdso/Makefile                       |    2 +-
>  arch/x86/include/asm/inat.h                        |   17 +-
>  arch/x86/include/asm/insn.h                        |   12 +-
>  arch/x86/lib/insn.c                                |   18 +-
>  arch/x86/lib/x86-opcode-map.txt                    |  263 ++-
>  arch/x86/tools/gen-insn-attr-x86.awk               |   11 +-
>  tools/objtool/Build                                |    2 +-
>  tools/objtool/Makefile                             |    8 +-
>  tools/perf/arch/x86/tests/insn-x86-dat-32.c        | 1018 ++++++++++-
>  tools/perf/arch/x86/tests/insn-x86-dat-64.c        |  940 +++++++++-
>  tools/perf/arch/x86/tests/insn-x86-dat-src.c       | 1789 ++++++++++++++++++++
>  tools/perf/tests/kmod-path.c                       |    1 +
>  tools/perf/util/event.h                            |    1 -
>  .../util/intel-pt-decoder/gen-insn-attr-x86.awk    |   11 +-
>  tools/perf/util/intel-pt-decoder/inat.h            |   17 +-
>  tools/perf/util/intel-pt-decoder/insn.c            |   18 +-
>  tools/perf/util/intel-pt-decoder/insn.h            |   12 +-
>  .../perf/util/intel-pt-decoder/x86-opcode-map.txt  |  263 ++-
>  tools/scripts/Makefile.arch                        |   41 +-
>  19 files changed, 4221 insertions(+), 223 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-07-25 15:57 Arnaldo Carvalho de Melo
  2016-07-25 17:49 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-25 15:57 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andy Lutomirski, Dan Williams, David Ahern, H . Peter Anvin,
	Jiri Olsa, Josh Poimboeuf, Masami Hiramatsu, Namhyung Kim,
	Naveen N . Rao, Peter Zijlstra, Stephane Eranian,
	Stephen Rothwell, Sukadev Bhattiprolu, Thomas Gleixner, Wang Nan,
	X86 ML, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

Build news:

Now the 16.04-x-armhf and 16.04-x-powerpc64 cross build docker images have libz
and libelf cross built from sources, so that we can cover cross build testing
more of the codebase.

In those images objtool is not built, as checking powerpc and arm binaries is
not supported, so trying to build it will end up in linker errors.

Build stats:

  # perf stat dm
  alpine:3.4: Ok
  android-ndk:r12b: Ok
  centos:5: Ok
  centos:6: Ok
  centos:7: Ok
  debian:7: Ok
  debian:8: Ok
  debian:experimental: Ok
  fedora:21: Ok
  fedora:22: Ok
  fedora:23: Ok
  fedora:24: Ok
  fedora:rawhide: Ok
  mageia:5: Ok
  opensuse:13.2: Ok
  opensuse:42.1: Ok
  ubuntu:14.04.4: Ok
  ubuntu:15.10: Ok
  ubuntu:16.04: Ok
  ubuntu:16.04-x-armhf: Ok
  ubuntu:16.04-x-powerpc64: Ok

   Performance counter stats for 'dm':

       1940.152756      task-clock (msec)         #    0.002 CPUs utilized          
            76,985      context-switches          #    0.040 M/sec                  
             9,189      cpu-migrations            #    0.005 M/sec                  
            56,641      page-faults               #    0.029 M/sec                  
     5,631,722,319      cycles                    #    2.903 GHz                    
     5,382,953,696      instructions              #    0.96  insn per cycle         
       998,621,403      branches                  #  514.713 M/sec                  
        17,532,943      branch-misses             #    1.76% of all branches        

     817.896638265 seconds time elapsed

  # 

The following changes since commit 5048c2af078d5976895d521262a8802ea791f3b0:

  Merge tag 'perf-core-for-mingo-20160718' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-07-19 08:44:38 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160725

for you to fetch changes up to 4e3ba8af21b00b91b451e7c4a9fa3a63b025dd56:

  Revert "perf tools: event.h needs asm/perf_regs.h" (2016-07-25 11:58:56 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

- Add AVX-512 support to the instruction decoder, used by Intel PT,
  fix vcvtph2ps instruction decoding (Adrian Hunter)

- Make objtool and vdso2c use the right arch header search path
  (Stephen Rothwell, Josh Poimboeuf, Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (4):
      x86/insn: perf tools: Fix vcvtph2ps instruction decoding
      x86/insn: Add AVX-512 support to the instruction decoder
      perf tools: Add AVX-512 support to the instruction decoder used by Intel PT
      perf tools: Add AVX-512 instructions to the new instructions test

Arnaldo Carvalho de Melo (5):
      perf tests kmod-path: Fix build on ubuntu:16.04-x-armhf
      tools build: Add HOSTARCH Makefile variable
      objtool: Use tools/scripts/Makefile.arch to get ARCH and HOSTARCH
      objtool: Always use host headers
      Revert "perf tools: event.h needs asm/perf_regs.h"

Josh Poimboeuf (1):
      tools build: Fix objtool build with ARCH=x86_64

Stephen Rothwell (1):
      x86: Make the vdso2c compiler use the host architecture headers

 arch/x86/entry/vdso/Makefile                       |    2 +-
 arch/x86/include/asm/inat.h                        |   17 +-
 arch/x86/include/asm/insn.h                        |   12 +-
 arch/x86/lib/insn.c                                |   18 +-
 arch/x86/lib/x86-opcode-map.txt                    |  263 ++-
 arch/x86/tools/gen-insn-attr-x86.awk               |   11 +-
 tools/objtool/Build                                |    2 +-
 tools/objtool/Makefile                             |    8 +-
 tools/perf/arch/x86/tests/insn-x86-dat-32.c        | 1018 ++++++++++-
 tools/perf/arch/x86/tests/insn-x86-dat-64.c        |  940 +++++++++-
 tools/perf/arch/x86/tests/insn-x86-dat-src.c       | 1789 ++++++++++++++++++++
 tools/perf/tests/kmod-path.c                       |    1 +
 tools/perf/util/event.h                            |    1 -
 .../util/intel-pt-decoder/gen-insn-attr-x86.awk    |   11 +-
 tools/perf/util/intel-pt-decoder/inat.h            |   17 +-
 tools/perf/util/intel-pt-decoder/insn.c            |   18 +-
 tools/perf/util/intel-pt-decoder/insn.h            |   12 +-
 .../perf/util/intel-pt-decoder/x86-opcode-map.txt  |  263 ++-
 tools/scripts/Makefile.arch                        |   41 +-
 19 files changed, 4221 insertions(+), 223 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-07-01  6:43 ` Ingo Molnar
@ 2016-07-01 13:18   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-01 13:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov,
	Ananth N Mavinakayanahalli, Andi Kleen, Anton Blanchard,
	Colin King, Daniel Axtens, David Ahern, David Laight, He Kuang,
	Jiri Olsa, Michael Ellerman, Namhyung Kim, Naveen N . Rao,
	Nilay Vaish, Peter Zijlstra, Ravi Bangoria, Wang Nan,
	Arnaldo Carvalho de Melo

Em Fri, Jul 01, 2016 at 08:43:15AM +0200, Ingo Molnar escreveu:
> 
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > 	Please consider pulling,

> Pulled, thanks a lot Arnaldo!
 
> Btw., the build started generating:
 
>  Warning: x86_64's syscall_64.tbl differs from kernel

Yeah, I noticed that, that is a compat one (the non-compat ones are
already in sync), which is something 'perf trace' needs to support but
can't right now due to raw_syscalls:sys_{enter,exit} limitations, so not
that important right now, will fix it anyway to remove the warning,

Thanks!

- Arnaldo
 
> Due to:
> 
> triton:~/tip> diff -up ./arch/x86/entry/syscalls/syscall_64.tbl 
> ./tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
> --- ./arch/x86/entry/syscalls/syscall_64.tbl    2016-06-30 08:33:35.272016286 
> +0200
> +++ ./tools/perf/arch/x86/entry/syscalls/syscall_64.tbl 2016-06-30 
> 08:33:36.596018485 +0200
> @@ -374,5 +374,3 @@
>  543    x32     io_setup                compat_sys_io_setup
>  544    x32     io_submit               compat_sys_io_submit
>  545    x32     execveat                compat_sys_execveat/ptregs
> -534    x32     preadv2                 compat_sys_preadv2
> -535    x32     pwritev2                compat_sys_pwritev2
> 
> 	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-06-30 22:16 Arnaldo Carvalho de Melo
@ 2016-07-01  6:43 ` Ingo Molnar
  2016-07-01 13:18   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2016-07-01  6:43 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov,
	Ananth N Mavinakayanahalli, Andi Kleen, Anton Blanchard,
	Colin King, Daniel Axtens, David Ahern, David Laight, He Kuang,
	Jiri Olsa, Michael Ellerman, Namhyung Kim, Naveen N . Rao,
	Nilay Vaish, Peter Zijlstra, Ravi Bangoria, Wang Nan,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit d905768c9e1addfa35d9731dbaa9242e8991f6ac:
> 
>   Merge tag 'perf-core-for-mingo-20160628' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-06-29 11:34:41 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160630
> 
> for you to fetch changes up to a24020e6b7cf6eb8b75d8bca6b89870b1cee6ba7:
> 
>   perf tools: Change cpu_map__fprintf output (2016-06-30 18:27:45 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Allow running 'perf test' entries in the same process, not forking to
>   test each testcase, useful for debugging (Jiri Olsa)
> 
> - Show number of samples in the stdio annotate header (Peter Zijlstra)
> 
> Documentation:
> 
> - Add documentation for perf.data on disk format (Andi Kleen)
> 
> Build fixes:
> 
> - Fix 'perf trace' build on old systems wrt missing SCHED_RESET_ON_FORK and
>   eventfd.h (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Utility function to fetch arch from evsel/evlist (Ravi Bangoria)
> 
> Trivial:
> 
> - Fix spelling mistake: "missmatch" -> "mismatch" in libbpf (Colin Ian King)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf tools: Add documentation for perf.data on disk format
> 
> Arnaldo Carvalho de Melo (2):
>       perf trace beauty sched_policy: Define SCHED_RESET_ON_FORK for older systems
>       perf trace beauty eventfd: No need to include eventfd.h
> 
> Colin Ian King (1):
>       tools lib bpf: Fix spelling mistake: "missmatch" -> "mismatch"
> 
> Jiri Olsa (4):
>       perf tools: Allow to reset open files counter
>       perf tests: Fix thread map test for -F option
>       perf test: Add -F/--dont-fork option
>       perf tools: Change cpu_map__fprintf output
> 
> Peter Zijlstra (Intel) (2):
>       perf annotate: Simplify header dotted line sizing
>       perf annotate: Add number of samples to the header
> 
> Ravi Bangoria (1):
>       perf evsel: Utility function to fetch arch
> 
>  tools/lib/bpf/libbpf.c                             |   2 +-
>  tools/lib/bpf/libbpf.h                             |   2 +-
>  tools/perf/Documentation/perf-test.txt             |   4 +
>  tools/perf/Documentation/perf.data-file-format.txt | 442 +++++++++++++++++++++
>  tools/perf/tests/builtin-test.c                    |  59 ++-
>  tools/perf/tests/cpumap.c                          |  24 ++
>  tools/perf/tests/dso-data.c                        |   6 +
>  tools/perf/tests/tests.h                           |   1 +
>  tools/perf/tests/thread-map.c                      |  16 +-
>  tools/perf/trace/beauty/eventfd.c                  |   2 -
>  tools/perf/trace/beauty/sched_policy.c             |   3 +
>  tools/perf/util/annotate.c                         |  12 +-
>  tools/perf/util/cpumap.c                           |  54 ++-
>  tools/perf/util/cpumap.h                           |   1 +
>  tools/perf/util/dso.c                              |  22 +-
>  tools/perf/util/dso.h                              |   2 +
>  tools/perf/util/event.c                            |   2 +-
>  tools/perf/util/evsel.c                            |   7 +
>  tools/perf/util/evsel.h                            |   2 +
>  19 files changed, 614 insertions(+), 49 deletions(-)
>  create mode 100644 tools/perf/Documentation/perf.data-file-format.txt

Pulled, thanks a lot Arnaldo!

Btw., the build started generating:

 Warning: x86_64's syscall_64.tbl differs from kernel

Due to:

triton:~/tip> diff -up ./arch/x86/entry/syscalls/syscall_64.tbl 
./tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
--- ./arch/x86/entry/syscalls/syscall_64.tbl    2016-06-30 08:33:35.272016286 
+0200
+++ ./tools/perf/arch/x86/entry/syscalls/syscall_64.tbl 2016-06-30 
08:33:36.596018485 +0200
@@ -374,5 +374,3 @@
 543    x32     io_setup                compat_sys_io_setup
 544    x32     io_submit               compat_sys_io_submit
 545    x32     execveat                compat_sys_execveat/ptregs
-534    x32     preadv2                 compat_sys_preadv2
-535    x32     pwritev2                compat_sys_pwritev2

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-06-30 22:16 Arnaldo Carvalho de Melo
  2016-07-01  6:43 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-06-30 22:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Ananth N Mavinakayanahalli, Andi Kleen,
	Anton Blanchard, Colin King, Daniel Axtens, David Ahern,
	David Laight, He Kuang, Jiri Olsa, Michael Ellerman,
	Namhyung Kim, Naveen N . Rao, Nilay Vaish, Peter Zijlstra,
	Ravi Bangoria, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit d905768c9e1addfa35d9731dbaa9242e8991f6ac:

  Merge tag 'perf-core-for-mingo-20160628' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-06-29 11:34:41 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160630

for you to fetch changes up to a24020e6b7cf6eb8b75d8bca6b89870b1cee6ba7:

  perf tools: Change cpu_map__fprintf output (2016-06-30 18:27:45 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

New features:

- Allow running 'perf test' entries in the same process, not forking to
  test each testcase, useful for debugging (Jiri Olsa)

- Show number of samples in the stdio annotate header (Peter Zijlstra)

Documentation:

- Add documentation for perf.data on disk format (Andi Kleen)

Build fixes:

- Fix 'perf trace' build on old systems wrt missing SCHED_RESET_ON_FORK and
  eventfd.h (Arnaldo Carvalho de Melo)

Infrastructure:

- Utility function to fetch arch from evsel/evlist (Ravi Bangoria)

Trivial:

- Fix spelling mistake: "missmatch" -> "mismatch" in libbpf (Colin Ian King)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (1):
      perf tools: Add documentation for perf.data on disk format

Arnaldo Carvalho de Melo (2):
      perf trace beauty sched_policy: Define SCHED_RESET_ON_FORK for older systems
      perf trace beauty eventfd: No need to include eventfd.h

Colin Ian King (1):
      tools lib bpf: Fix spelling mistake: "missmatch" -> "mismatch"

Jiri Olsa (4):
      perf tools: Allow to reset open files counter
      perf tests: Fix thread map test for -F option
      perf test: Add -F/--dont-fork option
      perf tools: Change cpu_map__fprintf output

Peter Zijlstra (Intel) (2):
      perf annotate: Simplify header dotted line sizing
      perf annotate: Add number of samples to the header

Ravi Bangoria (1):
      perf evsel: Utility function to fetch arch

 tools/lib/bpf/libbpf.c                             |   2 +-
 tools/lib/bpf/libbpf.h                             |   2 +-
 tools/perf/Documentation/perf-test.txt             |   4 +
 tools/perf/Documentation/perf.data-file-format.txt | 442 +++++++++++++++++++++
 tools/perf/tests/builtin-test.c                    |  59 ++-
 tools/perf/tests/cpumap.c                          |  24 ++
 tools/perf/tests/dso-data.c                        |   6 +
 tools/perf/tests/tests.h                           |   1 +
 tools/perf/tests/thread-map.c                      |  16 +-
 tools/perf/trace/beauty/eventfd.c                  |   2 -
 tools/perf/trace/beauty/sched_policy.c             |   3 +
 tools/perf/util/annotate.c                         |  12 +-
 tools/perf/util/cpumap.c                           |  54 ++-
 tools/perf/util/cpumap.h                           |   1 +
 tools/perf/util/dso.c                              |  22 +-
 tools/perf/util/dso.h                              |   2 +
 tools/perf/util/event.c                            |   2 +-
 tools/perf/util/evsel.c                            |   7 +
 tools/perf/util/evsel.h                            |   2 +
 19 files changed, 614 insertions(+), 49 deletions(-)
 create mode 100644 tools/perf/Documentation/perf.data-file-format.txt

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-06-06 21:04 Arnaldo Carvalho de Melo
@ 2016-06-08  7:32 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2016-06-08  7:32 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin, Andi Kleen,
	David Ahern, He Kuang, Jiri Olsa, kernel, Lucas Stach,
	Masami Hiramatsu, Milian Wolff, Namhyung Kim, Peter Zijlstra,
	pi3orama, Taeung Song, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 030ba6cd105c68ce919c5e239853b567490cd059:
> 
>   perf/x86/intel: Use new topology_max_smt_threads() in HT leak workaround (2016-06-03 09:41:25 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160606
> 
> for you to fetch changes up to 7db91f251056f90fec4121f028680ab3153a0f3c:
> 
>   perf config: Handle the error when config set is NULL at collect_config() (2016-06-06 17:43:19 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Tooling support for TopDown counters, recently added to the kernel (Andi Kleen)
> 
> - Show call graphs in 'perf script' when 1st event doesn't have it but some other has (He Kuang)
> 
> - Fix terminal cleanup when handling invalid .perfconfig files in 'perf top' (Taeung Song)
> 
> Build fixes:
> 
> - Respect CROSS_COMPILE for the linker in libapi (Lucas Stach)
> 
> Infrastructure:
> 
> - Fix perf_evlist__alloc_mmap() failure path (Wang Nan)
> 
> - Provide way to extract integer value from format_field (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (5):
>       perf test: Ignore .scale and other special files
>       perf stat: Basic support for TopDown in perf stat
>       perf stat: Add computation of TopDown formulas
>       perf stat: Print topology/time headers with --metric-only
>       perf stat: Add missing aggregation headers for --metric-only CSV
> 
> Arnaldo Carvalho de Melo (1):
>       perf evsel: Provide way to extract integer value from format_field
> 
> He Kuang (1):
>       perf script: Show call graphs when 1st event doesn't have it but some other has
> 
> Lucas Stach (1):
>       tools lib api: Respect CROSS_COMPILE for the linker
> 
> Taeung Song (2):
>       perf config: Fix abnormal termination at perf_parse_file()
>       perf config: Handle the error when config set is NULL at collect_config()
> 
> Wang Nan (1):
>       perf evlist: Fix alloc_mmap() failure path
> 
>  tools/lib/api/Makefile                 |   1 +
>  tools/perf/Documentation/perf-stat.txt |  32 +++++++
>  tools/perf/arch/x86/util/Build         |   1 +
>  tools/perf/arch/x86/util/group.c       |  27 ++++++
>  tools/perf/builtin-script.c            |  23 +++--
>  tools/perf/builtin-stat.c              | 165 ++++++++++++++++++++++++++++++---
>  tools/perf/tests/parse-events.c        |   4 +-
>  tools/perf/util/config.c               |  22 +++--
>  tools/perf/util/evlist.c               |   5 +-
>  tools/perf/util/evsel.c                |  25 +++--
>  tools/perf/util/evsel.h                |   2 +
>  tools/perf/util/group.h                |   7 ++
>  tools/perf/util/parse-events.l         |   1 +
>  tools/perf/util/stat-shadow.c          | 162 ++++++++++++++++++++++++++++++++
>  tools/perf/util/stat.c                 |   5 +
>  tools/perf/util/stat.h                 |   5 +
>  16 files changed, 441 insertions(+), 46 deletions(-)
>  create mode 100644 tools/perf/arch/x86/util/group.c
>  create mode 100644 tools/perf/util/group.h

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-06-06 21:04 Arnaldo Carvalho de Melo
  2016-06-08  7:32 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-06-06 21:04 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, David Ahern, He Kuang, Jiri Olsa,
	kernel, Lucas Stach, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Peter Zijlstra, pi3orama, Taeung Song, Wang Nan,
	Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 030ba6cd105c68ce919c5e239853b567490cd059:

  perf/x86/intel: Use new topology_max_smt_threads() in HT leak workaround (2016-06-03 09:41:25 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160606

for you to fetch changes up to 7db91f251056f90fec4121f028680ab3153a0f3c:

  perf config: Handle the error when config set is NULL at collect_config() (2016-06-06 17:43:19 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Tooling support for TopDown counters, recently added to the kernel (Andi Kleen)

- Show call graphs in 'perf script' when 1st event doesn't have it but some other has (He Kuang)

- Fix terminal cleanup when handling invalid .perfconfig files in 'perf top' (Taeung Song)

Build fixes:

- Respect CROSS_COMPILE for the linker in libapi (Lucas Stach)

Infrastructure:

- Fix perf_evlist__alloc_mmap() failure path (Wang Nan)

- Provide way to extract integer value from format_field (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (5):
      perf test: Ignore .scale and other special files
      perf stat: Basic support for TopDown in perf stat
      perf stat: Add computation of TopDown formulas
      perf stat: Print topology/time headers with --metric-only
      perf stat: Add missing aggregation headers for --metric-only CSV

Arnaldo Carvalho de Melo (1):
      perf evsel: Provide way to extract integer value from format_field

He Kuang (1):
      perf script: Show call graphs when 1st event doesn't have it but some other has

Lucas Stach (1):
      tools lib api: Respect CROSS_COMPILE for the linker

Taeung Song (2):
      perf config: Fix abnormal termination at perf_parse_file()
      perf config: Handle the error when config set is NULL at collect_config()

Wang Nan (1):
      perf evlist: Fix alloc_mmap() failure path

 tools/lib/api/Makefile                 |   1 +
 tools/perf/Documentation/perf-stat.txt |  32 +++++++
 tools/perf/arch/x86/util/Build         |   1 +
 tools/perf/arch/x86/util/group.c       |  27 ++++++
 tools/perf/builtin-script.c            |  23 +++--
 tools/perf/builtin-stat.c              | 165 ++++++++++++++++++++++++++++++---
 tools/perf/tests/parse-events.c        |   4 +-
 tools/perf/util/config.c               |  22 +++--
 tools/perf/util/evlist.c               |   5 +-
 tools/perf/util/evsel.c                |  25 +++--
 tools/perf/util/evsel.h                |   2 +
 tools/perf/util/group.h                |   7 ++
 tools/perf/util/parse-events.l         |   1 +
 tools/perf/util/stat-shadow.c          | 162 ++++++++++++++++++++++++++++++++
 tools/perf/util/stat.c                 |   5 +
 tools/perf/util/stat.h                 |   5 +
 16 files changed, 441 insertions(+), 46 deletions(-)
 create mode 100644 tools/perf/arch/x86/util/group.c
 create mode 100644 tools/perf/util/group.h

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-05-20 15:05 ` Arnaldo Carvalho de Melo
@ 2016-05-20 17:38   ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2016-05-20 17:38 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: He Kuang, linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexei Starovoitov, Andi Kleen, Brendan Gregg, Chris Ryder,
	David Ahern, Ekaterina Tumanova, Frederic Weisbecker, Jiri Olsa,
	Josh Poimboeuf, Kan Liang, Mark Rutland, Masami Hiramatsu,
	Milian Wolff, Namhyung Kim, Pawel Moll, Pekka Enberg,
	Peter Zijlstra, Stephane Eranian, Sukadev Bhattiprolu,
	Thomas Gleixner, Vince Weaver, Wang Nan, Will Deacon, Zefan Li,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Em Thu, May 19, 2016 at 07:21:22PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Hi Ingo,
> > 
> > 	Please consider pulling, this is on top of my previous pull
> > request (perf-core-for-mingo-20160516).
>
> The new tag is perf-core-for-mingo-20160520.

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-05-19 22:21 Arnaldo Carvalho de Melo
@ 2016-05-20 15:05 ` Arnaldo Carvalho de Melo
  2016-05-20 17:38   ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-05-20 15:05 UTC (permalink / raw)
  To: Ingo Molnar, He Kuang
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexei Starovoitov, Andi Kleen, Brendan Gregg, Chris Ryder,
	David Ahern, Ekaterina Tumanova, Frederic Weisbecker, Jiri Olsa,
	Josh Poimboeuf, Kan Liang, Mark Rutland, Masami Hiramatsu,
	Milian Wolff, Namhyung Kim, Pawel Moll, Pekka Enberg,
	Peter Zijlstra, Stephane Eranian, Sukadev Bhattiprolu,
	Thomas Gleixner, Vince Weaver, Wang Nan, Will Deacon, Zefan Li,
	Arnaldo Carvalho de Melo

Em Thu, May 19, 2016 at 07:21:22PM -0300, Arnaldo Carvalho de Melo escreveu:
> Hi Ingo,
> 
> 	Please consider pulling, this is on top of my previous pull
> request (perf-core-for-mingo-20160516).

So, here is a new pull req, removing the following patch, due to that
segfault you noticed while testing 'perf top' on an ubuntu system:
 
> He Kuang (2):
>       perf tools: Find vdso supporting cross-platform analysis

The new tag is perf-core-for-mingo-20160520.

Kuang, Ingo proposed the patch below to fix the problem he noticed
(notice the 'dso && ' part, as __dsos__find() may return NULL), but he
had several other issues with code touched by this patch, I'll try to
address those, please check the patch below and resubmit. 

- Arnaldo

 tools/perf/util/vdso.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index 8f81c415723d..3a9321f83d00 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -293,12 +293,12 @@ static struct dso *machine__find_vdso(struct machine *machine,
 	switch (dso_type) {
 	case DSO__TYPE_32BIT:
 		dso = __dsos__find(&machine->dsos, DSO__NAME_VDSO32, true);
-		if (!dso) {
-			dso = __dsos__find(&machine->dsos, DSO__NAME_VDSO,
-					   true);
-			if (dso_type != dso__type(dso, machine))
-				dso = NULL;
-		}
+		if (dso)
+			break;
+
+		dso = __dsos__find(&machine->dsos, DSO__NAME_VDSO, true);
+		if (dso && dso_type != dso__type(dso, machine))
+			dso = NULL;
 		break;
 	case DSO__TYPE_X32BIT:
 		dso = __dsos__find(&machine->dsos, DSO__NAME_VDSOX32, true);

^ permalink raw reply related	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-05-19 22:21 Arnaldo Carvalho de Melo
  2016-05-20 15:05 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-05-19 22:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexei Starovoitov, Andi Kleen,
	Brendan Gregg, Chris Ryder, David Ahern, Ekaterina Tumanova,
	Frederic Weisbecker, He Kuang, Jiri Olsa, Josh Poimboeuf,
	Kan Liang, Mark Rutland, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Pawel Moll, Pekka Enberg, Peter Zijlstra,
	Stephane Eranian, Sukadev Bhattiprolu, Thomas Gleixner,
	Vince Weaver, Wang Nan, Will Deacon, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, this is on top of my previous pull
request (perf-core-for-mingo-20160516).

- Arnaldo

The following changes since commit a29d5c9b8167dbc21a7ca8c0302e3799f9063b4e:

  perf tools: Separate accounting of contexts and real addresses in a stack trace (2016-05-16 23:11:54 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160519

for you to fetch changes up to f978a7b47e5a31d4057187153f71e95b24455e54:

  perf tools: Set buildid dir under symfs when --symfs is provided (2016-05-19 19:04:36 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- We should not use the current value of the kernel.perf_event_max_stack as the
  default value for --max-stack in tools that can process perf.data files, they
  will only match if that sysctl wasn't changed from its default value at the
  time the perf.data file was recorded, fix it.

  This fixes a bug where a 'perf record -a --call-graph dwarf ; perf report'
  produces a glibc invalid free backtrace (Arnaldo Carvalho de Melo)

- Provide a better warning when running 'perf trace' on a system where the
  kernel.kptr_restrict is set to 1, similar to the one produced by 'perf record',
  noticed on ubuntu 16.04 where this is the default kptr_restrict setting.
  (Arnaldo Carvalho de Melo)

- Fix ordering of instructions in the annotation code, noticed when annotating
  ARM binaries, now that table is auto-ordered at first use, to avoid more such
  problems (Chris Ryder)

- Fix searching the vdso image to support cross-platform analysis (He Kuang)

- Set buildid dir under symfs when --symfs is provided (He Kuang)

- Fix the 'exit_group()' syscall output in 'perf trace' (Arnaldo Carvalho de Melo)

- Only auto set call-graph to "dwarf" in 'perf trace' when syscalls are being
  traced (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Arnaldo Carvalho de Melo (7):
      perf machine: Do not bail out if not managing to read ref reloc symbol
      perf trace: Warn when trying to resolve kernel addresses with kptr_restrict=1
      perf top: Use machine->kptr_restrict_warned
      perf trace: Fix exit_group() formatting
      perf callchain: Stop validating callchains by the max_stack sysctl
      perf tools: Fix usage of max_stack sysctl
      perf trace: Only auto set call-graph to "dwarf" when syscalls are being traced

Chris Ryder (2):
      perf annotate: Fix identification of ARM blt and bls instructions
      perf annotate: Sort list of recognised instructions

He Kuang (2):
      perf tools: Find vdso supporting cross-platform analysis
      perf tools: Set buildid dir under symfs when --symfs is provided

 tools/perf/Documentation/perf-report.txt           |  2 +-
 tools/perf/Documentation/perf-script.txt           |  2 +-
 tools/perf/Documentation/perf-trace.txt            |  3 +-
 tools/perf/builtin-annotate.c                      |  5 +--
 tools/perf/builtin-diff.c                          |  5 +--
 tools/perf/builtin-report.c                        |  7 ++--
 tools/perf/builtin-script.c                        |  7 ++--
 tools/perf/builtin-timechart.c                     |  5 +--
 tools/perf/builtin-top.c                           |  6 ++--
 tools/perf/builtin-trace.c                         | 26 +++++++++++---
 tools/perf/util/annotate.c                         | 30 ++++++++++++----
 tools/perf/util/db-export.c                        |  3 +-
 tools/perf/util/dso.c                              |  4 +--
 tools/perf/util/machine.c                          | 35 ++++++-------------
 tools/perf/util/machine.h                          |  1 +
 .../perf/util/scripting-engines/trace-event-perl.c |  3 +-
 tools/perf/util/symbol.c                           | 23 +++++++++++++
 tools/perf/util/symbol.h                           |  2 ++
 tools/perf/util/top.h                              |  1 -
 tools/perf/util/vdso.c                             | 40 ++++++++++++++++++++--
 20 files changed, 146 insertions(+), 64 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-05-06 16:08 Arnaldo Carvalho de Melo
@ 2016-05-07  4:52 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2016-05-07  4:52 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Chris Phlipot,
	David Ahern, Jiri Olsa, Milian Wolff, Namhyung Kim,
	Peter Zijlstra, Wang Nan, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit c0edb7467c3d21b213ff734bfe810d81d2c6ed61:
> 
>   Merge tag 'perf-core-for-mingo-20160505' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-05-06 08:35:14 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160506
> 
> for you to fetch changes up to d5d71e86d226abe7e08df5763127ed2bd07649a1:
> 
>   perf trace: Move futex_op beautifier to tools/perf/trace/beauty/ (2016-05-06 13:00:59 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Fix ordering of kernel/user entries in 'caller' mode, where the kernel and
>   user parts were being correctly inverted but kept in place wrt each other,
>   i.e. 'callee' (k1, k2, u3, u4) became 'caller' (k2, k1, u4, u3) when it
>   should be 'caller' (u4, u3, k2, k1) (Chris Phlipot)
> 
> - In 'perf trace' don't print the raw arg syscall args for a syscall that has
>   no arguments, like gettid(). This was happening because just checking if
>   the syscall args list is NULL may mean that there are no args (e.g.: gettid)
>   or that there is no tracepoint info (e.g.: clone) (Arnaldo Carvalho de Melo)
> 
> - Add extra output of counter values with 'perf stat -vv' (Andi Kleen)
> 
> Infrastructure:
> 
> - Expose callchain db export via the python API (Chris Phlipot)
> 
> Code reorganization:
> 
> - Move some more syscall arg beautifiers from the 'perf trace' main file to
>   separate files in tools/perf/trace/beauty/, to reduce the main file line
>   count (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf stat: Add extra output of counter values with -vv
> 
> Arnaldo Carvalho de Melo (4):
>       perf trace: Do not print raw args list for syscalls with no args
>       perf trace: Move signum beautifier to tools/perf/trace/beauty/
>       perf trace: Move open_flags beautifier to tools/perf/trace/beauty/
>       perf trace: Move futex_op beautifier to tools/perf/trace/beauty/
> 
> Chris Phlipot (6):
>       perf callchain: Fix incorrect ordering of entries
>       perf tools: Refactor code to move call path handling out of thread-stack
>       perf script: Enable db export to output sampled callchains
>       perf script: Add call path id to exported sample in db export
>       perf script: Expose usage of the callchain db export via the python api
>       perf script: Update export-to-postgresql to support callchain export
> 
>  tools/perf/builtin-stat.c                          |   8 +
>  tools/perf/builtin-trace.c                         | 165 ++-------------------
>  tools/perf/scripts/python/export-to-postgresql.py  |  47 +++---
>  tools/perf/trace/beauty/futex_op.c                 |  44 ++++++
>  tools/perf/trace/beauty/open_flags.c               |  56 +++++++
>  tools/perf/trace/beauty/signum.c                   |  53 +++++++
>  tools/perf/util/Build                              |   1 +
>  tools/perf/util/call-path.c                        | 122 +++++++++++++++
>  tools/perf/util/call-path.h                        |  77 ++++++++++
>  tools/perf/util/db-export.c                        |  85 +++++++++++
>  tools/perf/util/db-export.h                        |   3 +
>  tools/perf/util/machine.c                          |  56 +++++--
>  .../util/scripting-engines/trace-event-python.c    |  36 ++++-
>  tools/perf/util/thread-stack.c                     | 139 +----------------
>  tools/perf/util/thread-stack.h                     |  31 ++--
>  15 files changed, 575 insertions(+), 348 deletions(-)
>  create mode 100644 tools/perf/trace/beauty/futex_op.c
>  create mode 100644 tools/perf/trace/beauty/open_flags.c
>  create mode 100644 tools/perf/trace/beauty/signum.c
>  create mode 100644 tools/perf/util/call-path.c
>  create mode 100644 tools/perf/util/call-path.h

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-05-06 16:08 Arnaldo Carvalho de Melo
  2016-05-07  4:52 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-05-06 16:08 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Chris Phlipot, David Ahern, Jiri Olsa, Milian Wolff,
	Namhyung Kim, Peter Zijlstra, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit c0edb7467c3d21b213ff734bfe810d81d2c6ed61:

  Merge tag 'perf-core-for-mingo-20160505' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-05-06 08:35:14 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160506

for you to fetch changes up to d5d71e86d226abe7e08df5763127ed2bd07649a1:

  perf trace: Move futex_op beautifier to tools/perf/trace/beauty/ (2016-05-06 13:00:59 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Fix ordering of kernel/user entries in 'caller' mode, where the kernel and
  user parts were being correctly inverted but kept in place wrt each other,
  i.e. 'callee' (k1, k2, u3, u4) became 'caller' (k2, k1, u4, u3) when it
  should be 'caller' (u4, u3, k2, k1) (Chris Phlipot)

- In 'perf trace' don't print the raw arg syscall args for a syscall that has
  no arguments, like gettid(). This was happening because just checking if
  the syscall args list is NULL may mean that there are no args (e.g.: gettid)
  or that there is no tracepoint info (e.g.: clone) (Arnaldo Carvalho de Melo)

- Add extra output of counter values with 'perf stat -vv' (Andi Kleen)

Infrastructure:

- Expose callchain db export via the python API (Chris Phlipot)

Code reorganization:

- Move some more syscall arg beautifiers from the 'perf trace' main file to
  separate files in tools/perf/trace/beauty/, to reduce the main file line
  count (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (1):
      perf stat: Add extra output of counter values with -vv

Arnaldo Carvalho de Melo (4):
      perf trace: Do not print raw args list for syscalls with no args
      perf trace: Move signum beautifier to tools/perf/trace/beauty/
      perf trace: Move open_flags beautifier to tools/perf/trace/beauty/
      perf trace: Move futex_op beautifier to tools/perf/trace/beauty/

Chris Phlipot (6):
      perf callchain: Fix incorrect ordering of entries
      perf tools: Refactor code to move call path handling out of thread-stack
      perf script: Enable db export to output sampled callchains
      perf script: Add call path id to exported sample in db export
      perf script: Expose usage of the callchain db export via the python api
      perf script: Update export-to-postgresql to support callchain export

 tools/perf/builtin-stat.c                          |   8 +
 tools/perf/builtin-trace.c                         | 165 ++-------------------
 tools/perf/scripts/python/export-to-postgresql.py  |  47 +++---
 tools/perf/trace/beauty/futex_op.c                 |  44 ++++++
 tools/perf/trace/beauty/open_flags.c               |  56 +++++++
 tools/perf/trace/beauty/signum.c                   |  53 +++++++
 tools/perf/util/Build                              |   1 +
 tools/perf/util/call-path.c                        | 122 +++++++++++++++
 tools/perf/util/call-path.h                        |  77 ++++++++++
 tools/perf/util/db-export.c                        |  85 +++++++++++
 tools/perf/util/db-export.h                        |   3 +
 tools/perf/util/machine.c                          |  56 +++++--
 .../util/scripting-engines/trace-event-python.c    |  36 ++++-
 tools/perf/util/thread-stack.c                     | 139 +----------------
 tools/perf/util/thread-stack.h                     |  31 ++--
 15 files changed, 575 insertions(+), 348 deletions(-)
 create mode 100644 tools/perf/trace/beauty/futex_op.c
 create mode 100644 tools/perf/trace/beauty/open_flags.c
 create mode 100644 tools/perf/trace/beauty/signum.c
 create mode 100644 tools/perf/util/call-path.c
 create mode 100644 tools/perf/util/call-path.h

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-04-14 12:32 Arnaldo Carvalho de Melo
@ 2016-04-14 13:32 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2016-04-14 13:32 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, He Kuang, Jiri Olsa, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Peter Zijlstra, pi3orama, Taeung Song, Wang Nan,
	Zefan Li


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit c5ab6ad7f627f031e2bbde575c7e6e27ea36da55:
> 
>   Merge tag 'perf-core-for-mingo-20160413' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-04-13 20:27:58 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160414
> 
> for you to fetch changes up to 860b8d4b3f893c97f905b978ecf62f48816dc5de:
> 
>   perf config: Make show_config() use perf_config_set (2016-04-14 09:15:47 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements:
> 
> User visible:
> 
> - Introduce 'perf record --timestamp-filename', to add a timestamp
>   at the end of the 'perf data' file. Will get added value when
>   the patch to make 'perf.data' file snapshots gets merged (Wang Nan)
> 
> - Fix display of variables present in both --config and --user in
>   'perf list' (Taeung Song)
> 
> Build fixes:
> 
> - Add seccomp and getradom beautifier related defines to fix
>   the build in older systems where those definitions are not
>   available (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
>       perf trace: Add seccomp beautifier related defines for older systems
>       perf trace: Add getrandom beautifier related defines for older systems
>       perf trace: Move mmap beautifiers to trace/beauty/ directory
>       perf trace: Move eventfd beautifiers to trace/beauty/ directory
> 
> Taeung Song (2):
>       perf config: Introduce perf_config_set class
>       perf config: Make show_config() use perf_config_set
> 
> Wang Nan (5):
>       perf ordered_events: Introduce reinit()
>       perf session: Make ordered_events reusable
>       perf data: Add perf_data_file__switch() helper
>       perf record: Turns auxtrace_snapshot_enable into 3 states
>       perf record: Add '--timestamp-filename' option to append timestamp to output file name
> 
>  tools/perf/builtin-config.c       |  39 +++++--
>  tools/perf/builtin-record.c       | 112 +++++++++++++++++---
>  tools/perf/builtin-trace.c        | 218 ++++----------------------------------
>  tools/perf/trace/beauty/eventfd.c |  38 +++++++
>  tools/perf/trace/beauty/mmap.c    | 158 +++++++++++++++++++++++++++
>  tools/perf/util/config.c          | 173 ++++++++++++++++++++++++++++++
>  tools/perf/util/config.h          |  26 +++++
>  tools/perf/util/data.c            |  41 +++++++
>  tools/perf/util/data.h            |  11 +-
>  tools/perf/util/ordered-events.c  |   9 ++
>  tools/perf/util/ordered-events.h  |   1 +
>  tools/perf/util/session.c         |   6 +-
>  12 files changed, 611 insertions(+), 221 deletions(-)
>  create mode 100644 tools/perf/trace/beauty/eventfd.c
>  create mode 100644 tools/perf/trace/beauty/mmap.c
>  create mode 100644 tools/perf/util/config.h

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-04-14 12:32 Arnaldo Carvalho de Melo
  2016-04-14 13:32 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-04-14 12:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, He Kuang, Jiri Olsa, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Peter Zijlstra, pi3orama, Taeung Song, Wang Nan,
	Zefan Li

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit c5ab6ad7f627f031e2bbde575c7e6e27ea36da55:

  Merge tag 'perf-core-for-mingo-20160413' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-04-13 20:27:58 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160414

for you to fetch changes up to 860b8d4b3f893c97f905b978ecf62f48816dc5de:

  perf config: Make show_config() use perf_config_set (2016-04-14 09:15:47 -0300)

----------------------------------------------------------------
perf/core improvements:

User visible:

- Introduce 'perf record --timestamp-filename', to add a timestamp
  at the end of the 'perf data' file. Will get added value when
  the patch to make 'perf.data' file snapshots gets merged (Wang Nan)

- Fix display of variables present in both --config and --user in
  'perf list' (Taeung Song)

Build fixes:

- Add seccomp and getradom beautifier related defines to fix
  the build in older systems where those definitions are not
  available (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf trace: Add seccomp beautifier related defines for older systems
      perf trace: Add getrandom beautifier related defines for older systems
      perf trace: Move mmap beautifiers to trace/beauty/ directory
      perf trace: Move eventfd beautifiers to trace/beauty/ directory

Taeung Song (2):
      perf config: Introduce perf_config_set class
      perf config: Make show_config() use perf_config_set

Wang Nan (5):
      perf ordered_events: Introduce reinit()
      perf session: Make ordered_events reusable
      perf data: Add perf_data_file__switch() helper
      perf record: Turns auxtrace_snapshot_enable into 3 states
      perf record: Add '--timestamp-filename' option to append timestamp to output file name

 tools/perf/builtin-config.c       |  39 +++++--
 tools/perf/builtin-record.c       | 112 +++++++++++++++++---
 tools/perf/builtin-trace.c        | 218 ++++----------------------------------
 tools/perf/trace/beauty/eventfd.c |  38 +++++++
 tools/perf/trace/beauty/mmap.c    | 158 +++++++++++++++++++++++++++
 tools/perf/util/config.c          | 173 ++++++++++++++++++++++++++++++
 tools/perf/util/config.h          |  26 +++++
 tools/perf/util/data.c            |  41 +++++++
 tools/perf/util/data.h            |  11 +-
 tools/perf/util/ordered-events.c  |   9 ++
 tools/perf/util/ordered-events.h  |   1 +
 tools/perf/util/session.c         |   6 +-
 12 files changed, 611 insertions(+), 221 deletions(-)
 create mode 100644 tools/perf/trace/beauty/eventfd.c
 create mode 100644 tools/perf/trace/beauty/mmap.c
 create mode 100644 tools/perf/util/config.h

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-04-13 14:43 Arnaldo Carvalho de Melo
@ 2016-04-13 18:28 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2016-04-13 18:28 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, David Ahern, Jiri Olsa,
	Milian Wolff, Namhyung Kim, Peter Zijlstra, Wang Nan,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 31d50c551e30923b86a1b5b420920dd1927fa63b:
> 
>   perf/x86/amd/uncore: Do not register a task ctx for uncore PMUs (2016-04-13 11:56:36 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160413
> 
> for you to fetch changes up to 59247e33ff494e3643cdff54b64bf72575052b76:
> 
>   perf trace: Do not accept --no-syscalls together with -e (2016-04-13 10:11:52 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Print callchains asked for events requested via 'perf trace --event' too:
>   (Arnaldo Carvalho de Melo)
> 
>   # trace -e nanosleep --call dwarf --event sched:sched_switch/call-graph=fp/ usleep 1
>    0.346 (0.005 ms): usleep/24428 nanosleep(rqtp: 0x7fffa15a0540) ...
>    0.346 (        ): sched:sched_switch:usleep:24428 [120] S ==> swapper/3:0 [120])
>                                     __schedule+0xfe200402 ([kernel.kallsyms])
>                                     schedule+0xfe200035 ([kernel.kallsyms])
>                                     do_nanosleep+0xfe20006f ([kernel.kallsyms])
>                                     hrtimer_nanosleep+0xfe2000dc ([kernel.kallsyms])
>                                     sys_nanosleep+0xfe20007a ([kernel.kallsyms])
>                                     do_syscall_64+0xfe200062 ([kernel.kallsyms])
>                                     return_from_SYSCALL_64+0xfe200000 ([kernel.kallsyms])
>                                     __nanosleep+0xffff005b8d602010 (/usr/lib64/libc-2.22.so)
>    0.400 (0.059 ms): usleep/24428  ... [continued]: nanosleep()) = 0
>                                     __nanosleep+0x10 (/usr/lib64/libc-2.22.so)
>                                     usleep+0x34 (/usr/lib64/libc-2.22.so)
>                                     main+0x1eb (/usr/bin/usleep)
>                                     __libc_start_main+0xf0 (/usr/lib64/libc-2.22.so)
>                                     _start+0x29 (/usr/bin/usleep)
> 
> - Allow requesting that some CPUs or PIDs be highlighted in 'perf sched map' (Jiri Olsa)
> 
> - Compact 'perf sched map' to show just CPUs with activity, improving the output
>   in high core count systems (Jiri Olsa)
> 
> - Fix segfault with 'perf trace --no-syscalls -e syscall-names' by bailing out
>   such request, doesn't make sense to ask for no syscalls and then specify which
>   ones should be printed (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (3):
>       perf trace: Support callchains for --event too
>       perf evsel: Move some methods from session.[ch] to evsel.[ch]
>       perf trace: Do not accept --no-syscalls together with -e
> 
> Jiri Olsa (8):
>       perf thread_map: Add has() method
>       perf cpu_map: Add has() method
>       perf sched: Add compact display option
>       perf sched: Use color_fprintf for output
>       perf thread_map: Make new_by_tid_str constructor public
>       perf sched map: Color given pids
>       perf sched map: Color given cpus
>       perf sched map: Display only given cpus
> 
>  tools/perf/Documentation/perf-sched.txt |  16 +++
>  tools/perf/builtin-sched.c              | 198 ++++++++++++++++++++++++++++++--
>  tools/perf/builtin-script.c             |  14 +--
>  tools/perf/builtin-trace.c              |  48 +++++---
>  tools/perf/util/cpumap.c                |  12 ++
>  tools/perf/util/cpumap.h                |   2 +
>  tools/perf/util/evsel.c                 | 131 +++++++++++++++++++++
>  tools/perf/util/evsel.h                 |  13 +++
>  tools/perf/util/session.c               | 130 ---------------------
>  tools/perf/util/session.h               |  13 ---
>  tools/perf/util/thread_map.c            |  14 ++-
>  tools/perf/util/thread_map.h            |   3 +
>  12 files changed, 416 insertions(+), 178 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-04-13 14:43 Arnaldo Carvalho de Melo
  2016-04-13 18:28 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-04-13 14:43 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Milian Wolff, Namhyung Kim,
	Peter Zijlstra, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 31d50c551e30923b86a1b5b420920dd1927fa63b:

  perf/x86/amd/uncore: Do not register a task ctx for uncore PMUs (2016-04-13 11:56:36 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160413

for you to fetch changes up to 59247e33ff494e3643cdff54b64bf72575052b76:

  perf trace: Do not accept --no-syscalls together with -e (2016-04-13 10:11:52 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Print callchains asked for events requested via 'perf trace --event' too:
  (Arnaldo Carvalho de Melo)

  # trace -e nanosleep --call dwarf --event sched:sched_switch/call-graph=fp/ usleep 1
   0.346 (0.005 ms): usleep/24428 nanosleep(rqtp: 0x7fffa15a0540) ...
   0.346 (        ): sched:sched_switch:usleep:24428 [120] S ==> swapper/3:0 [120])
                                    __schedule+0xfe200402 ([kernel.kallsyms])
                                    schedule+0xfe200035 ([kernel.kallsyms])
                                    do_nanosleep+0xfe20006f ([kernel.kallsyms])
                                    hrtimer_nanosleep+0xfe2000dc ([kernel.kallsyms])
                                    sys_nanosleep+0xfe20007a ([kernel.kallsyms])
                                    do_syscall_64+0xfe200062 ([kernel.kallsyms])
                                    return_from_SYSCALL_64+0xfe200000 ([kernel.kallsyms])
                                    __nanosleep+0xffff005b8d602010 (/usr/lib64/libc-2.22.so)
   0.400 (0.059 ms): usleep/24428  ... [continued]: nanosleep()) = 0
                                    __nanosleep+0x10 (/usr/lib64/libc-2.22.so)
                                    usleep+0x34 (/usr/lib64/libc-2.22.so)
                                    main+0x1eb (/usr/bin/usleep)
                                    __libc_start_main+0xf0 (/usr/lib64/libc-2.22.so)
                                    _start+0x29 (/usr/bin/usleep)

- Allow requesting that some CPUs or PIDs be highlighted in 'perf sched map' (Jiri Olsa)

- Compact 'perf sched map' to show just CPUs with activity, improving the output
  in high core count systems (Jiri Olsa)

- Fix segfault with 'perf trace --no-syscalls -e syscall-names' by bailing out
  such request, doesn't make sense to ask for no syscalls and then specify which
  ones should be printed (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
      perf trace: Support callchains for --event too
      perf evsel: Move some methods from session.[ch] to evsel.[ch]
      perf trace: Do not accept --no-syscalls together with -e

Jiri Olsa (8):
      perf thread_map: Add has() method
      perf cpu_map: Add has() method
      perf sched: Add compact display option
      perf sched: Use color_fprintf for output
      perf thread_map: Make new_by_tid_str constructor public
      perf sched map: Color given pids
      perf sched map: Color given cpus
      perf sched map: Display only given cpus

 tools/perf/Documentation/perf-sched.txt |  16 +++
 tools/perf/builtin-sched.c              | 198 ++++++++++++++++++++++++++++++--
 tools/perf/builtin-script.c             |  14 +--
 tools/perf/builtin-trace.c              |  48 +++++---
 tools/perf/util/cpumap.c                |  12 ++
 tools/perf/util/cpumap.h                |   2 +
 tools/perf/util/evsel.c                 | 131 +++++++++++++++++++++
 tools/perf/util/evsel.h                 |  13 +++
 tools/perf/util/session.c               | 130 ---------------------
 tools/perf/util/session.h               |  13 ---
 tools/perf/util/thread_map.c            |  14 ++-
 tools/perf/util/thread_map.h            |   3 +
 12 files changed, 416 insertions(+), 178 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-03-29 23:41 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-03-29 23:41 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Clark Williams, David Ahern, Dima Kogan, Jiri Olsa,
	Namhyung Kim, Peter Zijlstra, Stephane Eranian, Taeung Song,
	Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, this is on top of my previously submitted
acme/perf/urgent, so that we can test Andi's udis86 work on 'perf script'.

	This is now test built in several more docker images, including
minimal feature cross-compiler builds ones:

  # dm
  minimal-debian-experimental-x-mips64: Ok
  minimal-debian-experimental-x-mips64el: Ok
  minimal-debian-experimental-x-mipsel: Ok
  minimal-ubuntu-x-arm: Ok
  minimal-ubuntu-x-arm64: Ok
  minimal-ubuntu-x-ppc64: Ok
  minimal-ubuntu-x-ppc64el: Ok
  alldeps-debian: Ok
  alldeps-mageia: Ok
  alldeps-rhel7: Ok
  alldeps-centos: Ok
  alldeps-opensuse: Ok
  alldeps-ubuntu: Ok
  #

	Those x-arch cross docker images already allow me to avoid introducing
bugs like the powerpc one Sukadev spotted.

	I need to figure out how to install more devel packages for things like
libelf-devel:arch in debian/ubuntu, I almost got there with 'dpkg
--add-architecture arch', but I still need to figure out  how to find the list
of multilib enabled devel packages to allow me to have devel packages for other
arches than the native one...

- Arnaldo

The following changes since commit 3ea223adcb0c5893a6dc8ed3a84dce264cbb61d6:

  perf tools: Add missing initialization of perf_sample.cpumode in synthesized samples (2016-03-29 20:03:56 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160329

for you to fetch changes up to 7c2927ccf0daf630cf66570f061c860c73df23c7:

  perf script: Add support for printing assembler (2016-03-29 20:15:16 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Add support for printing assembler using the udis86 library (Andi Kleen)

  E.g.:

  # perf record -e intel_pt// true
  # perf script -F ip,sym,asm
  <SNIP>
  ffffffff8106399d native_write_msr_safe
 	ret
  ffffffff81013728 pt_config
 	ret $0x5b81
  ffffffff810139e0 pt_event_start
 	ret
  ffffffff810144c3 pt_event_add
 	jnz 0x81014489
  ffffffff81014491 pt_event_add
 	ret
  ffffffff8119df62 event_sched_in.isra.93
 	jz 0x8119df69
  ffffffff8119df78 event_sched_in.isra.93
 	jz event_sched_in.isra.93+506
  ffffffff8119e069 event_sched_in.isra.93
 	call 0x81c29600
  <SNIP>

- Add support for skipping itrace instructions, useful to fast forward
  processor trace (Intel PT, BTS) to right after initialization code at the start
  of a workload (Andi Kleen)

- Add support for backtraces in perl 'perf script's (Dima Kogan)

- Add -U/-K (--all-user/--all-kernel) options to 'perf mem' (Jiri Olsa)

- Make -f/--force option documentation consistent across tools (Jiri Olsa)

Infrastructure:

- Add 'perf test' to check for event times (Jiri Olsa)

- 'perf config' cleanups (Taeung Song)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (3):
      perf tools: Add support for skipping itrace instructions
      perf tools: Add probing for udev86 library
      perf script: Add support for printing assembler

Dima Kogan (1):
      perf script perl: Perl scripts now get a backtrace, like the python ones

Jiri Olsa (4):
      perf mem: Add -U/-K (--all-user/--all-kernel) options
      perf tools: Make hists__collapse_insert_entry static
      perf tools: Make -f/--force option documentation consistent across tools
      perf tests: Add test to check for event times

Taeung Song (3):
      perf config: Remove duplicated set_buildid_dir calls
      perf config: Rework buildid_dir_command_config to perf_buildid_config
      perf config: Rename 'v' to 'home' in set_buildid_dir()

 tools/build/Makefile.feature                       |   6 +-
 tools/build/feature/Makefile                       |   8 +-
 tools/build/feature/test-all.c                     |   5 +
 tools/build/feature/test-udis86.c                  |   8 +
 tools/perf/Documentation/intel-pt.txt              |   7 +
 tools/perf/Documentation/itrace.txt                |   8 +
 tools/perf/Documentation/perf-annotate.txt         |   2 +-
 tools/perf/Documentation/perf-diff.txt             |   2 +-
 tools/perf/Documentation/perf-mem.txt              |   8 +
 tools/perf/Documentation/perf-report.txt           |   2 +-
 tools/perf/Documentation/perf-script.txt           |   8 +-
 tools/perf/builtin-mem.c                           |  11 +-
 tools/perf/builtin-script.c                        | 107 +++++++++-
 tools/perf/config/Makefile                         |   5 +
 tools/perf/perf.c                                  |   3 +-
 tools/perf/tests/Build                             |   1 +
 tools/perf/tests/builtin-test.c                    |   4 +
 tools/perf/tests/event-times.c                     | 236 +++++++++++++++++++++
 tools/perf/tests/tests.h                           |   1 +
 tools/perf/util/auxtrace.c                         |   7 +
 tools/perf/util/auxtrace.h                         |   2 +
 tools/perf/util/config.c                           |  57 ++---
 tools/perf/util/hist.c                             |   5 +-
 tools/perf/util/hist.h                             |   2 -
 tools/perf/util/intel-bts.c                        |   5 +
 tools/perf/util/intel-pt.c                         |  22 +-
 .../perf/util/scripting-engines/trace-event-perl.c | 114 +++++++++-
 27 files changed, 581 insertions(+), 65 deletions(-)
 create mode 100644 tools/build/feature/test-udis86.c
 create mode 100644 tools/perf/tests/event-times.c

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-03-03 14:38   ` Arnaldo Carvalho de Melo
@ 2016-03-05  8:08     ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2016-03-05  8:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Alexei Starovoitov, Andi Kleen, Brendan Gregg,
	David Ahern, He Kuang, Jeff Bastian, Jeremie Galarneau,
	Jiri Olsa, Josh Boyer, Lai Jiangshan, Li Zefan, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, pi3orama, Stephane Eranian,
	Steven Rostedt, Taeung Song, Thomas Gleixner, Wang Nan,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Em Thu, Mar 03, 2016 at 09:21:30AM +0100, Ingo Molnar escreveu:
>  
> > Hm, there's a 'perf stat' regression that I can see:
> >
> > Before:
> >                                                   #    1.59  stalled cycles per insn
> >      1,818,488,088      branches                  #  151.667 M/sec                  
> > 
> > After:
> > 
> >  triton:~/tip> perf stat -a sleep 1
> > 
> >           24166678      branches                  #    2.016 M/sec                  
> > 
> > ... see how the numbers became human-unreadable, losing the big-number separator?
> > 
> > I suspect it's due to the following commit:
> > 
> >   fa184776ac27 perf stat: Check existence of frontend/backed stalled cycles
> 
> Ok, I inserted Jiri's patch fixing the problem just before the commit
> (fa184776ac27) that triggers it, so that we don't break bisection for
> human-readable numbers in 'perf stat'.
> 
> Its all in a new signed tag, that combines the two outstanding ones
> (perf-core-for-mingo-20160229 + perf-core-for-mingo-20160302), please
> consider pulling.
> 
> - Arnaldo
> 
> The following changes since commit 675965b00d734c985e4285f5bec7e524d15fc4e1:
> 
>   perf: Export perf_event_sysfs_show() (2016-02-29 09:35:27 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160303
> 
> for you to fetch changes up to fb4605ba47e772ff9d62d1d54218a832ec8b3e1d:
> 
>   perf stat: Check for frontend stalled for metrics (2016-03-03 11:10:40 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Check existence of frontend/backed stalled cycles in 'perf stat' (Andi Kleen)
> 
> - Implement CSV metrics output in 'perf stat' (Andi Kleen)
> 
> - Support metrics in 'perf stat' --per-core/socket mode (Andi Kleen)
> 
> - Avoid installing .o files from tools/lib/ into the python extension (Jiri Olsa)
> 
> - Rename the tracepoint '/format' field that carries the syscall ID from 'nr',
>   that is also the name of some syscalls arguments, to "__syscall_nr", to
>   avoid having multiple fields with the same name, that was breaking the
>   python script skeleton generator from perf.data files (Taeung Song)
> 
> - Support converting data from bpf events in 'perf data' (Wang Nan)
> 
> - Fix segfault in 'perf test' hists related entries (Arnaldo Carvalho de Melo)
> 
> - Fix output of %llu for 64 bit values read on 32 bit machines in libtraceevent (Steven Rostedt)
> 
> - Fix time stamp rounding issue in libtraceevent (Chaos.Chen)
> 
> Infrastructure:
> 
> - Fix setlocale() breakage in the pmu parsing code (Jiri Olsa)
> 
> - Split libtraceevent's pevent_print_event() (Steven Rostedt)
> 
> - Librarize some 'perf record' bits to allow handling multiple perf.data
>   files per session (Wang Nan)
> 
> - Ensure return non-zero rc when mmap fails in 'perf record' (Wang Nan)
> 
> - Fix double free on 'command_line' in a error path in 'perf script' (Colin Ian King)
> 
> - Initialize struct sigaction 'sa_flags' field in a 'perf test' entry (Colin Ian King)
> 
> - Fix various build warnings in turbostat, detected with gcc6 (Colin Ian King)
> 
> - Use .s extension for preprocessed assembler code (Masahiro Yamada)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (4):
>       perf stat: Check existence of frontend/backed stalled cycles
>       perf stat: Implement CSV metrics output
>       perf stat: Support metrics in --per-core/socket mode
>       perf stat: Check for frontend stalled for metrics
> 
> Arnaldo Carvalho de Melo (1):
>       perf test: Fix hists related entries
> 
> Chaos.Chen (1):
>       tools lib traceevent: Fix time stamp rounding issue
> 
> Colin Ian King (3):
>       perf script: Fix double free on command_line
>       perf tests: Initialize sa.sa_flags
>       tools/power turbostat: fix various build warnings
> 
> Jiri Olsa (2):
>       perf tools: Fix python extension build
>       perf tools: Fix locale handling in pmu parsing
> 
> Masahiro Yamada (1):
>       tools build: Use .s extension for preprocessed assembler code
> 
> Steven Rostedt (1):
>       tools lib traceevent: Split pevent_print_event() into specific functionality functions
> 
> Steven Rostedt (Red Hat) (2):
>       tools lib traceevent: Set int_array fields to NULL if freeing from error
>       tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines
> 
> Taeung Song (2):
>       perf trace: Check and discard not only 'nr' but also '__syscall_nr'
>       tracing/syscalls: Rename "/format" tracepoint field name "nr" to "__syscall_nr:
> 
> Wang Nan (6):
>       perf data: Support converting data from bpf_perf_event_output()
>       perf data: Explicitly set byte order for integer types
>       perf record: Use WARN_ONCE to replace 'if' condition
>       perf record: Extract synthesize code to record__synthesize()
>       perf record: Introduce record__finish_output() to finish a perf.data
>       perf record: Ensure return non-zero rc when mmap fail
> 
>  kernel/trace/trace_syscalls.c                      |  16 +-
>  tools/build/Makefile.build                         |   2 +-
>  tools/lib/traceevent/event-parse.c                 | 146 ++++++++++++++----
>  tools/lib/traceevent/event-parse.h                 |  13 ++
>  tools/perf/arch/x86/tests/rdpmc.c                  |   1 +
>  tools/perf/builtin-record.c                        | 168 ++++++++++++---------
>  tools/perf/builtin-stat.c                          | 158 +++++++++++++++++--
>  tools/perf/builtin-trace.c                         |   8 +-
>  tools/perf/util/data-convert-bt.c                  | 118 ++++++++++++++-
>  tools/perf/util/pmu.c                              |  13 ++
>  .../util/scripting-engines/trace-event-python.c    |   4 +-
>  tools/perf/util/setup.py                           |   4 +
>  tools/perf/util/sort.c                             |  37 +++--
>  tools/perf/util/stat-shadow.c                      |  18 ++-
>  tools/perf/util/stat.h                             |   1 +
>  tools/power/x86/turbostat/turbostat.c              |   8 +-
>  16 files changed, 566 insertions(+), 149 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-03-03  8:21 ` Ingo Molnar
  2016-03-03  9:15   ` Jiri Olsa
@ 2016-03-03 14:38   ` Arnaldo Carvalho de Melo
  2016-03-05  8:08     ` Ingo Molnar
  1 sibling, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-03-03 14:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Alexei Starovoitov, Andi Kleen, Brendan Gregg,
	David Ahern, He Kuang, Jeff Bastian, Jeremie Galarneau,
	Jiri Olsa, Josh Boyer, Lai Jiangshan, Li Zefan, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, pi3orama, Stephane Eranian,
	Steven Rostedt, Taeung Song, Thomas Gleixner, Wang Nan,
	Arnaldo Carvalho de Melo

Em Thu, Mar 03, 2016 at 09:21:30AM +0100, Ingo Molnar escreveu:
 
> Hm, there's a 'perf stat' regression that I can see:
>
> Before:
>                                                   #    1.59  stalled cycles per insn
>      1,818,488,088      branches                  #  151.667 M/sec                  
> 
> After:
> 
>  triton:~/tip> perf stat -a sleep 1
> 
>           24166678      branches                  #    2.016 M/sec                  
> 
> ... see how the numbers became human-unreadable, losing the big-number separator?
> 
> I suspect it's due to the following commit:
> 
>   fa184776ac27 perf stat: Check existence of frontend/backed stalled cycles

Ok, I inserted Jiri's patch fixing the problem just before the commit
(fa184776ac27) that triggers it, so that we don't break bisection for
human-readable numbers in 'perf stat'.

Its all in a new signed tag, that combines the two outstanding ones
(perf-core-for-mingo-20160229 + perf-core-for-mingo-20160302), please
consider pulling.

- Arnaldo

The following changes since commit 675965b00d734c985e4285f5bec7e524d15fc4e1:

  perf: Export perf_event_sysfs_show() (2016-02-29 09:35:27 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160303

for you to fetch changes up to fb4605ba47e772ff9d62d1d54218a832ec8b3e1d:

  perf stat: Check for frontend stalled for metrics (2016-03-03 11:10:40 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Check existence of frontend/backed stalled cycles in 'perf stat' (Andi Kleen)

- Implement CSV metrics output in 'perf stat' (Andi Kleen)

- Support metrics in 'perf stat' --per-core/socket mode (Andi Kleen)

- Avoid installing .o files from tools/lib/ into the python extension (Jiri Olsa)

- Rename the tracepoint '/format' field that carries the syscall ID from 'nr',
  that is also the name of some syscalls arguments, to "__syscall_nr", to
  avoid having multiple fields with the same name, that was breaking the
  python script skeleton generator from perf.data files (Taeung Song)

- Support converting data from bpf events in 'perf data' (Wang Nan)

- Fix segfault in 'perf test' hists related entries (Arnaldo Carvalho de Melo)

- Fix output of %llu for 64 bit values read on 32 bit machines in libtraceevent (Steven Rostedt)

- Fix time stamp rounding issue in libtraceevent (Chaos.Chen)

Infrastructure:

- Fix setlocale() breakage in the pmu parsing code (Jiri Olsa)

- Split libtraceevent's pevent_print_event() (Steven Rostedt)

- Librarize some 'perf record' bits to allow handling multiple perf.data
  files per session (Wang Nan)

- Ensure return non-zero rc when mmap fails in 'perf record' (Wang Nan)

- Fix double free on 'command_line' in a error path in 'perf script' (Colin Ian King)

- Initialize struct sigaction 'sa_flags' field in a 'perf test' entry (Colin Ian King)

- Fix various build warnings in turbostat, detected with gcc6 (Colin Ian King)

- Use .s extension for preprocessed assembler code (Masahiro Yamada)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (4):
      perf stat: Check existence of frontend/backed stalled cycles
      perf stat: Implement CSV metrics output
      perf stat: Support metrics in --per-core/socket mode
      perf stat: Check for frontend stalled for metrics

Arnaldo Carvalho de Melo (1):
      perf test: Fix hists related entries

Chaos.Chen (1):
      tools lib traceevent: Fix time stamp rounding issue

Colin Ian King (3):
      perf script: Fix double free on command_line
      perf tests: Initialize sa.sa_flags
      tools/power turbostat: fix various build warnings

Jiri Olsa (2):
      perf tools: Fix python extension build
      perf tools: Fix locale handling in pmu parsing

Masahiro Yamada (1):
      tools build: Use .s extension for preprocessed assembler code

Steven Rostedt (1):
      tools lib traceevent: Split pevent_print_event() into specific functionality functions

Steven Rostedt (Red Hat) (2):
      tools lib traceevent: Set int_array fields to NULL if freeing from error
      tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines

Taeung Song (2):
      perf trace: Check and discard not only 'nr' but also '__syscall_nr'
      tracing/syscalls: Rename "/format" tracepoint field name "nr" to "__syscall_nr:

Wang Nan (6):
      perf data: Support converting data from bpf_perf_event_output()
      perf data: Explicitly set byte order for integer types
      perf record: Use WARN_ONCE to replace 'if' condition
      perf record: Extract synthesize code to record__synthesize()
      perf record: Introduce record__finish_output() to finish a perf.data
      perf record: Ensure return non-zero rc when mmap fail

 kernel/trace/trace_syscalls.c                      |  16 +-
 tools/build/Makefile.build                         |   2 +-
 tools/lib/traceevent/event-parse.c                 | 146 ++++++++++++++----
 tools/lib/traceevent/event-parse.h                 |  13 ++
 tools/perf/arch/x86/tests/rdpmc.c                  |   1 +
 tools/perf/builtin-record.c                        | 168 ++++++++++++---------
 tools/perf/builtin-stat.c                          | 158 +++++++++++++++++--
 tools/perf/builtin-trace.c                         |   8 +-
 tools/perf/util/data-convert-bt.c                  | 118 ++++++++++++++-
 tools/perf/util/pmu.c                              |  13 ++
 .../util/scripting-engines/trace-event-python.c    |   4 +-
 tools/perf/util/setup.py                           |   4 +
 tools/perf/util/sort.c                             |  37 +++--
 tools/perf/util/stat-shadow.c                      |  18 ++-
 tools/perf/util/stat.h                             |   1 +
 tools/power/x86/turbostat/turbostat.c              |   8 +-
 16 files changed, 566 insertions(+), 149 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-03-03  8:21 ` Ingo Molnar
@ 2016-03-03  9:15   ` Jiri Olsa
  2016-03-03 14:38   ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 76+ messages in thread
From: Jiri Olsa @ 2016-03-03  9:15 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Alexei Starovoitov,
	Andi Kleen, Brendan Gregg, David Ahern, He Kuang, Jeff Bastian,
	Jeremie Galarneau, Jiri Olsa, Josh Boyer, Lai Jiangshan,
	Li Zefan, Masami Hiramatsu, Namhyung Kim, Peter Zijlstra,
	pi3orama, Stephane Eranian, Steven Rostedt, Taeung Song,
	Thomas Gleixner, Wang Nan, Arnaldo Carvalho de Melo

On Thu, Mar 03, 2016 at 09:21:30AM +0100, Ingo Molnar wrote:
> 
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> 
> > Hi Ingo,
> > 
> > 	Please consider pulling,
> > 
> > - Arnaldo
> > 
> > The following changes since commit 675965b00d734c985e4285f5bec7e524d15fc4e1:
> > 
> >   perf: Export perf_event_sysfs_show() (2016-02-29 09:35:27 +0100)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160229
> > 
> > for you to fetch changes up to 575a02e00b11eecbbabcb1eb22eab4c68e91ae77:
> > 
> >   perf record: Ensure return non-zero rc when mmap fail (2016-02-29 12:44:15 -0300)
> > 
> > ----------------------------------------------------------------
> > perf/core improvements and fixes:
> > 
> > User visible:
> > 
> > - Check existence of frontend/backed stalled cycles in 'perf stat' (Andi Kleen)
> > 
> > - Avoid installing .o files from tools/lib/ into the python extension (Jiri Olsa)
> > 
> > - Rename the tracepoint '/format' field that carries the syscall ID from 'nr',
> >   that is also the name of some syscalls arguments, to "__syscall_nr", to
> >   avoid having multiple fields with the same name, that was breaking the
> >   python script skeleton generator from perf.data files (Taeung Song)
> > 
> > - Support converting data from bpf events in 'perf data' (Wang Nan)
> > 
> > Infrastructure:
> > 
> > - Split libtraceevent's pevent_print_event() (Steven Rostedt)
> > 
> > - Librarize some 'perf record' bits to allow handling multiple perf.data
> >   files per session (Wang Nan)
> > 
> > - Ensure return non-zero rc when mmap fail in 'perf record' (Wang Nan)
> > 
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > ----------------------------------------------------------------
> > Andi Kleen (1):
> >       perf stat: Check existence of frontend/backed stalled cycles
> 
> > 
> > Jiri Olsa (1):
> >       perf tools: Fix python extension build
> > 
> > Steven Rostedt (1):
> >       tools lib traceevent: Split pevent_print_event() into specific functionality functions
> > 
> > Taeung Song (2):
> >       perf trace: Check and discard not only 'nr' but also '__syscall_nr'
> >       tracing/syscalls: Rename "/format" tracepoint field name "nr" to "__syscall_nr:
> > 
> > Wang Nan (6):
> >       perf data: Support converting data from bpf_perf_event_output()
> >       perf data: Explicitly set byte order for integer types
> >       perf record: Use WARN_ONCE to replace 'if' condition
> >       perf record: Extract synthesize code to record__synthesize()
> >       perf record: Introduce record__finish_output() to finish a perf.data
> >       perf record: Ensure return non-zero rc when mmap fail
> > 
> >  kernel/trace/trace_syscalls.c      |  16 ++--
> >  tools/lib/traceevent/event-parse.c | 136 +++++++++++++++++++++++-------
> >  tools/lib/traceevent/event-parse.h |  13 +++
> >  tools/perf/builtin-record.c        | 168 ++++++++++++++++++++++---------------
> >  tools/perf/builtin-stat.c          |  22 ++++-
> >  tools/perf/builtin-trace.c         |   8 +-
> >  tools/perf/util/data-convert-bt.c  | 118 +++++++++++++++++++++++++-
> >  tools/perf/util/setup.py           |   4 +
> >  8 files changed, 372 insertions(+), 113 deletions(-)
> 
> Hm, there's a 'perf stat' regression that I can see:
> 
> Before:
> 
>  triton:~/tip> perf stat -a sleep 1
> 
>  Performance counter stats for 'system wide':
> 
>       11990.023100      task-clock (msec)         #   11.981 CPUs utilized          
>              8,802      context-switches          #    0.734 K/sec                  
>                543      cpu-migrations            #    0.045 K/sec                  
>             97,375      page-faults               #    0.008 M/sec                  
>      9,854,385,894      cycles                    #    0.822 GHz                    
>     15,274,841,152      stalled-cycles-frontend   #  155.01% frontend cycles idle   
>    <not supported>      stalled-cycles-backend   
>      9,634,486,137      instructions              #    0.98  insn per cycle         
>                                                   #    1.59  stalled cycles per insn
>      1,818,488,088      branches                  #  151.667 M/sec                  
>         46,365,120      branch-misses             #    2.55% of all branches        
> 
>        1.000741599 seconds time elapsed
> 
> After:
> 
>  triton:~/tip> perf stat -a sleep 1
> 
>  Performance counter stats for 'system wide':
> 
>       11989.280397      task-clock (msec)         #   11.981 CPUs utilized          
>               1299      context-switches          #    0.108 K/sec                  
>                  6      cpu-migrations            #    0.001 K/sec                  
>                 70      page-faults               #    0.006 K/sec                  
>          127008602      cycles                    #    0.011 GHz                    
>          279538533      stalled-cycles-frontend   #  220.09% frontend cycles idle   
>          119213269      instructions              #    0.94  insn per cycle         
>                                                   #    2.34  stalled cycles per insn
>           24166678      branches                  #    2.016 M/sec                  
>             505681      branch-misses             #    2.09% of all branches        
> 
>        1.000684278 seconds time elapsed
> 
> 
> ... see how the numbers became human-unreadable, losing the big-number separator?
> 
> I suspect it's due to the following commit:
> 
>   fa184776ac27 perf stat: Check existence of frontend/backed stalled cycles

yea, it used the pmu parsing which screwes locales,
following patch fixed that for me..

jirka


---
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index ce61f79dbaae..d8cd038baed2 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -124,6 +124,17 @@ static int perf_pmu__parse_scale(struct perf_pmu_alias *alias, char *dir, char *
 	lc = setlocale(LC_NUMERIC, NULL);
 
 	/*
+	 * The lc string may be allocated in static storage,
+	 * so get a dynamic copy to make it survive setlocale
+	 * call below.
+	 */
+	lc = strdup(lc);
+	if (!lc) {
+		ret = -ENOMEM;
+		goto error;
+	}
+
+	/*
 	 * force to C locale to ensure kernel
 	 * scale string is converted correctly.
 	 * kernel uses default C locale.
@@ -135,6 +146,8 @@ static int perf_pmu__parse_scale(struct perf_pmu_alias *alias, char *dir, char *
 	/* restore locale */
 	setlocale(LC_NUMERIC, lc);
 
+	free((char *) lc);
+
 	ret = 0;
 error:
 	close(fd);

^ permalink raw reply related	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-02-29 19:21 Arnaldo Carvalho de Melo
@ 2016-03-03  8:21 ` Ingo Molnar
  2016-03-03  9:15   ` Jiri Olsa
  2016-03-03 14:38   ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 76+ messages in thread
From: Ingo Molnar @ 2016-03-03  8:21 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Alexei Starovoitov, Andi Kleen, Brendan Gregg,
	David Ahern, He Kuang, Jeff Bastian, Jeremie Galarneau,
	Jiri Olsa, Josh Boyer, Lai Jiangshan, Li Zefan, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, pi3orama, Stephane Eranian,
	Steven Rostedt, Taeung Song, Thomas Gleixner, Wang Nan,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 675965b00d734c985e4285f5bec7e524d15fc4e1:
> 
>   perf: Export perf_event_sysfs_show() (2016-02-29 09:35:27 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160229
> 
> for you to fetch changes up to 575a02e00b11eecbbabcb1eb22eab4c68e91ae77:
> 
>   perf record: Ensure return non-zero rc when mmap fail (2016-02-29 12:44:15 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Check existence of frontend/backed stalled cycles in 'perf stat' (Andi Kleen)
> 
> - Avoid installing .o files from tools/lib/ into the python extension (Jiri Olsa)
> 
> - Rename the tracepoint '/format' field that carries the syscall ID from 'nr',
>   that is also the name of some syscalls arguments, to "__syscall_nr", to
>   avoid having multiple fields with the same name, that was breaking the
>   python script skeleton generator from perf.data files (Taeung Song)
> 
> - Support converting data from bpf events in 'perf data' (Wang Nan)
> 
> Infrastructure:
> 
> - Split libtraceevent's pevent_print_event() (Steven Rostedt)
> 
> - Librarize some 'perf record' bits to allow handling multiple perf.data
>   files per session (Wang Nan)
> 
> - Ensure return non-zero rc when mmap fail in 'perf record' (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf stat: Check existence of frontend/backed stalled cycles

> 
> Jiri Olsa (1):
>       perf tools: Fix python extension build
> 
> Steven Rostedt (1):
>       tools lib traceevent: Split pevent_print_event() into specific functionality functions
> 
> Taeung Song (2):
>       perf trace: Check and discard not only 'nr' but also '__syscall_nr'
>       tracing/syscalls: Rename "/format" tracepoint field name "nr" to "__syscall_nr:
> 
> Wang Nan (6):
>       perf data: Support converting data from bpf_perf_event_output()
>       perf data: Explicitly set byte order for integer types
>       perf record: Use WARN_ONCE to replace 'if' condition
>       perf record: Extract synthesize code to record__synthesize()
>       perf record: Introduce record__finish_output() to finish a perf.data
>       perf record: Ensure return non-zero rc when mmap fail
> 
>  kernel/trace/trace_syscalls.c      |  16 ++--
>  tools/lib/traceevent/event-parse.c | 136 +++++++++++++++++++++++-------
>  tools/lib/traceevent/event-parse.h |  13 +++
>  tools/perf/builtin-record.c        | 168 ++++++++++++++++++++++---------------
>  tools/perf/builtin-stat.c          |  22 ++++-
>  tools/perf/builtin-trace.c         |   8 +-
>  tools/perf/util/data-convert-bt.c  | 118 +++++++++++++++++++++++++-
>  tools/perf/util/setup.py           |   4 +
>  8 files changed, 372 insertions(+), 113 deletions(-)

Hm, there's a 'perf stat' regression that I can see:

Before:

 triton:~/tip> perf stat -a sleep 1

 Performance counter stats for 'system wide':

      11990.023100      task-clock (msec)         #   11.981 CPUs utilized          
             8,802      context-switches          #    0.734 K/sec                  
               543      cpu-migrations            #    0.045 K/sec                  
            97,375      page-faults               #    0.008 M/sec                  
     9,854,385,894      cycles                    #    0.822 GHz                    
    15,274,841,152      stalled-cycles-frontend   #  155.01% frontend cycles idle   
   <not supported>      stalled-cycles-backend   
     9,634,486,137      instructions              #    0.98  insn per cycle         
                                                  #    1.59  stalled cycles per insn
     1,818,488,088      branches                  #  151.667 M/sec                  
        46,365,120      branch-misses             #    2.55% of all branches        

       1.000741599 seconds time elapsed

After:

 triton:~/tip> perf stat -a sleep 1

 Performance counter stats for 'system wide':

      11989.280397      task-clock (msec)         #   11.981 CPUs utilized          
              1299      context-switches          #    0.108 K/sec                  
                 6      cpu-migrations            #    0.001 K/sec                  
                70      page-faults               #    0.006 K/sec                  
         127008602      cycles                    #    0.011 GHz                    
         279538533      stalled-cycles-frontend   #  220.09% frontend cycles idle   
         119213269      instructions              #    0.94  insn per cycle         
                                                  #    2.34  stalled cycles per insn
          24166678      branches                  #    2.016 M/sec                  
            505681      branch-misses             #    2.09% of all branches        

       1.000684278 seconds time elapsed


... see how the numbers became human-unreadable, losing the big-number separator?

I suspect it's due to the following commit:

  fa184776ac27 perf stat: Check existence of frontend/backed stalled cycles

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-03-02 22:16 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-03-02 22:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Aaro Koskinen,
	Adrian Hunter, Andi Kleen, Andrew Morton, Chaos . Chen,
	Colin Ian King, David Ahern, He Kuang, Javi Merino, Jiri Olsa,
	Lukas Wunner, Masahiro Yamada, Matt Fleming, Namhyung Kim,
	Peter Zijlstra, Steven Rostedt, Wang Nan,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, this is on top of the outstanding
perf-core-for-mingo-20160229 signed tag.

- Arnaldo

The following changes since commit 1d6c9407d45dd622b277ca9f725da3cc9e95b5de:

  perf trace: Print content of bpf-output event (2016-02-26 19:57:07 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160302

for you to fetch changes up to 575197b405c45959ca2f71da8c65b6f8d9693140:

  perf stat: Check for frontend stalled for metrics (2016-03-02 11:27:00 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Implement CSV metrics output in 'perf stat' (Andi Kleen)

- Support metrics in 'perf stat' --per-core/socket mode (Andi Kleen)

- Check for frontend stalled for metrics (Andi Kleen)

- Fix segfault in 'perf test' hists related entries (Arnaldo Carvalho de Melo)

- Fix output of %llu for 64 bit values read on 32 bit machines in libtraceevent (Steven Rostedt)

- Fix time stamp rounding issue in libtraceevent (Chaos.Chen)

Infrastructure:

- Fix double free on 'command_line' in a error path in 'perf script' (Colin Ian King)

- Initialize struct sigaction 'sa_flags' field in a 'perf test' entri (Colin Ian King)

- Fix various build warnings in turbostat, detected with gcc6 (Colin Ian King)

- Use .s extension for preprocessed assembler code (Masahiro Yamada)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------

The following changes since commit 575a02e00b11eecbbabcb1eb22eab4c68e91ae77:

  perf record: Ensure return non-zero rc when mmap fail (2016-02-29 12:44:15 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160302

for you to fetch changes up to 575197b405c45959ca2f71da8c65b6f8d9693140:

  perf stat: Check for frontend stalled for metrics (2016-03-02 11:27:00 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Implement CSV metrics output in 'perf stat' (Andi Kleen)

- Support metrics in 'perf stat' --per-core/socket mode (Andi Kleen)

- Check for frontend stalled for metrics (Andi Kleen)

- Fix segfault in 'perf test' hists related entries (Arnaldo Carvalho de Melo)

- Fix output of %llu for 64 bit values read on 32 bit machines in libtraceevent (Steven Rostedt)

- Fix time stamp rounding issue in libtraceevent (Chaos.Chen)

Infrastructure:

- Fix double free on 'command_line' in a error path in 'perf script' (Colin Ian King)

- Initialize struct sigaction 'sa_flags' field in a 'perf test' entri (Colin Ian King)

- Fix various build warnings in turbostat, detected with gcc6 (Colin Ian King)

- Use .s extension for preprocessed assembler code (Masahiro Yamada)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (3):
      perf stat: Implement CSV metrics output
      perf stat: Support metrics in --per-core/socket mode
      perf stat: Check for frontend stalled for metrics

Arnaldo Carvalho de Melo (1):
      perf test: Fix hists related entries

Chaos.Chen (1):
      tools lib traceevent: Fix time stamp rounding issue

Colin Ian King (3):
      perf script: Fix double free on command_line
      perf tests: Initialize sa.sa_flags
      tools/power turbostat: fix various build warnings

Masahiro Yamada (1):
      tools build: Use .s extension for preprocessed assembler code

Steven Rostedt (Red Hat) (2):
      tools lib traceevent: Set int_array fields to NULL if freeing from error
      tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines

 tools/build/Makefile.build                         |   2 +-
 tools/lib/traceevent/event-parse.c                 |  10 +-
 tools/perf/arch/x86/tests/rdpmc.c                  |   1 +
 tools/perf/builtin-stat.c                          | 136 +++++++++++++++++++--
 .../util/scripting-engines/trace-event-python.c    |   4 +-
 tools/perf/util/sort.c                             |  37 +++---
 tools/perf/util/stat-shadow.c                      |  18 ++-
 tools/perf/util/stat.h                             |   1 +
 tools/power/x86/turbostat/turbostat.c              |   8 +-
 9 files changed, 181 insertions(+), 36 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-02-29 19:21 Arnaldo Carvalho de Melo
  2016-03-03  8:21 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-02-29 19:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Alexei Starovoitov,
	Andi Kleen, Brendan Gregg, David Ahern, He Kuang, Jeff Bastian,
	Jeremie Galarneau, Jiri Olsa, Josh Boyer, Lai Jiangshan,
	Li Zefan, Masami Hiramatsu, Namhyung Kim, Peter Zijlstra,
	pi3orama, Stephane Eranian, Steven Rostedt, Taeung Song,
	Thomas Gleixner, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 675965b00d734c985e4285f5bec7e524d15fc4e1:

  perf: Export perf_event_sysfs_show() (2016-02-29 09:35:27 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160229

for you to fetch changes up to 575a02e00b11eecbbabcb1eb22eab4c68e91ae77:

  perf record: Ensure return non-zero rc when mmap fail (2016-02-29 12:44:15 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Check existence of frontend/backed stalled cycles in 'perf stat' (Andi Kleen)

- Avoid installing .o files from tools/lib/ into the python extension (Jiri Olsa)

- Rename the tracepoint '/format' field that carries the syscall ID from 'nr',
  that is also the name of some syscalls arguments, to "__syscall_nr", to
  avoid having multiple fields with the same name, that was breaking the
  python script skeleton generator from perf.data files (Taeung Song)

- Support converting data from bpf events in 'perf data' (Wang Nan)

Infrastructure:

- Split libtraceevent's pevent_print_event() (Steven Rostedt)

- Librarize some 'perf record' bits to allow handling multiple perf.data
  files per session (Wang Nan)

- Ensure return non-zero rc when mmap fail in 'perf record' (Wang Nan)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (1):
      perf stat: Check existence of frontend/backed stalled cycles

Jiri Olsa (1):
      perf tools: Fix python extension build

Steven Rostedt (1):
      tools lib traceevent: Split pevent_print_event() into specific functionality functions

Taeung Song (2):
      perf trace: Check and discard not only 'nr' but also '__syscall_nr'
      tracing/syscalls: Rename "/format" tracepoint field name "nr" to "__syscall_nr:

Wang Nan (6):
      perf data: Support converting data from bpf_perf_event_output()
      perf data: Explicitly set byte order for integer types
      perf record: Use WARN_ONCE to replace 'if' condition
      perf record: Extract synthesize code to record__synthesize()
      perf record: Introduce record__finish_output() to finish a perf.data
      perf record: Ensure return non-zero rc when mmap fail

 kernel/trace/trace_syscalls.c      |  16 ++--
 tools/lib/traceevent/event-parse.c | 136 +++++++++++++++++++++++-------
 tools/lib/traceevent/event-parse.h |  13 +++
 tools/perf/builtin-record.c        | 168 ++++++++++++++++++++++---------------
 tools/perf/builtin-stat.c          |  22 ++++-
 tools/perf/builtin-trace.c         |   8 +-
 tools/perf/util/data-convert-bt.c  | 118 +++++++++++++++++++++++++-
 tools/perf/util/setup.py           |   4 +
 8 files changed, 372 insertions(+), 113 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-02-23 20:00 Arnaldo Carvalho de Melo
@ 2016-02-24  7:23 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2016-02-24  7:23 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen,
	Daniel Bristot de Oliveira, David Ahern, Jiri Olsa, Juri Lelli,
	linux-rt-users, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
	Steven Rostedt, Thomas Gleixner, Wang Nan,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling, this is on top of the perf-core-for-mingo
> submitted recently,
> 
> - Arnaldo
> 
> The following changes since commit 03e0a7df3efd959e40cd7ff40b1fabddc234ec5a:
> 
>   perf tools: Introduce bpf-output event (2016-02-22 14:37:21 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2
> 
> for you to fetch changes up to bea2400621836b028d82c3d6a74053921d70dbd7:
> 
>   perf tools: Remove strbuf_{remove,splice}() (2016-02-23 16:21:04 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Don't stop PMU parsing on alias parse error, allowing the
>   addition of new sysfs PMU files without breaking old tools (Andi Kleen)
> 
> - Implement '%' operation in libtraceevent (Daniel Bristot de Oliveira)
> 
> - Allow specifying events via -e in 'perf mem record', also listing what events
>   can be specified via 'perf mem record -e list' (Jiri Olsa)
> 
> - Improve support to 'data_src', 'weight' and 'addr' fields in
>   'perf script' (Jiri Olsa)
> 
> Infrastructure:
> 
> - Export cacheline routines (Jiri Olsa)
> 
> - Remove strbuf_{remove,splice}(), dead code (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf tools: Dont stop PMU parsing on alias parse error
> 
> Arnaldo Carvalho de Melo (2):
>       perf help: No need to use strbuf_remove()
>       perf tools: Remove strbuf_{remove,splice}()
> 
> Daniel Bristot de Oliveira (1):
>       tools lib traceevent: Implement '%' operation
> 
> Jiri Olsa (7):
>       perf tools: Make cl_address global
>       perf tools: Introduce cl_offset function
>       perf tools: Add monitored events array
>       perf mem: Add -e record option
>       perf tools: Use ARRAY_SIZE in mem sort display functions
>       perf script: Add data_src and weight column definitions
>       perf script: Display addr/data_src/weight columns for raw events
> 
>  tools/lib/traceevent/event-parse.c |  4 +++
>  tools/perf/builtin-help.c          |  3 +-
>  tools/perf/builtin-mem.c           | 74 +++++++++++++++++++++++++++++++++-----
>  tools/perf/builtin-script.c        | 23 +++++++++++-
>  tools/perf/util/Build              |  1 +
>  tools/perf/util/mem-events.c       | 51 ++++++++++++++++++++++++++
>  tools/perf/util/mem-events.h       | 22 ++++++++++++
>  tools/perf/util/pmu.c              | 15 ++++----
>  tools/perf/util/sort.c             | 15 ++------
>  tools/perf/util/sort.h             | 11 ++++++
>  tools/perf/util/strbuf.c           | 24 -------------
>  tools/perf/util/strbuf.h           |  2 --
>  12 files changed, 188 insertions(+), 57 deletions(-)
>  create mode 100644 tools/perf/util/mem-events.c
>  create mode 100644 tools/perf/util/mem-events.h

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-02-23 20:00 Arnaldo Carvalho de Melo
  2016-02-24  7:23 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-02-23 20:00 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Daniel Bristot de Oliveira, David Ahern, Jiri Olsa,
	Juri Lelli, linux-rt-users, Namhyung Kim, Peter Zijlstra,
	Stephane Eranian, Steven Rostedt, Thomas Gleixner, Wang Nan,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, this is on top of the perf-core-for-mingo
submitted recently,

- Arnaldo

The following changes since commit 03e0a7df3efd959e40cd7ff40b1fabddc234ec5a:

  perf tools: Introduce bpf-output event (2016-02-22 14:37:21 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2

for you to fetch changes up to bea2400621836b028d82c3d6a74053921d70dbd7:

  perf tools: Remove strbuf_{remove,splice}() (2016-02-23 16:21:04 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Don't stop PMU parsing on alias parse error, allowing the
  addition of new sysfs PMU files without breaking old tools (Andi Kleen)

- Implement '%' operation in libtraceevent (Daniel Bristot de Oliveira)

- Allow specifying events via -e in 'perf mem record', also listing what events
  can be specified via 'perf mem record -e list' (Jiri Olsa)

- Improve support to 'data_src', 'weight' and 'addr' fields in
  'perf script' (Jiri Olsa)

Infrastructure:

- Export cacheline routines (Jiri Olsa)

- Remove strbuf_{remove,splice}(), dead code (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (1):
      perf tools: Dont stop PMU parsing on alias parse error

Arnaldo Carvalho de Melo (2):
      perf help: No need to use strbuf_remove()
      perf tools: Remove strbuf_{remove,splice}()

Daniel Bristot de Oliveira (1):
      tools lib traceevent: Implement '%' operation

Jiri Olsa (7):
      perf tools: Make cl_address global
      perf tools: Introduce cl_offset function
      perf tools: Add monitored events array
      perf mem: Add -e record option
      perf tools: Use ARRAY_SIZE in mem sort display functions
      perf script: Add data_src and weight column definitions
      perf script: Display addr/data_src/weight columns for raw events

 tools/lib/traceevent/event-parse.c |  4 +++
 tools/perf/builtin-help.c          |  3 +-
 tools/perf/builtin-mem.c           | 74 +++++++++++++++++++++++++++++++++-----
 tools/perf/builtin-script.c        | 23 +++++++++++-
 tools/perf/util/Build              |  1 +
 tools/perf/util/mem-events.c       | 51 ++++++++++++++++++++++++++
 tools/perf/util/mem-events.h       | 22 ++++++++++++
 tools/perf/util/pmu.c              | 15 ++++----
 tools/perf/util/sort.c             | 15 ++------
 tools/perf/util/sort.h             | 11 ++++++
 tools/perf/util/strbuf.c           | 24 -------------
 tools/perf/util/strbuf.h           |  2 --
 12 files changed, 188 insertions(+), 57 deletions(-)
 create mode 100644 tools/perf/util/mem-events.c
 create mode 100644 tools/perf/util/mem-events.h

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2016-01-12 17:59 Arnaldo Carvalho de Melo
@ 2016-01-13  9:37 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2016-01-13  9:37 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Andrew Morton, Andy Lutomirski, Bernd Petrovitsch,
	Borislav Petkov, Brendan Gregg, Chris J Arges, David Ahern,
	He Kuang, H. Peter Anvin, Jiri Olsa, Jiri Slaby, Josh Poimboeuf,
	Linus Torvalds, live-patching, Markus Trippelsdorf,
	Masami Hiramatsu, Michal Marek, Namhyung Kim, Pedro Alves,
	Peter Zijlstra, pi3orama, Stephane Eranian, Thomas Gleixner,
	Wang Nan, x86, Zefan Li


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 0bd106d26dbe444160104b3153ca1652d2ab913b:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2016-01-12 11:01:16 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to 34b7b0f95d41d2351a080e774d71085171db90e6:
> 
>   perf tools: Fallback to srcdir/Documentation/tips.txt (2016-01-12 12:42:08 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible new features:
> 
> - Add --buildid-all option to 'perf record' to avoid processing
>   samples, just collecting build-ids for _all_ the DSOs that appears
>   in PERF_RECORD_MMAP records (Namhyung Kim)
> 
> - Add some more usage tips to appear in the hists browser
>   (top & report) (Namhyung Kim, Andi Kleen)
> 
> - Fix mmap2 event allocation in synthesize code, where we were
>   allocating space just for PERF_RECORD_MMAP, the older variant,
>   which could lead to corner case problems (Wang Nan)
> 
> Developer stuff:
> 
> - Make list.h self-sufficient, removing one more reference to
>   kernel headers that lead to recent breakage when some rculist
>   change was made in the kernel sources. (Josh Poimboeuf)
> 
>   Add missing NORETURN define for parse-options.h in
>   tools/lib/subcmd (Josh Poimboeuf)
> 
> - Fallback to srcdir/Documentation/ when not finding tips.txt
>   elsewhere (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Jiri Olsa (1):
>       perf stat: Fix recort_usage typo
> 
> Josh Poimboeuf (3):
>       tools: Make list.h self-sufficient
>       tools: Fix formatting of the "make -C tools" help message
>       tools subcmd: Add missing NORETURN define for parse-options.h
> 
> Namhyung Kim (6):
>       perf record: Add --buildid-all option
>       perf tools: Add more usage tips
>       perf tools: Add file_only config option to strlist
>       perf tools: Set and pass DOCDIR to builtin-report.c
>       perf ui/tui: Print helpline message as is
>       perf tools: Fallback to srcdir/Documentation/tips.txt
> 
> Wang Nan (1):
>       perf tools: Fix mmap2 event allocation in synthesize code
> 
>  tools/Makefile                           |  32 +-
>  tools/include/linux/list.h               | 753 ++++++++++++++++++++++++++++++-
>  tools/lib/subcmd/parse-options.h         |   4 +
>  tools/perf/Build                         |   1 +
>  tools/perf/Documentation/perf-record.txt |   3 +
>  tools/perf/Documentation/tips.txt        |  15 +
>  tools/perf/builtin-record.c              |  26 +-
>  tools/perf/builtin-report.c              |  10 +-
>  tools/perf/builtin-stat.c                |   8 +-
>  tools/perf/config/Makefile               |   3 +
>  tools/perf/ui/browsers/hists.c           |   2 +-
>  tools/perf/util/event.c                  |   4 +-
>  tools/perf/util/strlist.c                |   8 +
>  tools/perf/util/strlist.h                |   9 +-
>  tools/perf/util/util.c                   |  11 +-
>  15 files changed, 847 insertions(+), 42 deletions(-)

Pulled into perf/urgent, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2016-01-12 17:59 Arnaldo Carvalho de Melo
  2016-01-13  9:37 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-01-12 17:59 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Andrew Morton, Andy Lutomirski, Bernd Petrovitsch,
	Borislav Petkov, Brendan Gregg, Chris J Arges, David Ahern,
	He Kuang, H. Peter Anvin, Jiri Olsa, Jiri Slaby, Josh Poimboeuf,
	Linus Torvalds, live-patching, Markus Trippelsdorf,
	Masami Hiramatsu, Michal Marek, Namhyung Kim, Pedro Alves,
	Peter Zijlstra, pi3orama, Stephane Eranian, Thomas Gleixner,
	Wang Nan, x86, Zefan Li

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 0bd106d26dbe444160104b3153ca1652d2ab913b:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2016-01-12 11:01:16 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to 34b7b0f95d41d2351a080e774d71085171db90e6:

  perf tools: Fallback to srcdir/Documentation/tips.txt (2016-01-12 12:42:08 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible new features:

- Add --buildid-all option to 'perf record' to avoid processing
  samples, just collecting build-ids for _all_ the DSOs that appears
  in PERF_RECORD_MMAP records (Namhyung Kim)

- Add some more usage tips to appear in the hists browser
  (top & report) (Namhyung Kim, Andi Kleen)

- Fix mmap2 event allocation in synthesize code, where we were
  allocating space just for PERF_RECORD_MMAP, the older variant,
  which could lead to corner case problems (Wang Nan)

Developer stuff:

- Make list.h self-sufficient, removing one more reference to
  kernel headers that lead to recent breakage when some rculist
  change was made in the kernel sources. (Josh Poimboeuf)

  Add missing NORETURN define for parse-options.h in
  tools/lib/subcmd (Josh Poimboeuf)

- Fallback to srcdir/Documentation/ when not finding tips.txt
  elsewhere (Namhyung Kim)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Jiri Olsa (1):
      perf stat: Fix recort_usage typo

Josh Poimboeuf (3):
      tools: Make list.h self-sufficient
      tools: Fix formatting of the "make -C tools" help message
      tools subcmd: Add missing NORETURN define for parse-options.h

Namhyung Kim (6):
      perf record: Add --buildid-all option
      perf tools: Add more usage tips
      perf tools: Add file_only config option to strlist
      perf tools: Set and pass DOCDIR to builtin-report.c
      perf ui/tui: Print helpline message as is
      perf tools: Fallback to srcdir/Documentation/tips.txt

Wang Nan (1):
      perf tools: Fix mmap2 event allocation in synthesize code

 tools/Makefile                           |  32 +-
 tools/include/linux/list.h               | 753 ++++++++++++++++++++++++++++++-
 tools/lib/subcmd/parse-options.h         |   4 +
 tools/perf/Build                         |   1 +
 tools/perf/Documentation/perf-record.txt |   3 +
 tools/perf/Documentation/tips.txt        |  15 +
 tools/perf/builtin-record.c              |  26 +-
 tools/perf/builtin-report.c              |  10 +-
 tools/perf/builtin-stat.c                |   8 +-
 tools/perf/config/Makefile               |   3 +
 tools/perf/ui/browsers/hists.c           |   2 +-
 tools/perf/util/event.c                  |   4 +-
 tools/perf/util/strlist.c                |   8 +
 tools/perf/util/strlist.h                |   9 +-
 tools/perf/util/util.c                   |  11 +-
 15 files changed, 847 insertions(+), 42 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2015-12-10 19:43 Arnaldo Carvalho de Melo
@ 2015-12-11  7:48 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2015-12-11  7:48 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Josh Poimboeuf, Martin Liska, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit d18929e9fde30c4d57ae57eb9a7f6f10b5808ca1:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-12-10 09:10:40 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to e7a7865cc0da306542db0b9205cb0a467f59e33d:
> 
>   perf symbols: Fix dso__load_sym to put dso (2015-12-10 16:29:32 -0300)
> 
> ----------------------------------------------------------------
> perf/core refactorings and fixes:
> 
> Infrastructure:
> 
> - Revert "perf tools: Improve setting of gcc debug option", -Og is broken,
>   GCC PR created (Jiri Olsa)
> 
> - More reference count fixes (Masami Hiramatsu)
> 
> - Untangle browser setup (--stdio, --tui, etc) from argument checking,
>   prep work to move the usage() code out of tools/perf for use by
>   other tools/ living utilities (Namhyung Kim)
> 
> - Delete half-processed hist entries when exiting 'perf top' (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf top: Do show usage message when failing to create cpu/thread maps
>       Revert "perf tools: Improve setting of gcc debug option"
> 
> Masami Hiramatsu (2):
>       perf tools: Make perf_session__register_idle_thread drop the refcount
>       perf symbols: Fix dso__load_sym to put dso
> 
> Namhyung Kim (7):
>       perf annotate: Check argument before calling setup_browser()
>       perf annotate: Delay UI browser setup after initialization is done
>       perf kvm: Remove invocation of setup/exit_browser()
>       perf report: Check argument before calling setup_browser()
>       perf thread_map: Free strlist on constructor error path
>       perf tools: Get rid of exit_browser() from usage_with_options()
>       perf top: Delete half-processed hist entries when exit
> 
>  tools/perf/builtin-annotate.c   | 33 ++++++++++++++++-----------------
>  tools/perf/builtin-kvm.c        |  3 ---
>  tools/perf/builtin-report.c     | 21 ++++++++++-----------
>  tools/perf/builtin-top.c        |  9 ++++++---
>  tools/perf/config/Makefile      |  2 --
>  tools/perf/config/utilities.mak | 19 -------------------
>  tools/perf/util/hist.c          | 26 +++++++++++++++++++++++++-
>  tools/perf/util/parse-options.c |  3 ---
>  tools/perf/util/session.c       | 11 +++++++----
>  tools/perf/util/session.h       |  2 +-
>  tools/perf/util/symbol-elf.c    |  9 +++++++--
>  tools/perf/util/thread_map.c    |  1 +
>  12 files changed, 73 insertions(+), 66 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2015-12-10 19:43 Arnaldo Carvalho de Melo
  2015-12-11  7:48 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-12-10 19:43 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Josh Poimboeuf, Martin Liska, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit d18929e9fde30c4d57ae57eb9a7f6f10b5808ca1:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-12-10 09:10:40 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to e7a7865cc0da306542db0b9205cb0a467f59e33d:

  perf symbols: Fix dso__load_sym to put dso (2015-12-10 16:29:32 -0300)

----------------------------------------------------------------
perf/core refactorings and fixes:

Infrastructure:

- Revert "perf tools: Improve setting of gcc debug option", -Og is broken,
  GCC PR created (Jiri Olsa)

- More reference count fixes (Masami Hiramatsu)

- Untangle browser setup (--stdio, --tui, etc) from argument checking,
  prep work to move the usage() code out of tools/perf for use by
  other tools/ living utilities (Namhyung Kim)

- Delete half-processed hist entries when exiting 'perf top' (Namhyung Kim)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf top: Do show usage message when failing to create cpu/thread maps
      Revert "perf tools: Improve setting of gcc debug option"

Masami Hiramatsu (2):
      perf tools: Make perf_session__register_idle_thread drop the refcount
      perf symbols: Fix dso__load_sym to put dso

Namhyung Kim (7):
      perf annotate: Check argument before calling setup_browser()
      perf annotate: Delay UI browser setup after initialization is done
      perf kvm: Remove invocation of setup/exit_browser()
      perf report: Check argument before calling setup_browser()
      perf thread_map: Free strlist on constructor error path
      perf tools: Get rid of exit_browser() from usage_with_options()
      perf top: Delete half-processed hist entries when exit

 tools/perf/builtin-annotate.c   | 33 ++++++++++++++++-----------------
 tools/perf/builtin-kvm.c        |  3 ---
 tools/perf/builtin-report.c     | 21 ++++++++++-----------
 tools/perf/builtin-top.c        |  9 ++++++---
 tools/perf/config/Makefile      |  2 --
 tools/perf/config/utilities.mak | 19 -------------------
 tools/perf/util/hist.c          | 26 +++++++++++++++++++++++++-
 tools/perf/util/parse-options.c |  3 ---
 tools/perf/util/session.c       | 11 +++++++----
 tools/perf/util/session.h       |  2 +-
 tools/perf/util/symbol-elf.c    |  9 +++++++--
 tools/perf/util/thread_map.c    |  1 +
 12 files changed, 73 insertions(+), 66 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2015-12-09 16:51 Arnaldo Carvalho de Melo
@ 2015-12-10  8:12 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2015-12-10  8:12 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, David Binderman, Jiri Olsa,
	Josh Poimboeuf, Masami Hiramatsu, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit a30c99a0beb3030ba42dab38cad6273cd090805d:
> 
>   Merge branch 'perf/urgent' into perf/core, to pick up fixes (2015-12-08 06:06:20 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to 0a4bb5da957b83ece8b4723c5bac7a5d29fbfb33:
> 
>   perf tools: Move cmd_version() to builtin-version.c (2015-12-09 13:42:03 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Change default selection TUI background color to yellow (Ingo Molnar)
> 
> Infrastructure:
> 
> - Start paving the way to reuse some cmdline functions with other tools/
>   living utilities (Josh Poimboeuf)
> 
> - Reference count fixes using the refcount debugger, unleaking some objects
>   (Masami Hiramatsu)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Ingo Molnar (1):
>       perf tui: Change default selection background color to yellow
> 
> Josh Poimboeuf (4):
>       perf tools: Remove unused pager_use_color variable
>       perf tools: Move term functions out of util.c
>       perf tools: Save cmdline arguments earlier
>       perf tools: Move cmd_version() to builtin-version.c
> 
> Masami Hiramatsu (6):
>       perf tools: Fix map_groups__clone to put cloned map
>       perf stat: Fix cmd_stat to release cpu_map
>       perf hists: Fix hists_evsel to release hists
>       perf tools: Fix maps__fixup_overlappings to put used maps
>       perf machine: Fix machine.vmlinux_maps to make sure to clear the old one
>       perf tools: Fix write_numa_topology to put cpu_map instead of free
> 
>  tools/perf/Build                |  1 +
>  tools/perf/builtin-stat.c       |  9 +++++++++
>  tools/perf/builtin-version.c    | 10 ++++++++++
>  tools/perf/perf.c               |  1 +
>  tools/perf/ui/browser.c         |  2 +-
>  tools/perf/util/Build           |  2 +-
>  tools/perf/util/cache.h         |  1 -
>  tools/perf/util/color.c         |  2 +-
>  tools/perf/util/env.c           |  9 ---------
>  tools/perf/util/environment.c   |  8 --------
>  tools/perf/util/header.c        |  2 +-
>  tools/perf/util/help.c          |  7 -------
>  tools/perf/util/hist.c          | 10 +++++++++-
>  tools/perf/util/machine.c       |  5 +++++
>  tools/perf/util/map.c           |  3 +++
>  tools/perf/util/parse-options.c |  2 --
>  tools/perf/util/term.c          | 35 +++++++++++++++++++++++++++++++++++
>  tools/perf/util/term.h          | 10 ++++++++++
>  tools/perf/util/util.c          | 34 ----------------------------------
>  tools/perf/util/util.h          |  4 +---
>  20 files changed, 88 insertions(+), 69 deletions(-)
>  create mode 100644 tools/perf/builtin-version.c
>  delete mode 100644 tools/perf/util/environment.c
>  create mode 100644 tools/perf/util/term.c
>  create mode 100644 tools/perf/util/term.h

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2015-12-09 16:51 Arnaldo Carvalho de Melo
  2015-12-10  8:12 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-12-09 16:51 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Binderman, Jiri Olsa, Josh Poimboeuf, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit a30c99a0beb3030ba42dab38cad6273cd090805d:

  Merge branch 'perf/urgent' into perf/core, to pick up fixes (2015-12-08 06:06:20 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to 0a4bb5da957b83ece8b4723c5bac7a5d29fbfb33:

  perf tools: Move cmd_version() to builtin-version.c (2015-12-09 13:42:03 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Change default selection TUI background color to yellow (Ingo Molnar)

Infrastructure:

- Start paving the way to reuse some cmdline functions with other tools/
  living utilities (Josh Poimboeuf)

- Reference count fixes using the refcount debugger, unleaking some objects
  (Masami Hiramatsu)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Ingo Molnar (1):
      perf tui: Change default selection background color to yellow

Josh Poimboeuf (4):
      perf tools: Remove unused pager_use_color variable
      perf tools: Move term functions out of util.c
      perf tools: Save cmdline arguments earlier
      perf tools: Move cmd_version() to builtin-version.c

Masami Hiramatsu (6):
      perf tools: Fix map_groups__clone to put cloned map
      perf stat: Fix cmd_stat to release cpu_map
      perf hists: Fix hists_evsel to release hists
      perf tools: Fix maps__fixup_overlappings to put used maps
      perf machine: Fix machine.vmlinux_maps to make sure to clear the old one
      perf tools: Fix write_numa_topology to put cpu_map instead of free

 tools/perf/Build                |  1 +
 tools/perf/builtin-stat.c       |  9 +++++++++
 tools/perf/builtin-version.c    | 10 ++++++++++
 tools/perf/perf.c               |  1 +
 tools/perf/ui/browser.c         |  2 +-
 tools/perf/util/Build           |  2 +-
 tools/perf/util/cache.h         |  1 -
 tools/perf/util/color.c         |  2 +-
 tools/perf/util/env.c           |  9 ---------
 tools/perf/util/environment.c   |  8 --------
 tools/perf/util/header.c        |  2 +-
 tools/perf/util/help.c          |  7 -------
 tools/perf/util/hist.c          | 10 +++++++++-
 tools/perf/util/machine.c       |  5 +++++
 tools/perf/util/map.c           |  3 +++
 tools/perf/util/parse-options.c |  2 --
 tools/perf/util/term.c          | 35 +++++++++++++++++++++++++++++++++++
 tools/perf/util/term.h          | 10 ++++++++++
 tools/perf/util/util.c          | 34 ----------------------------------
 tools/perf/util/util.h          |  4 +---
 20 files changed, 88 insertions(+), 69 deletions(-)
 create mode 100644 tools/perf/builtin-version.c
 delete mode 100644 tools/perf/util/environment.c
 create mode 100644 tools/perf/util/term.c
 create mode 100644 tools/perf/util/term.h

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2015-11-06 20:54 Arnaldo Carvalho de Melo
@ 2015-11-08  7:24 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2015-11-08  7:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Andi Kleen,
	David Ahern, He Kuang, Jiri Olsa, Kan Liang, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, pi3orama, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling, this is on top of the perf-core-for-mingo tag,
> that is outstanding.
> 
> Best regards,
> 
> - Arnaldo
> 
> The following changes since commit 0014de172d228e450377d1fd079d94e67128d27f:
> 
>   perf sched latency: Fix thread pid reuse issue (2015-11-05 12:51:00 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2
> 
> for you to fetch changes up to 345c99a303e1d97b407bf99190314a878d59ca92:
> 
>   perf test: Do not be case sensitive when searching for matching tests (2015-11-06 17:50:04 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - libbpf error reporting improvements, using a strerror interface to
>   more precisely tell the user about problems with the provided
>   scriptlet, be it in C or as a ready made object file (Wang Nan)
> 
> - Do not be case sensitive when searching for matching 'perf test'
>   entries (Arnaldo Carvalho de Melo)
> 
> - Inform the user about objdump failures in 'perf annotate' (Andi Kleen)
> 
> Infrastructure:
> 
> - Improve the LLVM 'perf test' entry, introduce new ones for
>   BPF and kbuild to check the environment used by clang to
>   compile .c scriptlets (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf annotate: Inform the user about objdump failures in --stdio
> 
> Arnaldo Carvalho de Melo (1):
>       perf test: Do not be case sensitive when searching for matching tests
> 
> Jiri Olsa (1):
>       perf stat: Make stat options global
> 
> Masami Hiramatsu (1):
>       perf probe: Cleanup find_perf_probe_point_from_map to reduce redundancy
> 
> Wang Nan (7):
>       bpf tools: Improve libbpf error reporting
>       bpf tools: Add new API bpf_object__get_kversion()
>       perf tools: Make fetch_kernel_version() publicly available
>       perf bpf: Improve BPF related error messages
>       perf test: Enhance the LLVM test: update basic BPF test program
>       perf test: Enhance the LLVM tests: add kbuild test
>       perf test: Add 'perf test BPF'
> 
>  tools/lib/bpf/libbpf.c                    | 167 +++++++++++++++++-------
>  tools/lib/bpf/libbpf.h                    |  21 +++
>  tools/perf/builtin-stat.c                 | 163 +++++++++++------------
>  tools/perf/tests/Build                    |  17 ++-
>  tools/perf/tests/bpf-script-example.c     |   4 +
>  tools/perf/tests/bpf-script-test-kbuild.c |  21 +++
>  tools/perf/tests/bpf.c                    | 209 ++++++++++++++++++++++++++++++
>  tools/perf/tests/builtin-test.c           |   6 +-
>  tools/perf/tests/llvm.c                   | 137 +++++++++++++++-----
>  tools/perf/tests/llvm.h                   |  18 +++
>  tools/perf/tests/tests.h                  |   1 +
>  tools/perf/util/annotate.c                |  20 ++-
>  tools/perf/util/bpf-loader.c              | 139 +++++++++++++++++---
>  tools/perf/util/bpf-loader.h              |  33 +++++
>  tools/perf/util/llvm-utils.c              |  49 +++----
>  tools/perf/util/parse-events.c            |  11 +-
>  tools/perf/util/probe-event.c             |   7 +-
>  tools/perf/util/util.c                    |  30 +++++
>  tools/perf/util/util.h                    |   8 ++
>  19 files changed, 836 insertions(+), 225 deletions(-)
>  create mode 100644 tools/perf/tests/bpf-script-test-kbuild.c
>  create mode 100644 tools/perf/tests/bpf.c
>  create mode 100644 tools/perf/tests/llvm.h

Pulled into perf/urgent, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2015-11-06 20:54 Arnaldo Carvalho de Melo
  2015-11-08  7:24 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-11-06 20:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Andi Kleen, David Ahern, He Kuang, Jiri Olsa,
	Kan Liang, Masami Hiramatsu, Namhyung Kim, Peter Zijlstra,
	pi3orama, Wang Nan, Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, this is on top of the perf-core-for-mingo tag,
that is outstanding.

Best regards,

- Arnaldo

The following changes since commit 0014de172d228e450377d1fd079d94e67128d27f:

  perf sched latency: Fix thread pid reuse issue (2015-11-05 12:51:00 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2

for you to fetch changes up to 345c99a303e1d97b407bf99190314a878d59ca92:

  perf test: Do not be case sensitive when searching for matching tests (2015-11-06 17:50:04 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

- libbpf error reporting improvements, using a strerror interface to
  more precisely tell the user about problems with the provided
  scriptlet, be it in C or as a ready made object file (Wang Nan)

- Do not be case sensitive when searching for matching 'perf test'
  entries (Arnaldo Carvalho de Melo)

- Inform the user about objdump failures in 'perf annotate' (Andi Kleen)

Infrastructure:

- Improve the LLVM 'perf test' entry, introduce new ones for
  BPF and kbuild to check the environment used by clang to
  compile .c scriptlets (Wang Nan)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (1):
      perf annotate: Inform the user about objdump failures in --stdio

Arnaldo Carvalho de Melo (1):
      perf test: Do not be case sensitive when searching for matching tests

Jiri Olsa (1):
      perf stat: Make stat options global

Masami Hiramatsu (1):
      perf probe: Cleanup find_perf_probe_point_from_map to reduce redundancy

Wang Nan (7):
      bpf tools: Improve libbpf error reporting
      bpf tools: Add new API bpf_object__get_kversion()
      perf tools: Make fetch_kernel_version() publicly available
      perf bpf: Improve BPF related error messages
      perf test: Enhance the LLVM test: update basic BPF test program
      perf test: Enhance the LLVM tests: add kbuild test
      perf test: Add 'perf test BPF'

 tools/lib/bpf/libbpf.c                    | 167 +++++++++++++++++-------
 tools/lib/bpf/libbpf.h                    |  21 +++
 tools/perf/builtin-stat.c                 | 163 +++++++++++------------
 tools/perf/tests/Build                    |  17 ++-
 tools/perf/tests/bpf-script-example.c     |   4 +
 tools/perf/tests/bpf-script-test-kbuild.c |  21 +++
 tools/perf/tests/bpf.c                    | 209 ++++++++++++++++++++++++++++++
 tools/perf/tests/builtin-test.c           |   6 +-
 tools/perf/tests/llvm.c                   | 137 +++++++++++++++-----
 tools/perf/tests/llvm.h                   |  18 +++
 tools/perf/tests/tests.h                  |   1 +
 tools/perf/util/annotate.c                |  20 ++-
 tools/perf/util/bpf-loader.c              | 139 +++++++++++++++++---
 tools/perf/util/bpf-loader.h              |  33 +++++
 tools/perf/util/llvm-utils.c              |  49 +++----
 tools/perf/util/parse-events.c            |  11 +-
 tools/perf/util/probe-event.c             |   7 +-
 tools/perf/util/util.c                    |  30 +++++
 tools/perf/util/util.h                    |   8 ++
 19 files changed, 836 insertions(+), 225 deletions(-)
 create mode 100644 tools/perf/tests/bpf-script-test-kbuild.c
 create mode 100644 tools/perf/tests/bpf.c
 create mode 100644 tools/perf/tests/llvm.h

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2015-07-06 15:41 ` Arnaldo Carvalho de Melo
@ 2015-07-06 15:47   ` Ingo Molnar
  -1 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2015-07-06 15:47 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, David Ahern,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Julia Lawall,
	kernel-janitors, Markus Elfring, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit d2d61ed55f8375a10ff606e83e2196880a775fb4:
> 
>   Merge branch 'perf/rbtree_copy' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2015-07-06 09:24:41 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to ab85785aa13c36440a91a8e9f7616357de411a1f:
> 
>   tools lib api debugfs: Check for tracefs when reporting errors (2015-07-06 12:22:14 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Take tracefs into account when reporting errors about accessing
>   tracepoint information in tools like 'perf trace' (Arnaldo Carvalho de Melo)
> 
> - Let user have timestamps with per-thread recording in 'perf record' (Adrian Hunter)
> 
> Infrastructure:
> 
> - Introduce series of functions to build event filters so that we
>   can set them in just one ioctl call, useful to set up common_pid,
>   raw_syscalls:sys_{enter,exit}'s "id" filters to use with
>   'perf trace' (Arnaldo Carvalho de Melo)
> 
> - Delete an unnecessary check before calling strfilter__delete() (Markus Elfring)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf record: Let user have timestamps with per-thread recording
> 
> Arnaldo Carvalho de Melo (9):
>       perf tools: Asprintf like functions to format integer filter expression
>       perf trace: Remember what are the syscalls tracepoint evsels
>       perf trace: Store the syscall ids for the event qualifiers in a table
>       perf evsel: Rename set_filter to apply_filter
>       perf evsel: Introduce set_filter method
>       perf evlist: Make perf_evlist__set_filter use perf_evsel__set_filter
>       perf evsel: Introduce append_filter() method
>       perf trace: Use event filters for the event qualifier list
>       tools lib api debugfs: Check for tracefs when reporting errors
> 
> Markus Elfring (1):
>       perf probe: Delete an unnecessary check before the function call "strfilter__delete"
> 
>  tools/lib/api/fs/debugfs.c     |  15 +++-
>  tools/perf/builtin-probe.c     |   3 +-
>  tools/perf/builtin-record.c    |   4 +-
>  tools/perf/builtin-trace.c     | 178 ++++++++++++++++++++++++++---------------
>  tools/perf/perf.h              |   1 +
>  tools/perf/util/evlist.c       |   6 +-
>  tools/perf/util/evsel.c        |  37 ++++++++-
>  tools/perf/util/evsel.h        |   7 +-
>  tools/perf/util/parse-events.c |   3 +-
>  tools/perf/util/string.c       |  39 +++++++++
>  tools/perf/util/util.h         |  12 +++
>  11 files changed, 224 insertions(+), 81 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
@ 2015-07-06 15:47   ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2015-07-06 15:47 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, David Ahern,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Julia Lawall,
	kernel-janitors, Markus Elfring, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit d2d61ed55f8375a10ff606e83e2196880a775fb4:
> 
>   Merge branch 'perf/rbtree_copy' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2015-07-06 09:24:41 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to ab85785aa13c36440a91a8e9f7616357de411a1f:
> 
>   tools lib api debugfs: Check for tracefs when reporting errors (2015-07-06 12:22:14 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Take tracefs into account when reporting errors about accessing
>   tracepoint information in tools like 'perf trace' (Arnaldo Carvalho de Melo)
> 
> - Let user have timestamps with per-thread recording in 'perf record' (Adrian Hunter)
> 
> Infrastructure:
> 
> - Introduce series of functions to build event filters so that we
>   can set them in just one ioctl call, useful to set up common_pid,
>   raw_syscalls:sys_{enter,exit}'s "id" filters to use with
>   'perf trace' (Arnaldo Carvalho de Melo)
> 
> - Delete an unnecessary check before calling strfilter__delete() (Markus Elfring)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf record: Let user have timestamps with per-thread recording
> 
> Arnaldo Carvalho de Melo (9):
>       perf tools: Asprintf like functions to format integer filter expression
>       perf trace: Remember what are the syscalls tracepoint evsels
>       perf trace: Store the syscall ids for the event qualifiers in a table
>       perf evsel: Rename set_filter to apply_filter
>       perf evsel: Introduce set_filter method
>       perf evlist: Make perf_evlist__set_filter use perf_evsel__set_filter
>       perf evsel: Introduce append_filter() method
>       perf trace: Use event filters for the event qualifier list
>       tools lib api debugfs: Check for tracefs when reporting errors
> 
> Markus Elfring (1):
>       perf probe: Delete an unnecessary check before the function call "strfilter__delete"
> 
>  tools/lib/api/fs/debugfs.c     |  15 +++-
>  tools/perf/builtin-probe.c     |   3 +-
>  tools/perf/builtin-record.c    |   4 +-
>  tools/perf/builtin-trace.c     | 178 ++++++++++++++++++++++++++---------------
>  tools/perf/perf.h              |   1 +
>  tools/perf/util/evlist.c       |   6 +-
>  tools/perf/util/evsel.c        |  37 ++++++++-
>  tools/perf/util/evsel.h        |   7 +-
>  tools/perf/util/parse-events.c |   3 +-
>  tools/perf/util/string.c       |  39 +++++++++
>  tools/perf/util/util.h         |  12 +++
>  11 files changed, 224 insertions(+), 81 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2015-07-06 15:41 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-07-06 15:41 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Julia Lawall, kernel-janitors, Markus Elfring,
	Masami Hiramatsu, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit d2d61ed55f8375a10ff606e83e2196880a775fb4:

  Merge branch 'perf/rbtree_copy' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2015-07-06 09:24:41 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to ab85785aa13c36440a91a8e9f7616357de411a1f:

  tools lib api debugfs: Check for tracefs when reporting errors (2015-07-06 12:22:14 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Take tracefs into account when reporting errors about accessing
  tracepoint information in tools like 'perf trace' (Arnaldo Carvalho de Melo)

- Let user have timestamps with per-thread recording in 'perf record' (Adrian Hunter)

Infrastructure:

- Introduce series of functions to build event filters so that we
  can set them in just one ioctl call, useful to set up common_pid,
  raw_syscalls:sys_{enter,exit}'s "id" filters to use with
  'perf trace' (Arnaldo Carvalho de Melo)

- Delete an unnecessary check before calling strfilter__delete() (Markus Elfring)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (1):
      perf record: Let user have timestamps with per-thread recording

Arnaldo Carvalho de Melo (9):
      perf tools: Asprintf like functions to format integer filter expression
      perf trace: Remember what are the syscalls tracepoint evsels
      perf trace: Store the syscall ids for the event qualifiers in a table
      perf evsel: Rename set_filter to apply_filter
      perf evsel: Introduce set_filter method
      perf evlist: Make perf_evlist__set_filter use perf_evsel__set_filter
      perf evsel: Introduce append_filter() method
      perf trace: Use event filters for the event qualifier list
      tools lib api debugfs: Check for tracefs when reporting errors

Markus Elfring (1):
      perf probe: Delete an unnecessary check before the function call "strfilter__delete"

 tools/lib/api/fs/debugfs.c     |  15 +++-
 tools/perf/builtin-probe.c     |   3 +-
 tools/perf/builtin-record.c    |   4 +-
 tools/perf/builtin-trace.c     | 178 ++++++++++++++++++++++++++---------------
 tools/perf/perf.h              |   1 +
 tools/perf/util/evlist.c       |   6 +-
 tools/perf/util/evsel.c        |  37 ++++++++-
 tools/perf/util/evsel.h        |   7 +-
 tools/perf/util/parse-events.c |   3 +-
 tools/perf/util/string.c       |  39 +++++++++
 tools/perf/util/util.h         |  12 +++
 11 files changed, 224 insertions(+), 81 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2015-07-06 15:41 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-07-06 15:41 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Julia Lawall, kernel-janitors, Markus Elfring,
	Masami Hiramatsu, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit d2d61ed55f8375a10ff606e83e2196880a775fb4:

  Merge branch 'perf/rbtree_copy' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2015-07-06 09:24:41 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to ab85785aa13c36440a91a8e9f7616357de411a1f:

  tools lib api debugfs: Check for tracefs when reporting errors (2015-07-06 12:22:14 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Take tracefs into account when reporting errors about accessing
  tracepoint information in tools like 'perf trace' (Arnaldo Carvalho de Melo)

- Let user have timestamps with per-thread recording in 'perf record' (Adrian Hunter)

Infrastructure:

- Introduce series of functions to build event filters so that we
  can set them in just one ioctl call, useful to set up common_pid,
  raw_syscalls:sys_{enter,exit}'s "id" filters to use with
  'perf trace' (Arnaldo Carvalho de Melo)

- Delete an unnecessary check before calling strfilter__delete() (Markus Elfring)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (1):
      perf record: Let user have timestamps with per-thread recording

Arnaldo Carvalho de Melo (9):
      perf tools: Asprintf like functions to format integer filter expression
      perf trace: Remember what are the syscalls tracepoint evsels
      perf trace: Store the syscall ids for the event qualifiers in a table
      perf evsel: Rename set_filter to apply_filter
      perf evsel: Introduce set_filter method
      perf evlist: Make perf_evlist__set_filter use perf_evsel__set_filter
      perf evsel: Introduce append_filter() method
      perf trace: Use event filters for the event qualifier list
      tools lib api debugfs: Check for tracefs when reporting errors

Markus Elfring (1):
      perf probe: Delete an unnecessary check before the function call "strfilter__delete"

 tools/lib/api/fs/debugfs.c     |  15 +++-
 tools/perf/builtin-probe.c     |   3 +-
 tools/perf/builtin-record.c    |   4 +-
 tools/perf/builtin-trace.c     | 178 ++++++++++++++++++++++++++---------------
 tools/perf/perf.h              |   1 +
 tools/perf/util/evlist.c       |   6 +-
 tools/perf/util/evsel.c        |  37 ++++++++-
 tools/perf/util/evsel.h        |   7 +-
 tools/perf/util/parse-events.c |   3 +-
 tools/perf/util/string.c       |  39 +++++++++
 tools/perf/util/util.h         |  12 +++
 11 files changed, 224 insertions(+), 81 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2015-06-19 21:58 Arnaldo Carvalho de Melo
@ 2015-06-19 23:12 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2015-06-19 23:12 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
	David Ahern, Don Zickus, Frederic Weisbecker, Jiri Olsa,
	Kan Liang, kernel-team, Martin Liska, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Yannick Brosseau, Ying Huang, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 79928928c5a27d58ae48285d2a3f7aa835db7547:
> 
>   Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-06-18 09:40:46 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to 9d9cad763ca79dd3697e9f2d1df648e37496582b:
> 
>   perf tools: Configurable per thread proc map processing time out (2015-06-19 18:27:13 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Replace CTRL+z with 'f' as hotkey for enable/disable events (Arnaldo Carvalho de Melo)
> 
> - Do not exit when 'f' is pressed in 'report' mode (Arnaldo Carvalho de Melo)
> 
> - Tell the user how to unfreeze events after pressing 'f' in 'perf top' (Arnaldo Carvalho de Melo)
> 
> - React to unassigned hotkey pressing in 'top/report' (Arnaldo Carvalho de Melo)
> 
> - Display total number of samples with --show-total-period in 'annotate' (Martin Liška)
> 
> - Add timeout to make procfs mmap processing more robust (Kan Liang)
> 
> - Fix sort__sym_cmp to also compare end of symbol (Yannick Brosseau)
> 
> Infrastructure:
> 
> - Ensure thread-stack is flushed (Adrian Hunter)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf tools: Ensure thread-stack is flushed
> 
> Arnaldo Carvalho de Melo (6):
>       perf annotate: Rename source_line_percent to source_line_samples
>       perf top: Replace CTRL+z with 'f' as hotkey for enable/disable events
>       perf hists browser: Do not exit when 'f' is pressed in 'report' mode
>       perf hists browser: Honour the help line provided by builtin-{top,report}.c
>       perf top: Tell the user how to unfreeze events after pressing 'f'
>       perf hists browser: React to unassigned hotkey pressing
> 
> Kan Liang (2):
>       perf tools: Add time out to force stop proc map processing
>       perf tools: Configurable per thread proc map processing time out
> 
> Martin Liška (1):
>       perf annotate: Display total number of samples with --show-total-period
> 
> Yannick Brosseau (1):
>       perf report: Fix sort__sym_cmp to also compare end of symbol
> 
>  include/uapi/linux/perf_event.h          |  4 +++
>  tools/perf/Documentation/perf-kvm.txt    |  6 ++++
>  tools/perf/Documentation/perf-record.txt |  5 +++
>  tools/perf/Documentation/perf-top.txt    |  6 ++++
>  tools/perf/Documentation/perf-trace.txt  |  5 +++
>  tools/perf/builtin-annotate.c            |  2 ++
>  tools/perf/builtin-kvm.c                 |  5 ++-
>  tools/perf/builtin-record.c              |  6 +++-
>  tools/perf/builtin-top.c                 | 15 ++++++--
>  tools/perf/builtin-trace.c               |  6 +++-
>  tools/perf/perf.h                        |  1 +
>  tools/perf/tests/code-reading.c          |  2 +-
>  tools/perf/tests/dwarf-unwind.c          |  2 +-
>  tools/perf/tests/mmap-thread-lookup.c    |  4 +--
>  tools/perf/ui/browsers/annotate.c        | 60 +++++++++++++++++++++++---------
>  tools/perf/ui/browsers/hists.c           | 15 ++++----
>  tools/perf/util/annotate.c               | 52 ++++++++++++++++++---------
>  tools/perf/util/annotate.h               |  7 ++--
>  tools/perf/util/event.c                  | 46 +++++++++++++++++++-----
>  tools/perf/util/event.h                  | 10 ++++--
>  tools/perf/util/machine.c                | 28 +++++++++++++--
>  tools/perf/util/machine.h                | 12 +++++--
>  tools/perf/util/session.c                | 33 ++++++++++++++++++
>  tools/perf/util/sort.c                   |  8 ++---
>  tools/perf/util/thread-stack.c           | 18 +++++++---
>  tools/perf/util/thread-stack.h           |  1 +
>  26 files changed, 278 insertions(+), 81 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2015-06-19 21:58 Arnaldo Carvalho de Melo
  2015-06-19 23:12 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-06-19 21:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Don Zickus,
	Frederic Weisbecker, Jiri Olsa, Kan Liang, kernel-team,
	Martin Liska, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian, Yannick Brosseau, Ying Huang,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 79928928c5a27d58ae48285d2a3f7aa835db7547:

  Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-06-18 09:40:46 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to 9d9cad763ca79dd3697e9f2d1df648e37496582b:

  perf tools: Configurable per thread proc map processing time out (2015-06-19 18:27:13 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Replace CTRL+z with 'f' as hotkey for enable/disable events (Arnaldo Carvalho de Melo)

- Do not exit when 'f' is pressed in 'report' mode (Arnaldo Carvalho de Melo)

- Tell the user how to unfreeze events after pressing 'f' in 'perf top' (Arnaldo Carvalho de Melo)

- React to unassigned hotkey pressing in 'top/report' (Arnaldo Carvalho de Melo)

- Display total number of samples with --show-total-period in 'annotate' (Martin Liška)

- Add timeout to make procfs mmap processing more robust (Kan Liang)

- Fix sort__sym_cmp to also compare end of symbol (Yannick Brosseau)

Infrastructure:

- Ensure thread-stack is flushed (Adrian Hunter)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (1):
      perf tools: Ensure thread-stack is flushed

Arnaldo Carvalho de Melo (6):
      perf annotate: Rename source_line_percent to source_line_samples
      perf top: Replace CTRL+z with 'f' as hotkey for enable/disable events
      perf hists browser: Do not exit when 'f' is pressed in 'report' mode
      perf hists browser: Honour the help line provided by builtin-{top,report}.c
      perf top: Tell the user how to unfreeze events after pressing 'f'
      perf hists browser: React to unassigned hotkey pressing

Kan Liang (2):
      perf tools: Add time out to force stop proc map processing
      perf tools: Configurable per thread proc map processing time out

Martin Liška (1):
      perf annotate: Display total number of samples with --show-total-period

Yannick Brosseau (1):
      perf report: Fix sort__sym_cmp to also compare end of symbol

 include/uapi/linux/perf_event.h          |  4 +++
 tools/perf/Documentation/perf-kvm.txt    |  6 ++++
 tools/perf/Documentation/perf-record.txt |  5 +++
 tools/perf/Documentation/perf-top.txt    |  6 ++++
 tools/perf/Documentation/perf-trace.txt  |  5 +++
 tools/perf/builtin-annotate.c            |  2 ++
 tools/perf/builtin-kvm.c                 |  5 ++-
 tools/perf/builtin-record.c              |  6 +++-
 tools/perf/builtin-top.c                 | 15 ++++++--
 tools/perf/builtin-trace.c               |  6 +++-
 tools/perf/perf.h                        |  1 +
 tools/perf/tests/code-reading.c          |  2 +-
 tools/perf/tests/dwarf-unwind.c          |  2 +-
 tools/perf/tests/mmap-thread-lookup.c    |  4 +--
 tools/perf/ui/browsers/annotate.c        | 60 +++++++++++++++++++++++---------
 tools/perf/ui/browsers/hists.c           | 15 ++++----
 tools/perf/util/annotate.c               | 52 ++++++++++++++++++---------
 tools/perf/util/annotate.h               |  7 ++--
 tools/perf/util/event.c                  | 46 +++++++++++++++++++-----
 tools/perf/util/event.h                  | 10 ++++--
 tools/perf/util/machine.c                | 28 +++++++++++++--
 tools/perf/util/machine.h                | 12 +++++--
 tools/perf/util/session.c                | 33 ++++++++++++++++++
 tools/perf/util/sort.c                   |  8 ++---
 tools/perf/util/thread-stack.c           | 18 +++++++---
 tools/perf/util/thread-stack.h           |  1 +
 26 files changed, 278 insertions(+), 81 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2014-06-19 21:13 Arnaldo Carvalho de Melo
@ 2014-06-25  5:43 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2014-06-25  5:43 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Aswin Chandramouleeswaran,
	Corey Ashford, David Ahern, Davidlohr Bueso, Don Zickus,
	Frederic Weisbecker, Hitoshi Mitake, Jiri Olsa, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please conseider pulling,
> 
> - Arnaldo
> 
> The following changes since commit a10d60c08cc3bbea9195e2b36440f557373623eb:
> 
>   sh, perf: Use common PMU interrupt disabled code (2014-06-19 19:37:51 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to ecdac96899e3db3f428e4d2e978f25e3f8d35a6c:
> 
>   perf bench sched-messaging: Drop barf() (2014-06-19 16:13:17 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> . Add --repeat global option to 'perf bench' to be used in benchmarks
>   such as the existing 'futex' one, that was modified to use it instead
>   of a local option. (Davidlohr Bueso)
> 
> . Fix fd -> pathname resolution in 'trace', be it using /proc or
>   a vfs_getname probe point. (Arnaldo Carvalho de Melo)
> 
> . Add suggestion of how to set perf_event_paranoid sysctl, to help
>   non-root users trying tools like 'trace' to get a working environment.
>   (Arnaldo Carvalho de Melo)
> 
> Fixes:
> 
> . Fix memory leak in the 'sched-messaging' perf bench test. (Davidlohr Bueso)
> 
> . The -o and -n 'perf bench mem' options are mutually exclusive, emit error
>   when both are specified. (Davidlohr Bueso)
> 
> . Fix scrollbar refresh row index in the ui browser, problem exposed now
>   that headers will be added and will be allowed to be switched on/off.
>   (Jiri Olsa)
> 
> Cleanups:
> 
> . Remove needless reassignments in 'trace' (Arnaldo Carvalho de Melo)
> 
> . Cache the is_exit syscall test in 'trace) (Arnaldo Carvalho de Melo)
> 
> . No need to reimplement err() in 'perf bench sched-messaging', drop barf().
>   (Davidlohr Bueso).
> 
> . Remove ev_name argument from perf_evsel__hists_browse, can be obtained
>   from the other parameters. (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
>       perf trace: Fix up fd -> pathname resolution
>       perf evlist: Add suggestion of how to set perf_event_paranoid sysctl
>       perf trace: Remove needless reassignments
>       perf trace: Cache the is_exit syscall test
> 
> Davidlohr Bueso (5):
>       perf bench sched-messaging: Plug memleak
>       perf bench: Add --repeat option
>       perf bench futex: Use global --repeat option
>       perf bench mem: The -o and -n options are mutually exclusive
>       perf bench sched-messaging: Drop barf()
> 
> Jiri Olsa (2):
>       perf hists browser: Remove ev_name argument from perf_evsel__hists_browse
>       perf ui browser: Fix scrollbar refresh row index
> 
>  tools/perf/Documentation/perf-bench.txt |  4 +++
>  tools/perf/bench/bench.h                |  1 +
>  tools/perf/bench/futex-requeue.c        | 10 +------
>  tools/perf/bench/futex-wake.c           | 12 ++-------
>  tools/perf/bench/mem-memcpy.c           |  5 ++++
>  tools/perf/bench/mem-memset.c           |  5 ++++
>  tools/perf/bench/sched-messaging.c      | 47 +++++++++++++++------------------
>  tools/perf/builtin-bench.c              |  7 +++++
>  tools/perf/builtin-trace.c              | 12 ++++-----
>  tools/perf/ui/browser.c                 |  2 +-
>  tools/perf/ui/browsers/hists.c          | 25 ++++++++----------
>  tools/perf/util/evlist.c                |  5 ++--
>  12 files changed, 67 insertions(+), 68 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2014-06-19 21:13 Arnaldo Carvalho de Melo
  2014-06-25  5:43 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-06-19 21:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Aswin Chandramouleeswaran, Corey Ashford, David Ahern,
	Davidlohr Bueso, Don Zickus, Frederic Weisbecker, Hitoshi Mitake,
	Jiri Olsa, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo

Hi Ingo,

	Please conseider pulling,

- Arnaldo

The following changes since commit a10d60c08cc3bbea9195e2b36440f557373623eb:

  sh, perf: Use common PMU interrupt disabled code (2014-06-19 19:37:51 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to ecdac96899e3db3f428e4d2e978f25e3f8d35a6c:

  perf bench sched-messaging: Drop barf() (2014-06-19 16:13:17 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

. Add --repeat global option to 'perf bench' to be used in benchmarks
  such as the existing 'futex' one, that was modified to use it instead
  of a local option. (Davidlohr Bueso)

. Fix fd -> pathname resolution in 'trace', be it using /proc or
  a vfs_getname probe point. (Arnaldo Carvalho de Melo)

. Add suggestion of how to set perf_event_paranoid sysctl, to help
  non-root users trying tools like 'trace' to get a working environment.
  (Arnaldo Carvalho de Melo)

Fixes:

. Fix memory leak in the 'sched-messaging' perf bench test. (Davidlohr Bueso)

. The -o and -n 'perf bench mem' options are mutually exclusive, emit error
  when both are specified. (Davidlohr Bueso)

. Fix scrollbar refresh row index in the ui browser, problem exposed now
  that headers will be added and will be allowed to be switched on/off.
  (Jiri Olsa)

Cleanups:

. Remove needless reassignments in 'trace' (Arnaldo Carvalho de Melo)

. Cache the is_exit syscall test in 'trace) (Arnaldo Carvalho de Melo)

. No need to reimplement err() in 'perf bench sched-messaging', drop barf().
  (Davidlohr Bueso).

. Remove ev_name argument from perf_evsel__hists_browse, can be obtained
  from the other parameters. (Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf trace: Fix up fd -> pathname resolution
      perf evlist: Add suggestion of how to set perf_event_paranoid sysctl
      perf trace: Remove needless reassignments
      perf trace: Cache the is_exit syscall test

Davidlohr Bueso (5):
      perf bench sched-messaging: Plug memleak
      perf bench: Add --repeat option
      perf bench futex: Use global --repeat option
      perf bench mem: The -o and -n options are mutually exclusive
      perf bench sched-messaging: Drop barf()

Jiri Olsa (2):
      perf hists browser: Remove ev_name argument from perf_evsel__hists_browse
      perf ui browser: Fix scrollbar refresh row index

 tools/perf/Documentation/perf-bench.txt |  4 +++
 tools/perf/bench/bench.h                |  1 +
 tools/perf/bench/futex-requeue.c        | 10 +------
 tools/perf/bench/futex-wake.c           | 12 ++-------
 tools/perf/bench/mem-memcpy.c           |  5 ++++
 tools/perf/bench/mem-memset.c           |  5 ++++
 tools/perf/bench/sched-messaging.c      | 47 +++++++++++++++------------------
 tools/perf/builtin-bench.c              |  7 +++++
 tools/perf/builtin-trace.c              | 12 ++++-----
 tools/perf/ui/browser.c                 |  2 +-
 tools/perf/ui/browsers/hists.c          | 25 ++++++++----------
 tools/perf/util/evlist.c                |  5 ++--
 12 files changed, 67 insertions(+), 68 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2014-04-24 15:40 Jiri Olsa
@ 2014-04-25  8:05 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2014-04-25  8:05 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra


* Jiri Olsa <jolsa@kernel.org> wrote:

> hi Ingo,
> please consider pulling
> 
> thanks,
> jirka
> 
> 
> The following changes since commit a81fef347b32dea2b31275826afe1c93fa0d2d54:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-04-22 20:28:23 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to c3b789527b236873557f53740ceac47747e0e1cb:
> 
>   perf hists/tui: Count callchain rows separately (2014-04-24 16:34:27 +0200)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Factor hists statistics counts processing which in turn also
>   fixes several bugs in TUI report command (Namhyung Kim)
> 
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> 
> ----------------------------------------------------------------
> Namhyung Kim (11):
>       perf report: Count number of entries separately
>       perf hists: Rename hists__inc_stats()
>       perf hists: Move column length calculation out of hists__inc_stats()
>       perf hists: Add a couple of hists stat helper functions
>       perf hists: Collapse expanded callchains after filter is applied
>       perf tools: Account entry stats when it's added to the output tree
>       perf hists: Add missing update on filtered stats in hists__decay_entries()
>       perf ui/tui: Fix off-by-one in hist_browser__update_nr_entries()
>       perf ui/tui: Rename hist_browser__update_nr_entries()
>       perf top/tui: Update nr_entries properly after a filter is applied
>       perf hists/tui: Count callchain rows separately
> 
>  tools/perf/builtin-annotate.c  |  3 +-
>  tools/perf/builtin-diff.c      | 23 ++++++-----
>  tools/perf/builtin-report.c    | 64 ++++++++++++++---------------
>  tools/perf/ui/browsers/hists.c | 92 +++++++++++++++++++++++++++++-------------
>  tools/perf/util/hist.c         | 83 ++++++++++++++++++++++++-------------
>  tools/perf/util/hist.h         |  9 ++++-
>  6 files changed, 171 insertions(+), 103 deletions(-)

Pulled, thanks a lot Jiri!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2014-04-24 15:40 Jiri Olsa
  2014-04-25  8:05 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Jiri Olsa @ 2014-04-24 15:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Jiri Olsa

hi Ingo,
please consider pulling

thanks,
jirka


The following changes since commit a81fef347b32dea2b31275826afe1c93fa0d2d54:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-04-22 20:28:23 +0200)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo

for you to fetch changes up to c3b789527b236873557f53740ceac47747e0e1cb:

  perf hists/tui: Count callchain rows separately (2014-04-24 16:34:27 +0200)

----------------------------------------------------------------
perf/core improvements and fixes:

. Factor hists statistics counts processing which in turn also
  fixes several bugs in TUI report command (Namhyung Kim)

Signed-off-by: Jiri Olsa <jolsa@kernel.org>

----------------------------------------------------------------
Namhyung Kim (11):
      perf report: Count number of entries separately
      perf hists: Rename hists__inc_stats()
      perf hists: Move column length calculation out of hists__inc_stats()
      perf hists: Add a couple of hists stat helper functions
      perf hists: Collapse expanded callchains after filter is applied
      perf tools: Account entry stats when it's added to the output tree
      perf hists: Add missing update on filtered stats in hists__decay_entries()
      perf ui/tui: Fix off-by-one in hist_browser__update_nr_entries()
      perf ui/tui: Rename hist_browser__update_nr_entries()
      perf top/tui: Update nr_entries properly after a filter is applied
      perf hists/tui: Count callchain rows separately

 tools/perf/builtin-annotate.c  |  3 +-
 tools/perf/builtin-diff.c      | 23 ++++++-----
 tools/perf/builtin-report.c    | 64 ++++++++++++++---------------
 tools/perf/ui/browsers/hists.c | 92 +++++++++++++++++++++++++++++-------------
 tools/perf/util/hist.c         | 83 ++++++++++++++++++++++++-------------
 tools/perf/util/hist.h         |  9 ++++-
 6 files changed, 171 insertions(+), 103 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2014-04-16 18:41 Jiri Olsa
@ 2014-04-17  8:07 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2014-04-17  8:07 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Adrian Hunter, Arnaldo Carvalho de Melo,
	Corey Ashford, David Ahern, Frederic Weisbecker, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Ramkumar Ramachandra


* Jiri Olsa <jolsa@redhat.com> wrote:

> hi Ingo,
> please consider pulling
> 
> thanks,
> jirka
> 
> 
> The following changes since commit fbdd17ec5ce2e5e4027356fcfde769b88d15702f:
> 
>   Merge branch 'perf-core-for-mingo' into perf/urgent (2014-04-14 16:45:39 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to a83edb2dfc5989fbadc594109c933bae528a2809:
> 
>   perf sched: Introduce --list-cmds for use by scripts (2014-04-16 17:16:05 +0200)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> . Add --percentage option to control absolute/relative percentage output (Namhyung Kim)
> 
> Developer stuff:
> 
> . Add --list-cmds to 'kmem', 'mem', 'lock' and 'sched', for use by completion scripts (Ramkumar Ramachandra)
> 
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
> 
> ----------------------------------------------------------------
> Namhyung Kim (7):
>       perf hists: Add support for showing relative percentage
>       perf report: Add --percentage option
>       perf top: Add --percentage option
>       perf diff: Add --percentage option
>       perf tools: Add hist.percentage config option
>       perf ui/tui: Add 'F' hotkey to toggle percentage output
>       perf tools: Show absolute percentage by default
> 
> Ramkumar Ramachandra (4):
>       perf kmem: Introduce --list-cmds for use by scripts
>       perf mem: Introduce --list-cmds for use by scripts
>       perf lock: Introduce --list-cmds for use by scripts
>       perf sched: Introduce --list-cmds for use by scripts
> 
>  tools/perf/Documentation/perf-diff.txt   | 21 ++++++++++--
>  tools/perf/Documentation/perf-report.txt | 24 +++++++++----
>  tools/perf/Documentation/perf-top.txt    | 18 ++++++++--
>  tools/perf/builtin-diff.c                | 32 ++++++++++++-----
>  tools/perf/builtin-kmem.c                |  8 +++--
>  tools/perf/builtin-lock.c                | 10 +++---
>  tools/perf/builtin-mem.c                 | 15 ++++----
>  tools/perf/builtin-report.c              | 22 ++++++++++--
>  tools/perf/builtin-sched.c               | 10 +++---
>  tools/perf/builtin-top.c                 |  8 +++--
>  tools/perf/perf-completion.sh            |  4 +--
>  tools/perf/ui/browsers/hists.c           | 39 ++++++++++++++++-----
>  tools/perf/ui/gtk/hists.c                | 11 +++---
>  tools/perf/ui/hist.c                     |  8 ++---
>  tools/perf/util/config.c                 |  4 +++
>  tools/perf/util/hist.c                   | 59 +++++++++++++++++++++++++-------
>  tools/perf/util/hist.h                   | 10 ++++++
>  tools/perf/util/symbol.h                 |  3 +-
>  18 files changed, 230 insertions(+), 76 deletions(-)

Pulled, thanks a lot Jiri!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2014-04-16 18:41 Jiri Olsa
  2014-04-17  8:07 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Jiri Olsa @ 2014-04-16 18:41 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Arnaldo Carvalho de Melo,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Ramkumar Ramachandra

hi Ingo,
please consider pulling

thanks,
jirka


The following changes since commit fbdd17ec5ce2e5e4027356fcfde769b88d15702f:

  Merge branch 'perf-core-for-mingo' into perf/urgent (2014-04-14 16:45:39 +0200)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo

for you to fetch changes up to a83edb2dfc5989fbadc594109c933bae528a2809:

  perf sched: Introduce --list-cmds for use by scripts (2014-04-16 17:16:05 +0200)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

. Add --percentage option to control absolute/relative percentage output (Namhyung Kim)

Developer stuff:

. Add --list-cmds to 'kmem', 'mem', 'lock' and 'sched', for use by completion scripts (Ramkumar Ramachandra)

Signed-off-by: Jiri Olsa <jolsa@redhat.com>

----------------------------------------------------------------
Namhyung Kim (7):
      perf hists: Add support for showing relative percentage
      perf report: Add --percentage option
      perf top: Add --percentage option
      perf diff: Add --percentage option
      perf tools: Add hist.percentage config option
      perf ui/tui: Add 'F' hotkey to toggle percentage output
      perf tools: Show absolute percentage by default

Ramkumar Ramachandra (4):
      perf kmem: Introduce --list-cmds for use by scripts
      perf mem: Introduce --list-cmds for use by scripts
      perf lock: Introduce --list-cmds for use by scripts
      perf sched: Introduce --list-cmds for use by scripts

 tools/perf/Documentation/perf-diff.txt   | 21 ++++++++++--
 tools/perf/Documentation/perf-report.txt | 24 +++++++++----
 tools/perf/Documentation/perf-top.txt    | 18 ++++++++--
 tools/perf/builtin-diff.c                | 32 ++++++++++++-----
 tools/perf/builtin-kmem.c                |  8 +++--
 tools/perf/builtin-lock.c                | 10 +++---
 tools/perf/builtin-mem.c                 | 15 ++++----
 tools/perf/builtin-report.c              | 22 ++++++++++--
 tools/perf/builtin-sched.c               | 10 +++---
 tools/perf/builtin-top.c                 |  8 +++--
 tools/perf/perf-completion.sh            |  4 +--
 tools/perf/ui/browsers/hists.c           | 39 ++++++++++++++++-----
 tools/perf/ui/gtk/hists.c                | 11 +++---
 tools/perf/ui/hist.c                     |  8 ++---
 tools/perf/util/config.c                 |  4 +++
 tools/perf/util/hist.c                   | 59 +++++++++++++++++++++++++-------
 tools/perf/util/hist.h                   | 10 ++++++
 tools/perf/util/symbol.h                 |  3 +-
 18 files changed, 230 insertions(+), 76 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [GIT PULL 00/11] perf/core improvements and fixes
  2013-07-22 20:22 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2013-07-23  7:38 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2013-07-23  7:38 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Borislav Petkov, Clark Williams, Corey Ashford, David Ahern,
	Feng Tang, Frederic Weisbecker, Hitoshi Mitake, Jiri Olsa,
	Kirill A. Shutemov, Kirill A. Shutemov, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling.
> 
> 	Tomorrow I'll try to process Jiri's group leader patches and David's 'kvm live'
> kits and continue looking for patches not processed during my vacations.
> 
> Thanks,
> 
> - Arnaldo
> 
> The following changes since commit 5a9821321e0a61674fd5c4b5a9e95007d0e7e052:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2013-07-19 09:35:30 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to f9ea55d0ddf66ed030b2a478625cd5792d30df16:
> 
>   perf tools: Move weight back to common sort keys (2013-07-22 16:58:28 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes.
> 
> . Fix memcpy benchmark for large sizes, from Andi Kleen.
> 
> . Support callchain sorting based on addresses, from Andi Kleen
> 
> . Move weight back to common sort keys, From Andi Kleen.
> 
> . Fix named threads support in 'perf script', from David Ahern.
> 
> . Handle ENODEV on default cycles event, fix from David Ahern.
> 
> . More install tests, from Jiri Olsa.
> 
> . Fix build with perl 5.18, from Kirill A. Shutemov.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (3):
>       perf bench: Fix memcpy benchmark for large sizes
>       perf tools: Support callchain sorting based on addresses
>       perf tools: Move weight back to common sort keys
> 
> David Ahern (2):
>       perf script: Fix named threads support
>       perf evsel: Handle ENODEV on default cycles event
> 
> Jiri Olsa (5):
>       perf tests: Run ctags/cscope make tests only with needed binaries
>       perf tests: Rename TMP to TMP_O tests/make variable
>       perf tests: Add DESTDIR=TMP_DEST tests/make variable
>       perf tests: Add 'make install/install-bin' tests into tests/make
>       perf tests: Add broken install-* tests into tests/make
> 
> Kirill A. Shutemov (1):
>       perf tools: Fix build with perl 5.18
> 
>  tools/perf/Documentation/perf-report.txt           |  8 ++-
>  tools/perf/Makefile                                |  4 +-
>  tools/perf/bench/mem-memcpy.c                      |  2 +
>  tools/perf/builtin-report.c                        | 19 ++++--
>  tools/perf/builtin-script.c                        |  6 +-
>  tools/perf/tests/make                              | 67 +++++++++++++++++++---
>  tools/perf/util/callchain.c                        |  7 ++-
>  tools/perf/util/callchain.h                        |  6 ++
>  tools/perf/util/evsel.c                            |  2 +-
>  tools/perf/util/hist.c                             |  3 +-
>  .../perf/util/scripting-engines/trace-event-perl.c | 14 +++--
>  .../util/scripting-engines/trace-event-python.c    |  9 +--
>  tools/perf/util/sort.c                             |  4 +-
>  tools/perf/util/sort.h                             |  6 +-
>  tools/perf/util/trace-event-scripting.c            |  3 +-
>  tools/perf/util/trace-event.h                      |  4 +-
>  16 files changed, 124 insertions(+), 40 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* [GIT PULL 00/11] perf/core improvements and fixes
@ 2013-07-22 20:22 Arnaldo Carvalho de Melo
  2013-07-23  7:38 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-07-22 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Borislav Petkov, Clark Williams, Corey Ashford, David Ahern,
	Feng Tang, Frederic Weisbecker, Hitoshi Mitake, Jiri Olsa,
	Kirill A. Shutemov, Kirill A. Shutemov, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Hi Ingo,

	Please consider pulling.

	Tomorrow I'll try to process Jiri's group leader patches and David's 'kvm live'
kits and continue looking for patches not processed during my vacations.

Thanks,

- Arnaldo

The following changes since commit 5a9821321e0a61674fd5c4b5a9e95007d0e7e052:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2013-07-19 09:35:30 +0200)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to f9ea55d0ddf66ed030b2a478625cd5792d30df16:

  perf tools: Move weight back to common sort keys (2013-07-22 16:58:28 -0300)

----------------------------------------------------------------
perf/core improvements and fixes.

. Fix memcpy benchmark for large sizes, from Andi Kleen.

. Support callchain sorting based on addresses, from Andi Kleen

. Move weight back to common sort keys, From Andi Kleen.

. Fix named threads support in 'perf script', from David Ahern.

. Handle ENODEV on default cycles event, fix from David Ahern.

. More install tests, from Jiri Olsa.

. Fix build with perl 5.18, from Kirill A. Shutemov.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (3):
      perf bench: Fix memcpy benchmark for large sizes
      perf tools: Support callchain sorting based on addresses
      perf tools: Move weight back to common sort keys

David Ahern (2):
      perf script: Fix named threads support
      perf evsel: Handle ENODEV on default cycles event

Jiri Olsa (5):
      perf tests: Run ctags/cscope make tests only with needed binaries
      perf tests: Rename TMP to TMP_O tests/make variable
      perf tests: Add DESTDIR=TMP_DEST tests/make variable
      perf tests: Add 'make install/install-bin' tests into tests/make
      perf tests: Add broken install-* tests into tests/make

Kirill A. Shutemov (1):
      perf tools: Fix build with perl 5.18

 tools/perf/Documentation/perf-report.txt           |  8 ++-
 tools/perf/Makefile                                |  4 +-
 tools/perf/bench/mem-memcpy.c                      |  2 +
 tools/perf/builtin-report.c                        | 19 ++++--
 tools/perf/builtin-script.c                        |  6 +-
 tools/perf/tests/make                              | 67 +++++++++++++++++++---
 tools/perf/util/callchain.c                        |  7 ++-
 tools/perf/util/callchain.h                        |  6 ++
 tools/perf/util/evsel.c                            |  2 +-
 tools/perf/util/hist.c                             |  3 +-
 .../perf/util/scripting-engines/trace-event-perl.c | 14 +++--
 .../util/scripting-engines/trace-event-python.c    |  9 +--
 tools/perf/util/sort.c                             |  4 +-
 tools/perf/util/sort.h                             |  6 +-
 tools/perf/util/trace-event-scripting.c            |  3 +-
 tools/perf/util/trace-event.h                      |  4 +-
 16 files changed, 124 insertions(+), 40 deletions(-)

^ permalink raw reply	[flat|nested] 76+ messages in thread

end of thread, other threads:[~2018-05-16 15:58 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-08 17:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 01/11] perf tools: Fix version file for perf documentation with OUTPUT variable set Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 02/11] perf tools: Fix lib/traceevent build dir " Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 03/11] perf tools: Fix parsing of 64 bit raw config value for 32 bit Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 04/11] tools lib traceevent: Fix cast from pointer to integer " Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 05/11] perf list: Update documentation about raw event setup Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 06/11] perf list: Document precise event sampling for AMD IBS Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 07/11] perf script: Add general python handler to process non-tracepoint events Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 08/11] perf script: Replace "struct thread" with "struct addr_location" as a parameter for "process_event()" Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 09/11] perf scripts python: Pass event/thread/dso name and symbol info to event handler in python Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 10/11] perf scripts python: Add a python library EventClass.py Arnaldo Carvalho de Melo
2012-08-08 17:13 ` [PATCH 11/11] perf scripts python: Add event_analyzing_sample.py as a sample for general event handling Arnaldo Carvalho de Melo
2012-08-09  3:01   ` Namhyung Kim
2012-08-09  5:24     ` [PATCH] perf script python: Correct handler check and spelling errors Feng Tang
2012-08-09  5:35       ` Namhyung Kim
2012-08-09  5:46         ` [PATCH v2] " Feng Tang
2012-08-09  6:15           ` Namhyung Kim
2012-08-21 15:37           ` [tip:perf/core] " tip-bot for Feng Tang
2013-07-22 20:22 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
2013-07-23  7:38 ` Ingo Molnar
2014-04-16 18:41 Jiri Olsa
2014-04-17  8:07 ` Ingo Molnar
2014-04-24 15:40 Jiri Olsa
2014-04-25  8:05 ` Ingo Molnar
2014-06-19 21:13 Arnaldo Carvalho de Melo
2014-06-25  5:43 ` Ingo Molnar
2015-06-19 21:58 Arnaldo Carvalho de Melo
2015-06-19 23:12 ` Ingo Molnar
2015-07-06 15:41 Arnaldo Carvalho de Melo
2015-07-06 15:41 ` Arnaldo Carvalho de Melo
2015-07-06 15:47 ` Ingo Molnar
2015-07-06 15:47   ` Ingo Molnar
2015-11-06 20:54 Arnaldo Carvalho de Melo
2015-11-08  7:24 ` Ingo Molnar
2015-12-09 16:51 Arnaldo Carvalho de Melo
2015-12-10  8:12 ` Ingo Molnar
2015-12-10 19:43 Arnaldo Carvalho de Melo
2015-12-11  7:48 ` Ingo Molnar
2016-01-12 17:59 Arnaldo Carvalho de Melo
2016-01-13  9:37 ` Ingo Molnar
2016-02-23 20:00 Arnaldo Carvalho de Melo
2016-02-24  7:23 ` Ingo Molnar
2016-02-29 19:21 Arnaldo Carvalho de Melo
2016-03-03  8:21 ` Ingo Molnar
2016-03-03  9:15   ` Jiri Olsa
2016-03-03 14:38   ` Arnaldo Carvalho de Melo
2016-03-05  8:08     ` Ingo Molnar
2016-03-02 22:16 Arnaldo Carvalho de Melo
2016-03-29 23:41 Arnaldo Carvalho de Melo
2016-04-13 14:43 Arnaldo Carvalho de Melo
2016-04-13 18:28 ` Ingo Molnar
2016-04-14 12:32 Arnaldo Carvalho de Melo
2016-04-14 13:32 ` Ingo Molnar
2016-05-06 16:08 Arnaldo Carvalho de Melo
2016-05-07  4:52 ` Ingo Molnar
2016-05-19 22:21 Arnaldo Carvalho de Melo
2016-05-20 15:05 ` Arnaldo Carvalho de Melo
2016-05-20 17:38   ` Ingo Molnar
2016-06-06 21:04 Arnaldo Carvalho de Melo
2016-06-08  7:32 ` Ingo Molnar
2016-06-30 22:16 Arnaldo Carvalho de Melo
2016-07-01  6:43 ` Ingo Molnar
2016-07-01 13:18   ` Arnaldo Carvalho de Melo
2016-07-25 15:57 Arnaldo Carvalho de Melo
2016-07-25 17:49 ` Ingo Molnar
2017-03-21  1:16 Arnaldo Carvalho de Melo
2017-03-21  1:16 ` Arnaldo Carvalho de Melo
2017-03-21  6:43 ` Ingo Molnar
2017-03-21  6:43   ` Ingo Molnar
2017-11-24 15:02 Arnaldo Carvalho de Melo
2018-05-16 14:48 Arnaldo Carvalho de Melo
2018-05-16 14:48 ` Arnaldo Carvalho de Melo
2018-05-16 14:48 ` Arnaldo Carvalho de Melo
2018-05-16 15:58 ` Ingo Molnar
2018-05-16 15:58   ` Ingo Molnar
2018-05-16 15:58   ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.