linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 00/13] perf/core improvements and fixes
@ 2014-07-16 20:02 Jiri Olsa
  2014-07-16 20:02 ` [PATCH 01/13] perf tools: Enable close-on-exec flag on perf file descriptor Jiri Olsa
                   ` (12 more replies)
  0 siblings, 13 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Corey Ashford, David Ahern, Frederic Weisbecker, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stanislav Fomichev,
	Yann Droneaud, Jiri Olsa

hi Ingo,
please consider pulling

thanks,
jirka


The following changes since commit ff2ebe46e15bd49d52b9c2f3fc77f3a9d94eac7b:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-07-16 13:48:13 +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 5ce0a7940a89ad7028dfada935b0cc64d307ea3f:

  perf tools: Add a --no-desc flag to perf list (2014-07-16 21:35:07 +0200)

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

. Add support for full Intel event lists (Andi Kleen)

. Update attr test with PERF_FLAG_FD_CLOEXEC flag (Jiri Olsa)

. Enable close-on-exec flag on perf file descriptor (Yann Droneaud)

Signed-off-by: Jiri Olsa <jolsa@kernel.org>

----------------------------------------------------------------
Andi Kleen (11):
      perf tools: Add jsmn `jasmine' JSON parser
      perf tools: Add support for text descriptions of events and alias add
      perf tools: Update perf list to output descriptions
      perf tools: Allow events with dot
      perf tools: Add support for reading JSON event files
      perf tools: Automatically look for event file name for cpu
      perf tools: Add perf download to download event files
      perf tools: Query terminal width and use in perf list
      perf tools: Add a new pmu interface to iterate over all events
      perf tests: Add test case for alias and JSON parsing
      perf tools: Add a --no-desc flag to perf list

Jiri Olsa (1):
      perf tests: Update attr test with PERF_FLAG_FD_CLOEXEC flag

Yann Droneaud (1):
      perf tools: Enable close-on-exec flag on perf file descriptor

 tools/perf/Documentation/perf-download.txt |  31 +++
 tools/perf/Documentation/perf-list.txt     |  29 ++-
 tools/perf/Documentation/perf-record.txt   |   8 +-
 tools/perf/Documentation/perf-stat.txt     |   8 +-
 tools/perf/Makefile.perf                   |  13 +-
 tools/perf/arch/x86/util/header.c          |  19 +-
 tools/perf/bench/mem-memcpy.c              |   4 +-
 tools/perf/bench/mem-memset.c              |   4 +-
 tools/perf/builtin-list.c                  |  16 +-
 tools/perf/builtin-record.c                |   3 +
 tools/perf/builtin-sched.c                 |   4 +-
 tools/perf/builtin-stat.c                  |   2 +
 tools/perf/perf-download.sh                |  56 ++++++
 tools/perf/tests/aliases.c                 |  58 ++++++
 tools/perf/tests/attr/base-record          |   3 +-
 tools/perf/tests/attr/base-stat            |   3 +-
 tools/perf/tests/bp_signal.c               |   4 +-
 tools/perf/tests/bp_signal_overflow.c      |   4 +-
 tools/perf/tests/builtin-test.c            |   4 +
 tools/perf/tests/rdpmc.c                   |   4 +-
 tools/perf/tests/tests.h                   |   1 +
 tools/perf/util/cache.h                    |   1 +
 tools/perf/util/cloexec.c                  |  57 ++++++
 tools/perf/util/cloexec.h                  |   6 +
 tools/perf/util/evsel.c                    |  12 +-
 tools/perf/util/jevents.c                  | 286 ++++++++++++++++++++++++++
 tools/perf/util/jevents.h                  |   9 +
 tools/perf/util/jsmn.c                     | 313 +++++++++++++++++++++++++++++
 tools/perf/util/jsmn.h                     |  67 ++++++
 tools/perf/util/json.c                     | 155 ++++++++++++++
 tools/perf/util/json.h                     |  13 ++
 tools/perf/util/pager.c                    |  15 ++
 tools/perf/util/parse-events.c             |   4 +-
 tools/perf/util/parse-events.h             |   2 +-
 tools/perf/util/parse-events.l             |   3 +-
 tools/perf/util/pmu.c                      | 153 +++++++++++---
 tools/perf/util/pmu.h                      |   6 +-
 tools/perf/util/record.c                   |   9 +-
 38 files changed, 1324 insertions(+), 65 deletions(-)
 create mode 100644 tools/perf/Documentation/perf-download.txt
 create mode 100755 tools/perf/perf-download.sh
 create mode 100644 tools/perf/tests/aliases.c
 create mode 100644 tools/perf/util/cloexec.c
 create mode 100644 tools/perf/util/cloexec.h
 create mode 100644 tools/perf/util/jevents.c
 create mode 100644 tools/perf/util/jevents.h
 create mode 100644 tools/perf/util/jsmn.c
 create mode 100644 tools/perf/util/jsmn.h
 create mode 100644 tools/perf/util/json.c
 create mode 100644 tools/perf/util/json.h

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

* [PATCH 01/13] perf tools: Enable close-on-exec flag on perf file descriptor
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 02/13] perf tests: Update attr test with PERF_FLAG_FD_CLOEXEC flag Jiri Olsa
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Yann Droneaud,
	Andi Kleen, Arnaldo Carvalho de Melo, Jiri Olsa, Peter Zijlstra,
	Jiri Olsa

From: Yann Droneaud <ydroneaud@opteya.com>

In commit a21b0b354d4a ('perf: Introduce a flag to enable
close-on-exec in perf_event_open()'), flag PERF_FLAG_FD_CLOEXEC
was added to perf_event_open(2) syscall to allows userspace
to atomically enable close-on-exec behavor when creating
the file descriptor.

This patch makes perf tools use the new flag if supported
by the kernel, so that the event file descriptors got
automatically closed if perf tool exec a sub-command.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/1404160127-7475-1-git-send-email-ydroneaud@opteya.com
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/Makefile.perf              |  1 +
 tools/perf/bench/mem-memcpy.c         |  4 ++-
 tools/perf/bench/mem-memset.c         |  4 ++-
 tools/perf/builtin-sched.c            |  4 ++-
 tools/perf/tests/bp_signal.c          |  4 ++-
 tools/perf/tests/bp_signal_overflow.c |  4 ++-
 tools/perf/tests/rdpmc.c              |  4 ++-
 tools/perf/util/cloexec.c             | 57 +++++++++++++++++++++++++++++++++++
 tools/perf/util/cloexec.h             |  6 ++++
 tools/perf/util/evsel.c               | 12 ++++++--
 tools/perf/util/record.c              |  9 ++++--
 11 files changed, 97 insertions(+), 12 deletions(-)
 create mode 100644 tools/perf/util/cloexec.c
 create mode 100644 tools/perf/util/cloexec.h

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 9670a16fa577..66cde74ee851 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -373,6 +373,7 @@ LIB_OBJS += $(OUTPUT)util/stat.o
 LIB_OBJS += $(OUTPUT)util/record.o
 LIB_OBJS += $(OUTPUT)util/srcline.o
 LIB_OBJS += $(OUTPUT)util/data.o
+LIB_OBJS += $(OUTPUT)util/cloexec.o
 
 LIB_OBJS += $(OUTPUT)ui/setup.o
 LIB_OBJS += $(OUTPUT)ui/helpline.o
diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c
index e622c3e96efc..2465141b554b 100644
--- a/tools/perf/bench/mem-memcpy.c
+++ b/tools/perf/bench/mem-memcpy.c
@@ -10,6 +10,7 @@
 #include "../util/util.h"
 #include "../util/parse-options.h"
 #include "../util/header.h"
+#include "../util/cloexec.h"
 #include "bench.h"
 #include "mem-memcpy-arch.h"
 
@@ -83,7 +84,8 @@ static struct perf_event_attr cycle_attr = {
 
 static void init_cycle(void)
 {
-	cycle_fd = sys_perf_event_open(&cycle_attr, getpid(), -1, -1, 0);
+	cycle_fd = sys_perf_event_open(&cycle_attr, getpid(), -1, -1,
+				       perf_event_open_cloexec_flag());
 
 	if (cycle_fd < 0 && errno == ENOSYS)
 		die("No CONFIG_PERF_EVENTS=y kernel support configured?\n");
diff --git a/tools/perf/bench/mem-memset.c b/tools/perf/bench/mem-memset.c
index 2a65468619f0..75fc3e65fb2a 100644
--- a/tools/perf/bench/mem-memset.c
+++ b/tools/perf/bench/mem-memset.c
@@ -10,6 +10,7 @@
 #include "../util/util.h"
 #include "../util/parse-options.h"
 #include "../util/header.h"
+#include "../util/cloexec.h"
 #include "bench.h"
 #include "mem-memset-arch.h"
 
@@ -83,7 +84,8 @@ static struct perf_event_attr cycle_attr = {
 
 static void init_cycle(void)
 {
-	cycle_fd = sys_perf_event_open(&cycle_attr, getpid(), -1, -1, 0);
+	cycle_fd = sys_perf_event_open(&cycle_attr, getpid(), -1, -1,
+				       perf_event_open_cloexec_flag());
 
 	if (cycle_fd < 0 && errno == ENOSYS)
 		die("No CONFIG_PERF_EVENTS=y kernel support configured?\n");
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index c38d06c04775..9c686b342013 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -10,6 +10,7 @@
 #include "util/header.h"
 #include "util/session.h"
 #include "util/tool.h"
+#include "util/cloexec.h"
 
 #include "util/parse-options.h"
 #include "util/trace-event.h"
@@ -434,7 +435,8 @@ static int self_open_counters(void)
 	attr.type = PERF_TYPE_SOFTWARE;
 	attr.config = PERF_COUNT_SW_TASK_CLOCK;
 
-	fd = sys_perf_event_open(&attr, 0, -1, -1, 0);
+	fd = sys_perf_event_open(&attr, 0, -1, -1,
+				 perf_event_open_cloexec_flag());
 
 	if (fd < 0)
 		pr_err("Error: sys_perf_event_open() syscall returned "
diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c
index aba095489193..a02b035fd5aa 100644
--- a/tools/perf/tests/bp_signal.c
+++ b/tools/perf/tests/bp_signal.c
@@ -25,6 +25,7 @@
 #include "tests.h"
 #include "debug.h"
 #include "perf.h"
+#include "cloexec.h"
 
 static int fd1;
 static int fd2;
@@ -78,7 +79,8 @@ static int bp_event(void *fn, int setup_signal)
 	pe.exclude_kernel = 1;
 	pe.exclude_hv = 1;
 
-	fd = sys_perf_event_open(&pe, 0, -1, -1, 0);
+	fd = sys_perf_event_open(&pe, 0, -1, -1,
+				 perf_event_open_cloexec_flag());
 	if (fd < 0) {
 		pr_debug("failed opening event %llx\n", pe.config);
 		return TEST_FAIL;
diff --git a/tools/perf/tests/bp_signal_overflow.c b/tools/perf/tests/bp_signal_overflow.c
index 44ac82179708..e76537724491 100644
--- a/tools/perf/tests/bp_signal_overflow.c
+++ b/tools/perf/tests/bp_signal_overflow.c
@@ -24,6 +24,7 @@
 #include "tests.h"
 #include "debug.h"
 #include "perf.h"
+#include "cloexec.h"
 
 static int overflows;
 
@@ -91,7 +92,8 @@ int test__bp_signal_overflow(void)
 	pe.exclude_kernel = 1;
 	pe.exclude_hv = 1;
 
-	fd = sys_perf_event_open(&pe, 0, -1, -1, 0);
+	fd = sys_perf_event_open(&pe, 0, -1, -1,
+				 perf_event_open_cloexec_flag());
 	if (fd < 0) {
 		pr_debug("failed opening event %llx\n", pe.config);
 		return TEST_FAIL;
diff --git a/tools/perf/tests/rdpmc.c b/tools/perf/tests/rdpmc.c
index e59143fd9e71..c04d1f268576 100644
--- a/tools/perf/tests/rdpmc.c
+++ b/tools/perf/tests/rdpmc.c
@@ -6,6 +6,7 @@
 #include "perf.h"
 #include "debug.h"
 #include "tests.h"
+#include "cloexec.h"
 
 #if defined(__x86_64__) || defined(__i386__)
 
@@ -104,7 +105,8 @@ static int __test__rdpmc(void)
 	sa.sa_sigaction = segfault_handler;
 	sigaction(SIGSEGV, &sa, NULL);
 
-	fd = sys_perf_event_open(&attr, 0, -1, -1, 0);
+	fd = sys_perf_event_open(&attr, 0, -1, -1,
+				 perf_event_open_cloexec_flag());
 	if (fd < 0) {
 		pr_err("Error: sys_perf_event_open() syscall returned "
 		       "with %d (%s)\n", fd, strerror(errno));
diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c
new file mode 100644
index 000000000000..c5d05ec17220
--- /dev/null
+++ b/tools/perf/util/cloexec.c
@@ -0,0 +1,57 @@
+#include "util.h"
+#include "../perf.h"
+#include "cloexec.h"
+#include "asm/bug.h"
+
+static unsigned long flag = PERF_FLAG_FD_CLOEXEC;
+
+static int perf_flag_probe(void)
+{
+	/* use 'safest' configuration as used in perf_evsel__fallback() */
+	struct perf_event_attr attr = {
+		.type = PERF_COUNT_SW_CPU_CLOCK,
+		.config = PERF_COUNT_SW_CPU_CLOCK,
+	};
+	int fd;
+	int err;
+
+	/* check cloexec flag */
+	fd = sys_perf_event_open(&attr, 0, -1, -1,
+				 PERF_FLAG_FD_CLOEXEC);
+	err = errno;
+
+	if (fd >= 0) {
+		close(fd);
+		return 1;
+	}
+
+	WARN_ONCE(err != EINVAL,
+		  "perf_event_open(..., PERF_FLAG_FD_CLOEXEC) failed with unexpected error %d (%s)\n",
+		  err, strerror(err));
+
+	/* not supported, confirm error related to PERF_FLAG_FD_CLOEXEC */
+	fd = sys_perf_event_open(&attr, 0, -1, -1, 0);
+	err = errno;
+
+	if (WARN_ONCE(fd < 0,
+		      "perf_event_open(..., 0) failed unexpectedly with error %d (%s)\n",
+		      err, strerror(err)))
+		return -1;
+
+	close(fd);
+
+	return 0;
+}
+
+unsigned long perf_event_open_cloexec_flag(void)
+{
+	static bool probed;
+
+	if (!probed) {
+		if (perf_flag_probe() <= 0)
+			flag = 0;
+		probed = true;
+	}
+
+	return flag;
+}
diff --git a/tools/perf/util/cloexec.h b/tools/perf/util/cloexec.h
new file mode 100644
index 000000000000..94a5a7d829d5
--- /dev/null
+++ b/tools/perf/util/cloexec.h
@@ -0,0 +1,6 @@
+#ifndef __PERF_CLOEXEC_H
+#define __PERF_CLOEXEC_H
+
+unsigned long perf_event_open_cloexec_flag(void);
+
+#endif /* __PERF_CLOEXEC_H */
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 8606175fe1e8..8623840a6e4a 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -29,6 +29,7 @@ static struct {
 	bool sample_id_all;
 	bool exclude_guest;
 	bool mmap2;
+	bool cloexec;
 } perf_missing_features;
 
 #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y))
@@ -989,7 +990,7 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
 			      struct thread_map *threads)
 {
 	int cpu, thread;
-	unsigned long flags = 0;
+	unsigned long flags = PERF_FLAG_FD_CLOEXEC;
 	int pid = -1, err;
 	enum { NO_CHANGE, SET_TO_MAX, INCREASED_MAX } set_rlimit = NO_CHANGE;
 
@@ -998,11 +999,13 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
 		return -ENOMEM;
 
 	if (evsel->cgrp) {
-		flags = PERF_FLAG_PID_CGROUP;
+		flags |= PERF_FLAG_PID_CGROUP;
 		pid = evsel->cgrp->fd;
 	}
 
 fallback_missing_features:
+	if (perf_missing_features.cloexec)
+		flags &= ~(unsigned long)PERF_FLAG_FD_CLOEXEC;
 	if (perf_missing_features.mmap2)
 		evsel->attr.mmap2 = 0;
 	if (perf_missing_features.exclude_guest)
@@ -1071,7 +1074,10 @@ try_fallback:
 	if (err != -EINVAL || cpu > 0 || thread > 0)
 		goto out_close;
 
-	if (!perf_missing_features.mmap2 && evsel->attr.mmap2) {
+	if (!perf_missing_features.cloexec && (flags & PERF_FLAG_FD_CLOEXEC)) {
+		perf_missing_features.cloexec = true;
+		goto fallback_missing_features;
+	} else if (!perf_missing_features.mmap2 && evsel->attr.mmap2) {
 		perf_missing_features.mmap2 = true;
 		goto fallback_missing_features;
 	} else if (!perf_missing_features.exclude_guest &&
diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c
index 049e0a09ccd3..9a8d622809f6 100644
--- a/tools/perf/util/record.c
+++ b/tools/perf/util/record.c
@@ -4,6 +4,7 @@
 #include "parse-events.h"
 #include <api/fs/fs.h>
 #include "util.h"
+#include "cloexec.h"
 
 typedef void (*setup_probe_fn_t)(struct perf_evsel *evsel);
 
@@ -11,6 +12,7 @@ static int perf_do_probe_api(setup_probe_fn_t fn, int cpu, const char *str)
 {
 	struct perf_evlist *evlist;
 	struct perf_evsel *evsel;
+	unsigned long flags = perf_event_open_cloexec_flag();
 	int err = -EAGAIN, fd;
 
 	evlist = perf_evlist__new();
@@ -22,14 +24,14 @@ static int perf_do_probe_api(setup_probe_fn_t fn, int cpu, const char *str)
 
 	evsel = perf_evlist__first(evlist);
 
-	fd = sys_perf_event_open(&evsel->attr, -1, cpu, -1, 0);
+	fd = sys_perf_event_open(&evsel->attr, -1, cpu, -1, flags);
 	if (fd < 0)
 		goto out_delete;
 	close(fd);
 
 	fn(evsel);
 
-	fd = sys_perf_event_open(&evsel->attr, -1, cpu, -1, 0);
+	fd = sys_perf_event_open(&evsel->attr, -1, cpu, -1, flags);
 	if (fd < 0) {
 		if (errno == EINVAL)
 			err = -EINVAL;
@@ -203,7 +205,8 @@ bool perf_evlist__can_select_event(struct perf_evlist *evlist, const char *str)
 		cpu = evlist->cpus->map[0];
 	}
 
-	fd = sys_perf_event_open(&evsel->attr, -1, cpu, -1, 0);
+	fd = sys_perf_event_open(&evsel->attr, -1, cpu, -1,
+				 perf_event_open_cloexec_flag());
 	if (fd >= 0) {
 		close(fd);
 		ret = true;
-- 
1.8.3.1


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

* [PATCH 02/13] perf tests: Update attr test with PERF_FLAG_FD_CLOEXEC flag
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
  2014-07-16 20:02 ` [PATCH 01/13] perf tools: Enable close-on-exec flag on perf file descriptor Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 03/13] perf tools: Add jsmn `jasmine' JSON parser Jiri Olsa
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Jiri Olsa, Corey Ashford,
	David Ahern, Frederic Weisbecker, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra

We not support PERF_FLAG_FD_CLOEXEC flag, updating attr tests
accordingly.

Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-2mgzn5p9u74drmdmxo5unar0@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/attr/base-record | 3 ++-
 tools/perf/tests/attr/base-stat   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/perf/tests/attr/base-record b/tools/perf/tests/attr/base-record
index e9bd6391f2ae..f710b92ccff6 100644
--- a/tools/perf/tests/attr/base-record
+++ b/tools/perf/tests/attr/base-record
@@ -1,7 +1,8 @@
 [event]
 fd=1
 group_fd=-1
-flags=0
+# 0 or PERF_FLAG_FD_CLOEXEC flag
+flags=0|8
 cpu=*
 type=0|1
 size=96
diff --git a/tools/perf/tests/attr/base-stat b/tools/perf/tests/attr/base-stat
index 91cd48b399f3..dc3ada2470c0 100644
--- a/tools/perf/tests/attr/base-stat
+++ b/tools/perf/tests/attr/base-stat
@@ -1,7 +1,8 @@
 [event]
 fd=1
 group_fd=-1
-flags=0
+# 0 or PERF_FLAG_FD_CLOEXEC flag
+flags=0|8
 cpu=*
 type=0
 size=96
-- 
1.8.3.1


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

* [PATCH 03/13] perf tools: Add jsmn `jasmine' JSON parser
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
  2014-07-16 20:02 ` [PATCH 01/13] perf tools: Enable close-on-exec flag on perf file descriptor Jiri Olsa
  2014-07-16 20:02 ` [PATCH 02/13] perf tests: Update attr test with PERF_FLAG_FD_CLOEXEC flag Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 04/13] perf tools: Add support for text descriptions of events and alias add Jiri Olsa
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

I need a JSON parser. This adds the simplest JSON
parser I could find -- Serge Zaitsev's jsmn `jasmine' --
to the perf library. I merely converted it to (mostly)
Linux style and added support for non 0 terminated input.

The parser is quite straight forward and does not
copy any data, just returns tokens with offsets
into the input buffer. So it's relatively efficient
and simple to use.

The code is not fully checkpatch clean, but I didn't
want to completely fork the upstream code.

Original source: http://zserge.bitbucket.org/jsmn.html

In addition I added a simple wrapper that mmaps a json
file and provides some straight forward access functions.

Used in follow-on patches to parse event files.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/1405123165-22666-2-git-send-email-andi@firstfloor.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/Makefile.perf |   4 +
 tools/perf/util/jsmn.c   | 313 +++++++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/jsmn.h   |  67 ++++++++++
 tools/perf/util/json.c   | 155 +++++++++++++++++++++++
 tools/perf/util/json.h   |  13 ++
 5 files changed, 552 insertions(+)
 create mode 100644 tools/perf/util/jsmn.c
 create mode 100644 tools/perf/util/jsmn.h
 create mode 100644 tools/perf/util/json.c
 create mode 100644 tools/perf/util/json.h

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 66cde74ee851..64a174de59c9 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -300,6 +300,8 @@ LIB_H += ui/progress.h
 LIB_H += ui/util.h
 LIB_H += ui/ui.h
 LIB_H += util/data.h
+LIB_H += util/jsmn.h
+LIB_H += util/json.h
 
 LIB_OBJS += $(OUTPUT)util/abspath.o
 LIB_OBJS += $(OUTPUT)util/alias.o
@@ -374,6 +376,8 @@ LIB_OBJS += $(OUTPUT)util/record.o
 LIB_OBJS += $(OUTPUT)util/srcline.o
 LIB_OBJS += $(OUTPUT)util/data.o
 LIB_OBJS += $(OUTPUT)util/cloexec.o
+LIB_OBJS += $(OUTPUT)util/jsmn.o
+LIB_OBJS += $(OUTPUT)util/json.o
 
 LIB_OBJS += $(OUTPUT)ui/setup.o
 LIB_OBJS += $(OUTPUT)ui/helpline.o
diff --git a/tools/perf/util/jsmn.c b/tools/perf/util/jsmn.c
new file mode 100644
index 000000000000..11d1fa18bfa5
--- /dev/null
+++ b/tools/perf/util/jsmn.c
@@ -0,0 +1,313 @@
+/*
+ * Copyright (c) 2010 Serge A. Zaitsev
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * Slightly modified by AK to not assume 0 terminated input.
+ */
+
+#include <stdlib.h>
+#include "jsmn.h"
+
+/*
+ * Allocates a fresh unused token from the token pool.
+ */
+static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser,
+				   jsmntok_t *tokens, size_t num_tokens)
+{
+	jsmntok_t *tok;
+
+	if ((unsigned)parser->toknext >= num_tokens)
+		return NULL;
+	tok = &tokens[parser->toknext++];
+	tok->start = tok->end = -1;
+	tok->size = 0;
+	return tok;
+}
+
+/*
+ * Fills token type and boundaries.
+ */
+static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type,
+			    int start, int end)
+{
+	token->type = type;
+	token->start = start;
+	token->end = end;
+	token->size = 0;
+}
+
+/*
+ * Fills next available token with JSON primitive.
+ */
+static jsmnerr_t jsmn_parse_primitive(jsmn_parser *parser, const char *js,
+				      size_t len,
+				      jsmntok_t *tokens, size_t num_tokens)
+{
+	jsmntok_t *token;
+	int start;
+
+	start = parser->pos;
+
+	for (; parser->pos < len; parser->pos++) {
+		switch (js[parser->pos]) {
+#ifndef JSMN_STRICT
+		/*
+		 * In strict mode primitive must be followed by ","
+		 * or "}" or "]"
+		 */
+		case ':':
+#endif
+		case '\t':
+		case '\r':
+		case '\n':
+		case ' ':
+		case ',':
+		case ']':
+		case '}':
+			goto found;
+		default:
+			break;
+		}
+		if (js[parser->pos] < 32 || js[parser->pos] >= 127) {
+			parser->pos = start;
+			return JSMN_ERROR_INVAL;
+		}
+	}
+#ifdef JSMN_STRICT
+	/*
+	 * In strict mode primitive must be followed by a
+	 * comma/object/array.
+	 */
+	parser->pos = start;
+	return JSMN_ERROR_PART;
+#endif
+
+found:
+	token = jsmn_alloc_token(parser, tokens, num_tokens);
+	if (token == NULL) {
+		parser->pos = start;
+		return JSMN_ERROR_NOMEM;
+	}
+	jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos);
+	parser->pos--; /* parent sees closing brackets */
+	return JSMN_SUCCESS;
+}
+
+/*
+ * Fills next token with JSON string.
+ */
+static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
+				   size_t len,
+				   jsmntok_t *tokens, size_t num_tokens)
+{
+	jsmntok_t *token;
+	int start = parser->pos;
+
+	/* Skip starting quote */
+	parser->pos++;
+
+	for (; parser->pos < len; parser->pos++) {
+		char c = js[parser->pos];
+
+		/* Quote: end of string */
+		if (c == '\"') {
+			token = jsmn_alloc_token(parser, tokens, num_tokens);
+			if (token == NULL) {
+				parser->pos = start;
+				return JSMN_ERROR_NOMEM;
+			}
+			jsmn_fill_token(token, JSMN_STRING, start+1,
+					parser->pos);
+			return JSMN_SUCCESS;
+		}
+
+		/* Backslash: Quoted symbol expected */
+		if (c == '\\') {
+			parser->pos++;
+			switch (js[parser->pos]) {
+				/* Allowed escaped symbols */
+			case '\"':
+			case '/':
+			case '\\':
+			case 'b':
+			case 'f':
+			case 'r':
+			case 'n':
+			case 't':
+				break;
+				/* Allows escaped symbol \uXXXX */
+			case 'u':
+				/* TODO */
+				break;
+				/* Unexpected symbol */
+			default:
+				parser->pos = start;
+				return JSMN_ERROR_INVAL;
+			}
+		}
+	}
+	parser->pos = start;
+	return JSMN_ERROR_PART;
+}
+
+/*
+ * Parse JSON string and fill tokens.
+ */
+jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len,
+		     jsmntok_t *tokens, unsigned int num_tokens)
+{
+	jsmnerr_t r;
+	int i;
+	jsmntok_t *token;
+
+	for (; parser->pos < len; parser->pos++) {
+		char c;
+		jsmntype_t type;
+
+		c = js[parser->pos];
+		switch (c) {
+		case '{':
+		case '[':
+			token = jsmn_alloc_token(parser, tokens, num_tokens);
+			if (token == NULL)
+				return JSMN_ERROR_NOMEM;
+			if (parser->toksuper != -1)
+				tokens[parser->toksuper].size++;
+			token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY);
+			token->start = parser->pos;
+			parser->toksuper = parser->toknext - 1;
+			break;
+		case '}':
+		case ']':
+			type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY);
+			for (i = parser->toknext - 1; i >= 0; i--) {
+				token = &tokens[i];
+				if (token->start != -1 && token->end == -1) {
+					if (token->type != type)
+						return JSMN_ERROR_INVAL;
+					parser->toksuper = -1;
+					token->end = parser->pos + 1;
+					break;
+				}
+			}
+			/* Error if unmatched closing bracket */
+			if (i == -1)
+				return JSMN_ERROR_INVAL;
+			for (; i >= 0; i--) {
+				token = &tokens[i];
+				if (token->start != -1 && token->end == -1) {
+					parser->toksuper = i;
+					break;
+				}
+			}
+			break;
+		case '\"':
+			r = jsmn_parse_string(parser, js, len, tokens,
+					      num_tokens);
+			if (r < 0)
+				return r;
+			if (parser->toksuper != -1)
+				tokens[parser->toksuper].size++;
+			break;
+		case '\t':
+		case '\r':
+		case '\n':
+		case ':':
+		case ',':
+		case ' ':
+			break;
+#ifdef JSMN_STRICT
+			/*
+			 * In strict mode primitives are:
+			 * numbers and booleans.
+			 */
+		case '-':
+		case '0':
+		case '1':
+		case '2':
+		case '3':
+		case '4':
+		case '5':
+		case '6':
+		case '7':
+		case '8':
+		case '9':
+		case 't':
+		case 'f':
+		case 'n':
+#else
+			/*
+			 * In non-strict mode every unquoted value
+			 * is a primitive.
+			 */
+			/*FALL THROUGH */
+		default:
+#endif
+			r = jsmn_parse_primitive(parser, js, len, tokens,
+						 num_tokens);
+			if (r < 0)
+				return r;
+			if (parser->toksuper != -1)
+				tokens[parser->toksuper].size++;
+			break;
+
+#ifdef JSMN_STRICT
+			/* Unexpected char in strict mode */
+		default:
+			return JSMN_ERROR_INVAL;
+#endif
+		}
+	}
+
+	for (i = parser->toknext - 1; i >= 0; i--) {
+		/* Unmatched opened object or array */
+		if (tokens[i].start != -1 && tokens[i].end == -1)
+			return JSMN_ERROR_PART;
+	}
+
+	return JSMN_SUCCESS;
+}
+
+/*
+ * Creates a new parser based over a given  buffer with an array of tokens
+ * available.
+ */
+void jsmn_init(jsmn_parser *parser)
+{
+	parser->pos = 0;
+	parser->toknext = 0;
+	parser->toksuper = -1;
+}
+
+const char *jsmn_strerror(jsmnerr_t err)
+{
+	switch (err) {
+	case JSMN_ERROR_NOMEM:
+		return "No enough tokens";
+	case JSMN_ERROR_INVAL:
+		return "Invalid character inside JSON string";
+	case JSMN_ERROR_PART:
+		return "The string is not a full JSON packet, more bytes expected";
+	case JSMN_SUCCESS:
+		return "Success";
+	default:
+		return "Unknown json error";
+	}
+}
diff --git a/tools/perf/util/jsmn.h b/tools/perf/util/jsmn.h
new file mode 100644
index 000000000000..d666b10cf25b
--- /dev/null
+++ b/tools/perf/util/jsmn.h
@@ -0,0 +1,67 @@
+#ifndef __JSMN_H_
+#define __JSMN_H_
+
+/*
+ * JSON type identifier. Basic types are:
+ *	o Object
+ *	o Array
+ *	o String
+ *	o Other primitive: number, boolean (true/false) or null
+ */
+typedef enum {
+	JSMN_PRIMITIVE = 0,
+	JSMN_OBJECT = 1,
+	JSMN_ARRAY = 2,
+	JSMN_STRING = 3
+} jsmntype_t;
+
+typedef enum {
+	/* Not enough tokens were provided */
+	JSMN_ERROR_NOMEM = -1,
+	/* Invalid character inside JSON string */
+	JSMN_ERROR_INVAL = -2,
+	/* The string is not a full JSON packet, more bytes expected */
+	JSMN_ERROR_PART = -3,
+	/* Everything was fine */
+	JSMN_SUCCESS = 0
+} jsmnerr_t;
+
+/*
+ * JSON token description.
+ * @param		type	type (object, array, string etc.)
+ * @param		start	start position in JSON data string
+ * @param		end		end position in JSON data string
+ */
+typedef struct {
+	jsmntype_t type;
+	int start;
+	int end;
+	int size;
+} jsmntok_t;
+
+/*
+ * JSON parser. Contains an array of token blocks available. Also stores
+ * the string being parsed now and current position in that string
+ */
+typedef struct {
+	unsigned int pos; /* offset in the JSON string */
+	int toknext; /* next token to allocate */
+	int toksuper; /* superior token node, e.g parent object or array */
+} jsmn_parser;
+
+/*
+ * Create JSON parser over an array of tokens
+ */
+void jsmn_init(jsmn_parser *parser);
+
+/*
+ * Run JSON parser. It parses a JSON data string into and array of tokens,
+ * each describing a single JSON object.
+ */
+jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js,
+		     size_t len,
+		     jsmntok_t *tokens, unsigned int num_tokens);
+
+const char *jsmn_strerror(jsmnerr_t err);
+
+#endif /* __JSMN_H_ */
diff --git a/tools/perf/util/json.c b/tools/perf/util/json.c
new file mode 100644
index 000000000000..cac1b83bda0a
--- /dev/null
+++ b/tools/perf/util/json.c
@@ -0,0 +1,155 @@
+/* Parse JSON files using the JSMN parser. */
+
+/*
+ * Copyright (c) 2014, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "jsmn.h"
+#include "json.h"
+#include <linux/kernel.h>
+
+static char *mapfile(const char *fn, size_t *size)
+{
+	unsigned ps = sysconf(_SC_PAGESIZE);
+	struct stat st;
+	char *map = NULL;
+	int err;
+	int fd = open(fn, O_RDONLY);
+
+	if (fd < 0)
+		return NULL;
+	err = fstat(fd, &st);
+	if (err < 0)
+		goto out;
+	*size = st.st_size;
+	map = mmap(NULL,
+		   (st.st_size + ps - 1) & ~(ps - 1),
+		   PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
+	if (map == MAP_FAILED)
+		map = NULL;
+out:
+	close(fd);
+	return map;
+}
+
+static void unmapfile(char *map, size_t size)
+{
+	unsigned ps = sysconf(_SC_PAGESIZE);
+	munmap(map, roundup(size, ps));
+}
+
+/*
+ * Parse json file using jsmn. Return array of tokens,
+ * and mapped file. Caller needs to free array.
+ */
+jsmntok_t *parse_json(const char *fn, char **map, size_t *size, int *len)
+{
+	jsmn_parser parser;
+	jsmntok_t *tokens;
+	jsmnerr_t res;
+	unsigned sz;
+
+	*map = mapfile(fn, size);
+	if (!*map)
+		return NULL;
+	/* Heuristic */
+	sz = *size * 16;
+	tokens = malloc(sz);
+	if (!tokens)
+		goto error;
+	jsmn_init(&parser);
+	res = jsmn_parse(&parser, *map, *size, tokens,
+			 sz / sizeof(jsmntok_t));
+	if (res != JSMN_SUCCESS) {
+		pr_err("%s: json error %s\n", fn, jsmn_strerror(res));
+		goto error_free;
+	}
+	if (len)
+		*len = parser.toknext;
+	return tokens;
+error_free:
+	free(tokens);
+error:
+	unmapfile(*map, *size);
+	return NULL;
+}
+
+void free_json(char *map, size_t size, jsmntok_t *tokens)
+{
+	free(tokens);
+	unmapfile(map, size);
+}
+
+static int countchar(char *map, char c, int end)
+{
+	int i;
+	int count = 0;
+	for (i = 0; i < end; i++)
+		if (map[i] == c)
+			count++;
+	return count;
+}
+
+/* Return line number of a jsmn token */
+int json_line(char *map, jsmntok_t *t)
+{
+	return countchar(map, '\n', t->start) + 1;
+}
+
+static const char * const jsmn_types[] = {
+	[JSMN_PRIMITIVE] = "primitive",
+	[JSMN_ARRAY] = "array",
+	[JSMN_OBJECT] = "object",
+	[JSMN_STRING] = "string"
+};
+
+#define LOOKUP(a, i) ((i) < (sizeof(a)/sizeof(*(a))) ? ((a)[i]) : "?")
+
+/* Return type name of a jsmn token */
+const char *json_name(jsmntok_t *t)
+{
+	return LOOKUP(jsmn_types, t->type);
+}
+
+int json_len(jsmntok_t *t)
+{
+	return t->end - t->start;
+}
+
+/* Is string t equal to s? */
+int json_streq(char *map, jsmntok_t *t, const char *s)
+{
+	unsigned len = json_len(t);
+	return len == strlen(s) && !strncasecmp(map + t->start, s, len);
+}
diff --git a/tools/perf/util/json.h b/tools/perf/util/json.h
new file mode 100644
index 000000000000..37dd9e9c5a3f
--- /dev/null
+++ b/tools/perf/util/json.h
@@ -0,0 +1,13 @@
+#ifndef JSON_H
+#define JSON_H 1
+
+#include "jsmn.h"
+
+jsmntok_t *parse_json(const char *fn, char **map, size_t *size, int *len);
+void free_json(char *map, size_t size, jsmntok_t *tokens);
+int json_line(char *map, jsmntok_t *t);
+const char *json_name(jsmntok_t *t);
+int json_streq(char *map, jsmntok_t *t, const char *s);
+int json_len(jsmntok_t *t);
+
+#endif
-- 
1.8.3.1


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

* [PATCH 04/13] perf tools: Add support for text descriptions of events and alias add
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
                   ` (2 preceding siblings ...)
  2014-07-16 20:02 ` [PATCH 03/13] perf tools: Add jsmn `jasmine' JSON parser Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 05/13] perf tools: Update perf list to output descriptions Jiri Olsa
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

Change pmu.c to allow descriptions of events and add interfaces
to add aliases at runtime from another file. To be used by jevents in
a followon patch

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/1405123165-22666-3-git-send-email-andi@firstfloor.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/pmu.c | 43 ++++++++++++++++++++++++++++++-------------
 1 file changed, 30 insertions(+), 13 deletions(-)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 7a811eb61f75..f9c704628218 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -14,6 +14,7 @@
 
 struct perf_pmu_alias {
 	char *name;
+	char *desc;
 	struct list_head terms;
 	struct list_head list;
 	char unit[UNIT_MAX_LEN+1];
@@ -171,17 +172,12 @@ error:
 	return -1;
 }
 
-static int perf_pmu__new_alias(struct list_head *list, char *dir, char *name, FILE *file)
+static int __perf_pmu__new_alias(struct list_head *list, char *name,
+				 char *dir, char *desc, char *val)
 {
 	struct perf_pmu_alias *alias;
-	char buf[256];
 	int ret;
 
-	ret = fread(buf, 1, sizeof(buf), file);
-	if (ret == 0)
-		return -EINVAL;
-	buf[ret] = 0;
-
 	alias = malloc(sizeof(*alias));
 	if (!alias)
 		return -ENOMEM;
@@ -190,24 +186,45 @@ static int perf_pmu__new_alias(struct list_head *list, char *dir, char *name, FI
 	alias->scale = 1.0;
 	alias->unit[0] = '\0';
 
-	ret = parse_events_terms(&alias->terms, buf);
+	ret = parse_events_terms(&alias->terms, val);
 	if (ret) {
+		pr_err("Cannot parse alias %s: %d\n", val, ret);
 		free(alias);
 		return ret;
 	}
 
 	alias->name = strdup(name);
-	/*
-	 * load unit name and scale if available
-	 */
-	perf_pmu__parse_unit(alias, dir, name);
-	perf_pmu__parse_scale(alias, dir, name);
 
+	if (dir) {
+		/*
+		 * load unit name and scale if available
+		 */
+		perf_pmu__parse_unit(alias, dir, name);
+		perf_pmu__parse_scale(alias, dir, name);
+	}
+
+	alias->desc = desc ? strdup(desc) : NULL;
 	list_add_tail(&alias->list, list);
 
 	return 0;
 }
 
+static int perf_pmu__new_alias(struct list_head *list,
+			       char *dir,
+			       char *name,
+			       FILE *file)
+{
+	char buf[256];
+	int ret;
+
+	ret = fread(buf, 1, sizeof(buf), file);
+	if (ret == 0)
+		return -EINVAL;
+	buf[ret] = 0;
+
+	return __perf_pmu__new_alias(list, name, dir, NULL, buf);
+}
+
 /*
  * Process all the sysfs attributes located under the directory
  * specified in 'dir' parameter.
-- 
1.8.3.1


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

* [PATCH 05/13] perf tools: Update perf list to output descriptions
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
                   ` (3 preceding siblings ...)
  2014-07-16 20:02 ` [PATCH 04/13] perf tools: Add support for text descriptions of events and alias add Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 06/13] perf tools: Allow events with dot Jiri Olsa
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

Add support to perf list to print aliases with descriptions.
Support word wrapping for descriptions.
Fix up the sorting code to put aliases with descriptions
last.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/n/1405123165-22666-4-git-send-email-andi@firstfloor.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/pmu.c | 84 +++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 68 insertions(+), 16 deletions(-)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index f9c704628218..baec0905eef8 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -737,11 +737,51 @@ static char *format_alias_or(char *buf, int len, struct perf_pmu *pmu,
 	return buf;
 }
 
-static int cmp_string(const void *a, const void *b)
+struct pair {
+	char *name;
+	char *desc;
+};
+
+static int cmp_pair(const void *a, const void *b)
+{
+	const struct pair *as = a;
+	const struct pair *bs = b;
+
+	/* Put downloaded event list last */
+	if (!!as->desc != !!bs->desc)
+		return !!as->desc - !!bs->desc;
+	return strcmp(as->name, bs->name);
+}
+
+static void wordwrap(char *s, int start, int max, int corr)
+{
+	int column = start;
+	int n;
+
+	while (*s) {
+		int wlen = strcspn(s, " \t");
+
+		if (column + wlen >= max && column > start) {
+			printf("\n%*s", start, "");
+			column = start + corr;
+		}
+		n = printf("%s%.*s", column > start ? " " : "", wlen, s);
+		if (n <= 0)
+			break;
+		s += wlen;
+		column += n;
+		while (isspace(*s))
+			s++;
+	}
+}
+
+static int get_columns(void)
 {
-	const char * const *as = a;
-	const char * const *bs = b;
-	return strcmp(*as, *bs);
+	/*
+	 * Should ask the terminal with TIOCGWINSZ here, but we
+	 * need the original fd before the pager.
+	 */
+	return 79;
 }
 
 void print_pmu_events(const char *event_glob, bool name_only)
@@ -751,21 +791,24 @@ void print_pmu_events(const char *event_glob, bool name_only)
 	char buf[1024];
 	int printed = 0;
 	int len, j;
-	char **aliases;
+	struct pair *aliases;
+	int numdesc = 0;
+	int columns = get_columns();
 
 	pmu = NULL;
 	len = 0;
 	while ((pmu = perf_pmu__scan(pmu)) != NULL)
 		list_for_each_entry(alias, &pmu->aliases, list)
 			len++;
-	aliases = malloc(sizeof(char *) * len);
+	aliases = malloc(sizeof(struct pair) * len);
 	if (!aliases)
 		return;
 	pmu = NULL;
 	j = 0;
 	while ((pmu = perf_pmu__scan(pmu)) != NULL)
 		list_for_each_entry(alias, &pmu->aliases, list) {
-			char *name = format_alias(buf, sizeof(buf), pmu, alias);
+			char *name = alias->desc ? alias->name :
+				format_alias(buf, sizeof(buf), pmu, alias);
 			bool is_cpu = !strcmp(pmu->name, "cpu");
 
 			if (event_glob != NULL &&
@@ -773,22 +816,31 @@ void print_pmu_events(const char *event_glob, bool name_only)
 			      (!is_cpu && strglobmatch(alias->name,
 						       event_glob))))
 				continue;
-			aliases[j] = name;
-			if (is_cpu && !name_only)
-				aliases[j] = format_alias_or(buf, sizeof(buf),
-							      pmu, alias);
-			aliases[j] = strdup(aliases[j]);
+			aliases[j].name = name;
+			if (is_cpu && !name_only && !alias->desc)
+				aliases[j].name = format_alias_or(buf,
+								  sizeof(buf),
+								  pmu, alias);
+			aliases[j].name = strdup(aliases[j].name);
+			aliases[j].desc = alias->desc;
 			j++;
 		}
 	len = j;
-	qsort(aliases, len, sizeof(char *), cmp_string);
+	qsort(aliases, len, sizeof(struct pair), cmp_pair);
 	for (j = 0; j < len; j++) {
 		if (name_only) {
-			printf("%s ", aliases[j]);
+			printf("%s ", aliases[j].name);
 			continue;
 		}
-		printf("  %-50s [Kernel PMU event]\n", aliases[j]);
-		zfree(&aliases[j]);
+		if (aliases[j].desc) {
+			if (numdesc++ == 0 && printed)
+				printf("\n");
+			printf("  %-50s [", aliases[j].name);
+			wordwrap(aliases[j].desc, 53, columns, 1);
+			printf("]\n");
+		} else
+			printf("  %-50s [Kernel PMU event]\n", aliases[j].name);
+		zfree(&aliases[j].name);
 		printed++;
 	}
 	if (printed)
-- 
1.8.3.1


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

* [PATCH 06/13] perf tools: Allow events with dot
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
                   ` (4 preceding siblings ...)
  2014-07-16 20:02 ` [PATCH 05/13] perf tools: Update perf list to output descriptions Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 07/13] perf tools: Add support for reading JSON event files Jiri Olsa
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

The Intel events use a dot to separate event name and unit mask.
Allow dot in names in the scanner, and remove special handling
of dot as EOF. Also remove the hack in jevents to replace dot
with underscore. This way dotted events can be specified
directly by the user.

I'm not fully sure this change to the scanner is correct
(what was the dot special case good for?), but I haven't
found anything that breaks with it so far at least.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/1405123165-22666-5-git-send-email-andi@firstfloor.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/parse-events.l | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index 343299575b30..709fa3b57e83 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -81,7 +81,7 @@ num_dec		[0-9]+
 num_hex		0x[a-fA-F0-9]+
 num_raw_hex	[a-fA-F0-9]+
 name		[a-zA-Z_*?][a-zA-Z0-9_*?]*
-name_minus	[a-zA-Z_*?][a-zA-Z0-9\-_*?]*
+name_minus	[a-zA-Z_*?][a-zA-Z0-9\-_*?.]*
 /* If you add a modifier you need to update check_modifier() */
 modifier_event	[ukhpGHSD]+
 modifier_bp	[rwx]{1,3}
@@ -119,7 +119,6 @@ modifier_bp	[rwx]{1,3}
 			return PE_EVENT_NAME;
 		}
 
-.		|
 <<EOF>>		{
 			BEGIN(INITIAL); yyless(0);
 		}
-- 
1.8.3.1


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

* [PATCH 07/13] perf tools: Add support for reading JSON event files
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
                   ` (5 preceding siblings ...)
  2014-07-16 20:02 ` [PATCH 06/13] perf tools: Allow events with dot Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 08/13] perf tools: Automatically look for event file name for cpu Jiri Olsa
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

Add a parser for Intel style JSON event files. This allows
to use an Intel event list directly with perf. The Intel
event lists can be quite large and are too big to store
in unswappable kernel memory.

The parser code knows how to convert the JSON fields
to perf fields. The conversion code is straight forward.
It knows (very little) Intel specific information, and can be easily
extended to handle fields for other CPUs.

The parser code is partially shared with an independent parsing
library, which is 2-clause BSD licenced. To avoid any conflicts I marked
those files as BSD licenced too. As part of perf they become GPLv2.

The events are handled using the existing alias machinery.

We output the BriefDescription in perf list.

Right now the json file can be specified as an argument
to perf stat/record/list. Followon patches will automate this.

JSON files look like this:

[
  {
    "EventCode": "0x00",
    "UMask": "0x01",
    "EventName": "INST_RETIRED.ANY",
    "BriefDescription": "Instructions retired from execution.",
    "PublicDescription": "Instructions retired from execution.",
    "Counter": "Fixed counter 1",
    "CounterHTOff": "Fixed counter 1",
    "SampleAfterValue": "2000003",
    "MSRIndex": "0",
    "MSRValue": "0",
    "TakenAlone": "0",
    "CounterMask": "0",
    "Invert": "0",
    "AnyThread": "0",
    "EdgeDetect": "0",
    "PEBS": "0",
    "PRECISE_STORE": "0",
    "Errata": "null",
    "Offcore": "0"
  }
]

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/1405123165-22666-6-git-send-email-andi@firstfloor.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/Documentation/perf-list.txt   |  12 +-
 tools/perf/Documentation/perf-record.txt |   8 +-
 tools/perf/Documentation/perf-stat.txt   |   8 +-
 tools/perf/Makefile.perf                 |   2 +
 tools/perf/builtin-list.c                |   2 +
 tools/perf/builtin-record.c              |   3 +
 tools/perf/builtin-stat.c                |   2 +
 tools/perf/util/jevents.c                | 246 +++++++++++++++++++++++++++++++
 tools/perf/util/jevents.h                |   8 +
 tools/perf/util/pmu.c                    |  14 ++
 tools/perf/util/pmu.h                    |   2 +
 11 files changed, 303 insertions(+), 4 deletions(-)
 create mode 100644 tools/perf/util/jevents.c
 create mode 100644 tools/perf/util/jevents.h

diff --git a/tools/perf/Documentation/perf-list.txt b/tools/perf/Documentation/perf-list.txt
index 6fce6a622206..da03992a635b 100644
--- a/tools/perf/Documentation/perf-list.txt
+++ b/tools/perf/Documentation/perf-list.txt
@@ -15,8 +15,16 @@ 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
+OPTIONS
+-------
+--events-file=::
+Specify JSON event list file to use for parsing events. Files can be
+automatically downloaded with perf download.
+The JSON event file can be also specified with the EVENTMAP environment
+variable.
+
+
+[[EVENT_MODIFIERS]] EVENT MODIFIERS
 ---------------
 
 Events can optionally have a modifer by appending a colon and one or
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index d460049cae8e..62c27fc629d0 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -214,6 +214,12 @@ if combined with -a or -C options.
 After starting the program, wait msecs before measuring. This is useful to
 filter out the startup phase of the program, which is often very different.
 
+--events-file=::
+Specify JSON event list file to use for parsing events. Must be specified
+before the -e option. Files can be automatically downloaded with perf download.
+The JSON event file can be also specified with the EVENTMAP environment
+variable.
+
 SEE ALSO
 --------
-linkperf:perf-stat[1], linkperf:perf-list[1]
+linkperf:perf-stat[1], linkperf:perf-list[1], linkperf:perf-download[1]
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index 29ee857c09c6..cd9b62f5bef4 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -142,6 +142,12 @@ filter out the startup phase of the program, which is often very different.
 
 Print statistics of transactional execution if supported.
 
+--events-file=::
+Specify JSON event list file to use for parsing events. Must be specified before
+the -e option. Files can be automatically downloaded with perf download.
+The JSON event file can be also specified with the EVENTMAP environment
+variable.
+
 EXAMPLES
 --------
 
@@ -162,4 +168,4 @@ $ perf stat -- make -j
 
 SEE ALSO
 --------
-linkperf:perf-top[1], linkperf:perf-list[1]
+linkperf:perf-top[1], linkperf:perf-list[1], linkperf:perf-download[1]
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 64a174de59c9..f65eb859e116 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -302,6 +302,7 @@ LIB_H += ui/ui.h
 LIB_H += util/data.h
 LIB_H += util/jsmn.h
 LIB_H += util/json.h
+LIB_H += util/jevents.h
 
 LIB_OBJS += $(OUTPUT)util/abspath.o
 LIB_OBJS += $(OUTPUT)util/alias.o
@@ -378,6 +379,7 @@ LIB_OBJS += $(OUTPUT)util/data.o
 LIB_OBJS += $(OUTPUT)util/cloexec.o
 LIB_OBJS += $(OUTPUT)util/jsmn.o
 LIB_OBJS += $(OUTPUT)util/json.o
+LIB_OBJS += $(OUTPUT)util/jevents.o
 
 LIB_OBJS += $(OUTPUT)ui/setup.o
 LIB_OBJS += $(OUTPUT)ui/helpline.o
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 011195e38f21..086c96fa959b 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -20,6 +20,8 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
 {
 	int i;
 	const struct option list_options[] = {
+		OPT_STRING(0, "events-file", &json_file, "json file",
+			   "Read event json file"),
 		OPT_END()
 	};
 	const char * const list_usage[] = {
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 378b85b731a7..f22f27c01615 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -25,6 +25,7 @@
 #include "util/cpumap.h"
 #include "util/thread_map.h"
 #include "util/data.h"
+#include "util/pmu.h"
 
 #include <unistd.h>
 #include <sched.h>
@@ -876,6 +877,8 @@ const struct option record_options[] = {
 		    "sample transaction flags (special events only)"),
 	OPT_BOOLEAN(0, "per-thread", &record.opts.target.per_thread,
 		    "use per-thread mmaps"),
+	OPT_STRING(0, "events-file", &json_file, "json file",
+		   "Read event json file"),
 	OPT_END()
 };
 
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 3e80aa10cfd8..37abdc2b8ed6 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1668,6 +1668,8 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 		     "aggregate counts per physical processor core", AGGR_CORE),
 	OPT_UINTEGER('D', "delay", &initial_delay,
 		     "ms to wait before starting measurement after program start"),
+	OPT_STRING(0, "events-file", &json_file, "json file",
+		   "Read event json file"),
 	OPT_END()
 	};
 	const char * const stat_usage[] = {
diff --git a/tools/perf/util/jevents.c b/tools/perf/util/jevents.c
new file mode 100644
index 000000000000..a23f57f112da
--- /dev/null
+++ b/tools/perf/util/jevents.c
@@ -0,0 +1,246 @@
+/* Parse event JSON files */
+
+/*
+ * Copyright (c) 2014, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+#include "cache.h"
+#include "jsmn.h"
+#include "json.h"
+#include "jevents.h"
+
+static void addfield(char *map, char **dst, const char *sep,
+		     const char *a, jsmntok_t *bt)
+{
+	unsigned len = strlen(a) + 1 + strlen(sep);
+	int olen = *dst ? strlen(*dst) : 0;
+	int blen = bt ? json_len(bt) : 0;
+	char *out;
+
+	out = realloc(*dst, len + olen + blen);
+	if (!out) {
+		/* Don't add field in this case */
+		return;
+	}
+	*dst = out;
+
+	if (!olen)
+		*(*dst) = 0;
+	else
+		strcat(*dst, sep);
+	strcat(*dst, a);
+	if (bt)
+		strncat(*dst, map + bt->start, blen);
+}
+
+static void fixname(char *s)
+{
+	for (; *s; s++)
+		*s = tolower(*s);
+}
+
+static void fixdesc(char *s)
+{
+	char *e = s + strlen(s);
+
+	/* Remove trailing dots that look ugly in perf list */
+	--e;
+	while (e >= s && isspace(*e))
+		--e;
+	if (*e == '.')
+		*e = 0;
+}
+
+static struct msrmap {
+	const char *num;
+	const char *pname;
+} msrmap[] = {
+	{ "0x3F6", "ldlat=" },
+	{ "0x1A6", "offcore_rsp=" },
+	{ "0x1A7", "offcore_rsp=" },
+	{ NULL, NULL }
+};
+
+static struct field {
+	const char *field;
+	const char *kernel;
+} fields[] = {
+	{ "EventCode",	"event=" },
+	{ "UMask",	"umask=" },
+	{ "CounterMask", "cmask=" },
+	{ "Invert",	"inv=" },
+	{ "AnyThread",	"any=" },
+	{ "EdgeDetect",	"edge=" },
+	{ "SampleAfterValue", "period=" },
+	{ NULL, NULL }
+};
+
+static void cut_comma(char *map, jsmntok_t *newval)
+{
+	int i;
+
+	/* Cut off everything after comma */
+	for (i = newval->start; i < newval->end; i++) {
+		if (map[i] == ',')
+			newval->end = i;
+	}
+}
+
+static int match_field(char *map, jsmntok_t *field, int nz,
+		       char **event, jsmntok_t *val)
+{
+	struct field *f;
+	jsmntok_t newval = *val;
+
+	for (f = fields; f->field; f++)
+		if (json_streq(map, field, f->field) && nz) {
+			cut_comma(map, &newval);
+			addfield(map, event, ",", f->kernel, &newval);
+			return 1;
+		}
+	return 0;
+}
+
+static struct msrmap *lookup_msr(char *map, jsmntok_t *val)
+{
+	jsmntok_t newval = *val;
+	static bool warned;
+	int i;
+
+	cut_comma(map, &newval);
+	for (i = 0; msrmap[i].num; i++)
+		if (json_streq(map, &newval, msrmap[i].num))
+			return &msrmap[i];
+	if (!warned) {
+		warned = true;
+		pr_err("Unknown MSR in event file %.*s\n",
+			json_len(val), map + val->start);
+	}
+	return NULL;
+}
+
+#define EXPECT(e, t, m) do { if (!(e)) {			\
+	jsmntok_t *loc = (t);					\
+	if (!(t)->start && (t) > tokens)			\
+		loc = (t) - 1;					\
+		pr_err("%s:%d: " m ", got %s\n", fn,		\
+			json_line(map, loc),			\
+			json_name(t));				\
+	goto out_free;						\
+} } while (0)
+
+/* Call func with each event in the json file */
+
+int json_events(const char *fn,
+	  int (*func)(void *data, char *name, char *event, char *desc),
+	  void *data)
+{
+	int err = -EIO;
+	size_t size;
+	jsmntok_t *tokens, *tok;
+	int i, j, len;
+	char *map;
+
+	tokens = parse_json(fn, &map, &size, &len);
+	if (!tokens)
+		return -EIO;
+	EXPECT(tokens->type == JSMN_ARRAY, tokens, "expected top level array");
+	tok = tokens + 1;
+	for (i = 0; i < tokens->size; i++) {
+		char *event = NULL, *desc = NULL, *name = NULL;
+		struct msrmap *msr = NULL;
+		jsmntok_t *msrval = NULL;
+		jsmntok_t *precise = NULL;
+		jsmntok_t *obj = tok++;
+
+		EXPECT(obj->type == JSMN_OBJECT, obj, "expected object");
+		for (j = 0; j < obj->size; j += 2) {
+			jsmntok_t *field, *val;
+			int nz;
+
+			field = tok + j;
+			EXPECT(field->type == JSMN_STRING, tok + j,
+			       "Expected field name");
+			val = tok + j + 1;
+			EXPECT(val->type == JSMN_STRING, tok + j + 1,
+			       "Expected string value");
+
+			nz = !json_streq(map, val, "0");
+			if (match_field(map, field, nz, &event, val)) {
+				/* ok */
+			} else if (json_streq(map, field, "EventName")) {
+				addfield(map, &name, "", "", val);
+			} else if (json_streq(map, field, "BriefDescription")) {
+				addfield(map, &desc, "", "", val);
+				fixdesc(desc);
+			} else if (json_streq(map, field, "PEBS") && nz) {
+				precise = val;
+			} else if (json_streq(map, field, "MSRIndex") && nz) {
+				msr = lookup_msr(map, val);
+			} else if (json_streq(map, field, "MSRValue")) {
+				msrval = val;
+			} else if (json_streq(map, field, "Errata") &&
+				   !json_streq(map, val, "null")) {
+				addfield(map, &desc, ". ",
+					" Spec update: ", val);
+			} else if (json_streq(map, field, "Data_LA") && nz) {
+				addfield(map, &desc, ". ",
+					" Supports address when precise",
+					NULL);
+			}
+			/* ignore unknown fields */
+		}
+		if (precise && !strstr(desc, "(Precise Event)")) {
+			if (json_streq(map, precise, "2"))
+				addfield(map, &desc, " ", "(Must be precise)",
+						NULL);
+			else
+				addfield(map, &desc, " ",
+						"(Precise event)", NULL);
+		}
+		if (msr != NULL)
+			addfield(map, &event, ",", msr->pname, msrval);
+		fixname(name);
+		err = func(data, name, event, desc);
+		free(event);
+		free(desc);
+		free(name);
+		if (err)
+			break;
+		tok += j;
+	}
+	EXPECT(tok - tokens == len, tok, "unexpected objects at end");
+	err = 0;
+out_free:
+	free_json(map, size, tokens);
+	return err;
+}
diff --git a/tools/perf/util/jevents.h b/tools/perf/util/jevents.h
new file mode 100644
index 000000000000..fbc45497078e
--- /dev/null
+++ b/tools/perf/util/jevents.h
@@ -0,0 +1,8 @@
+#ifndef JEVENTS_H
+#define JEVENTS_H 1
+
+int json_events(const char *fn,
+		int (*func)(void *data, char *name, char *event, char *desc),
+		void *data);
+
+#endif
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index baec0905eef8..9f154afc95fe 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -9,6 +9,9 @@
 #include "pmu.h"
 #include "parse-events.h"
 #include "cpumap.h"
+#include "jevents.h"
+
+const char *json_file;
 
 #define UNIT_MAX_LEN	31 /* max length for event unit name */
 
@@ -273,6 +276,14 @@ static int pmu_aliases_parse(char *dir, struct list_head *head)
 	return ret;
 }
 
+static int add_alias(void *data, char *name, char *event, char *desc)
+{
+	struct list_head *head = (struct list_head *)data;
+
+	__perf_pmu__new_alias(head, name, NULL, desc, event);
+	return 0;
+}
+
 /*
  * Reading the pmu event aliases definition, which should be located at:
  * /sys/bus/event_source/devices/<dev>/events as sysfs group attributes.
@@ -422,6 +433,9 @@ static struct perf_pmu *pmu_lookup(const char *name)
 	if (pmu_aliases(name, &aliases))
 		return NULL;
 
+	if (!strcmp(name, "cpu") && json_file)
+		json_events(json_file, add_alias, &aliases);
+
 	if (pmu_type(name, &type))
 		return NULL;
 
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index c14a543ce1f3..583d21e4cefb 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -46,4 +46,6 @@ void print_pmu_events(const char *event_glob, bool name_only);
 bool pmu_have_event(const char *pname, const char *name);
 
 int perf_pmu__test(void);
+
+extern const char *json_file;
 #endif /* __PMU_H */
-- 
1.8.3.1


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

* [PATCH 08/13] perf tools: Automatically look for event file name for cpu
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
                   ` (6 preceding siblings ...)
  2014-07-16 20:02 ` [PATCH 07/13] perf tools: Add support for reading JSON event files Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 09/13] perf tools: Add perf download to download event files Jiri Olsa
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

When no JSON event file is specified automatically look
for a suitable file in ~/.cache/pmu-events. A "perf download" can
automatically add files there for the current CPUs.

This does not include the actual event files with perf,
but they can be automatically downloaded instead
(implemented in the next patch)

This has the advantage that the events can be always uptodate,
because they are freshly downloaded. In oprofile we always
had problems with out of date or incomplete events files.

The event file format is per architecture, but can be
extended for other architectures.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/1405123165-22666-7-git-send-email-andi@firstfloor.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/arch/x86/util/header.c | 19 ++++++++++++++++---
 tools/perf/util/jevents.c         | 40 +++++++++++++++++++++++++++++++++++++++
 tools/perf/util/jevents.h         |  1 +
 tools/perf/util/pmu.c             |  2 +-
 4 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/tools/perf/arch/x86/util/header.c b/tools/perf/arch/x86/util/header.c
index 146d12a1cec0..76e0ece09b49 100644
--- a/tools/perf/arch/x86/util/header.c
+++ b/tools/perf/arch/x86/util/header.c
@@ -5,6 +5,7 @@
 #include <string.h>
 
 #include "../../util/header.h"
+#include "../../util/jevents.h"
 
 static inline void
 cpuid(unsigned int op, unsigned int *a, unsigned int *b, unsigned int *c,
@@ -19,8 +20,8 @@ cpuid(unsigned int op, unsigned int *a, unsigned int *b, unsigned int *c,
 			: "a" (op));
 }
 
-int
-get_cpuid(char *buffer, size_t sz)
+static int
+__get_cpuid(char *buffer, size_t sz, const char *fmt)
 {
 	unsigned int a, b, c, d, lvl;
 	int family = -1, model = -1, step = -1;
@@ -48,7 +49,7 @@ get_cpuid(char *buffer, size_t sz)
 		if (family >= 0x6)
 			model += ((a >> 16) & 0xf) << 4;
 	}
-	nb = scnprintf(buffer, sz, "%s,%u,%u,%u$", vendor, family, model, step);
+	nb = scnprintf(buffer, sz, fmt, vendor, family, model, step);
 
 	/* look for end marker to ensure the entire data fit */
 	if (strchr(buffer, '$')) {
@@ -57,3 +58,15 @@ get_cpuid(char *buffer, size_t sz)
 	}
 	return -1;
 }
+
+int get_cpuid(char *buffer, size_t sz)
+{
+	return __get_cpuid(buffer, sz, "%s,%u,%u,%u$");
+}
+
+char *get_cpu_str(void)
+{
+	char *buf = malloc(128);
+	__get_cpuid(buf, 128, "%s-%d-%X-core");
+	return buf;
+}
diff --git a/tools/perf/util/jevents.c b/tools/perf/util/jevents.c
index a23f57f112da..418502ac0560 100644
--- a/tools/perf/util/jevents.c
+++ b/tools/perf/util/jevents.c
@@ -38,6 +38,44 @@
 #include "json.h"
 #include "jevents.h"
 
+__attribute__((weak)) char *get_cpu_str(void)
+{
+	return NULL;
+}
+
+static const char *json_default_name(void)
+{
+	char *cache;
+	char *idstr = get_cpu_str();
+	char *res = NULL;
+	char *home = NULL;
+	char *emap;
+
+	emap = getenv("EVENTMAP");
+	if (emap) {
+		if (access(emap, R_OK) == 0)
+			return emap;
+		if (asprintf(&idstr, "%s-core", emap) < 0)
+			return NULL;
+	}
+
+	cache = getenv("XDG_CACHE_HOME");
+	if (!cache) {
+		home = getenv("HOME");
+		if (!home || asprintf(&cache, "%s/.cache", home) < 0)
+			goto out;
+	}
+	if (cache && idstr)
+		res = mkpath("%s/pmu-events/%s.json",
+			     cache,
+			     idstr);
+	if (home)
+		free(cache);
+out:
+	free(idstr);
+	return res;
+}
+
 static void addfield(char *map, char **dst, const char *sep,
 		     const char *a, jsmntok_t *bt)
 {
@@ -170,6 +208,8 @@ int json_events(const char *fn,
 	int i, j, len;
 	char *map;
 
+	if (!fn)
+		fn = json_default_name();
 	tokens = parse_json(fn, &map, &size, &len);
 	if (!tokens)
 		return -EIO;
diff --git a/tools/perf/util/jevents.h b/tools/perf/util/jevents.h
index fbc45497078e..86a94ddc9f7d 100644
--- a/tools/perf/util/jevents.h
+++ b/tools/perf/util/jevents.h
@@ -4,5 +4,6 @@
 int json_events(const char *fn,
 		int (*func)(void *data, char *name, char *event, char *desc),
 		void *data);
+char *get_cpu_str(void);
 
 #endif
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 9f154afc95fe..fa2131947ad3 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -433,7 +433,7 @@ static struct perf_pmu *pmu_lookup(const char *name)
 	if (pmu_aliases(name, &aliases))
 		return NULL;
 
-	if (!strcmp(name, "cpu") && json_file)
+	if (!strcmp(name, "cpu"))
 		json_events(json_file, add_alias, &aliases);
 
 	if (pmu_type(name, &type))
-- 
1.8.3.1


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

* [PATCH 09/13] perf tools: Add perf download to download event files
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
                   ` (7 preceding siblings ...)
  2014-07-16 20:02 ` [PATCH 08/13] perf tools: Automatically look for event file name for cpu Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-17 10:47   ` Ingo Molnar
  2014-07-16 20:02 ` [PATCH 10/13] perf tools: Query terminal width and use in perf list Jiri Olsa
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

Add a downloader to automatically download the right
files from a download site.

This is implemented as a script calling curl, similar to
perf archive. The perf driver automatically calls the right
binary. The downloader is extensible, but currently only
implements an Intel event download.  It would be straightforward
to add other sites too for other vendors.

The downloaded event files are put into ~/.cache/pmu-events, where the
builtin event parser in util/* can find them automatically.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/1405123165-22666-8-git-send-email-andi@firstfloor.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/Documentation/perf-download.txt | 31 +++++++++++++++++
 tools/perf/Documentation/perf-list.txt     | 12 ++++++-
 tools/perf/Makefile.perf                   |  5 ++-
 tools/perf/perf-download.sh                | 56 ++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+), 2 deletions(-)
 create mode 100644 tools/perf/Documentation/perf-download.txt
 create mode 100755 tools/perf/perf-download.sh

diff --git a/tools/perf/Documentation/perf-download.txt b/tools/perf/Documentation/perf-download.txt
new file mode 100644
index 000000000000..9e5b28e10c91
--- /dev/null
+++ b/tools/perf/Documentation/perf-download.txt
@@ -0,0 +1,31 @@
+perf-download(1)
+===============
+
+NAME
+----
+perf-download - Download event files for current CPU.
+
+SYNOPSIS
+--------
+[verse]
+'perf download' [vendor-family-model]
+
+DESCRIPTION
+-----------
+This command automatically downloads the event list for the current CPU and
+stores them in $XDG_CACHE_HOME/pmu-events (or $HOME/.cache/pmu-events).
+The other tools automatically look for them there. The CPU can be also
+specified at the command line.
+
+The downloading is done using http through wget, which needs
+to be installed. When behind a firewall the proxies
+may also need to be set up using "export https_proxy=...."
+
+The user should regularly call this to download updated event lists
+for the current CPU.
+
+Note the downloaded files are stored per user, so if perf is
+used as both normal user and with sudo the event files may
+also need to be moved to root's home directory with
+sudo mkdir /root/.cache ; sud cp -r ~/.cache/pmu-events /root/.cache
+after downloading.
diff --git a/tools/perf/Documentation/perf-list.txt b/tools/perf/Documentation/perf-list.txt
index da03992a635b..d241b5c8708f 100644
--- a/tools/perf/Documentation/perf-list.txt
+++ b/tools/perf/Documentation/perf-list.txt
@@ -63,6 +63,16 @@ Sampling). Examples to use IBS:
  perf record -a -e r076:p ...          # same as -e cpu-cycles:p
  perf record -a -e r0C1:p ...          # use ibs op counting micro-ops
 
+PER CPU EVENT LISTS
+-------------------
+
+For some CPUs (particularly modern Intel CPUs) "perf download" can
+download additional CPU specific event definitions, which then
+become visible in perf list and available in the other perf tools.
+
+This obsoletes the raw event description method described below
+for most cases.
+
 RAW HARDWARE EVENT DESCRIPTOR
 -----------------------------
 Even when an event is not available in a symbolic form within perf right now,
@@ -125,6 +135,6 @@ types specified.
 SEE ALSO
 --------
 linkperf:perf-stat[1], linkperf:perf-top[1],
-linkperf:perf-record[1],
+linkperf:perf-record[1], linkperf:perf-download[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_APM_v2.pdf[AMD64 Architecture Programmer’s Manual Volume 2: System Programming]
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index f65eb859e116..b1c0b758f88d 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -126,6 +126,7 @@ PYRF_OBJS =
 SCRIPT_SH =
 
 SCRIPT_SH += perf-archive.sh
+SCRIPT_SH += perf-download.sh
 
 grep-libs = $(filter -l%,$(1))
 strip-libs = $(filter-out -l%,$(1))
@@ -878,6 +879,8 @@ install-bin: all install-gtk
 		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
 	$(call QUIET_INSTALL, perf-archive) \
 		$(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
+	$(call QUIET_INSTALL, perf-download) \
+		$(INSTALL) $(OUTPUT)perf-download -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
 ifndef NO_LIBPERL
 	$(call QUIET_INSTALL, perl-scripts) \
 		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \
@@ -923,7 +926,7 @@ config-clean:
 	@$(MAKE) -C config/feature-checks clean >/dev/null
 
 clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean
-	$(call QUIET_CLEAN, core-objs)  $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS) $(GTK_OBJS)
+	$(call QUIET_CLEAN, core-objs)  $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)/perf-download $(OUTPUT)perf.o $(LANG_BINDINGS) $(GTK_OBJS)
 	$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf
 	$(call QUIET_CLEAN, core-gen)   $(RM)  *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS $(OUTPUT)PERF-FEATURES $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex*
 	$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
diff --git a/tools/perf/perf-download.sh b/tools/perf/perf-download.sh
new file mode 100755
index 000000000000..f8809f166d8e
--- /dev/null
+++ b/tools/perf/perf-download.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+# download event files for current cpu for perf
+
+CURLOPT=${CURLOPT:- --max-time 5 -#}
+
+set -e
+
+if ! type curl > /dev/null ; then
+	echo "please install curl"
+	exit 1
+fi
+
+if [ "$1" == "" ] ; then
+	S=$(awk '
+/^vendor/     		{ V=$3 }
+/^model/ && $2 == ":" 	{ M=$3 }
+/^cpu family/ 		{ F = $4 }
+END	      		{ printf("%s-%s-%X", V, F, M) }' /proc/cpuinfo)
+else
+	S="$1"
+fi
+V=$(echo $S  | ( IFS=- read v f m ; echo $v) )
+
+CACHEDIR=${XDG_CACHE_HOME:-~/.cache}
+[ ! -d $CACHEDIR/pmu-events ] && mkdir -p $CACHEDIR/pmu-events
+cd $CACHEDIR/pmu-events
+
+case "$V" in
+GenuineIntel)
+	echo "Downloading models file"
+	URLBASE=${URLBASE:-https://download.01.org/perfmon}
+	MAPFILE=${MAPFILE:-mapfile.csv}
+	echo "Downloading readme.txt"
+	curl $CURLOPT $URLBASE/readme.txt -o readme.txt
+	;;
+
+# Add more CPU vendors here
+
+*)
+	echo "Unsupported CPU vendor $V"
+	exit 1
+	;;
+esac
+
+curl $CURLOPT $URLBASE/$MAPFILE -o $MAPFILE
+
+echo "Downloading events file"
+awk -v urlbase=$URLBASE -v cpu="$S" -F, \
+	'$1 == cpu && $4 == "core" { print "url = \"" urlbase $3 "\""; exit 0 }' \
+	$MAPFILE > url$$
+if [ -s url$$ ] ; then
+	curl $CURLOPT -K url$$ -o $S-core.json
+else
+	echo "CPU $S not found"
+fi
+rm -f url$$
-- 
1.8.3.1


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

* [PATCH 10/13] perf tools: Query terminal width and use in perf list
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
                   ` (8 preceding siblings ...)
  2014-07-16 20:02 ` [PATCH 09/13] perf tools: Add perf download to download event files Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 11/13] perf tools: Add a new pmu interface to iterate over all events Jiri Olsa
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

Automatically adapt the now wider and word wrapped perf list
output to wider terminals. This requires querying the terminal
before the auto pager takes over, and exporting this
information from the pager subsystem.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/1405123165-22666-9-git-send-email-andi@firstfloor.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/cache.h |  1 +
 tools/perf/util/pager.c | 15 +++++++++++++++
 tools/perf/util/pmu.c   | 12 ++----------
 3 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h
index 7b176dd02e1a..07527d652f92 100644
--- a/tools/perf/util/cache.h
+++ b/tools/perf/util/cache.h
@@ -31,6 +31,7 @@ extern void setup_pager(void);
 extern const char *pager_program;
 extern int pager_in_use(void);
 extern int pager_use_color;
+int pager_get_columns(void);
 
 char *alias_lookup(const char *alias);
 int split_cmdline(char *cmdline, const char ***argv);
diff --git a/tools/perf/util/pager.c b/tools/perf/util/pager.c
index 31ee02d4e988..9761202f7f3a 100644
--- a/tools/perf/util/pager.c
+++ b/tools/perf/util/pager.c
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "run-command.h"
 #include "sigchain.h"
+#include <sys/ioctl.h>
 
 /*
  * This is split up from the rest of git so that we can do
@@ -8,6 +9,7 @@
  */
 
 static int spawned_pager;
+static int pager_columns;
 
 static void pager_preexec(void)
 {
@@ -47,9 +49,12 @@ static void wait_for_pager_signal(int signo)
 void setup_pager(void)
 {
 	const char *pager = getenv("PERF_PAGER");
+	struct winsize sz;
 
 	if (!isatty(1))
 		return;
+	if (ioctl(1, TIOCGWINSZ, &sz) == 0)
+		pager_columns = sz.ws_col;
 	if (!pager) {
 		if (!pager_program)
 			perf_config(perf_default_config, NULL);
@@ -98,3 +103,13 @@ int pager_in_use(void)
 	env = getenv("PERF_PAGER_IN_USE");
 	return env ? perf_config_bool("PERF_PAGER_IN_USE", env) : 0;
 }
+
+int pager_get_columns(void)
+{
+	char *s;
+
+	s = getenv("COLUMNS");
+	if (s)
+		return atoi(s);
+	return (pager_columns ? pager_columns : 80) - 2;
+}
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index fa2131947ad3..8714f9a11abe 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -9,6 +9,7 @@
 #include "pmu.h"
 #include "parse-events.h"
 #include "cpumap.h"
+#include "cache.h"
 #include "jevents.h"
 
 const char *json_file;
@@ -789,15 +790,6 @@ static void wordwrap(char *s, int start, int max, int corr)
 	}
 }
 
-static int get_columns(void)
-{
-	/*
-	 * Should ask the terminal with TIOCGWINSZ here, but we
-	 * need the original fd before the pager.
-	 */
-	return 79;
-}
-
 void print_pmu_events(const char *event_glob, bool name_only)
 {
 	struct perf_pmu *pmu;
@@ -807,7 +799,7 @@ void print_pmu_events(const char *event_glob, bool name_only)
 	int len, j;
 	struct pair *aliases;
 	int numdesc = 0;
-	int columns = get_columns();
+	int columns = pager_get_columns();
 
 	pmu = NULL;
 	len = 0;
-- 
1.8.3.1


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

* [PATCH 11/13] perf tools: Add a new pmu interface to iterate over all events
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
                   ` (9 preceding siblings ...)
  2014-07-16 20:02 ` [PATCH 10/13] perf tools: Query terminal width and use in perf list Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 12/13] perf tests: Add test case for alias and JSON parsing Jiri Olsa
  2014-07-16 20:02 ` [PATCH 13/13] perf tools: Add a --no-desc flag to perf list Jiri Olsa
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

With calling a callback. To be used in test code added in the next
patch.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/n/1405123165-22666-10-git-send-email-andi@firstfloor.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/pmu.c | 18 ++++++++++++++++++
 tools/perf/util/pmu.h |  2 ++
 2 files changed, 20 insertions(+)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 8714f9a11abe..397e4004fcdf 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -869,3 +869,21 @@ bool pmu_have_event(const char *pname, const char *name)
 	}
 	return false;
 }
+
+int pmu_iterate_events(int (*func)(const char *pmu, const char *name))
+{
+	int ret = 0;
+	struct perf_pmu *pmu;
+	struct perf_pmu_alias *alias;
+
+	perf_pmu__find("cpu"); /* Load PMUs */
+	pmu = NULL;
+	while ((pmu = perf_pmu__scan(pmu)) != NULL) {
+		list_for_each_entry(alias, &pmu->aliases, list) {
+			ret = func(pmu->name, alias->name);
+			if (ret != 0)
+				break;
+		}
+	}
+	return ret;
+}
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 583d21e4cefb..87a1da471686 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -47,5 +47,7 @@ bool pmu_have_event(const char *pname, const char *name);
 
 int perf_pmu__test(void);
 
+int pmu_iterate_events(int (*func)(const char *, const char *name));
+
 extern const char *json_file;
 #endif /* __PMU_H */
-- 
1.8.3.1


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

* [PATCH 12/13] perf tests: Add test case for alias and JSON parsing
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
                   ` (10 preceding siblings ...)
  2014-07-16 20:02 ` [PATCH 11/13] perf tools: Add a new pmu interface to iterate over all events Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  2014-07-16 20:02 ` [PATCH 13/13] perf tools: Add a --no-desc flag to perf list Jiri Olsa
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

Add a simple test case to perf test that runs perf download and parses
all the available events, including json events.

This needs adding an all event iterator to pmu.c

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/1405123165-22666-11-git-send-email-andi@firstfloor.org
[ use pr_* for output instead of fprintf calls ]
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/Makefile.perf        |  1 +
 tools/perf/tests/aliases.c      | 58 +++++++++++++++++++++++++++++++++++++++++
 tools/perf/tests/builtin-test.c |  4 +++
 tools/perf/tests/tests.h        |  1 +
 4 files changed, 64 insertions(+)
 create mode 100644 tools/perf/tests/aliases.c

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index b1c0b758f88d..a38191a335b4 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -420,6 +420,7 @@ endif
 LIB_OBJS += $(OUTPUT)tests/code-reading.o
 LIB_OBJS += $(OUTPUT)tests/sample-parsing.o
 LIB_OBJS += $(OUTPUT)tests/parse-no-sample-id-all.o
+LIB_OBJS += $(OUTPUT)tests/aliases.o
 ifndef NO_DWARF_UNWIND
 ifeq ($(ARCH),$(filter $(ARCH),x86 arm))
 LIB_OBJS += $(OUTPUT)tests/dwarf-unwind.o
diff --git a/tools/perf/tests/aliases.c b/tools/perf/tests/aliases.c
new file mode 100644
index 000000000000..f315fbc25272
--- /dev/null
+++ b/tools/perf/tests/aliases.c
@@ -0,0 +1,58 @@
+/* Check if we can set up all aliases and can read JSON files */
+#include <stdlib.h>
+#include "tests.h"
+#include "pmu.h"
+#include "evlist.h"
+#include "parse-events.h"
+
+static struct perf_evlist *evlist;
+
+static int num_events;
+static int failed;
+
+static int test__event(const char *pmu, const char *name)
+{
+	int ret;
+
+	/* Not supported for now */
+	if (strcmp(pmu, "cpu"))
+		return 0;
+
+	ret = parse_events(evlist, name);
+
+	if (ret) {
+		/*
+		 * We only print on failure because common perf setups
+		 * have events that cannot be parsed.
+		 */
+		pr_err("invalid or unsupported event: '%s'\n", name);
+		ret = 0;
+		failed++;
+	} else
+		num_events++;
+	return ret;
+}
+
+int test__aliases(void)
+{
+	int err;
+
+	/* Download JSON files */
+	/* XXX assumes perf is installed */
+	/* For now user must manually download */
+	if (0 && system("perf download > /dev/null") < 0) {
+		/* Don't error out for this for now */
+		pr_err("perf download failed\n");
+	}
+
+	evlist = perf_evlist__new();
+	if (evlist == NULL)
+		return -ENOMEM;
+
+	err = pmu_iterate_events(test__event);
+	pr_debug(" Parsed %d events :", num_events);
+	if (failed > 0)
+		pr_err(" %d events failed", failed);
+	perf_evlist__delete(evlist);
+	return err;
+}
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 6f8b01bc6033..bb37ac205971 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -154,6 +154,10 @@ static struct test {
 		.func = test__hists_cumulate,
 	},
 	{
+		.desc = "Test parsing JSON aliases",
+		.func = test__aliases,
+	},
+	{
 		.func = NULL,
 	},
 };
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
index ed64790a395f..ab92ad9bf0e6 100644
--- a/tools/perf/tests/tests.h
+++ b/tools/perf/tests/tests.h
@@ -48,6 +48,7 @@ int test__mmap_thread_lookup(void);
 int test__thread_mg_share(void);
 int test__hists_output(void);
 int test__hists_cumulate(void);
+int test__aliases(void);
 
 #if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
 #ifdef HAVE_DWARF_UNWIND_SUPPORT
-- 
1.8.3.1


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

* [PATCH 13/13] perf tools: Add a --no-desc flag to perf list
  2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
                   ` (11 preceding siblings ...)
  2014-07-16 20:02 ` [PATCH 12/13] perf tests: Add test case for alias and JSON parsing Jiri Olsa
@ 2014-07-16 20:02 ` Jiri Olsa
  12 siblings, 0 replies; 67+ messages in thread
From: Jiri Olsa @ 2014-07-16 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Jiri Olsa

From: Andi Kleen <ak@linux.intel.com>

Add a --no-desc flag to perf list to not print the event descriptions
that were earlier added for JSON events. This may be useful to
get a less crowded listing.

It's still default to print descriptions as that is the more useful
default for most users.

Before:

% perf list
...
  baclears.any                                       [Counts the total number when the front end is
                                                      resteered, mainly when the BPU cannot provide a
                                                      correct prediction and this is corrected by other
                                                      branch handling mechanisms at the front end]
  br_inst_exec.all_branches                          [Speculative and retired branches]

After:

% perf list --no-desc
...
  baclears.any                                       [Kernel PMU event]
  br_inst_exec.all_branches                          [Kernel PMU event]

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/n/1405123165-22666-12-git-send-email-andi@firstfloor.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/Documentation/perf-list.txt |  5 ++++-
 tools/perf/builtin-list.c              | 14 +++++++++-----
 tools/perf/util/parse-events.c         |  4 ++--
 tools/perf/util/parse-events.h         |  2 +-
 tools/perf/util/pmu.c                  |  4 ++--
 tools/perf/util/pmu.h                  |  2 +-
 6 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/tools/perf/Documentation/perf-list.txt b/tools/perf/Documentation/perf-list.txt
index d241b5c8708f..7a6b25d14afa 100644
--- a/tools/perf/Documentation/perf-list.txt
+++ b/tools/perf/Documentation/perf-list.txt
@@ -8,7 +8,7 @@ perf-list - List all symbolic event types
 SYNOPSIS
 --------
 [verse]
-'perf list' [hw|sw|cache|tracepoint|pmu|event_glob]
+'perf list' [--no-desc] [hw|sw|cache|tracepoint|pmu|event_glob]
 
 DESCRIPTION
 -----------
@@ -23,6 +23,9 @@ automatically downloaded with perf download.
 The JSON event file can be also specified with the EVENTMAP environment
 variable.
 
+--no-desc::
+Don't print descriptions.
+
 
 [[EVENT_MODIFIERS]] EVENT MODIFIERS
 ---------------
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 086c96fa959b..68752a1bac71 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -16,16 +16,20 @@
 #include "util/pmu.h"
 #include "util/parse-options.h"
 
+static bool desc_flag = true;
+
 int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
 {
 	int i;
 	const struct option list_options[] = {
 		OPT_STRING(0, "events-file", &json_file, "json file",
 			   "Read event json file"),
+		OPT_BOOLEAN('d', "desc", &desc_flag,
+			    "Print extra event descriptions. --no-desc to not print."),
 		OPT_END()
 	};
 	const char * const list_usage[] = {
-		"perf list [hw|sw|cache|tracepoint|pmu|event_glob]",
+		"perf list [--events-file FILE] [--no-desc] [hw|sw|cache|tracepoint|pmu|event_glob]",
 		NULL
 	};
 
@@ -35,7 +39,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
 	setup_pager();
 
 	if (argc == 0) {
-		print_events(NULL, false);
+		print_events(NULL, false, !desc_flag);
 		return 0;
 	}
 
@@ -54,15 +58,15 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
 			 strcmp(argv[i], "hwcache") == 0)
 			print_hwcache_events(NULL, false);
 		else if (strcmp(argv[i], "pmu") == 0)
-			print_pmu_events(NULL, false);
+			print_pmu_events(NULL, false, !desc_flag);
 		else if (strcmp(argv[i], "--raw-dump") == 0)
-			print_events(NULL, true);
+			print_events(NULL, true, !desc_flag);
 		else {
 			char *sep = strchr(argv[i], ':'), *s;
 			int sep_idx;
 
 			if (sep == NULL) {
-				print_events(argv[i], false);
+				print_events(argv[i], false, !desc_flag);
 				continue;
 			}
 			sep_idx = sep - argv[i];
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 1e15df10a88c..e2badf35a0ea 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1231,7 +1231,7 @@ static void print_symbol_events(const char *event_glob, unsigned type,
 /*
  * Print the help text for the event symbols:
  */
-void print_events(const char *event_glob, bool name_only)
+void print_events(const char *event_glob, bool name_only, bool quiet)
 {
 	if (!name_only) {
 		printf("\n");
@@ -1246,7 +1246,7 @@ void print_events(const char *event_glob, bool name_only)
 
 	print_hwcache_events(event_glob, name_only);
 
-	print_pmu_events(event_glob, name_only);
+	print_pmu_events(event_glob, name_only, quiet);
 
 	if (event_glob != NULL)
 		return;
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index df094b4ed5ed..f3ef0dc94cb7 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -100,7 +100,7 @@ void parse_events_update_lists(struct list_head *list_event,
 			       struct list_head *list_all);
 void parse_events_error(void *data, void *scanner, char const *msg);
 
-void print_events(const char *event_glob, bool name_only);
+void print_events(const char *event_glob, bool name_only, bool quiet);
 void print_events_type(u8 type);
 void print_tracepoint_events(const char *subsys_glob, const char *event_glob,
 			     bool name_only);
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 397e4004fcdf..b10393267b1f 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -790,7 +790,7 @@ static void wordwrap(char *s, int start, int max, int corr)
 	}
 }
 
-void print_pmu_events(const char *event_glob, bool name_only)
+void print_pmu_events(const char *event_glob, bool name_only, bool quiet_flag)
 {
 	struct perf_pmu *pmu;
 	struct perf_pmu_alias *alias;
@@ -838,7 +838,7 @@ void print_pmu_events(const char *event_glob, bool name_only)
 			printf("%s ", aliases[j].name);
 			continue;
 		}
-		if (aliases[j].desc) {
+		if (aliases[j].desc && !quiet_flag) {
 			if (numdesc++ == 0 && printed)
 				printf("\n");
 			printf("  %-50s [", aliases[j].name);
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 87a1da471686..9b22d0f8be24 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -42,7 +42,7 @@ int perf_pmu__format_parse(char *dir, struct list_head *head);
 
 struct perf_pmu *perf_pmu__scan(struct perf_pmu *pmu);
 
-void print_pmu_events(const char *event_glob, bool name_only);
+void print_pmu_events(const char *event_glob, bool name_only, bool quiet);
 bool pmu_have_event(const char *pname, const char *name);
 
 int perf_pmu__test(void);
-- 
1.8.3.1


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

* Re: [PATCH 09/13] perf tools: Add perf download to download event files
  2014-07-16 20:02 ` [PATCH 09/13] perf tools: Add perf download to download event files Jiri Olsa
@ 2014-07-17 10:47   ` Ingo Molnar
  2014-07-17 10:51     ` Ingo Molnar
                       ` (2 more replies)
  0 siblings, 3 replies; 67+ messages in thread
From: Ingo Molnar @ 2014-07-17 10:47 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Peter Zijlstra, Thomas Gleixner, Arnaldo Carvalho de Melo


this bit needs more discussion:

* Jiri Olsa <jolsa@kernel.org> wrote:

> From: Andi Kleen <ak@linux.intel.com>
> 
> Add a downloader to automatically download the right
> files from a download site.

'A download site' is way too vague and detached from the perf project.

> +	echo "Downloading models file"
> +	URLBASE=${URLBASE:-https://download.01.org/perfmon}

We want these description files to be in the perf source code, 
somewhere in tools/perf/live-config/arch/x86/ or so, and installed 
during 'make install' - i.e. part of perf project and installed in 
~/.debug or ~/.perf or so.

Those files could be refreshed via 'perf download' and could be 
accessible via kernel.org as well, 'perf download' should pick up 
these files from Linus's latest git repository (via the HTTP 
namespace).

Thanks,

	Ingo

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

* Re: [PATCH 09/13] perf tools: Add perf download to download event files
  2014-07-17 10:47   ` Ingo Molnar
@ 2014-07-17 10:51     ` Ingo Molnar
  2014-07-18 17:35     ` Andi Kleen
  2014-08-06  1:09     ` Michael Ellerman
  2 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2014-07-17 10:51 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Peter Zijlstra, Thomas Gleixner, Arnaldo Carvalho de Melo


* Ingo Molnar <mingo@kernel.org> wrote:

> 
> this bit needs more discussion:
> 
> * Jiri Olsa <jolsa@kernel.org> wrote:
> 
> > From: Andi Kleen <ak@linux.intel.com>
> > 
> > Add a downloader to automatically download the right
> > files from a download site.
> 
> 'A download site' is way too vague and detached from the perf project.
> 
> > +	echo "Downloading models file"
> > +	URLBASE=${URLBASE:-https://download.01.org/perfmon}
> 
> We want these description files to be in the perf source code, 
> somewhere in tools/perf/live-config/arch/x86/ or so, and installed 
> during 'make install' - i.e. part of perf project and installed in 
> ~/.debug or ~/.perf or so.
> 
> Those files could be refreshed via 'perf download' and could be 
> accessible via kernel.org as well, 'perf download' should pick up 
> these files from Linus's latest git repository (via the HTTP 
> namespace).

So basically instead of the above URI, we want these files to be 
refreshed from:

    http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/perf/live-config/

Thanks,

	Ingo

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

* Re: [PATCH 09/13] perf tools: Add perf download to download event files
  2014-07-17 10:47   ` Ingo Molnar
  2014-07-17 10:51     ` Ingo Molnar
@ 2014-07-18 17:35     ` Andi Kleen
  2014-07-19  9:51       ` Ingo Molnar
  2014-08-06  1:09     ` Michael Ellerman
  2 siblings, 1 reply; 67+ messages in thread
From: Andi Kleen @ 2014-07-18 17:35 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jiri Olsa, linux-kernel, Arnaldo Carvalho de Melo,
	Peter Zijlstra, Thomas Gleixner, Arnaldo Carvalho de Melo

Ingo Molnar <mingo@kernel.org> writes:
>
> We want these description files to be in the perf source code, 
> somewhere in tools/perf/live-config/arch/x86/ or so, and installed 
> during 'make install' - i.e. part of perf project and installed in 
> ~/.debug or ~/.perf or so.

I don't think that's a good idea. It would recreate all the 
problems oprofile has with out of date event lists. Already
proven to not work well.

>
> Those files could be refreshed via 'perf download' and could be 
> accessible via kernel.org as well, 'perf download' should pick up 
> these files from Linus's latest git repository (via the HTTP 
> namespace).

I have doubts a gitweb server is a good way to distribute potentially
high volume / high access data.

However getting a more neutral space is fine.

It would be fine to put it elsewhere on kernel.org.
I can ask for a space.

Otherwise I will just remove the auto URL from the tool, 
so the perf project does not need to endorse any particular
event lists.

Let me know what you prefer. I'll assume the "remove the URL"
variant is the default option.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

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

* Re: [PATCH 09/13] perf tools: Add perf download to download event files
  2014-07-18 17:35     ` Andi Kleen
@ 2014-07-19  9:51       ` Ingo Molnar
  2014-08-06  1:16         ` Michael Ellerman
  0 siblings, 1 reply; 67+ messages in thread
From: Ingo Molnar @ 2014-07-19  9:51 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Jiri Olsa, linux-kernel, Arnaldo Carvalho de Melo,
	Peter Zijlstra, Thomas Gleixner, Arnaldo Carvalho de Melo


* Andi Kleen <andi@firstfloor.org> wrote:

> Ingo Molnar <mingo@kernel.org> writes:
> >
> > We want these description files to be in the perf source code, 
> > somewhere in tools/perf/live-config/arch/x86/ or so, and installed 
> > during 'make install' - i.e. part of perf project and installed in 
> > ~/.debug or ~/.perf or so.
> 
> I don't think that's a good idea. It would recreate all the 
> problems oprofile has with out of date event lists. Already
> proven to not work well.

That's true only if you ignore my second suggestion:

> > Those files could be refreshed via 'perf download' and could be 
> > accessible via kernel.org as well, 'perf download' should pick up 
> > these files from Linus's latest git repository (via the HTTP 
> > namespace).
> 
> I have doubts a gitweb server is a good way to distribute 
> potentially high volume / high access data.

I don't buy that concern either, because typically humans will trigger 
the refresh - just like clicking on a link to refresh. In any case, if 
it starts being a problem in practice we can reconsider, it's not a 
reason to not do it.

> However getting a more neutral space is fine.
> 
> It would be fine to put it elsewhere on kernel.org.
> I can ask for a space.

The beauty of my approach is to:

 1) integrate the descriptions into the project, so that developers 
    are well aware of them and keep them uptodate - while considering 
    all the other perf features the kernel may offer.

 2) have them update automatically as we update the primary source, in 
    a single place.

Your suggestions so far lose those benefits, unnecessarily, and 
without explanation given.

So unless you can come up with a better approach, this is the way to 
implement this feature.

Thanks,

	Ingo

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

* Re: [PATCH 09/13] perf tools: Add perf download to download event files
  2014-07-17 10:47   ` Ingo Molnar
  2014-07-17 10:51     ` Ingo Molnar
  2014-07-18 17:35     ` Andi Kleen
@ 2014-08-06  1:09     ` Michael Ellerman
  2 siblings, 0 replies; 67+ messages in thread
From: Michael Ellerman @ 2014-08-06  1:09 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jiri Olsa, linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Peter Zijlstra, Thomas Gleixner, Arnaldo Carvalho de Melo

On Thu, 2014-07-17 at 12:47 +0200, Ingo Molnar wrote:
> this bit needs more discussion:
> 
> * Jiri Olsa <jolsa@kernel.org> wrote:
> 
> > From: Andi Kleen <ak@linux.intel.com>
> > 
> > Add a downloader to automatically download the right
> > files from a download site.
> 
> 'A download site' is way too vague and detached from the perf project.
> 
> > +	echo "Downloading models file"
> > +	URLBASE=${URLBASE:-https://download.01.org/perfmon}
> 
> We want these description files to be in the perf source code, 
> somewhere in tools/perf/live-config/arch/x86/ or so, and installed 
> during 'make install' - i.e. part of perf project and installed in 
> ~/.debug or ~/.perf or so.

Surely the shipped versions should go in /usr/share/perf or something like
that? Rather than a particular users home directory?

> Those files could be refreshed via 'perf download' and could be 
> accessible via kernel.org as well, 'perf download' should pick up 
> these files from Linus's latest git repository (via the HTTP 
> namespace).

This version would go in ~/.perf or similar.

cheers



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

* Re: [PATCH 09/13] perf tools: Add perf download to download event files
  2014-07-19  9:51       ` Ingo Molnar
@ 2014-08-06  1:16         ` Michael Ellerman
  0 siblings, 0 replies; 67+ messages in thread
From: Michael Ellerman @ 2014-08-06  1:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Andi Kleen, Jiri Olsa, linux-kernel, Arnaldo Carvalho de Melo,
	Peter Zijlstra, Thomas Gleixner, Arnaldo Carvalho de Melo

On Sat, 2014-07-19 at 11:51 +0200, Ingo Molnar wrote:
> * Andi Kleen <andi@firstfloor.org> wrote:
> 
> > Ingo Molnar <mingo@kernel.org> writes:
> > >
> > > We want these description files to be in the perf source code, 
> > > somewhere in tools/perf/live-config/arch/x86/ or so, and installed 
> > > during 'make install' - i.e. part of perf project and installed in 
> > > ~/.debug or ~/.perf or so.
> > 
> > I don't think that's a good idea. It would recreate all the 
> > problems oprofile has with out of date event lists. Already
> > proven to not work well.
> 
> That's true only if you ignore my second suggestion:
> 
> > > Those files could be refreshed via 'perf download' and could be 
> > > accessible via kernel.org as well, 'perf download' should pick up 
> > > these files from Linus's latest git repository (via the HTTP 
> > > namespace).
> > 
> > I have doubts a gitweb server is a good way to distribute 
> > potentially high volume / high access data.
> 
> I don't buy that concern either, because typically humans will trigger 
> the refresh - just like clicking on a link to refresh. In any case, if 
> it starts being a problem in practice we can reconsider, it's not a 
> reason to not do it.
> 
> > However getting a more neutral space is fine.
> > 
> > It would be fine to put it elsewhere on kernel.org.
> > I can ask for a space.
> 
> The beauty of my approach is to:
> 
>  1) integrate the descriptions into the project, so that developers 
>     are well aware of them and keep them uptodate - while considering 
>     all the other perf features the kernel may offer.
> 
>  2) have them update automatically as we update the primary source, in 
>     a single place.

Another benefit of having the events installed as part of perf is that they are
usable on machines that don't have access to the internet.

Even if some of the event descriptions are out of date, that is still
preferable to having no events on such machines.

cheers



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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2018-09-19 14:25 [GIT PULL 00/13] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2018-09-25  9:21 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2018-09-25  9:21 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
	Alexander Shishkin, Alexey Budankov, Andi Kleen, David Ahern,
	Ding Xiang, Hendrik Brueckner, Jeremie Galarneau, Jiri Olsa,
	Kate Stewart, Kim Phillips, Markus T Metzger, Namhyung Kim,
	Naveen N . Rao, Peter Zijlstra, Ravi Bangoria, Sandipan Das,
	Stephane Eranian, Thiago Macieira, Thomas Gleixner,
	Thomas Richter, Wang Nan, Will Deacon, 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 7f16023bfcc4b1f2bbccf86219dc97473db6e0d6:
> 
>   Merge remote-tracking branch 'acme/perf/urgent' into perf/core (2018-09-18 17:20:41 -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.20-20180919
> 
> for you to fetch changes up to 24ef0fd0a1f389b156e6ef0edd71072728831bd9:
> 
>   perf python: Use -Wno-redundant-decls to build with PYTHON=python3 (2018-09-19 10:25:13 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> perf test:
> 
> - Add watchpoint entry (Ravi Bangoria)
> 
> Build fixes:
> 
> - Initialize perf_data_file fd field to fix building the CTF (trace format)
>   converter with with gcc 4.8.4 on Ubuntu 14.04 (Jérémie Galarneau)
> 
> - Use -Wno-redundant-decls to build with PYTHON=python3 to
>   build the python binding, fixing the build in systems such
>   as Clear Linux (Arnaldo Carvalho de Melo)
> 
> Hardware tracing:
> 
> - Suppress AUX/OVERWRITE records (Alexander Shishkin)
> 
> Infrastructure:
> 
> - Adopt PTR_ERR_OR_ZERO from the kernel and use it in
>   the bpf-loader instead of open coded equivalent (Ding Xiang)
> 
> - Improve the event ordering code to make it clear and fix
>   a bug related to freeing of events when using pipe mode
>   from 'record' to 'inject' (Jiri Olsa)
> 
> - Some prep work to facilitate per-cpu threads to write
>   record data to per-cpu files (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Alexander Shishkin (1):
>       perf: Suppress AUX/OVERWRITE records
> 
> Arnaldo Carvalho de Melo (1):
>       perf python: Use -Wno-redundant-decls to build with PYTHON=python3
> 
> Ding Xiang (2):
>       tools include: Adopt PTR_ERR_OR_ZERO from the kernel err.h header
>       perf bpf-loader: use PTR_ERR_OR_ZERO inetead of return code
> 
> Jiri Olsa (7):
>       perf ordered_events: Add 'struct ordered_events_buffer' layer
>       perf ordered_events: Prevent crossing max_alloc_size
>       perf tools: Remove perf_tool from event_op2
>       perf tools: Remove perf_tool from event_op3
>       perf auxtrace: Pass struct perf_mmap into mmap__read* functions
>       perf tools: Add 'struct perf_mmap' arg to record__write()
>       perf util: Make copyfile_offset() global
> 
> Jérémie Galarneau (1):
>       perf tools: Initialize perf_data_file fd field
> 
> Ravi Bangoria (1):
>       perf test: Add watchpoint test
> 
>  kernel/events/ring_buffer.c       |  14 ++-
>  tools/include/linux/err.h         |   7 ++
>  tools/perf/builtin-annotate.c     |   7 +-
>  tools/perf/builtin-inject.c       |  37 +++---
>  tools/perf/builtin-record.c       |  51 +++++----
>  tools/perf/builtin-report.c       |   9 +-
>  tools/perf/builtin-script.c       |  38 +++----
>  tools/perf/builtin-stat.c         |  23 ++--
>  tools/perf/tests/Build            |   1 +
>  tools/perf/tests/builtin-test.c   |   9 ++
>  tools/perf/tests/tests.h          |   3 +
>  tools/perf/tests/wp.c             | 229 ++++++++++++++++++++++++++++++++++++++
>  tools/perf/util/auxtrace.c        |  30 +++--
>  tools/perf/util/auxtrace.h        |  21 ++--
>  tools/perf/util/bpf-loader.c      |   2 +-
>  tools/perf/util/data-convert-bt.c |   2 +-
>  tools/perf/util/header.c          |  16 ++-
>  tools/perf/util/header.h          |  15 +--
>  tools/perf/util/mmap.c            |   6 +-
>  tools/perf/util/mmap.h            |   2 +-
>  tools/perf/util/ordered-events.c  |  87 ++++++++++++---
>  tools/perf/util/ordered-events.h  |  37 +++---
>  tools/perf/util/session.c         |  75 ++++++-------
>  tools/perf/util/session.h         |   5 +-
>  tools/perf/util/setup.py          |   2 +-
>  tools/perf/util/stat.c            |   5 +-
>  tools/perf/util/stat.h            |   5 +-
>  tools/perf/util/tool.h            |   7 +-
>  tools/perf/util/util.c            |   2 +-
>  tools/perf/util/util.h            |   2 +
>  30 files changed, 519 insertions(+), 230 deletions(-)
>  create mode 100644 tools/perf/tests/wp.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2018-09-19 14:25 Arnaldo Carvalho de Melo
  2018-09-25  9:21 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-09-19 14:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter, Alexander Shishkin,
	Alexey Budankov, Andi Kleen, David Ahern, Ding Xiang,
	Hendrik Brueckner, Jeremie Galarneau, Jiri Olsa, Kate Stewart,
	Kim Phillips, Markus T Metzger, Namhyung Kim, Naveen N . Rao,
	Peter Zijlstra, Ravi Bangoria, Sandipan Das, Stephane Eranian,
	Thiago Macieira, Thomas Gleixner, Thomas Richter, Wang Nan,
	Will Deacon, 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 7f16023bfcc4b1f2bbccf86219dc97473db6e0d6:

  Merge remote-tracking branch 'acme/perf/urgent' into perf/core (2018-09-18 17:20:41 -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.20-20180919

for you to fetch changes up to 24ef0fd0a1f389b156e6ef0edd71072728831bd9:

  perf python: Use -Wno-redundant-decls to build with PYTHON=python3 (2018-09-19 10:25:13 -0300)

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

perf test:

- Add watchpoint entry (Ravi Bangoria)

Build fixes:

- Initialize perf_data_file fd field to fix building the CTF (trace format)
  converter with with gcc 4.8.4 on Ubuntu 14.04 (Jérémie Galarneau)

- Use -Wno-redundant-decls to build with PYTHON=python3 to
  build the python binding, fixing the build in systems such
  as Clear Linux (Arnaldo Carvalho de Melo)

Hardware tracing:

- Suppress AUX/OVERWRITE records (Alexander Shishkin)

Infrastructure:

- Adopt PTR_ERR_OR_ZERO from the kernel and use it in
  the bpf-loader instead of open coded equivalent (Ding Xiang)

- Improve the event ordering code to make it clear and fix
  a bug related to freeing of events when using pipe mode
  from 'record' to 'inject' (Jiri Olsa)

- Some prep work to facilitate per-cpu threads to write
  record data to per-cpu files (Jiri Olsa)

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

----------------------------------------------------------------
Alexander Shishkin (1):
      perf: Suppress AUX/OVERWRITE records

Arnaldo Carvalho de Melo (1):
      perf python: Use -Wno-redundant-decls to build with PYTHON=python3

Ding Xiang (2):
      tools include: Adopt PTR_ERR_OR_ZERO from the kernel err.h header
      perf bpf-loader: use PTR_ERR_OR_ZERO inetead of return code

Jiri Olsa (7):
      perf ordered_events: Add 'struct ordered_events_buffer' layer
      perf ordered_events: Prevent crossing max_alloc_size
      perf tools: Remove perf_tool from event_op2
      perf tools: Remove perf_tool from event_op3
      perf auxtrace: Pass struct perf_mmap into mmap__read* functions
      perf tools: Add 'struct perf_mmap' arg to record__write()
      perf util: Make copyfile_offset() global

Jérémie Galarneau (1):
      perf tools: Initialize perf_data_file fd field

Ravi Bangoria (1):
      perf test: Add watchpoint test

 kernel/events/ring_buffer.c       |  14 ++-
 tools/include/linux/err.h         |   7 ++
 tools/perf/builtin-annotate.c     |   7 +-
 tools/perf/builtin-inject.c       |  37 +++---
 tools/perf/builtin-record.c       |  51 +++++----
 tools/perf/builtin-report.c       |   9 +-
 tools/perf/builtin-script.c       |  38 +++----
 tools/perf/builtin-stat.c         |  23 ++--
 tools/perf/tests/Build            |   1 +
 tools/perf/tests/builtin-test.c   |   9 ++
 tools/perf/tests/tests.h          |   3 +
 tools/perf/tests/wp.c             | 229 ++++++++++++++++++++++++++++++++++++++
 tools/perf/util/auxtrace.c        |  30 +++--
 tools/perf/util/auxtrace.h        |  21 ++--
 tools/perf/util/bpf-loader.c      |   2 +-
 tools/perf/util/data-convert-bt.c |   2 +-
 tools/perf/util/header.c          |  16 ++-
 tools/perf/util/header.h          |  15 +--
 tools/perf/util/mmap.c            |   6 +-
 tools/perf/util/mmap.h            |   2 +-
 tools/perf/util/ordered-events.c  |  87 ++++++++++++---
 tools/perf/util/ordered-events.h  |  37 +++---
 tools/perf/util/session.c         |  75 ++++++-------
 tools/perf/util/session.h         |   5 +-
 tools/perf/util/setup.py          |   2 +-
 tools/perf/util/stat.c            |   5 +-
 tools/perf/util/stat.h            |   5 +-
 tools/perf/util/tool.h            |   7 +-
 tools/perf/util/util.c            |   2 +-
 tools/perf/util/util.h            |   2 +
 30 files changed, 519 insertions(+), 230 deletions(-)
 create mode 100644 tools/perf/tests/wp.c

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.

The Clear Linux container is building with NO_CLANG=1, the problem preventing
its use has been identified and the next builds will build in ClearLinux with
both gcc and clang. This time around only gcc was used.

   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:3.8                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   6 alpine:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   7 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   8 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   9 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  11 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  12 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
  13 centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
  14 clearlinux:latest             : Ok   gcc (Clear Linux OS for Intel Architecture) 8.2.1 20180502
  15 debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
  16 debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u1) 4.9.2
  17 debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
  18 debian:experimental           : Ok   gcc (Debian 8.2.0-7) 8.2.0
  19 debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 8.2.0-4) 8.2.0
  20 debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 8.1.0-12) 8.1.0
  21 debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 8.1.0-12) 8.1.0
  22 debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 8.1.0-12) 8.1.0
  23 fedora:20                     : Ok   gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
  24 fedora:21                     : Ok   gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
  25 fedora:22                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  26 fedora:23                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  27 fedora:24                     : Ok   gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
  28 fedora:24-x-ARC-uClibc        : Ok   arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
  29 fedora:25                     : Ok   gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
  30 fedora:26                     : Ok   gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
  31 fedora:27                     : Ok   gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-6)
  32 fedora:28                     : Ok   gcc (GCC) 8.1.1 20180712 (Red Hat 8.1.1-5)
  33 fedora:rawhide                : Ok   gcc (GCC) 8.2.1 20180905 (Red Hat 8.2.1-3)
  34 gentoo-stage3-amd64:latest    : Ok   gcc (Gentoo 7.3.0-r3 p1.4) 7.3.0
  35 mageia:5                      : Ok   gcc (GCC) 4.9.2
  36 mageia:6                      : Ok   gcc (Mageia 5.5.0-1.mga6) 5.5.0
  37 opensuse:13.2                 : Ok   gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064]
  38 opensuse:42.1                 : Ok   gcc (SUSE Linux) 4.8.5
  39 opensuse:42.2                 : Ok   gcc (SUSE Linux) 4.8.5
  40 opensuse:42.3                 : Ok   gcc (SUSE Linux) 4.8.5
  41 opensuse:tumbleweed           : Ok   gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
  42 oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23.0.1)
  43 oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)
  44 ubuntu:12.04.5                : Ok   gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  45 ubuntu:14.04.4                : Ok   gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
  46 ubuntu:14.04.4-x-linaro-arm64 : Ok   aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0
  47 ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
  48 ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  49 ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  50 ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  51 ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  52 ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  53 ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  54 ubuntu:16.10                  : Ok   gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
  55 ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
  56 ubuntu:18.04                  : Ok   gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  57 ubuntu:18.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.3.0-16ubuntu3) 7.3.0
  58 ubuntu:18.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 7.3.0-16ubuntu3) 7.3.0
  59 ubuntu:18.04-x-m68k           : Ok   m68k-linux-gnu-gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  60 ubuntu:18.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  61 ubuntu:18.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  62 ubuntu:18.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  63 ubuntu:18.04-x-riscv64        : Ok   riscv64-linux-gnu-gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  64 ubuntu:18.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  65 ubuntu:18.04-x-sh4            : Ok   sh4-linux-gnu-gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  66 ubuntu:18.04-x-sparc64        : Ok   sparc64-linux-gnu-gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  67 ubuntu:18.10                  : Ok   gcc (Ubuntu 8.2.0-4ubuntu1) 8.2.0
  #
  # uname -a
  Linux seventh 4.19.0-rc2-00176-gdb44bf4b4768 #1 SMP Thu Sep 6 14:38:21 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
  # git log --oneline -1
  29715ae86e6c perf python: Use -Wno-redundant-decls to build with PYTHON=python3
  # perf version --build-options
  perf version 4.19.rc2.g29715a
                   dwarf: [ on  ]  # HAVE_DWARF_SUPPORT
      dwarf_getlocations: [ on  ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
                   glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
                    gtk2: [ on  ]  # HAVE_GTK2_SUPPORT
           syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
                  libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
                  libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
                 libnuma: [ on  ]  # HAVE_LIBNUMA_SUPPORT
  numa_num_possible_cpus: [ on  ]  # HAVE_LIBNUMA_SUPPORT
                 libperl: [ on  ]  # HAVE_LIBPERL_SUPPORT
               libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
                libslang: [ on  ]  # HAVE_SLANG_SUPPORT
               libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
               libunwind: [ on  ]  # HAVE_LIBUNWIND_SUPPORT
      libdw-dwarf-unwind: [ on  ]  # HAVE_DWARF_SUPPORT
                    zlib: [ on  ]  # HAVE_ZLIB_SUPPORT
                    lzma: [ on  ]  # HAVE_LZMA_SUPPORT
               get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
                     bpf: [ on  ]  # HAVE_LIBBPF_SUPPORT
  # 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: Watchpoint                                            :
  22.1: Read Only Watchpoint                                : Skip
  22.2: Write Only Watchpoint                               : Ok
  22.3: Read / Write Watchpoint                             : Ok
  22.4: Modify Watchpoint                                   : Ok
  23: Number of exit events of a simple workload            : Ok
  24: Software clock events period values                   : Ok
  25: Object code reading                                   : Ok
  26: Sample parsing                                        : Ok
  27: Use a dummy software event to keep tracking           : Ok
  28: Parse with no sample_id_all bit set                   : Ok
  29: Filter hist entries                                   : Ok
  30: Lookup mmap thread                                    : Ok
  31: Share thread mg                                       : Ok
  32: Sort output of hist entries                           : Ok
  33: Cumulate child hist entries                           : Ok
  34: Track with sched_switch                               : Ok
  35: Filter fds with revents mask in a fdarray             : Ok
  36: Add fd to a fdarray, making it autogrow               : Ok
  37: kmod_path__parse                                      : Ok
  38: Thread map                                            : Ok
  39: LLVM search and compile                               :
  39.1: Basic BPF llvm compile                              : Ok
  39.2: kbuild searching                                    : Ok
  39.3: Compile source for BPF prologue generation          : Ok
  39.4: Compile source for BPF relocation                   : Ok
  40: Session topology                                      : Ok
  41: BPF filter                                            :
  41.1: Basic BPF filtering                                 : Ok
  41.2: BPF pinning                                         : Ok
  41.3: BPF prologue generation                             : Ok
  41.4: BPF relocation checker                              : Ok
  42: Synthesize thread map                                 : Ok
  43: Remove thread map                                     : Ok
  44: Synthesize cpu map                                    : Ok
  45: Synthesize stat config                                : Ok
  46: Synthesize stat                                       : Ok
  47: Synthesize stat round                                 : Ok
  48: Synthesize attr update                                : Ok
  49: Event times                                           : Ok
  50: Read backward ring buffer                             : Ok
  51: Print cpu map                                         : Ok
  52: Probe SDT events                                      : Ok
  53: is_printable_array                                    : Ok
  54: Print bitmap                                          : Ok
  55: perf hooks                                            : Ok
  56: builtin clang support                                 : Skip (not compiled in)
  57: unit_number__scnprintf                                : Ok
  58: mem2node                                              : Ok
  59: x86 rdpmc                                             : Ok
  60: Convert perf time to TSC                              : Ok
  61: DWARF unwind                                          : Ok
  62: x86 instruction decoder - new instructions            : Ok
  63: x86 bp modify                                         : FAILED!
  64: probe libc's inet_pton & backtrace it with ping       : Ok
  65: Check open filename arg using perf trace + vfs_getname: Ok
  66: Use vfs_getname probe to get syscall args filenames   : Ok
  67: Add vfs_getname probe to get syscall args filenames   : Ok

  # uname -a
  Linux seventh 4.19.0-rc2-00176-gdb44bf4b4768 #1 SMP Thu Sep 6 14:38:21 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
  # git log --oneline -1
  29715ae86e6c perf python: Use -Wno-redundant-decls to build with PYTHON=python3
  # perf version --build-options
  perf version 4.19.rc2.g29715a
                   dwarf: [ on  ]  # HAVE_DWARF_SUPPORT
      dwarf_getlocations: [ on  ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
                   glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
                    gtk2: [ on  ]  # HAVE_GTK2_SUPPORT
           syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
                  libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
                  libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
                 libnuma: [ on  ]  # HAVE_LIBNUMA_SUPPORT
  numa_num_possible_cpus: [ on  ]  # HAVE_LIBNUMA_SUPPORT
                 libperl: [ on  ]  # HAVE_LIBPERL_SUPPORT
               libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
                libslang: [ on  ]  # HAVE_SLANG_SUPPORT
               libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
               libunwind: [ on  ]  # HAVE_LIBUNWIND_SUPPORT
      libdw-dwarf-unwind: [ on  ]  # HAVE_DWARF_SUPPORT
                    zlib: [ on  ]  # HAVE_ZLIB_SUPPORT
                    lzma: [ on  ]  # HAVE_LZMA_SUPPORT
               get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
                     bpf: [ on  ]  # HAVE_LIBBPF_SUPPORT
  # 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: Watchpoint                                            :
  22.1: Read Only Watchpoint                                : Skip
  22.2: Write Only Watchpoint                               : Ok
  22.3: Read / Write Watchpoint                             : Ok
  22.4: Modify Watchpoint                                   : Ok
  23: Number of exit events of a simple workload            : Ok
  24: Software clock events period values                   : Ok
  25: Object code reading                                   : Ok
  26: Sample parsing                                        : Ok
  27: Use a dummy software event to keep tracking           : Ok
  28: Parse with no sample_id_all bit set                   : Ok
  29: Filter hist entries                                   : Ok
  30: Lookup mmap thread                                    : Ok
  31: Share thread mg                                       : Ok
  32: Sort output of hist entries                           : Ok
  33: Cumulate child hist entries                           : Ok
  34: Track with sched_switch                               : Ok
  35: Filter fds with revents mask in a fdarray             : Ok
  36: Add fd to a fdarray, making it autogrow               : Ok
  37: kmod_path__parse                                      : Ok
  38: Thread map                                            : Ok
  39: LLVM search and compile                               :
  39.1: Basic BPF llvm compile                              : Ok
  39.2: kbuild searching                                    : Ok
  39.3: Compile source for BPF prologue generation          : Ok
  39.4: Compile source for BPF relocation                   : Ok
  40: Session topology                                      : Ok
  41: BPF filter                                            :
  41.1: Basic BPF filtering                                 : Ok
  41.2: BPF pinning                                         : Ok
  41.3: BPF prologue generation                             : Ok
  41.4: BPF relocation checker                              : Ok
  42: Synthesize thread map                                 : Ok
  43: Remove thread map                                     : Ok
  44: Synthesize cpu map                                    : Ok
  45: Synthesize stat config                                : Ok
  46: Synthesize stat                                       : Ok
  47: Synthesize stat round                                 : Ok
  48: Synthesize attr update                                : Ok
  49: Event times                                           : Ok
  50: Read backward ring buffer                             : Ok
  51: Print cpu map                                         : Ok
  52: Probe SDT events                                      : Ok
  53: is_printable_array                                    : Ok
  54: Print bitmap                                          : Ok
  55: perf hooks                                            : Ok
  56: builtin clang support                                 : Skip (not compiled in)
  57: unit_number__scnprintf                                : Ok
  58: mem2node                                              : Ok
  59: x86 rdpmc                                             : Ok
  60: Convert perf time to TSC                              : Ok
  61: DWARF unwind                                          : Ok
  62: x86 instruction decoder - new instructions            : Ok
  63: x86 bp modify                                         : FAILED!
  64: probe libc's inet_pton & backtrace it with ping       : Ok
  65: Check open filename arg using perf trace + vfs_getname: Ok
  66: Use vfs_getname probe to get syscall args filenames   : Ok
  67: Add vfs_getname probe to get syscall args filenames   : Ok

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

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2017-09-04 14:00 Arnaldo Carvalho de Melo
@ 2017-09-05  5:15 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2017-09-05  5:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Anton Blanchard,
	Flavio Bruno Leitner, Jack Henschel, Jiri Olsa, Kan Liang,
	linuxppc-dev, Madhavan Srinivasan, Mark Rutland,
	Michael Ellerman, Michael Petlan, Namhyung Kim, Peter Zijlstra,
	Ravi Bangoria, Stephane Eranian, Sukadev Bhattiprolu,
	Taeung Song, Thomas Gleixner, Wang Nan, Yao Jin,
	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 1b2f76d77a277bb70d38ad0991ed7f16bbc115a9:
> 
>   Merge tag 'perf-core-for-mingo-4.14-20170829' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-29 23:13:56 +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-4.14-20170901
> 
> for you to fetch changes up to eba9fac017617e685d648339e29a1453a30cb065:
> 
>   perf annotate browser: Help for cycling thru hottest instructions with TAB/shift+TAB (2017-09-01 14:55:40 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Support syscall name glob matching in 'perf trace' (Arnaldo Carvalho de Melo)
> 
>   e.g.:
> 
>    # perf trace -e pkey_*
>    32.784 (0.006 ms): pkey/16018 pkey_alloc(init_val: DISABLE_WRITE) = -1 EINVAL Invalid argument
>    32.795 (0.004 ms): pkey/16018 pkey_mprotect(start: 0x7f380d0a6000, len: 4096, prot: READ|WRITE, pkey: -1) = 0
>    32.801 (0.002 ms): pkey/16018 pkey_free(pkey: -1                ) = -1 EINVAL Invalid argument
>    ^C#
> 
> - Do not auto merge counts for explicitely specified events in
>   'perf stat' (Arnaldo Carvalho de Melo)
> 
> - Fix syntax in documentation of .perfconfig intel-pt option (Jack Henschel)
> 
> - Calculate the average cycles of iterations for loops detected by the
>   branch history support in 'perf report' (Jin Yao)
> 
> - Support PERF_SAMPLE_PHYS_ADDR as a sort key "phys_daddr" in the 'script', 'mem',
>   'top' and 'report'. Also add a test entry for it in 'perf test' (Kan Liang)
> 
> - Fix 'Object code reading' 'perf test' entry in PowerPC (Ravi Bangoria)
> 
> - Remove some duplicate Power9 duplicate vendor events (described in JSON
>   files) (Sukadev Bhattiprolu)
> 
> - Add help entry in the TUI annotate browser about cycling thru hottest
>   instructions with TAB/shift+TAB (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
>       perf syscalltbl: Support glob matching on syscall names
>       perf trace: Support syscall name globbing
>       perf stat: Only auto-merge events that are PMU aliases
>       perf annotate browser: Help for cycling thru hottest instructions with TAB/shift+TAB
> 
> Jack Henschel (1):
>       perf intel-pt: Fix syntax in documentation of config option
> 
> Jin Yao (1):
>       perf report: Calculate the average cycles of iterations
> 
> Kan Liang (5):
>       perf tools: Support new sample type for physical address
>       perf sort: Add sort option for physical address
>       perf mem: Support physical address
>       perf script: Support physical address
>       perf test: Add test case for PERF_SAMPLE_PHYS_ADDR
> 
> Ravi Bangoria (1):
>       perf test powerpc: Fix 'Object code reading' test
> 
> Sukadev Bhattiprolu (1):
>       perf vendor events powerpc: Remove duplicate events
> 
>  tools/include/uapi/linux/perf_event.h              |   4 +-
>  tools/perf/Documentation/intel-pt.txt              |   2 +-
>  tools/perf/Documentation/perf-mem.txt              |   4 +
>  tools/perf/Documentation/perf-record.txt           |   5 +-
>  tools/perf/Documentation/perf-report.txt           |   1 +
>  tools/perf/Documentation/perf-script.txt           |   2 +-
>  tools/perf/Documentation/perf-trace.txt            |   2 +-
>  tools/perf/builtin-mem.c                           |  97 ++++++++++++-----
>  tools/perf/builtin-record.c                        |   2 +
>  tools/perf/builtin-script.c                        |  15 ++-
>  tools/perf/builtin-stat.c                          |   2 +-
>  tools/perf/builtin-trace.c                         |  39 ++++++-
>  tools/perf/perf.h                                  |   1 +
>  .../pmu-events/arch/powerpc/power9/frontend.json   |   7 +-
>  .../perf/pmu-events/arch/powerpc/power9/other.json | 120 ---------------------
>  .../pmu-events/arch/powerpc/power9/pipeline.json   |   7 +-
>  tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   7 +-
>  tools/perf/tests/code-reading.c                    |   5 +
>  tools/perf/tests/sample-parsing.c                  |   6 +-
>  tools/perf/ui/browsers/annotate.c                  |   3 +-
>  tools/perf/ui/browsers/hists.c                     |   8 +-
>  tools/perf/ui/stdio/hist.c                         |  10 +-
>  tools/perf/util/callchain.c                        |  49 ++++-----
>  tools/perf/util/callchain.h                        |   9 +-
>  tools/perf/util/event.h                            |   1 +
>  tools/perf/util/evsel.c                            |  19 +++-
>  tools/perf/util/evsel.h                            |   1 +
>  tools/perf/util/hist.c                             |   4 +
>  tools/perf/util/hist.h                             |   1 +
>  tools/perf/util/machine.c                          |  96 ++++++++++-------
>  tools/perf/util/parse-events.c                     |  24 +++--
>  tools/perf/util/session.c                          |   3 +
>  tools/perf/util/sort.c                             |  42 ++++++++
>  tools/perf/util/sort.h                             |   1 +
>  tools/perf/util/symbol.h                           |   1 +
>  tools/perf/util/syscalltbl.c                       |  33 ++++++
>  tools/perf/util/syscalltbl.h                       |   3 +
>  37 files changed, 368 insertions(+), 268 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2017-09-04 14:00 Arnaldo Carvalho de Melo
  2017-09-05  5:15 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-09-04 14:00 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Andi Kleen, Anton Blanchard,
	Flavio Bruno Leitner, Jack Henschel, Jiri Olsa, Kan Liang,
	linuxppc-dev, Madhavan Srinivasan, Mark Rutland,
	Michael Ellerman, Michael Petlan, Namhyung Kim, Peter Zijlstra,
	Ravi Bangoria, Stephane Eranian, Sukadev Bhattiprolu,
	Taeung Song, Thomas Gleixner, Wang Nan, Yao Jin,
	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 1b2f76d77a277bb70d38ad0991ed7f16bbc115a9:

  Merge tag 'perf-core-for-mingo-4.14-20170829' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-29 23:13:56 +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-4.14-20170901

for you to fetch changes up to eba9fac017617e685d648339e29a1453a30cb065:

  perf annotate browser: Help for cycling thru hottest instructions with TAB/shift+TAB (2017-09-01 14:55:40 -0300)

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

- Support syscall name glob matching in 'perf trace' (Arnaldo Carvalho de Melo)

  e.g.:

   # perf trace -e pkey_*
   32.784 (0.006 ms): pkey/16018 pkey_alloc(init_val: DISABLE_WRITE) = -1 EINVAL Invalid argument
   32.795 (0.004 ms): pkey/16018 pkey_mprotect(start: 0x7f380d0a6000, len: 4096, prot: READ|WRITE, pkey: -1) = 0
   32.801 (0.002 ms): pkey/16018 pkey_free(pkey: -1                ) = -1 EINVAL Invalid argument
   ^C#

- Do not auto merge counts for explicitely specified events in
  'perf stat' (Arnaldo Carvalho de Melo)

- Fix syntax in documentation of .perfconfig intel-pt option (Jack Henschel)

- Calculate the average cycles of iterations for loops detected by the
  branch history support in 'perf report' (Jin Yao)

- Support PERF_SAMPLE_PHYS_ADDR as a sort key "phys_daddr" in the 'script', 'mem',
  'top' and 'report'. Also add a test entry for it in 'perf test' (Kan Liang)

- Fix 'Object code reading' 'perf test' entry in PowerPC (Ravi Bangoria)

- Remove some duplicate Power9 duplicate vendor events (described in JSON
  files) (Sukadev Bhattiprolu)

- Add help entry in the TUI annotate browser about cycling thru hottest
  instructions with TAB/shift+TAB (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf syscalltbl: Support glob matching on syscall names
      perf trace: Support syscall name globbing
      perf stat: Only auto-merge events that are PMU aliases
      perf annotate browser: Help for cycling thru hottest instructions with TAB/shift+TAB

Jack Henschel (1):
      perf intel-pt: Fix syntax in documentation of config option

Jin Yao (1):
      perf report: Calculate the average cycles of iterations

Kan Liang (5):
      perf tools: Support new sample type for physical address
      perf sort: Add sort option for physical address
      perf mem: Support physical address
      perf script: Support physical address
      perf test: Add test case for PERF_SAMPLE_PHYS_ADDR

Ravi Bangoria (1):
      perf test powerpc: Fix 'Object code reading' test

Sukadev Bhattiprolu (1):
      perf vendor events powerpc: Remove duplicate events

 tools/include/uapi/linux/perf_event.h              |   4 +-
 tools/perf/Documentation/intel-pt.txt              |   2 +-
 tools/perf/Documentation/perf-mem.txt              |   4 +
 tools/perf/Documentation/perf-record.txt           |   5 +-
 tools/perf/Documentation/perf-report.txt           |   1 +
 tools/perf/Documentation/perf-script.txt           |   2 +-
 tools/perf/Documentation/perf-trace.txt            |   2 +-
 tools/perf/builtin-mem.c                           |  97 ++++++++++++-----
 tools/perf/builtin-record.c                        |   2 +
 tools/perf/builtin-script.c                        |  15 ++-
 tools/perf/builtin-stat.c                          |   2 +-
 tools/perf/builtin-trace.c                         |  39 ++++++-
 tools/perf/perf.h                                  |   1 +
 .../pmu-events/arch/powerpc/power9/frontend.json   |   7 +-
 .../perf/pmu-events/arch/powerpc/power9/other.json | 120 ---------------------
 .../pmu-events/arch/powerpc/power9/pipeline.json   |   7 +-
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   7 +-
 tools/perf/tests/code-reading.c                    |   5 +
 tools/perf/tests/sample-parsing.c                  |   6 +-
 tools/perf/ui/browsers/annotate.c                  |   3 +-
 tools/perf/ui/browsers/hists.c                     |   8 +-
 tools/perf/ui/stdio/hist.c                         |  10 +-
 tools/perf/util/callchain.c                        |  49 ++++-----
 tools/perf/util/callchain.h                        |   9 +-
 tools/perf/util/event.h                            |   1 +
 tools/perf/util/evsel.c                            |  19 +++-
 tools/perf/util/evsel.h                            |   1 +
 tools/perf/util/hist.c                             |   4 +
 tools/perf/util/hist.h                             |   1 +
 tools/perf/util/machine.c                          |  96 ++++++++++-------
 tools/perf/util/parse-events.c                     |  24 +++--
 tools/perf/util/session.c                          |   3 +
 tools/perf/util/sort.c                             |  42 ++++++++
 tools/perf/util/sort.h                             |   1 +
 tools/perf/util/symbol.h                           |   1 +
 tools/perf/util/syscalltbl.c                       |  33 ++++++
 tools/perf/util/syscalltbl.h                       |   3 +
 37 files changed, 368 insertions(+), 268 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.

The 'perf test'  also runs shell scripts exercising the tools, checking
if they affect the system in certain ways, like setting up kprobes and
uprobes, request callchains for well known programs and check that they
are the expected ones, see if 'perf trace' beautifies system call
arguments correctly, etc.

Additionally, a new set of tests, script based, runs the tools in a live system,
setting probes in place that then gets used by 'perf trace', with its output
compared against expected results.

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.

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

  # uname -a
  Linux jouet 4.13.0-rc4+ #2 SMP Fri Aug 11 12:39:09 -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                                    : Ok
  37.3: Compile source for BPF prologue generation          : Ok
  37.4: Compile source for BPF relocation                   : Ok
  38: Session topology                                      : Ok
  39: BPF filter                                            :
  39.1: Basic BPF filtering                                 : Ok
  39.2: BPF pinning                                         : Ok
  39.3: BPF prologue generation                             : Ok
  39.4: BPF relocation checker                              : Ok
  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: Intel cqm nmi context read                            : Skip
  61: Use vfs_getname probe to get syscall args filenames   : Ok
  62: probe libc's inet_pton & backtrace it with ping       : Ok
  63: Check open filename arg using perf trace + vfs_getname: Ok
  64: Add vfs_getname probe to get syscall args filenames   : Ok
  #

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

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2017-08-21 19:25 Arnaldo Carvalho de Melo
@ 2017-08-22 10:20 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2017-08-22 10:20 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Adrian Hunter, Andi Kleen,
	Daniel Díaz, David Ahern, Jiri Olsa, Martin Liška,
	Milian Wolff, Namhyung Kim, Peter Zijlstra, Taeung Song,
	Wang Nan, 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 9881223c6cc0644cc3aeea41e1f19ea7e3041f33:
> 
>   Merge tag 'perf-core-for-mingo-4.14-20170816' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-17 09:41:56 +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-4.14-20170821
> 
> for you to fetch changes up to 3a555c7799de69d73826eccc9a21948a5775d4d3:
> 
>   perf annotate browser: Circulate percent, total-period and nr-samples view (2017-08-18 11:23:20 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Support --show-nr-samples in annotate's --stdio and --tui, using
>   the existing 't' toggle to circulate 'percent', 'total-period' and
>   'nr-samples' as the first column (Taeung Song)
> 
> - Support FCMask and PortMask in JSON vendor events (Andi Kleen)
> 
> - Fix off by one string allocation problem in 'perf trace' (Arnaldo Carvalho de Melo)
> 
> - Use just one parse events state struct in yyparse(), fixing one
>   reported segfault when a routine received a different data struct,
>   smaller than the one it expected to use (Arnaldo Carvalho de Melo)
> 
> - Remove unused cpu_relax() macros, they stopped being used when
>   tools/perf lived in Documentation/ (Arnaldo Carvalho de Melo)
> 
> - Fix double file test in libbpf's Makefile (Daniel Díaz):
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf jevents: Support FCMask and PortMask
> 
> Arnaldo Carvalho de Melo (7):
>       perf trace: Fix off by one string allocation problem
>       perf events parse: Remove some needless local variables
>       perf events parse: Rename parsing state struct to clearer name
>       perf events parse: Use just one parse events state struct
>       perf events parse: Rename parse_events_parse arguments
>       perf tools: Remove unused cpu_relax() macros
>       perf tools: Use default CPUINFO_PROC where it fits
> 
> Daniel Díaz (1):
>       tools lib bpf: Fix double file test in Makefile
> 
> Taeung Song (4):
>       perf annotate stdio: Support --show-nr-samples option
>       perf annotate: Document --show-total-period option
>       perf annotate browser: Support --show-nr-samples option
>       perf annotate browser: Circulate percent, total-period and nr-samples view
> 
>  tools/lib/bpf/Makefile                     |  4 +-
>  tools/perf/Documentation/perf-annotate.txt |  6 ++
>  tools/perf/builtin-annotate.c              | 16 ++++-
>  tools/perf/builtin-trace.c                 |  2 +-
>  tools/perf/perf-sys.h                      | 28 +--------
>  tools/perf/pmu-events/jevents.c            |  2 +
>  tools/perf/tests/bpf.c                     | 16 ++---
>  tools/perf/ui/browsers/annotate.c          | 25 ++++++--
>  tools/perf/util/annotate.c                 |  6 +-
>  tools/perf/util/header.c                   |  3 -
>  tools/perf/util/parse-events.c             | 96 +++++++++++++++---------------
>  tools/perf/util/parse-events.h             | 19 +++---
>  tools/perf/util/parse-events.y             | 94 ++++++++++++++---------------
>  13 files changed, 159 insertions(+), 158 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2017-08-21 19:25 Arnaldo Carvalho de Melo
  2017-08-22 10:20 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-08-21 19:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Andi Kleen, Daniel Díaz, David Ahern,
	Jiri Olsa, Martin Liška, Milian Wolff, Namhyung Kim,
	Peter Zijlstra, Taeung Song, Wang Nan, 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 9881223c6cc0644cc3aeea41e1f19ea7e3041f33:

  Merge tag 'perf-core-for-mingo-4.14-20170816' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-17 09:41:56 +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-4.14-20170821

for you to fetch changes up to 3a555c7799de69d73826eccc9a21948a5775d4d3:

  perf annotate browser: Circulate percent, total-period and nr-samples view (2017-08-18 11:23:20 -0300)

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

- Support --show-nr-samples in annotate's --stdio and --tui, using
  the existing 't' toggle to circulate 'percent', 'total-period' and
  'nr-samples' as the first column (Taeung Song)

- Support FCMask and PortMask in JSON vendor events (Andi Kleen)

- Fix off by one string allocation problem in 'perf trace' (Arnaldo Carvalho de Melo)

- Use just one parse events state struct in yyparse(), fixing one
  reported segfault when a routine received a different data struct,
  smaller than the one it expected to use (Arnaldo Carvalho de Melo)

- Remove unused cpu_relax() macros, they stopped being used when
  tools/perf lived in Documentation/ (Arnaldo Carvalho de Melo)

- Fix double file test in libbpf's Makefile (Daniel Díaz):

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

----------------------------------------------------------------
Andi Kleen (1):
      perf jevents: Support FCMask and PortMask

Arnaldo Carvalho de Melo (7):
      perf trace: Fix off by one string allocation problem
      perf events parse: Remove some needless local variables
      perf events parse: Rename parsing state struct to clearer name
      perf events parse: Use just one parse events state struct
      perf events parse: Rename parse_events_parse arguments
      perf tools: Remove unused cpu_relax() macros
      perf tools: Use default CPUINFO_PROC where it fits

Daniel Díaz (1):
      tools lib bpf: Fix double file test in Makefile

Taeung Song (4):
      perf annotate stdio: Support --show-nr-samples option
      perf annotate: Document --show-total-period option
      perf annotate browser: Support --show-nr-samples option
      perf annotate browser: Circulate percent, total-period and nr-samples view

 tools/lib/bpf/Makefile                     |  4 +-
 tools/perf/Documentation/perf-annotate.txt |  6 ++
 tools/perf/builtin-annotate.c              | 16 ++++-
 tools/perf/builtin-trace.c                 |  2 +-
 tools/perf/perf-sys.h                      | 28 +--------
 tools/perf/pmu-events/jevents.c            |  2 +
 tools/perf/tests/bpf.c                     | 16 ++---
 tools/perf/ui/browsers/annotate.c          | 25 ++++++--
 tools/perf/util/annotate.c                 |  6 +-
 tools/perf/util/header.c                   |  3 -
 tools/perf/util/parse-events.c             | 96 +++++++++++++++---------------
 tools/perf/util/parse-events.h             | 19 +++---
 tools/perf/util/parse-events.y             | 94 ++++++++++++++---------------
 13 files changed, 159 insertions(+), 158 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.

The 'perf test'  also runs shell scripts exercising the tools, checking
if they affect the system in certain ways, like setting up kprobes and
uprobes, request callchains for well known programs and check that they
are the expected ones, see if 'perf trace' beautifies system call
arguments correctly, etc.

Additionally, a new set of tests, script based, runs the tools in a live system,
setting probes in place that then gets used by 'perf trace', with its output
compared against expected results.

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:3.6: Ok
   4 alpine:edge: Ok
   5 android-ndk:r12b-arm: Ok
   6 archlinux:latest: Ok
   7 centos:5: Ok
   8 centos:6: Ok
   9 centos:7: Ok
  10 debian:7: Ok
  11 debian:8: Ok
  12 debian:9: Ok
  13 debian:experimental: Ok
  14 debian:experimental-x-arm64: Ok
  15 debian:experimental-x-mips: Ok
  16 debian:experimental-x-mips64: Ok
  17 debian:experimental-x-mipsel: Ok
  18 fedora:20: Ok
  19 fedora:21: Ok
  20 fedora:22: Ok
  21 fedora:23: Ok
  22 fedora:24: Ok
  23 fedora:24-x-ARC-uClibc: Ok
  24 fedora:25: Ok
  25 fedora:26: Ok
  26 fedora:rawhide: Ok
  27 mageia:5: Ok
  28 opensuse:13.2: Ok
  29 opensuse:42.1: Ok
  30 opensuse:42.2: Ok
  31 opensuse:tumbleweed: Ok
  32 oraclelinux:6: Ok
  33 oraclelinux:7: Ok
  34 ubuntu:12.04.5: Ok
  35 ubuntu:14.04.4: Ok
  36 ubuntu:14.04.4-x-linaro-arm64: Ok
  37 ubuntu:15.10: Ok
  38 ubuntu:16.04: Ok
  39 ubuntu:16.04-x-arm: Ok
  40 ubuntu:16.04-x-arm64: Ok
  41 ubuntu:16.04-x-powerpc: Ok
  42 ubuntu:16.04-x-powerpc64: Ok
  43 ubuntu:16.04-x-powerpc64el: Ok
  44 ubuntu:16.04-x-s390: Ok
  45 ubuntu:16.10: Ok
  46 ubuntu:17.04: Ok
  47 ubuntu:17.10: Ok
  #

  # uname -a
  Linux jouet 4.13.0-rc4+ #2 SMP Fri Aug 11 12:39:09 -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: Parse event definition strings                        : Ok
   6: Simple expression parser                              : Ok
   7: PERF_RECORD_* events & perf_sample fields             : Ok
   8: Parse perf pmu format                                 : Ok
   9: DSO data read                                         : Ok
  10: DSO data cache                                        : Ok
  11: DSO data reopen                                       : Ok
  12: Roundtrip evsel->name                                 : Ok
  13: Parse sched tracepoints fields                        : Ok
  14: syscalls:sys_enter_openat event fields                : Ok
  15: Setup struct perf_event_attr                          : Ok
  16: Match and link multiple hists                         : Ok
  17: 'import perf' in python                               : Ok
  18: Breakpoint overflow signal handler                    : Ok
  19: Breakpoint overflow sampling                          : Ok
  20: Number of exit events of a simple workload            : Ok
  21: Software clock events period values                   : Ok
  22: Object code reading                                   : Ok
  23: Sample parsing                                        : Ok
  24: Use a dummy software event to keep tracking           : Ok
  25: Parse with no sample_id_all bit set                   : Ok
  26: Filter hist entries                                   : Ok
  27: Lookup mmap thread                                    : Ok
  28: Share thread mg                                       : Ok
  29: Sort output of hist entries                           : Ok
  30: Cumulate child hist entries                           : Ok
  31: Track with sched_switch                               : Ok
  32: Filter fds with revents mask in a fdarray             : Ok
  33: Add fd to a fdarray, making it autogrow               : Ok
  34: kmod_path__parse                                      : Ok
  35: Thread map                                            : Ok
  36: LLVM search and compile                               :
  36.1: Basic BPF llvm compile                              : Ok
  36.2: kbuild searching                                    : Ok
  36.3: Compile source for BPF prologue generation          : Ok
  36.4: Compile source for BPF relocation                   : Ok
  37: Session topology                                      : Ok
  38: BPF filter                                            :
  38.1: Basic BPF filtering                                 : Ok
  38.2: BPF pinning                                         : Ok
  38.3: BPF prologue generation                             : Ok
  38.4: BPF relocation checker                              : Ok
  39: Synthesize thread map                                 : Ok
  40: Remove thread map                                     : Ok
  41: Synthesize cpu map                                    : Ok
  42: Synthesize stat config                                : Ok
  43: Synthesize stat                                       : Ok
  44: Synthesize stat round                                 : Ok
  45: Synthesize attr update                                : Ok
  46: Event times                                           : Ok
  47: Read backward ring buffer                             : Ok
  48: Print cpu map                                         : Ok
  49: Probe SDT events                                      : Ok
  50: is_printable_array                                    : Ok
  51: Print bitmap                                          : Ok
  52: perf hooks                                            : Ok
  53: builtin clang support                                 : Skip (not compiled in)
  54: unit_number__scnprintf                                : Ok
  55: x86 rdpmc                                             : Ok
  56: Convert perf time to TSC                              : Ok
  57: DWARF unwind                                          : Ok
  58: x86 instruction decoder - new instructions            : Ok
  59: Intel cqm nmi context read                            : Skip
  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_util_map_o_O: make util/map.o
           make_no_libbionic_O: make NO_LIBBIONIC=1
                make_install_O: make install
                   make_tags_O: make tags
                   make_pure_O: make
            make_no_auxtrace_O: make NO_AUXTRACE=1
             make_no_libperl_O: make NO_LIBPERL=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                    make_doc_O: make doc
              make_no_libelf_O: make NO_LIBELF=1
               make_no_slang_O: make NO_SLANG=1
                   make_help_O: make help
            make_no_libaudit_O: make NO_LIBAUDIT=1
                 make_perf_o_O: make perf.o
                  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_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
             make_no_libnuma_O: make NO_LIBNUMA=1
         make_install_prefix_O: make install prefix=/tmp/krava
        make_with_babeltrace_O: make LIBBABELTRACE=1
           make_no_libpython_O: make NO_LIBPYTHON=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
           make_no_libunwind_O: make NO_LIBUNWIND=1
            make_install_bin_O: make install-bin
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
              make_no_libbpf_O: make NO_LIBBPF=1
                make_no_gtk2_O: make NO_GTK2=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
              make_clean_all_O: make clean all
            make_no_demangle_O: make NO_DEMANGLE=1
                make_no_newt_O: make NO_NEWT=1
           make_no_backtrace_O: make NO_BACKTRACE=1
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2017-04-05  0:17 Arnaldo Carvalho de Melo
@ 2017-04-05  5:41 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2017-04-05  5:41 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Alexander Shishkin, Alexis Berlemont, Andi Kleen,
	Hemant Kumar, Jiri Olsa, Martin Liska, Masami Hiramatsu,
	Michael Ellerman, Namhyung Kim, Naveen N . Rao, Peter Zijlstra,
	Ravi Bangoria, Taeung Song, Wang Nan, 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 fcc309e618c9e9ac4ede010d87522b0689549658:
> 
>   Merge tag 'perf-core-for-mingo-4.12-20170331' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-04-01 12:43:40 +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-4.12-20170404
> 
> for you to fetch changes up to 99094a5e941fe88d95cbd594e6a41bee24003ecb:
> 
>   perf annotate: Fix missing number of samples for source_line_samples (2017-04-04 21:08:00 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Add missing number of samples in 'perf annotate --stdio -l --show-total-period'
>   (Taeung Song)
> 
> Vendor events updates:
> 
> - Add uncore_arb Intel vendor events in JSON format (Andi Kleen)
> 
> - Add uncore vendor events for Intel's Sandy Bridge, Ivy Bridge,
>   Haswell, Broadwell and Skylake architectures (Andi Kleen)
> 
> - Add missing UNC_M_DCLOCKTICKS Intel Broadwell DE uncore vendor event (Andi Kleen)
> 
> Infrastructure:
> 
> - Remove some more die() calls, avoiding sudden death in library code
>   (Arnaldo Carvalho de Melo)
> 
> - Add argument support for SDT events in powerpc (Ravi Bangoria)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (8):
>       perf vendor events intel: Add missing UNC_M_DCLOCKTICKS for Broadwell DE uncore
>       perf vendor events intel: Add uncore events for Sandy Bridge client
>       perf vendor events intel: Add uncore events for Ivy Bridge client
>       perf vendor events intel: Add uncore events for Haswell client
>       perf vendor events intel: Add uncore events for Broadwell client
>       perf vendor events intel: Add uncore events for Skylake client
>       perf vendor events intel: Add uncore_arb JSON support
>       perf vendor events intel: Add missing space in json descriptions
> 
> Arnaldo Carvalho de Melo (4):
>       Merge branch 'perf/uncore-json-updates-1' of git://git.kernel.org/.../ak/linux-misc into perf/core
>       perf tools: Remove die() call
>       perf tools: Handle allocation failures gracefully
>       perf tools: Don't die on a print function
> 
> Ravi Bangoria (1):
>       perf sdt powerpc: Add argument support
> 
> Taeung Song (1):
>       perf annotate: Fix missing number of samples for source_line_samples
> 
>  tools/perf/arch/powerpc/util/perf_regs.c           | 111 ++++++
>  tools/perf/perf.c                                  |   3 +-
>  .../perf/pmu-events/arch/x86/broadwell/uncore.json | 278 +++++++++++++++
>  .../arch/x86/broadwellde/uncore-memory.json        |  13 +-
>  tools/perf/pmu-events/arch/x86/haswell/uncore.json | 374 +++++++++++++++++++++
>  .../perf/pmu-events/arch/x86/ivybridge/uncore.json | 314 +++++++++++++++++
>  .../pmu-events/arch/x86/sandybridge/uncore.json    | 314 +++++++++++++++++
>  tools/perf/pmu-events/arch/x86/skylake/uncore.json | 254 ++++++++++++++
>  tools/perf/pmu-events/jevents.c                    |   2 +
>  tools/perf/util/annotate.c                         |   6 +-
>  tools/perf/util/annotate.h                         |   2 +-
>  tools/perf/util/values.c                           |  63 +++-
>  12 files changed, 1710 insertions(+), 24 deletions(-)
>  create mode 100644 tools/perf/pmu-events/arch/x86/broadwell/uncore.json
>  create mode 100644 tools/perf/pmu-events/arch/x86/haswell/uncore.json
>  create mode 100644 tools/perf/pmu-events/arch/x86/ivybridge/uncore.json
>  create mode 100644 tools/perf/pmu-events/arch/x86/sandybridge/uncore.json
>  create mode 100644 tools/perf/pmu-events/arch/x86/skylake/uncore.json

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2017-04-05  0:17 Arnaldo Carvalho de Melo
  2017-04-05  5:41 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-05  0:17 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Alexis Berlemont, Andi Kleen, Hemant Kumar, Jiri Olsa,
	Martin Liska, Masami Hiramatsu, Michael Ellerman, Namhyung Kim,
	Naveen N . Rao, Peter Zijlstra, Ravi Bangoria, Taeung Song,
	Wang Nan, 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 fcc309e618c9e9ac4ede010d87522b0689549658:

  Merge tag 'perf-core-for-mingo-4.12-20170331' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-04-01 12:43:40 +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-4.12-20170404

for you to fetch changes up to 99094a5e941fe88d95cbd594e6a41bee24003ecb:

  perf annotate: Fix missing number of samples for source_line_samples (2017-04-04 21:08:00 -0300)

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

User visible:

- Add missing number of samples in 'perf annotate --stdio -l --show-total-period'
  (Taeung Song)

Vendor events updates:

- Add uncore_arb Intel vendor events in JSON format (Andi Kleen)

- Add uncore vendor events for Intel's Sandy Bridge, Ivy Bridge,
  Haswell, Broadwell and Skylake architectures (Andi Kleen)

- Add missing UNC_M_DCLOCKTICKS Intel Broadwell DE uncore vendor event (Andi Kleen)

Infrastructure:

- Remove some more die() calls, avoiding sudden death in library code
  (Arnaldo Carvalho de Melo)

- Add argument support for SDT events in powerpc (Ravi Bangoria)

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

----------------------------------------------------------------
Andi Kleen (8):
      perf vendor events intel: Add missing UNC_M_DCLOCKTICKS for Broadwell DE uncore
      perf vendor events intel: Add uncore events for Sandy Bridge client
      perf vendor events intel: Add uncore events for Ivy Bridge client
      perf vendor events intel: Add uncore events for Haswell client
      perf vendor events intel: Add uncore events for Broadwell client
      perf vendor events intel: Add uncore events for Skylake client
      perf vendor events intel: Add uncore_arb JSON support
      perf vendor events intel: Add missing space in json descriptions

Arnaldo Carvalho de Melo (4):
      Merge branch 'perf/uncore-json-updates-1' of git://git.kernel.org/.../ak/linux-misc into perf/core
      perf tools: Remove die() call
      perf tools: Handle allocation failures gracefully
      perf tools: Don't die on a print function

Ravi Bangoria (1):
      perf sdt powerpc: Add argument support

Taeung Song (1):
      perf annotate: Fix missing number of samples for source_line_samples

 tools/perf/arch/powerpc/util/perf_regs.c           | 111 ++++++
 tools/perf/perf.c                                  |   3 +-
 .../perf/pmu-events/arch/x86/broadwell/uncore.json | 278 +++++++++++++++
 .../arch/x86/broadwellde/uncore-memory.json        |  13 +-
 tools/perf/pmu-events/arch/x86/haswell/uncore.json | 374 +++++++++++++++++++++
 .../perf/pmu-events/arch/x86/ivybridge/uncore.json | 314 +++++++++++++++++
 .../pmu-events/arch/x86/sandybridge/uncore.json    | 314 +++++++++++++++++
 tools/perf/pmu-events/arch/x86/skylake/uncore.json | 254 ++++++++++++++
 tools/perf/pmu-events/jevents.c                    |   2 +
 tools/perf/util/annotate.c                         |   6 +-
 tools/perf/util/annotate.h                         |   2 +-
 tools/perf/util/values.c                           |  63 +++-
 12 files changed, 1710 insertions(+), 24 deletions(-)
 create mode 100644 tools/perf/pmu-events/arch/x86/broadwell/uncore.json
 create mode 100644 tools/perf/pmu-events/arch/x86/haswell/uncore.json
 create mode 100644 tools/perf/pmu-events/arch/x86/ivybridge/uncore.json
 create mode 100644 tools/perf/pmu-events/arch/x86/sandybridge/uncore.json
 create mode 100644 tools/perf/pmu-events/arch/x86/skylake/uncore.json

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.

For this specific pull request the samples/bpf/ was disabled, as 'make headers_install'
is failing with the following error, in this case in fedora:rawhide:

    INSTALL usr/include/uapi/ (0 file)
  /git/linux/scripts/Makefile.headersinst:62: *** Missing generated UAPI file ./arch/x86/include/generated/uapi/asm/unistd_32.h.  Stop.
  make[1]: *** [/git/linux/Makefile:1151: headers_install] Error 2
  make[1]: Leaving directory '/tmp/build/linux'
  make: *** [Makefile:152: sub-make] Error 2
  make: Leaving directory '/git/linux'

I'll investigate later, perf and objtool builds just fine, with clang and gcc.

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:9: Ok
  12 debian:experimental: Ok
  13 debian:experimental-x-arm64: Ok
  14 debian:experimental-x-mips: Ok
  15 debian:experimental-x-mips64: Ok
  16 debian:experimental-x-mipsel: Ok
  17 fedora:20: Ok
  18 fedora:21: Ok
  19 fedora:22: Ok
  20 fedora:23: Ok
  21 fedora:24: Ok
  22 fedora:24-x-ARC-uClibc: Ok
  23 fedora:25: Ok
  24 fedora:rawhide: Ok
  25 mageia:5: Ok
  26 opensuse:13.2: Ok
  27 opensuse:42.1: Ok
  28 opensuse:tumbleweed: Ok
  29 ubuntu:12.04.5: Ok
  30 ubuntu:14.04.4: Ok
  31 ubuntu:14.04.4-x-linaro-arm64: Ok
  32 ubuntu:15.10: Ok
  33 ubuntu:16.04: Ok
  34 ubuntu:16.04-x-arm: Ok
  35 ubuntu:16.04-x-arm64: Ok
  36 ubuntu:16.04-x-powerpc: Ok
  37 ubuntu:16.04-x-powerpc64: Ok
  38 ubuntu:16.04-x-s390: Ok
  39 ubuntu:16.10: Ok
  40 ubuntu:17.04: Ok
  # 
  # uname -a
  Linux jouet 4.11.0-rc2+ #5 SMP Mon Mar 20 18:12:29 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
  # 'perf test tsc' already fixed by peterz in tip, need to update this kernel :-\
  # 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: Simple expression parser                   : Ok
   7: PERF_RECORD_* events & perf_sample fields  : Ok
   8: Parse perf pmu format                      : Ok
   9: DSO data read                              : Ok
  10: DSO data cache                             : Ok
  11: DSO data reopen                            : Ok
  12: Roundtrip evsel->name                      : Ok
  13: Parse sched tracepoints fields             : Ok
  14: syscalls:sys_enter_openat event fields     : Ok
  15: Setup struct perf_event_attr               : Ok
  16: Match and link multiple hists              : Ok
  17: 'import perf' in python                    : Ok
  18: Breakpoint overflow signal handler         : Ok
  19: Breakpoint overflow sampling               : Ok
  20: Number of exit events of a simple workload : Ok
  21: Software clock events period values        : Ok
  22: Object code reading                        : Ok
  23: Sample parsing                             : Ok
  24: Use a dummy software event to keep tracking: Ok
  25: Parse with no sample_id_all bit set        : Ok
  26: Filter hist entries                        : Ok
  27: Lookup mmap thread                         : Ok
  28: Share thread mg                            : Ok
  29: Sort output of hist entries                : Ok
  30: Cumulate child hist entries                : Ok
  31: Track with sched_switch                    : Ok
  32: Filter fds with revents mask in a fdarray  : Ok
  33: Add fd to a fdarray, making it autogrow    : Ok
  34: kmod_path__parse                           : Ok
  35: Thread map                                 : Ok
  36: LLVM search and compile                    :
  36.1: Basic BPF llvm compile                    : Ok
  36.2: kbuild searching                          : Ok
  36.3: Compile source for BPF prologue generation: Ok
  36.4: Compile source for BPF relocation         : Ok
  37: Session topology                           : Ok
  38: BPF filter                                 :
  38.1: Basic BPF filtering                      : Ok
  38.2: BPF pinning                              : Ok
  38.3: BPF prologue generation                  : Ok
  38.4: BPF relocation checker                   : Ok
  39: Synthesize thread map                      : Ok
  40: Remove thread map                          : Ok
  41: Synthesize cpu map                         : Ok
  42: Synthesize stat config                     : Ok
  43: Synthesize stat                            : Ok
  44: Synthesize stat round                      : Ok
  45: Synthesize attr update                     : Ok
  46: Event times                                : Ok
  47: Read backward ring buffer                  : Ok
  48: Print cpu map                              : Ok
  49: Probe SDT events                           : Ok
  50: is_printable_array                         : Ok
  51: Print bitmap                               : Ok
  52: perf hooks                                 : Ok
  53: builtin clang support                      : Skip (not compiled in)
  54: unit_number__scnprintf                     : Ok
  55: x86 rdpmc                                  : Ok
  56: Convert perf time to TSC                   : FAILED!
  57: DWARF unwind                               : Ok
  58: x86 instruction decoder - new instructions : Ok
  59: 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_debug_O: make DEBUG=1
               make_no_slang_O: make NO_SLANG=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
             make_no_libnuma_O: make NO_LIBNUMA=1
                   make_help_O: make help
                   make_tags_O: make tags
                make_no_newt_O: make NO_NEWT=1
           make_no_libbionic_O: make NO_LIBBIONIC=1
                 make_perf_o_O: make perf.o
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
            make_no_auxtrace_O: make NO_AUXTRACE=1
              make_clean_all_O: make clean all
           make_no_libunwind_O: make NO_LIBUNWIND=1
             make_no_libperl_O: make NO_LIBPERL=1
                   make_pure_O: make
                make_no_gtk2_O: make NO_GTK2=1
              make_no_libelf_O: make NO_LIBELF=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_install_O: make install
            make_no_libaudit_O: make NO_LIBAUDIT=1
            make_install_bin_O: make install-bin
           make_no_libpython_O: make NO_LIBPYTHON=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
             make_util_map_o_O: make util/map.o
            make_no_demangle_O: make NO_DEMANGLE=1
           make_no_backtrace_O: make NO_BACKTRACE=1
         make_install_prefix_O: make install prefix=/tmp/krava
                    make_doc_O: make doc
              make_no_libbpf_O: make NO_LIBBPF=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
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2017-01-11 20:21 Arnaldo Carvalho de Melo
@ 2017-01-12  8:25 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2017-01-12  8:25 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin, David Ahern,
	Jiri Olsa, Josh Poimboeuf, Ladi Prosek, Laura Abbott,
	Masami Hiramatsu, Milian Wolff, Namhyung Kim, Paolo Bonzini,
	Peter Zijlstra, Soramichi AKIYAMA, Wang Nan,
	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 description will move to the end in the next pull requests *
> 
> 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.
> 
> 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.
> 
> The following changes since commit ad5013d5699d30ded0cdbbc68b93b2aa28222c6e:
> 
>   perf/x86/intel: Use ULL constant to prevent undefined shift behaviour (2017-01-11 16:43:30 +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.11-20170111
> 
> for you to fetch changes up to 675f52b23743f396c585fc9d135435be37f320d8:
> 
>   tools: Sync x86's vmx.h with the kernel (2017-01-11 16:48:02 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Add more triggers to switch the output file (perf.data.TIMESTAMP).
> 
>   Now, in addition to switching to a different output file when
>   receiving a SIGUSR2, one can also specify file size and time based
>   triggers:
> 
>        perf record -a --switch-output=signal
> 
>   is equivalent to what we had before:
> 
>        perf record -a --switch-output
> 
>   While we can also ask for the file to be "sliced" by size, taking
>   into account that that will happen only when we get woken up by
>   the kernel, i.e. one has to take into account the --mmap-pages (the
>   size of the perf mmap ring buffer):
> 
>        perf record -a --switch-output=2G
> 
>   will break the perf.data output into multiple files limited to 2GB
>   of samples, right when generating the output.
> 
>   For time based samples, alert() will be used, so to have 1 minute
>   limited perf.data output files:
> 
>       perf record -a --switch-output=1m
> 
>   (Jiri Olsa)
> 
> - Remove the need to use -e only for syscalls and --event only for
>   tracepoints/HW/SW/etc events, i.e. now one can use:
> 
>       perf trace -e nanosleep,futex,sched:sched_switch ./workload
> 
>   or:
> 
>       perf trace --event nanosleep,futex,sched:sched_switch ./workload
> 
>   And have it tracing raw_syscalls:sys_{enter,exit} for the nanosleep
>   and futex syscalls, formatting those as strace does while also
>   tracing sched:sched_switch, ordering it all into one strace like
>   output.
> 
>   Using '!' as the first character in the -e/--event argument remains
>   a way to negate the list of syscalls, i.e. all syscalls except for
>   the ones specified, doesn't affect the other kinds of events.
> 
>   E.g:
> 
>   [root@jouet ~] # perf trace -e sched:sched_switch,nanosleep usleep 1
>      0.000 ( 0.028 ms): usleep/28150 nanosleep(rqtp: 0x7ffe4201b9f0) ...
>      0.028 (         ): sched:sched_switch:usleep:28150 [120] S ==> swapper/0:0 [120])
>      0.000 ( 0.065 ms): usleep/28150  ... [continued]: nanosleep()) = 0
>   [root@jouet ~]#
> 
>   (Arnaldo Carvalho de Melo)
> 
> - 'perf kallsyms' toy tool to look for extended symbol information on
>   the running kernel and demonstrate the machine/thread/symbol APIs for
>   use in other tools, such as 'perf probe' (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Add missing linux/kernel.h include to subcmd.h (Arnaldo Carvalho de Melo)
>   tools: Sync x86's vmx.h with the kernel
> 
> - Create libdir directory before installing libperf-jvmti.so (Laura Abbott)
> 
> - Fix typo in perf_evlist__start_workload() (Soramichi Akiyama)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (5):
>       tools lib subcmd: Add missing linux/kernel.h include to subcmd.h
>       perf machine: Add a kallsyms loading constructor
>       perf kallsyms: Introduce tool to look for extended symbol information on the running kernel
>       perf trace: Allow specifying list of syscalls and events in -e/--expr/--event
>       tools: Sync x86's vmx.h with the kernel
> 
> Jiri Olsa (6):
>       perf tools: Add unit_number__scnprintf function
>       perf record: Add struct switch_output
>       perf record: Change switch-output option to take optional argument
>       perf record: Add switch-output size option argument
>       perf record: Add switch-output size warning
>       perf record: Add switch-output time option argument
> 
> Laura Abbott (1):
>       perf jvmti: Create libdir directory before installing libperf-jvmti.so
> 
> Soramichi Akiyama (1):
>       perf evlist: Fix typo in perf_evlist__start_workload()
> 
>  tools/arch/x86/include/uapi/asm/vmx.h      |   5 +
>  tools/lib/subcmd/parse-options.h           |   1 +
>  tools/perf/Build                           |   1 +
>  tools/perf/Documentation/perf-kallsyms.txt |  24 +++++
>  tools/perf/Documentation/perf-record.txt   |  14 ++-
>  tools/perf/Documentation/perf-trace.txt    |   8 +-
>  tools/perf/Makefile.perf                   |   1 +
>  tools/perf/builtin-help.c                  |   2 +-
>  tools/perf/builtin-kallsyms.c              |  67 +++++++++++++
>  tools/perf/builtin-record.c                | 154 ++++++++++++++++++++++++++---
>  tools/perf/builtin-trace.c                 | 120 ++++++++++++++++------
>  tools/perf/builtin.h                       |   1 +
>  tools/perf/command-list.txt                |   1 +
>  tools/perf/perf.c                          |   1 +
>  tools/perf/tests/Build                     |   1 +
>  tools/perf/tests/builtin-test.c            |   4 +
>  tools/perf/tests/tests.h                   |   1 +
>  tools/perf/tests/unit_number__scnprintf.c  |  37 +++++++
>  tools/perf/util/evlist.c                   |  12 ++-
>  tools/perf/util/evlist.h                   |   2 +
>  tools/perf/util/machine.c                  |  19 ++++
>  tools/perf/util/machine.h                  |   1 +
>  tools/perf/util/util.c                     |  13 +++
>  tools/perf/util/util.h                     |   1 +
>  24 files changed, 439 insertions(+), 52 deletions(-)
>  create mode 100644 tools/perf/Documentation/perf-kallsyms.txt
>  create mode 100644 tools/perf/builtin-kallsyms.c
>  create mode 100644 tools/perf/tests/unit_number__scnprintf.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2017-01-11 20:21 Arnaldo Carvalho de Melo
  2017-01-12  8:25 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-01-11 20:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, David Ahern, Jiri Olsa, Josh Poimboeuf,
	Ladi Prosek, Laura Abbott, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Paolo Bonzini, Peter Zijlstra, Soramichi AKIYAMA,
	Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

* The following description will move to the end in the next pull requests *

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.

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.

The following changes since commit ad5013d5699d30ded0cdbbc68b93b2aa28222c6e:

  perf/x86/intel: Use ULL constant to prevent undefined shift behaviour (2017-01-11 16:43:30 +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.11-20170111

for you to fetch changes up to 675f52b23743f396c585fc9d135435be37f320d8:

  tools: Sync x86's vmx.h with the kernel (2017-01-11 16:48:02 -0300)

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

New features:

- Add more triggers to switch the output file (perf.data.TIMESTAMP).

  Now, in addition to switching to a different output file when
  receiving a SIGUSR2, one can also specify file size and time based
  triggers:

       perf record -a --switch-output=signal

  is equivalent to what we had before:

       perf record -a --switch-output

  While we can also ask for the file to be "sliced" by size, taking
  into account that that will happen only when we get woken up by
  the kernel, i.e. one has to take into account the --mmap-pages (the
  size of the perf mmap ring buffer):

       perf record -a --switch-output=2G

  will break the perf.data output into multiple files limited to 2GB
  of samples, right when generating the output.

  For time based samples, alert() will be used, so to have 1 minute
  limited perf.data output files:

      perf record -a --switch-output=1m

  (Jiri Olsa)

- Remove the need to use -e only for syscalls and --event only for
  tracepoints/HW/SW/etc events, i.e. now one can use:

      perf trace -e nanosleep,futex,sched:sched_switch ./workload

  or:

      perf trace --event nanosleep,futex,sched:sched_switch ./workload

  And have it tracing raw_syscalls:sys_{enter,exit} for the nanosleep
  and futex syscalls, formatting those as strace does while also
  tracing sched:sched_switch, ordering it all into one strace like
  output.

  Using '!' as the first character in the -e/--event argument remains
  a way to negate the list of syscalls, i.e. all syscalls except for
  the ones specified, doesn't affect the other kinds of events.

  E.g:

  [root@jouet ~] # perf trace -e sched:sched_switch,nanosleep usleep 1
     0.000 ( 0.028 ms): usleep/28150 nanosleep(rqtp: 0x7ffe4201b9f0) ...
     0.028 (         ): sched:sched_switch:usleep:28150 [120] S ==> swapper/0:0 [120])
     0.000 ( 0.065 ms): usleep/28150  ... [continued]: nanosleep()) = 0
  [root@jouet ~]#

  (Arnaldo Carvalho de Melo)

- 'perf kallsyms' toy tool to look for extended symbol information on
  the running kernel and demonstrate the machine/thread/symbol APIs for
  use in other tools, such as 'perf probe' (Arnaldo Carvalho de Melo)

Infrastructure:

- Add missing linux/kernel.h include to subcmd.h (Arnaldo Carvalho de Melo)
  tools: Sync x86's vmx.h with the kernel

- Create libdir directory before installing libperf-jvmti.so (Laura Abbott)

- Fix typo in perf_evlist__start_workload() (Soramichi Akiyama)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (5):
      tools lib subcmd: Add missing linux/kernel.h include to subcmd.h
      perf machine: Add a kallsyms loading constructor
      perf kallsyms: Introduce tool to look for extended symbol information on the running kernel
      perf trace: Allow specifying list of syscalls and events in -e/--expr/--event
      tools: Sync x86's vmx.h with the kernel

Jiri Olsa (6):
      perf tools: Add unit_number__scnprintf function
      perf record: Add struct switch_output
      perf record: Change switch-output option to take optional argument
      perf record: Add switch-output size option argument
      perf record: Add switch-output size warning
      perf record: Add switch-output time option argument

Laura Abbott (1):
      perf jvmti: Create libdir directory before installing libperf-jvmti.so

Soramichi Akiyama (1):
      perf evlist: Fix typo in perf_evlist__start_workload()

 tools/arch/x86/include/uapi/asm/vmx.h      |   5 +
 tools/lib/subcmd/parse-options.h           |   1 +
 tools/perf/Build                           |   1 +
 tools/perf/Documentation/perf-kallsyms.txt |  24 +++++
 tools/perf/Documentation/perf-record.txt   |  14 ++-
 tools/perf/Documentation/perf-trace.txt    |   8 +-
 tools/perf/Makefile.perf                   |   1 +
 tools/perf/builtin-help.c                  |   2 +-
 tools/perf/builtin-kallsyms.c              |  67 +++++++++++++
 tools/perf/builtin-record.c                | 154 ++++++++++++++++++++++++++---
 tools/perf/builtin-trace.c                 | 120 ++++++++++++++++------
 tools/perf/builtin.h                       |   1 +
 tools/perf/command-list.txt                |   1 +
 tools/perf/perf.c                          |   1 +
 tools/perf/tests/Build                     |   1 +
 tools/perf/tests/builtin-test.c            |   4 +
 tools/perf/tests/tests.h                   |   1 +
 tools/perf/tests/unit_number__scnprintf.c  |  37 +++++++
 tools/perf/util/evlist.c                   |  12 ++-
 tools/perf/util/evlist.h                   |   2 +
 tools/perf/util/machine.c                  |  19 ++++
 tools/perf/util/machine.h                  |   1 +
 tools/perf/util/util.c                     |  13 +++
 tools/perf/util/util.h                     |   1 +
 24 files changed, 439 insertions(+), 52 deletions(-)
 create mode 100644 tools/perf/Documentation/perf-kallsyms.txt
 create mode 100644 tools/perf/builtin-kallsyms.c
 create mode 100644 tools/perf/tests/unit_number__scnprintf.c

  # uname -a
  Linux jouet 4.9.0+ #2 SMP Wed Dec 21 11:54:44 BRT 2016 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: 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                      : Ok
  37.2: BPF prologue generation                  : Ok
  37.3: BPF relocation checker                   : Ok
  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
  #

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

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

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2016-10-06 16:11 Arnaldo Carvalho de Melo
@ 2016-10-06 22:38 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2016-10-06 22:38 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Linux Weekly News, Adrian Hunter,
	Alexander Shishkin, Alexei Starovoitov, Andi Kleen, Balbir Singh,
	Daniel Borkmann, David Ahern, David S . Miller, Donghyun Kim,
	He Kuang, Jiri Olsa, Masami Hiramatsu, Nambong Ha, Namhyung Kim,
	Naveen N . Rao, Peter Zijlstra, pi3orama, Ravi Bangoria,
	Seonyoung Kim, stable, Steven Rostedt, Sukadev Bhattiprolu,
	Taeung Song, Thomas Gleixner, Tony Luck, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Build and test stats at the end of the message.
> 
> The following changes since commit 8657355f5b5f657407efc12a2223e8a3a6d658de:
> 
>   Merge tag 'perf-core-for-mingo-20161003' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2016-10-04 10:04:47 +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-20161005
> 
> for you to fetch changes up to 87095f7ddeff3038a0cf8e6574922f9c11688619:
> 
>   tools build: Add feature detection for g++ (2016-10-05 19:59:35 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Intel PT timestamp fixes (Adrian Hunter)
> 
> - Fix Intel JSON fixed counter conversions (Andi Kleen)
> 
> - Sync memcpy, cpufeatures and bpf headers with the kernel (Arnaldo Carvalho de Melo)
> 
> - Add some more tool tips (Donghyun Kim, Kim SeonYoung, Nambong Ha)
> 
> - Fix libtraceevent's kbuffer_read_at_offset() handling of offsets before or
>   equal the first event (Namhyung Kim)
> 
> - Fix uretprobe probe placement on ppc64le (Ravi Bangoria)
> 
> - Support building C++ source files and add feature detection for g++,
>   prep work for supporting a builtin clang/llvm, to remove the need for having
>   that toolchain installed to automagically build BPF scriptlets that then
>   gets uploaded to the kernel via sys_bpf() (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (2):
>       perf intel-pt: Fix estimated timestamps for cycle-accurate mode
>       perf intel-pt: Fix MTC timestamp calculation for large MTC periods
> 
> Andi Kleen (1):
>       perf jevents: Fix Intel JSON fixed counter conversions
> 
> Arnaldo Carvalho de Melo (3):
>       perf bench mem: Sync memcpy assembly sources with the kernel
>       tools: Synchronize tools/arch/x86/include/asm/cpufeatures.h
>       tools: Synchronize tools/include/uapi/linux/bpf.h
> 
> Donghyun Kim (1):
>       perf report/top: Add a tip about system-wide collection from all CPUs
> 
> Kim SeonYoung (1):
>       perf report/top: Add a tip about source line numbers with overhead
> 
> Nambong Ha (1):
>       perf top/report: Add tips about a list option
> 
> Namhyung Kim (1):
>       tools lib traceevent: Fix kbuffer_read_at_offset()
> 
> Ravi Bangoria (1):
>       perf uretprobe ppc64le: Fix probe location
> 
> Wang Nan (2):
>       tools build: Support compiling C++ source file
>       tools build: Add feature detection for g++
> 
>  tools/arch/x86/include/asm/cpufeatures.h           |  1 -
>  tools/arch/x86/lib/memcpy_64.S                     |  6 ++--
>  tools/build/Build.include                          |  1 +
>  tools/build/Makefile.build                         |  7 ++++
>  tools/build/Makefile.feature                       |  2 +-
>  tools/build/feature/Makefile                       | 10 +++++-
>  tools/build/feature/test-cxx.cpp                   | 15 +++++++++
>  tools/include/uapi/linux/bpf.h                     |  4 +--
>  tools/lib/traceevent/kbuffer-parse.c               |  1 +
>  tools/perf/Documentation/tips.txt                  |  4 +++
>  tools/perf/arch/powerpc/util/sym-handling.c        |  3 +-
>  tools/perf/pmu-events/jevents.c                    |  2 ++
>  .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 38 ++++++++++++++++++++++
>  13 files changed, 85 insertions(+), 9 deletions(-)
>  create mode 100644 tools/build/feature/test-cxx.cpp
> 
>   [root@jouet ~]# time dm
>    1 alpine:3.4: Ok
>    2 android-ndk:r12b-arm: Ok
>    3 archlinux:latest: Ok
>    4 centos:5: Ok
>    5 centos:6: Ok
>    6 centos:7: Ok
>    7 debian:7: Ok
>    8 debian:8: Ok
>    9 debian:experimental: Ok
>   10 fedora:20: Ok
>   11 fedora:21: Ok
>   12 fedora:22: Ok
>   13 fedora:23: Ok
>   14 fedora:24: Ok
>   15 fedora:24-x-ARC-uClibc: Ok
>   16 fedora:rawhide: Ok
>   17 mageia:5: Ok
>   18 opensuse:13.2: Ok
>   19 opensuse:42.1: Ok
>   20 opensuse:tumbleweed: Ok
>   21 ubuntu:12.04.5: Ok
>   22 ubuntu:14.04: Ok
>   23 ubuntu:14.04.4: Ok
>   24 ubuntu:15.10: Ok
>   25 ubuntu:16.04: Ok
>   26 ubuntu:16.04-x-arm: Ok
>   27 ubuntu:16.04-x-arm64: Ok
>   28 ubuntu:16.04-x-powerpc: Ok
>   29 ubuntu:16.04-x-powerpc64: Ok
>   30 ubuntu:16.04-x-powerpc64el: Ok
>   31 ubuntu:16.04-x-s390: Ok
>   32 ubuntu:16.10: Ok
> 
>   real    44m58.202s
>   user    0m2.864s
>   sys     0m1.975s
>   [root@jouet ~]#
> 
>   [acme@jouet linux]$ make -C tools/perf build-test
>   make: Entering directory '/home/acme/git/linux/tools/perf'
>                         tarpkg: ./tests/perf-targz-src-pkg .
>                  make_static_O: make LDFLAGS=-static
>   make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
>    make_install_prefix_slash_O: make install prefix=/tmp/krava/
>                   make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
>                    make_help_O: make help
>            make_no_libpython_O: make NO_LIBPYTHON=1
>                 make_install_O: make install
>          make_install_prefix_O: make install prefix=/tmp/krava
>              make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
>              make_no_libperl_O: make NO_LIBPERL=1
>                   make_debug_O: make DEBUG=1
>                  make_perf_o_O: make perf.o
>               make_clean_all_O: make clean all
>        make_util_pmu_bison_o_O: make util/pmu-bison.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
>             make_no_demangle_O: make NO_DEMANGLE=1
>            make_no_libunwind_O: make NO_LIBUNWIND=1
>         make_with_babeltrace_O: make LIBBABELTRACE=1
>              make_no_libnuma_O: make NO_LIBNUMA=1
>               make_no_libbpf_O: make NO_LIBBPF=1
>             make_install_bin_O: make install-bin
>              make_util_map_o_O: make util/map.o
>               make_no_libelf_O: make NO_LIBELF=1
>                 make_no_newt_O: make NO_NEWT=1
>             make_no_auxtrace_O: make NO_AUXTRACE=1
>                 make_no_gtk2_O: make NO_GTK2=1
>                make_no_slang_O: make NO_SLANG=1
>                     make_doc_O: make doc
>                    make_pure_O: make
>            make_no_libbionic_O: make NO_LIBBIONIC=1
>             make_no_libaudit_O: make NO_LIBAUDIT=1
>                    make_tags_O: make tags
>            make_no_backtrace_O: make NO_BACKTRACE=1
>   OK
> 
>   [root@jouet ~]# 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 events tests                                       : Ok
>    6: Validate PERF_RECORD_* events & perf_sample fields       : Ok
>    7: Test perf pmu format parsing                             : Ok
>    8: Test dso data read                                       : Ok
>    9: Test dso data cache                                      : Ok
>   10: Test dso data reopen                                     : Ok
>   11: roundtrip evsel->name check                              : Ok
>   12: Check parsing of sched tracepoints fields                : Ok
>   13: Generate and check syscalls:sys_enter_openat event fields: Ok
>   14: struct perf_event_attr setup                             : Ok
>   15: Test matching and linking multiple hists                 : Ok
>   16: Try 'import perf' in python, checking link problems      : Ok
>   17: Test breakpoint overflow signal handler                  : Ok
>   18: Test breakpoint overflow sampling                        : Ok
>   19: Test number of exit event of a simple workload           : Ok
>   20: Test software clock events have valid period values      : Ok
>   21: Test object code reading                                 : Ok
>   22: Test sample parsing                                      : Ok
>   23: Test using a dummy software event to keep tracking       : Ok
>   24: Test parsing with no sample_id_all bit set               : Ok
>   25: Test filtering hist entries                              : Ok
>   26: Test mmap thread lookup                                  : Ok
>   27: Test thread mg sharing                                   : Ok
>   28: Test output sorting of hist entries                      : Ok
>   29: Test cumulation of child hist entries                    : Ok
>   30: Test tracking 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: Test kmod_path__parse function                           : Ok
>   34: Test thread map                                          : Ok
>   35: Test LLVM searching and compiling                        :
>   35.1: Basic BPF llvm compiling test                          : Ok
>   35.2: Test kbuild searching                                  : Ok
>   35.3: Compile source for BPF prologue generation test        : Ok
>   35.4: Compile source for BPF relocation test                 : Ok
>   36: Test topology in session                                 : Ok
>   37: Test BPF filter                                          :
>   37.1: Test basic BPF filtering                               : Ok
>   37.2: Test BPF prologue generation                           : Ok
>   37.3: Test BPF relocation checker                            : Ok
>   38: Test thread map synthesize                               : Ok
>   39: Test cpu map synthesize                                  : Ok
>   40: Test stat config synthesize                              : Ok
>   41: Test stat synthesize                                     : Ok
>   42: Test stat round synthesize                               : Ok
>   43: Test attr update synthesize                              : Ok
>   44: Test events times                                        : Ok
>   45: Test backward reading from ring buffer                   : Ok
>   46: Test cpu map print                                       : Ok
>   47: Test SDT event probing                                   : Ok
>   48: Test is_printable_array function                         : Ok
>   49: Test bitmap print                                        : Ok
>   50: x86 rdpmc test                                           : Ok
>   51: Test converting perf time to TSC                         : Ok
>   52: Test dwarf unwind                                        : Ok
>   53: Test x86 instruction decoder - new instructions          : Ok
>   54: Test intel cqm nmi context read                          : Skip
>   [root@jouet ~]# 

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2016-10-06 16:11 Arnaldo Carvalho de Melo
  2016-10-06 22:38 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-10-06 16:11 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Linux Weekly News, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Alexei Starovoitov,
	Andi Kleen, Balbir Singh, Daniel Borkmann, David Ahern,
	David S . Miller, Donghyun Kim, He Kuang, Jiri Olsa,
	Masami Hiramatsu, Nambong Ha, Namhyung Kim, Naveen N . Rao,
	Peter Zijlstra, pi3orama, Ravi Bangoria, Seonyoung Kim, stable,
	Steven Rostedt, Sukadev Bhattiprolu, Taeung Song,
	Thomas Gleixner, Tony Luck, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

Build and test stats at the end of the message.

The following changes since commit 8657355f5b5f657407efc12a2223e8a3a6d658de:

  Merge tag 'perf-core-for-mingo-20161003' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2016-10-04 10:04:47 +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-20161005

for you to fetch changes up to 87095f7ddeff3038a0cf8e6574922f9c11688619:

  tools build: Add feature detection for g++ (2016-10-05 19:59:35 -0300)

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

- Intel PT timestamp fixes (Adrian Hunter)

- Fix Intel JSON fixed counter conversions (Andi Kleen)

- Sync memcpy, cpufeatures and bpf headers with the kernel (Arnaldo Carvalho de Melo)

- Add some more tool tips (Donghyun Kim, Kim SeonYoung, Nambong Ha)

- Fix libtraceevent's kbuffer_read_at_offset() handling of offsets before or
  equal the first event (Namhyung Kim)

- Fix uretprobe probe placement on ppc64le (Ravi Bangoria)

- Support building C++ source files and add feature detection for g++,
  prep work for supporting a builtin clang/llvm, to remove the need for having
  that toolchain installed to automagically build BPF scriptlets that then
  gets uploaded to the kernel via sys_bpf() (Wang Nan)

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

----------------------------------------------------------------
Adrian Hunter (2):
      perf intel-pt: Fix estimated timestamps for cycle-accurate mode
      perf intel-pt: Fix MTC timestamp calculation for large MTC periods

Andi Kleen (1):
      perf jevents: Fix Intel JSON fixed counter conversions

Arnaldo Carvalho de Melo (3):
      perf bench mem: Sync memcpy assembly sources with the kernel
      tools: Synchronize tools/arch/x86/include/asm/cpufeatures.h
      tools: Synchronize tools/include/uapi/linux/bpf.h

Donghyun Kim (1):
      perf report/top: Add a tip about system-wide collection from all CPUs

Kim SeonYoung (1):
      perf report/top: Add a tip about source line numbers with overhead

Nambong Ha (1):
      perf top/report: Add tips about a list option

Namhyung Kim (1):
      tools lib traceevent: Fix kbuffer_read_at_offset()

Ravi Bangoria (1):
      perf uretprobe ppc64le: Fix probe location

Wang Nan (2):
      tools build: Support compiling C++ source file
      tools build: Add feature detection for g++

 tools/arch/x86/include/asm/cpufeatures.h           |  1 -
 tools/arch/x86/lib/memcpy_64.S                     |  6 ++--
 tools/build/Build.include                          |  1 +
 tools/build/Makefile.build                         |  7 ++++
 tools/build/Makefile.feature                       |  2 +-
 tools/build/feature/Makefile                       | 10 +++++-
 tools/build/feature/test-cxx.cpp                   | 15 +++++++++
 tools/include/uapi/linux/bpf.h                     |  4 +--
 tools/lib/traceevent/kbuffer-parse.c               |  1 +
 tools/perf/Documentation/tips.txt                  |  4 +++
 tools/perf/arch/powerpc/util/sym-handling.c        |  3 +-
 tools/perf/pmu-events/jevents.c                    |  2 ++
 .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 38 ++++++++++++++++++++++
 13 files changed, 85 insertions(+), 9 deletions(-)
 create mode 100644 tools/build/feature/test-cxx.cpp

  [root@jouet ~]# time dm
   1 alpine:3.4: Ok
   2 android-ndk:r12b-arm: Ok
   3 archlinux:latest: Ok
   4 centos:5: Ok
   5 centos:6: Ok
   6 centos:7: Ok
   7 debian:7: Ok
   8 debian:8: Ok
   9 debian:experimental: Ok
  10 fedora:20: Ok
  11 fedora:21: Ok
  12 fedora:22: Ok
  13 fedora:23: Ok
  14 fedora:24: Ok
  15 fedora:24-x-ARC-uClibc: Ok
  16 fedora:rawhide: Ok
  17 mageia:5: Ok
  18 opensuse:13.2: Ok
  19 opensuse:42.1: Ok
  20 opensuse:tumbleweed: Ok
  21 ubuntu:12.04.5: Ok
  22 ubuntu:14.04: Ok
  23 ubuntu:14.04.4: Ok
  24 ubuntu:15.10: Ok
  25 ubuntu:16.04: Ok
  26 ubuntu:16.04-x-arm: Ok
  27 ubuntu:16.04-x-arm64: Ok
  28 ubuntu:16.04-x-powerpc: Ok
  29 ubuntu:16.04-x-powerpc64: Ok
  30 ubuntu:16.04-x-powerpc64el: Ok
  31 ubuntu:16.04-x-s390: Ok
  32 ubuntu:16.10: Ok

  real    44m58.202s
  user    0m2.864s
  sys     0m1.975s
  [root@jouet ~]#

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

  [root@jouet ~]# 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 events tests                                       : Ok
   6: Validate PERF_RECORD_* events & perf_sample fields       : Ok
   7: Test perf pmu format parsing                             : Ok
   8: Test dso data read                                       : Ok
   9: Test dso data cache                                      : Ok
  10: Test dso data reopen                                     : Ok
  11: roundtrip evsel->name check                              : Ok
  12: Check parsing of sched tracepoints fields                : Ok
  13: Generate and check syscalls:sys_enter_openat event fields: Ok
  14: struct perf_event_attr setup                             : Ok
  15: Test matching and linking multiple hists                 : Ok
  16: Try 'import perf' in python, checking link problems      : Ok
  17: Test breakpoint overflow signal handler                  : Ok
  18: Test breakpoint overflow sampling                        : Ok
  19: Test number of exit event of a simple workload           : Ok
  20: Test software clock events have valid period values      : Ok
  21: Test object code reading                                 : Ok
  22: Test sample parsing                                      : Ok
  23: Test using a dummy software event to keep tracking       : Ok
  24: Test parsing with no sample_id_all bit set               : Ok
  25: Test filtering hist entries                              : Ok
  26: Test mmap thread lookup                                  : Ok
  27: Test thread mg sharing                                   : Ok
  28: Test output sorting of hist entries                      : Ok
  29: Test cumulation of child hist entries                    : Ok
  30: Test tracking 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: Test kmod_path__parse function                           : Ok
  34: Test thread map                                          : Ok
  35: Test LLVM searching and compiling                        :
  35.1: Basic BPF llvm compiling test                          : Ok
  35.2: Test kbuild searching                                  : Ok
  35.3: Compile source for BPF prologue generation test        : Ok
  35.4: Compile source for BPF relocation test                 : Ok
  36: Test topology in session                                 : Ok
  37: Test BPF filter                                          :
  37.1: Test basic BPF filtering                               : Ok
  37.2: Test BPF prologue generation                           : Ok
  37.3: Test BPF relocation checker                            : Ok
  38: Test thread map synthesize                               : Ok
  39: Test cpu map synthesize                                  : Ok
  40: Test stat config synthesize                              : Ok
  41: Test stat synthesize                                     : Ok
  42: Test stat round synthesize                               : Ok
  43: Test attr update synthesize                              : Ok
  44: Test events times                                        : Ok
  45: Test backward reading from ring buffer                   : Ok
  46: Test cpu map print                                       : Ok
  47: Test SDT event probing                                   : Ok
  48: Test is_printable_array function                         : Ok
  49: Test bitmap print                                        : Ok
  50: x86 rdpmc test                                           : Ok
  51: Test converting perf time to TSC                         : Ok
  52: Test dwarf unwind                                        : Ok
  53: Test x86 instruction decoder - new instructions          : Ok
  54: Test intel cqm nmi context read                          : Skip
  [root@jouet ~]# 

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2016-05-11 16:32 Arnaldo Carvalho de Melo
@ 2016-05-12  6:58 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2016-05-12  6:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Ananth N Mavinakayanahalli, Andi Kleen,
	Brendan Gregg, Chris Phlipot, David Ahern, Ekaterina Tumanova,
	He Kuang, Hemant Kumar, Jiri Olsa, Josh Poimboeuf, Kan Liang,
	Masami Hiramatsu, Namhyung Kim, Pekka Enberg, Peter Zijlstra,
	Stephane Eranian, Sukadev Bhattiprolu, Wang Nan


* 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 38f5d8b32f36bcac1f54d4511a81e02ed8771a29:
> 
>   Merge tag 'perf-core-for-mingo-20160510' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-05-11 16:56: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-20160511
> 
> for you to fetch changes up to d65444d2fba98dcd4fa028ffada39c36a46f0038:
> 
>   perf buildid-cache: Use lsdir() for looking up buildid caches (2016-05-11 13:06:08 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Fix symbol insertion and callchain behavior in db-export (Chris Phlipot)
> 
> Infrastructure:
> 
> - Add libunwind build test (feature query), working towards supporting
>   cross-platform DWARF callchains, starting with arm/arm64 (He Kuang)
> 
> - Use lsdir() more extensively (Masami Hiramatsu)
> 
> - Use SBUILD_ID_SIZE in places where the equivalent expression was
>   being used (Masami Hiramatsu)
> 
> - Split some more 'perf trace' syscall arg beautifiers (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (3):
>       perf scripting python: Use Py_FatalError instead of die()
>       perf trace: Move flock op beautifier to tools/perf/trace/beauty/
>       perf trace: Move seccomp args beautifiers to tools/perf/trace/beauty/
> 
> Chris Phlipot (4):
>       perf symbols: Add dso__insert_symbol function
>       perf script: Fix symbol insertion behavior in db-export
>       perf script: Fix callchain addresses in db-export
>       perf script: Fix export of callchains with recursion in db-export
> 
> He Kuang (2):
>       perf build: Add build-test for libunwind cross-platforms support
>       perf build: Add build-test for debug-frame on arm/arm64
> 
> Masami Hiramatsu (4):
>       perf tools: Fix lsdir to set errno correctly
>       perf tools: Use SBUILD_ID_SIZE where applicable
>       perf symbols: Use lsdir() for the search in kcore cache directory
>       perf buildid-cache: Use lsdir() for looking up buildid caches
> 
>  tools/build/Makefile.feature                       |  8 +-
>  tools/build/feature/Makefile                       | 23 ++++++
>  tools/build/feature/test-libunwind-aarch64.c       | 26 +++++++
>  tools/build/feature/test-libunwind-arm.c           | 27 +++++++
>  .../feature/test-libunwind-debug-frame-aarch64.c   | 16 ++++
>  .../build/feature/test-libunwind-debug-frame-arm.c | 16 ++++
>  tools/build/feature/test-libunwind-x86.c           | 27 +++++++
>  tools/build/feature/test-libunwind-x86_64.c        | 27 +++++++
>  tools/perf/builtin-trace.c                         | 85 +---------------------
>  tools/perf/trace/beauty/flock.c                    | 31 ++++++++
>  tools/perf/trace/beauty/seccomp.c                  | 52 +++++++++++++
>  tools/perf/util/annotate.c                         |  2 +-
>  tools/perf/util/build-id.c                         | 30 +-------
>  tools/perf/util/db-export.c                        | 12 +--
>  tools/perf/util/dso.c                              |  4 +-
>  tools/perf/util/header.c                           |  2 +-
>  tools/perf/util/map.c                              |  2 +-
>  .../util/scripting-engines/trace-event-python.c    |  9 ++-
>  tools/perf/util/symbol.c                           | 40 ++++++----
>  tools/perf/util/symbol.h                           |  3 +
>  tools/perf/util/util.c                             |  2 +-
>  21 files changed, 306 insertions(+), 138 deletions(-)
>  create mode 100644 tools/build/feature/test-libunwind-aarch64.c
>  create mode 100644 tools/build/feature/test-libunwind-arm.c
>  create mode 100644 tools/build/feature/test-libunwind-debug-frame-aarch64.c
>  create mode 100644 tools/build/feature/test-libunwind-debug-frame-arm.c
>  create mode 100644 tools/build/feature/test-libunwind-x86.c
>  create mode 100644 tools/build/feature/test-libunwind-x86_64.c
>  create mode 100644 tools/perf/trace/beauty/flock.c
>  create mode 100644 tools/perf/trace/beauty/seccomp.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2016-05-11 16:32 Arnaldo Carvalho de Melo
  2016-05-12  6:58 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-05-11 16:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Ananth N Mavinakayanahalli, Andi Kleen,
	Brendan Gregg, Chris Phlipot, David Ahern, Ekaterina Tumanova,
	He Kuang, Hemant Kumar, Jiri Olsa, Josh Poimboeuf, Kan Liang,
	Masami Hiramatsu, Namhyung Kim, Pekka Enberg, Peter Zijlstra,
	Stephane Eranian, Sukadev Bhattiprolu, Wang Nan

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 38f5d8b32f36bcac1f54d4511a81e02ed8771a29:

  Merge tag 'perf-core-for-mingo-20160510' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-05-11 16:56: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-20160511

for you to fetch changes up to d65444d2fba98dcd4fa028ffada39c36a46f0038:

  perf buildid-cache: Use lsdir() for looking up buildid caches (2016-05-11 13:06:08 -0300)

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

User visible:

- Fix symbol insertion and callchain behavior in db-export (Chris Phlipot)

Infrastructure:

- Add libunwind build test (feature query), working towards supporting
  cross-platform DWARF callchains, starting with arm/arm64 (He Kuang)

- Use lsdir() more extensively (Masami Hiramatsu)

- Use SBUILD_ID_SIZE in places where the equivalent expression was
  being used (Masami Hiramatsu)

- Split some more 'perf trace' syscall arg beautifiers (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
      perf scripting python: Use Py_FatalError instead of die()
      perf trace: Move flock op beautifier to tools/perf/trace/beauty/
      perf trace: Move seccomp args beautifiers to tools/perf/trace/beauty/

Chris Phlipot (4):
      perf symbols: Add dso__insert_symbol function
      perf script: Fix symbol insertion behavior in db-export
      perf script: Fix callchain addresses in db-export
      perf script: Fix export of callchains with recursion in db-export

He Kuang (2):
      perf build: Add build-test for libunwind cross-platforms support
      perf build: Add build-test for debug-frame on arm/arm64

Masami Hiramatsu (4):
      perf tools: Fix lsdir to set errno correctly
      perf tools: Use SBUILD_ID_SIZE where applicable
      perf symbols: Use lsdir() for the search in kcore cache directory
      perf buildid-cache: Use lsdir() for looking up buildid caches

 tools/build/Makefile.feature                       |  8 +-
 tools/build/feature/Makefile                       | 23 ++++++
 tools/build/feature/test-libunwind-aarch64.c       | 26 +++++++
 tools/build/feature/test-libunwind-arm.c           | 27 +++++++
 .../feature/test-libunwind-debug-frame-aarch64.c   | 16 ++++
 .../build/feature/test-libunwind-debug-frame-arm.c | 16 ++++
 tools/build/feature/test-libunwind-x86.c           | 27 +++++++
 tools/build/feature/test-libunwind-x86_64.c        | 27 +++++++
 tools/perf/builtin-trace.c                         | 85 +---------------------
 tools/perf/trace/beauty/flock.c                    | 31 ++++++++
 tools/perf/trace/beauty/seccomp.c                  | 52 +++++++++++++
 tools/perf/util/annotate.c                         |  2 +-
 tools/perf/util/build-id.c                         | 30 +-------
 tools/perf/util/db-export.c                        | 12 +--
 tools/perf/util/dso.c                              |  4 +-
 tools/perf/util/header.c                           |  2 +-
 tools/perf/util/map.c                              |  2 +-
 .../util/scripting-engines/trace-event-python.c    |  9 ++-
 tools/perf/util/symbol.c                           | 40 ++++++----
 tools/perf/util/symbol.h                           |  3 +
 tools/perf/util/util.c                             |  2 +-
 21 files changed, 306 insertions(+), 138 deletions(-)
 create mode 100644 tools/build/feature/test-libunwind-aarch64.c
 create mode 100644 tools/build/feature/test-libunwind-arm.c
 create mode 100644 tools/build/feature/test-libunwind-debug-frame-aarch64.c
 create mode 100644 tools/build/feature/test-libunwind-debug-frame-arm.c
 create mode 100644 tools/build/feature/test-libunwind-x86.c
 create mode 100644 tools/build/feature/test-libunwind-x86_64.c
 create mode 100644 tools/perf/trace/beauty/flock.c
 create mode 100644 tools/perf/trace/beauty/seccomp.c

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2016-04-29 14:57 Arnaldo Carvalho de Melo
@ 2016-04-29 19:39 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2016-04-29 19:39 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexei Starovoitov, Ananth N Mavinakayanahalli, Brendan Gregg,
	David Ahern, Florian Fainelli, Frederic Weisbecker, He Kuang,
	Hemant Kumar, Jiri Olsa, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Peter Zijlstra, pi3orama, Vaishali Thakkar,
	Wang Nan, Zefan Li, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling, tested on:
> 
>   [root@jouet ~]# docker-perf-build-test
>   alldeps-fedora-rawhide: Ok
>   alldeps-ubuntu-14.04: Ok
>   alldeps-ubuntu-16.04: Ok        <------------- New image
>   alldeps-fedora-20: Ok
>   alldeps-ubuntu-12.04: Ok
>   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
>   [root@jouet ~]#
> 
> - Arnaldo
> 
> The following changes since commit 3521ba1cc351e80488c3f85748c92c3853b75818:
> 
>   powercap, perf/x86/intel/rapl: Add PSys support (2016-04-28 10:39:19 +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-20160429
> 
> for you to fetch changes up to ca7ce82a280a65c377c24c95c29b1dec6e80b428:
> 
>   perf tests: Do not use sizeof on pointer type (2016-04-28 15:37:52 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Allow generate timestamped suffixed multiple perf.data files upon receiving
>   SIGUSR2 in 'perf record', to slice a long running monitoring session, allowing
>   to dump uninteresting sessions (Wang Nan)
> 
> - Handle ENOMEM for perf_event_max_stack + PERF_SAMPLE_CALLCHAIN
>   in perf_evsel__open_strerror(), showing a more informative
>   message when the request call stack depth can't be allocated by
>   the kernel (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Use strbuf for making strings in 'perf probe' (Masami Hiramatsu)
> 
> - Do not use sizeof on pointer type, not a problem since its a pointer to
>   pointer, fix none the less. Found by Coccinelle (Vaishali Thakkar)
> 
> Cleanups:
> 
> - Fix for Coverity found issues in the bpf feature build test (Florian Fainelli)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (3):
>       perf evsel: Handle ENOMEM for perf_event_max_stack + PERF_SAMPLE_CALLCHAIN
>       perf evsel: Remove two extraneous ending newlines in open_strerror()
>       perf trace: Move msg_flags beautifier to tools/perf/trace/beauty/
> 
> Florian Fainelli (2):
>       bpf tools: Remove expression with no effect
>       bpf tools: Fix syscall argument
> 
> Masami Hiramatsu (1):
>       perf probe: Use strbuf for making strings
> 
> Vaishali Thakkar (1):
>       perf tests: Do not use sizeof on pointer type
> 
> Wang Nan (6):
>       perf tools: Introduce trigger class
>       perf tools: Derive trigger class from auxtrace_snapshot
>       perf record: Split output into multiple files via '--switch-output'
>       perf record: Force enable --timestamp-filename when --switch-output is provided
>       perf record: Disable buildid cache options by default in switch output mode
>       perf record: Generate tracking events for process forked by perf
> 
>  tools/build/feature/test-bpf.c           |   3 +-
>  tools/perf/Documentation/perf-record.txt |  13 ++
>  tools/perf/builtin-record.c              | 173 +++++++++++++++-------
>  tools/perf/builtin-trace.c               |  62 +-------
>  tools/perf/tests/dso-data.c              |   2 +-
>  tools/perf/trace/beauty/msg_flags.c      |  62 ++++++++
>  tools/perf/util/evsel.c                  |  12 +-
>  tools/perf/util/probe-event.c            | 246 +++++++++++--------------------
>  tools/perf/util/probe-event.h            |   2 +-
>  tools/perf/util/probe-finder.c           |  14 +-
>  tools/perf/util/trigger.h                |  94 ++++++++++++
>  11 files changed, 393 insertions(+), 290 deletions(-)
>  create mode 100644 tools/perf/trace/beauty/msg_flags.c
>  create mode 100644 tools/perf/util/trigger.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2016-04-29 14:57 Arnaldo Carvalho de Melo
  2016-04-29 19:39 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-04-29 14:57 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexei Starovoitov,
	Ananth N Mavinakayanahalli, Brendan Gregg, David Ahern,
	Florian Fainelli, Frederic Weisbecker, He Kuang, Hemant Kumar,
	Jiri Olsa, Masami Hiramatsu, Milian Wolff, Namhyung Kim,
	Peter Zijlstra, pi3orama, Vaishali Thakkar, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, tested on:

  [root@jouet ~]# docker-perf-build-test
  alldeps-fedora-rawhide: Ok
  alldeps-ubuntu-14.04: Ok
  alldeps-ubuntu-16.04: Ok        <------------- New image
  alldeps-fedora-20: Ok
  alldeps-ubuntu-12.04: Ok
  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
  [root@jouet ~]#

- Arnaldo

The following changes since commit 3521ba1cc351e80488c3f85748c92c3853b75818:

  powercap, perf/x86/intel/rapl: Add PSys support (2016-04-28 10:39:19 +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-20160429

for you to fetch changes up to ca7ce82a280a65c377c24c95c29b1dec6e80b428:

  perf tests: Do not use sizeof on pointer type (2016-04-28 15:37:52 -0300)

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

User visible:

- Allow generate timestamped suffixed multiple perf.data files upon receiving
  SIGUSR2 in 'perf record', to slice a long running monitoring session, allowing
  to dump uninteresting sessions (Wang Nan)

- Handle ENOMEM for perf_event_max_stack + PERF_SAMPLE_CALLCHAIN
  in perf_evsel__open_strerror(), showing a more informative
  message when the request call stack depth can't be allocated by
  the kernel (Arnaldo Carvalho de Melo)

Infrastructure:

- Use strbuf for making strings in 'perf probe' (Masami Hiramatsu)

- Do not use sizeof on pointer type, not a problem since its a pointer to
  pointer, fix none the less. Found by Coccinelle (Vaishali Thakkar)

Cleanups:

- Fix for Coverity found issues in the bpf feature build test (Florian Fainelli)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
      perf evsel: Handle ENOMEM for perf_event_max_stack + PERF_SAMPLE_CALLCHAIN
      perf evsel: Remove two extraneous ending newlines in open_strerror()
      perf trace: Move msg_flags beautifier to tools/perf/trace/beauty/

Florian Fainelli (2):
      bpf tools: Remove expression with no effect
      bpf tools: Fix syscall argument

Masami Hiramatsu (1):
      perf probe: Use strbuf for making strings

Vaishali Thakkar (1):
      perf tests: Do not use sizeof on pointer type

Wang Nan (6):
      perf tools: Introduce trigger class
      perf tools: Derive trigger class from auxtrace_snapshot
      perf record: Split output into multiple files via '--switch-output'
      perf record: Force enable --timestamp-filename when --switch-output is provided
      perf record: Disable buildid cache options by default in switch output mode
      perf record: Generate tracking events for process forked by perf

 tools/build/feature/test-bpf.c           |   3 +-
 tools/perf/Documentation/perf-record.txt |  13 ++
 tools/perf/builtin-record.c              | 173 +++++++++++++++-------
 tools/perf/builtin-trace.c               |  62 +-------
 tools/perf/tests/dso-data.c              |   2 +-
 tools/perf/trace/beauty/msg_flags.c      |  62 ++++++++
 tools/perf/util/evsel.c                  |  12 +-
 tools/perf/util/probe-event.c            | 246 +++++++++++--------------------
 tools/perf/util/probe-event.h            |   2 +-
 tools/perf/util/probe-finder.c           |  14 +-
 tools/perf/util/trigger.h                |  94 ++++++++++++
 11 files changed, 393 insertions(+), 290 deletions(-)
 create mode 100644 tools/perf/trace/beauty/msg_flags.c
 create mode 100644 tools/perf/util/trigger.h

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2016-02-15 21:01 Arnaldo Carvalho de Melo
@ 2016-02-16  7:48 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2016-02-16  7:48 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Brendan Gregg, Cody P Schafer,
	Daniel Borkmann, Dave Jones, He Kuang, Jeremie Galarneau,
	Jiri Olsa, Kirill Smelkov, Li Zefan, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, pi3orama, Taeung Song, Vinson Lee,
	Wang Nan, Will Deacon, Zubair Lutfullah Kakakhel


* 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 a7636d9ecfa3ab7800a7c04c1f89378229eff609:
> 
>   kprobes: Optimize hot path by using percpu counter to collect 'nhit' statistics (2016-02-09 11:08:58 +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 1ad826bad5bd0b6ccfb203f78c70302b764df0be:
> 
>   perf tests: Fix build on older systems where 'signal' is reserved (2016-02-15 17:33:26 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Do not print trailing spaces in the hists browser (top, report) to
>   avoid line wrapping issues when long C++ demangled functions are
>   sampled (Arnaldo Carvalho de Melo)
> 
> - Allow 'perf config' to show --system or --user settings (Taeung Song)
> 
> - Add better warning about the need to install the audit-lib-python
>   package when using perf python scripts (Taeung Song)
> 
> - Fix symbol resolution when kernel modules files are only in the
>   build id cache (~/.debug) (Wang Nan)
> 
> Build fixes:
> 
> - Fix 'perf test' build on older systems where 'signal' is reserved (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Free the terms list_head in parse_events__free_terms(), also unlink the entries
>   when deleting them (Wang Nan)
> 
> - Fix releasing event_class in 'perf data' fixing integration with
>   libbabeltrace (Wang Nan)
> 
> - Add EXTRA_LDFLAGS option to Makefile (Zubair Lutfullah Kakakhel)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (6):
>       perf tools: Add comment explaining the repsep_snprintf function
>       perf hists: Do column alignment on the format iterator
>       perf tools: Introduce parse_events_terms__purge()
>       perf tools: Use perf_event_terms__purge() for non-malloced terms
>       perf tools: Rename parse_events__free_terms() to parse_events_terms__delete()
>       perf tests: Fix build on older systems where 'signal' is reserved
> 
> Taeung Song (2):
>       perf config: Add '--system' and '--user' options to select which config file is used
>       perf python scripting: Append examples to err msg about audit-libs-python
> 
> Wang Nan (4):
>       perf symbols: Fix symbols searching for module in buildid-cache
>       perf tools: Unlink entries from terms list
>       perf tools: Free the terms list_head in parse_events__free_terms()
>       perf data: Fix releasing event_class
> 
> Zubair Lutfullah Kakakhel (1):
>       perf build: Add EXTRA_LDFLAGS option to makefile
> 
>  tools/perf/Documentation/perf-config.txt           | 14 ++++++-
>  tools/perf/Makefile.perf                           |  2 +
>  tools/perf/arch/x86/util/intel-pt.c                |  2 +-
>  tools/perf/builtin-config.c                        | 27 +++++++++++--
>  .../python/Perf-Trace-Util/lib/Perf/Trace/Util.py  |  5 ++-
>  tools/perf/tests/bp_signal.c                       | 12 +++---
>  tools/perf/tests/parse-events.c                    |  2 +-
>  tools/perf/ui/browsers/hists.c                     | 27 ++++++++-----
>  tools/perf/ui/stdio/hist.c                         |  1 +
>  tools/perf/util/build-id.c                         | 44 ++++++++++++++++++++++
>  tools/perf/util/build-id.h                         |  1 +
>  tools/perf/util/cache.h                            |  3 ++
>  tools/perf/util/config.c                           |  4 +-
>  tools/perf/util/data-convert-bt.c                  | 18 +++++++++
>  tools/perf/util/hist.c                             | 21 +++++++++++
>  tools/perf/util/hist.h                             |  5 +++
>  tools/perf/util/parse-events.c                     | 17 +++++++--
>  tools/perf/util/parse-events.h                     |  3 +-
>  tools/perf/util/parse-events.y                     |  8 ++--
>  tools/perf/util/pmu.c                              |  2 +-
>  tools/perf/util/sort.c                             | 23 +++++------
>  tools/perf/util/symbol.c                           |  4 ++
>  22 files changed, 200 insertions(+), 45 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2016-02-15 21:01 Arnaldo Carvalho de Melo
  2016-02-16  7:48 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-02-15 21:01 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Brendan Gregg, Cody P Schafer,
	Daniel Borkmann, Dave Jones, He Kuang, Jeremie Galarneau,
	Jiri Olsa, Kirill Smelkov, Li Zefan, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, pi3orama, Taeung Song, Vinson Lee,
	Wang Nan, Will Deacon, Zubair Lutfullah Kakakhel

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit a7636d9ecfa3ab7800a7c04c1f89378229eff609:

  kprobes: Optimize hot path by using percpu counter to collect 'nhit' statistics (2016-02-09 11:08:58 +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 1ad826bad5bd0b6ccfb203f78c70302b764df0be:

  perf tests: Fix build on older systems where 'signal' is reserved (2016-02-15 17:33:26 -0300)

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

User visible:

- Do not print trailing spaces in the hists browser (top, report) to
  avoid line wrapping issues when long C++ demangled functions are
  sampled (Arnaldo Carvalho de Melo)

- Allow 'perf config' to show --system or --user settings (Taeung Song)

- Add better warning about the need to install the audit-lib-python
  package when using perf python scripts (Taeung Song)

- Fix symbol resolution when kernel modules files are only in the
  build id cache (~/.debug) (Wang Nan)

Build fixes:

- Fix 'perf test' build on older systems where 'signal' is reserved (Arnaldo Carvalho de Melo)

Infrastructure:

- Free the terms list_head in parse_events__free_terms(), also unlink the entries
  when deleting them (Wang Nan)

- Fix releasing event_class in 'perf data' fixing integration with
  libbabeltrace (Wang Nan)

- Add EXTRA_LDFLAGS option to Makefile (Zubair Lutfullah Kakakhel)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (6):
      perf tools: Add comment explaining the repsep_snprintf function
      perf hists: Do column alignment on the format iterator
      perf tools: Introduce parse_events_terms__purge()
      perf tools: Use perf_event_terms__purge() for non-malloced terms
      perf tools: Rename parse_events__free_terms() to parse_events_terms__delete()
      perf tests: Fix build on older systems where 'signal' is reserved

Taeung Song (2):
      perf config: Add '--system' and '--user' options to select which config file is used
      perf python scripting: Append examples to err msg about audit-libs-python

Wang Nan (4):
      perf symbols: Fix symbols searching for module in buildid-cache
      perf tools: Unlink entries from terms list
      perf tools: Free the terms list_head in parse_events__free_terms()
      perf data: Fix releasing event_class

Zubair Lutfullah Kakakhel (1):
      perf build: Add EXTRA_LDFLAGS option to makefile

 tools/perf/Documentation/perf-config.txt           | 14 ++++++-
 tools/perf/Makefile.perf                           |  2 +
 tools/perf/arch/x86/util/intel-pt.c                |  2 +-
 tools/perf/builtin-config.c                        | 27 +++++++++++--
 .../python/Perf-Trace-Util/lib/Perf/Trace/Util.py  |  5 ++-
 tools/perf/tests/bp_signal.c                       | 12 +++---
 tools/perf/tests/parse-events.c                    |  2 +-
 tools/perf/ui/browsers/hists.c                     | 27 ++++++++-----
 tools/perf/ui/stdio/hist.c                         |  1 +
 tools/perf/util/build-id.c                         | 44 ++++++++++++++++++++++
 tools/perf/util/build-id.h                         |  1 +
 tools/perf/util/cache.h                            |  3 ++
 tools/perf/util/config.c                           |  4 +-
 tools/perf/util/data-convert-bt.c                  | 18 +++++++++
 tools/perf/util/hist.c                             | 21 +++++++++++
 tools/perf/util/hist.h                             |  5 +++
 tools/perf/util/parse-events.c                     | 17 +++++++--
 tools/perf/util/parse-events.h                     |  3 +-
 tools/perf/util/parse-events.y                     |  8 ++--
 tools/perf/util/pmu.c                              |  2 +-
 tools/perf/util/sort.c                             | 23 +++++------
 tools/perf/util/symbol.c                           |  4 ++
 22 files changed, 200 insertions(+), 45 deletions(-)

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2015-11-26 20:45 Arnaldo Carvalho de Melo
@ 2015-11-27  7:30 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2015-11-27  7:30 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Yarygin,
	Alexei Starovoitov, Andi Kleen, Christian Borntraeger,
	David Ahern, Ekaterina Tumanova, Frederic Weisbecker, He Kuang,
	Jiri Olsa, Joshua Zhu, Kan Liang, kernel-team, Masami Hiramatsu,
	Namhyung Kim, Naveen N . Rao, Peter Zijlstra, pi3orama, Wang Nan,
	Yannick Brosseau, 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 a95a49fa0cc5eec730d8703b1544fa7ea6a11dec:
> 
>   Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-11-26 09:13:50 +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 43798bf37215fe242e592fd4605d804e2da0781b:
> 
>   bpf tools: Add helper function for updating bpf maps elements (2015-11-26 17:21:24 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Add 'vmlinux.debug' to the vmlinux seach path (Ekaterina Tumanova)
> 
> - Do not show sample_(type|period) in the perf_event_attr dump when using
>   -v with 'perf stat' (Jiri Olsa)
> 
> - Display the WEIGHT sample bit, when set, in 'perf evlist -v' (Jiri Olsa)
> 
> - Honour --hide-unresolved in 'report', will honour it as well in 'top'
>   when --hide-unresolved gets supported in that tool (Namhyung Kim)
> 
> - Fix freeze wit h--call-graph 'flat/folded' due to not properly
>   reinitializing the callchain rb_tree (Namhyumg Kim)
> 
> - Set dso->long_name when a module name is passed as a parameter
>   to tools like 'perf probe' but the 'struct dso' associated to that module
>   still doesn't have the full path for the module, just the '[name]' one
>   obtained from /proc/modules (Wang Nan)
> 
> - Fix anon_hugepage mmaps detection using scanf on /proc/PID/smaps (Yannick Brosseau)
> 
> Infrastructure:
> 
> - Add helper function for updating bpf maps elements (He Kuang)
> 
> - Fix traceevents plugins build race (Jiri Olsa)
> 
> - Add the $OUTPUT path prefix with 'fixdep' (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Ekaterina Tumanova (2):
>       perf symbols: Refactor vmlinux_path__init() to ease path additions
>       perf symbols: Add the path to vmlinux.debug
> 
> He Kuang (1):
>       bpf tools: Add helper function for updating bpf maps elements
> 
> Jiri Olsa (6):
>       perf script: Remove default_scripting_ops
>       perf build: Fix traceevent plugins build race
>       perf script: Pass perf_script into process_event
>       tools build: Use fixdep with OUTPUT path prefix
>       perf stat: Clear sample_(type|period) for counting
>       perf evlist: Display WEIGHT sample type bit
> 
> Namhyung Kim (2):
>       perf callchain: Honor hide_unresolved
>       perf top: Fix freeze on --call-graph flat/folded
> 
> Wang Nan (1):
>       perf machine: Adjust dso->long_name for offline module
> 
> Yannick Brosseau (1):
>       perf tools: Correctly identify anon_hugepage when generating map (v2)
> 
>  tools/build/Makefile         |  2 +-
>  tools/build/Makefile.include |  2 +-
>  tools/lib/bpf/bpf.c          | 14 +++++++++
>  tools/lib/bpf/bpf.h          |  2 ++
>  tools/perf/Makefile.perf     |  2 +-
>  tools/perf/builtin-report.c  |  7 ++---
>  tools/perf/builtin-script.c  | 67 +++++++++++++-------------------------------
>  tools/perf/builtin-stat.c    |  7 +++++
>  tools/perf/util/callchain.c  |  1 +
>  tools/perf/util/evsel.c      |  1 +
>  tools/perf/util/machine.c    | 32 ++++++++++++++++++++-
>  tools/perf/util/map.c        |  4 +--
>  tools/perf/util/symbol.c     | 65 ++++++++++++++++++++++--------------------
>  tools/perf/util/symbol.h     |  3 +-
>  14 files changed, 120 insertions(+), 89 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2015-11-26 20:45 Arnaldo Carvalho de Melo
  2015-11-27  7:30 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-11-26 20:45 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Yarygin, Alexei Starovoitov, Andi Kleen,
	Christian Borntraeger, David Ahern, Ekaterina Tumanova,
	Frederic Weisbecker, He Kuang, Jiri Olsa, Joshua Zhu, Kan Liang,
	kernel-team, Masami Hiramatsu, Namhyung Kim, Naveen N . Rao,
	Peter Zijlstra, pi3orama, Wang Nan, Yannick Brosseau, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo


The following changes since commit a95a49fa0cc5eec730d8703b1544fa7ea6a11dec:

  Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-11-26 09:13:50 +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 43798bf37215fe242e592fd4605d804e2da0781b:

  bpf tools: Add helper function for updating bpf maps elements (2015-11-26 17:21:24 -0300)

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

User visible:

- Add 'vmlinux.debug' to the vmlinux seach path (Ekaterina Tumanova)

- Do not show sample_(type|period) in the perf_event_attr dump when using
  -v with 'perf stat' (Jiri Olsa)

- Display the WEIGHT sample bit, when set, in 'perf evlist -v' (Jiri Olsa)

- Honour --hide-unresolved in 'report', will honour it as well in 'top'
  when --hide-unresolved gets supported in that tool (Namhyung Kim)

- Fix freeze wit h--call-graph 'flat/folded' due to not properly
  reinitializing the callchain rb_tree (Namhyumg Kim)

- Set dso->long_name when a module name is passed as a parameter
  to tools like 'perf probe' but the 'struct dso' associated to that module
  still doesn't have the full path for the module, just the '[name]' one
  obtained from /proc/modules (Wang Nan)

- Fix anon_hugepage mmaps detection using scanf on /proc/PID/smaps (Yannick Brosseau)

Infrastructure:

- Add helper function for updating bpf maps elements (He Kuang)

- Fix traceevents plugins build race (Jiri Olsa)

- Add the $OUTPUT path prefix with 'fixdep' (Jiri Olsa)

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

----------------------------------------------------------------
Ekaterina Tumanova (2):
      perf symbols: Refactor vmlinux_path__init() to ease path additions
      perf symbols: Add the path to vmlinux.debug

He Kuang (1):
      bpf tools: Add helper function for updating bpf maps elements

Jiri Olsa (6):
      perf script: Remove default_scripting_ops
      perf build: Fix traceevent plugins build race
      perf script: Pass perf_script into process_event
      tools build: Use fixdep with OUTPUT path prefix
      perf stat: Clear sample_(type|period) for counting
      perf evlist: Display WEIGHT sample type bit

Namhyung Kim (2):
      perf callchain: Honor hide_unresolved
      perf top: Fix freeze on --call-graph flat/folded

Wang Nan (1):
      perf machine: Adjust dso->long_name for offline module

Yannick Brosseau (1):
      perf tools: Correctly identify anon_hugepage when generating map (v2)

 tools/build/Makefile         |  2 +-
 tools/build/Makefile.include |  2 +-
 tools/lib/bpf/bpf.c          | 14 +++++++++
 tools/lib/bpf/bpf.h          |  2 ++
 tools/perf/Makefile.perf     |  2 +-
 tools/perf/builtin-report.c  |  7 ++---
 tools/perf/builtin-script.c  | 67 +++++++++++++-------------------------------
 tools/perf/builtin-stat.c    |  7 +++++
 tools/perf/util/callchain.c  |  1 +
 tools/perf/util/evsel.c      |  1 +
 tools/perf/util/machine.c    | 32 ++++++++++++++++++++-
 tools/perf/util/map.c        |  4 +--
 tools/perf/util/symbol.c     | 65 ++++++++++++++++++++++--------------------
 tools/perf/util/symbol.h     |  3 +-
 14 files changed, 120 insertions(+), 89 deletions(-)

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2015-08-12 16:39 Arnaldo Carvalho de Melo
@ 2015-08-13  7:25 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2015-08-13  7:25 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Kan Liang,
	Masami Hiramatsu, Milian Wolff, Namhyung Kim, Stephane Eranian,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider applying,
> 
> - Arnaldo
> 
> The following changes since commit 5f1230c9b80b89f404938ff88dfa64a963f74f2c:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-12 12:16:11 +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 71ef150ee06df29c5b427307dc0bacfe06a8baea:
> 
>   perf tests: Add tests to callgraph and time parse (2015-08-12 13:20:29 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Allow selecting the type of callchains per event, including disabling
>   callchains in all but one entry in an event list, to save space, and also
>   to ask for the callchains collected in one event to be used in other
>   events (Kan Liang)
> 
> - Beautify more syscall arguments in 'perf trace': (Arnaldo Carvalho de Melo)
>   - A bunch more translate file/pathnames from pointers to strings
>   - Convert numbers to strings for the 'keyctl' syscall 'option' arg.
>   - Add missing 'clockid' entries
> 
> - Fix 'perf probe -L sys_*' as it was not showing all the source code for
>   syscall functions in the kernel (Masami Hiramatsu)
> 
> - Make ESC unzoom as well in the hists browser, i.e. in 'report' and 'top',
>   as we're considering repurposing the right and left arrow keys to use in
>   horizontal scrolling, i.e. leave just ESC to be used for what <- works
>   now, and ENTER for what -> does (they are already aliases for ages)
>   (Arnaldo Carvalho de Melo)
> 
> Infrastructure fixes:
> 
> - Check for SRCLINE_UNKNOWN case in "srcfile" processing (Andi Kleen)
> 
> - Wrap the slsmg_{printf,write_nstring} slang functions behing ui_browser, so
>   that we can make the ui_browser based browsers (annotate, menus, hists, etc) UI
>   library agnostic and usable with multiple backends (slang now, GTK+ and others
>   in the future, maybe) (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf sort: Check for SRCLINE_UNKNOWN case in "srcfile" processing
> 
> Arnaldo Carvalho de Melo (7):
>       perf trace: Associate some more syscall args with the getname beautifier
>       perf trace: Add missing clockid entries
>       perf trace: Use the FD beautifier for socket syscall fds
>       perf trace: Beautify keyctl's option arg
>       perf ui browser: Introduce ui_browser__write_nstring()
>       perf ui browser: Introduce ui_browser__printf()
>       perf hists browser: Make ESC unzoom as well
> 
> Kan Liang (4):
>       perf callchain: Per-event type selection support
>       perf callchain: Allow disabling call graphs per event
>       perf report: Show call graph from reference events
>       perf tests: Add tests to callgraph and time parse
> 
> Masami Hiramatsu (1):
>       perf probe: Fix to show lines of sys_ functions correctly
> 
>  tools/perf/Documentation/perf-record.txt |  4 ++
>  tools/perf/Documentation/perf-report.txt | 11 ++++++
>  tools/perf/builtin-annotate.c            |  2 +
>  tools/perf/builtin-diff.c                |  3 ++
>  tools/perf/builtin-report.c              |  7 ++++
>  tools/perf/builtin-trace.c               | 54 +++++++++++++++++++------
>  tools/perf/tests/hists_cumulate.c        |  4 ++
>  tools/perf/tests/parse-events.c          | 38 ++++++++++++++++++
>  tools/perf/ui/browser.c                  | 17 +++++++-
>  tools/perf/ui/browser.h                  |  3 ++
>  tools/perf/ui/browsers/annotate.c        | 43 ++++++++++----------
>  tools/perf/ui/browsers/header.c          |  2 +-
>  tools/perf/ui/browsers/hists.c           | 54 ++++++++++++-------------
>  tools/perf/ui/browsers/map.c             | 11 +++---
>  tools/perf/ui/browsers/scripts.c         |  2 +-
>  tools/perf/ui/libslang.h                 |  3 ++
>  tools/perf/ui/tui/util.c                 |  2 +-
>  tools/perf/util/dwarf-aux.c              | 18 ++++++---
>  tools/perf/util/evsel.c                  | 67 +++++++++++++++++++++++++++++++-
>  tools/perf/util/evsel.h                  |  4 ++
>  tools/perf/util/hist.c                   | 14 +++++--
>  tools/perf/util/parse-events.c           | 12 ++++++
>  tools/perf/util/parse-events.h           |  2 +
>  tools/perf/util/parse-events.l           |  2 +
>  tools/perf/util/pmu.c                    |  4 +-
>  tools/perf/util/sort.c                   |  2 +
>  tools/perf/util/symbol.h                 |  3 +-
>  27 files changed, 307 insertions(+), 81 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2015-08-12 16:39 Arnaldo Carvalho de Melo
  2015-08-13  7:25 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-08-12 16:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Kan Liang, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Stephane Eranian, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider applying,

- Arnaldo

The following changes since commit 5f1230c9b80b89f404938ff88dfa64a963f74f2c:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-12 12:16:11 +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 71ef150ee06df29c5b427307dc0bacfe06a8baea:

  perf tests: Add tests to callgraph and time parse (2015-08-12 13:20:29 -0300)

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

User visible:

- Allow selecting the type of callchains per event, including disabling
  callchains in all but one entry in an event list, to save space, and also
  to ask for the callchains collected in one event to be used in other
  events (Kan Liang)

- Beautify more syscall arguments in 'perf trace': (Arnaldo Carvalho de Melo)
  - A bunch more translate file/pathnames from pointers to strings
  - Convert numbers to strings for the 'keyctl' syscall 'option' arg.
  - Add missing 'clockid' entries

- Fix 'perf probe -L sys_*' as it was not showing all the source code for
  syscall functions in the kernel (Masami Hiramatsu)

- Make ESC unzoom as well in the hists browser, i.e. in 'report' and 'top',
  as we're considering repurposing the right and left arrow keys to use in
  horizontal scrolling, i.e. leave just ESC to be used for what <- works
  now, and ENTER for what -> does (they are already aliases for ages)
  (Arnaldo Carvalho de Melo)

Infrastructure fixes:

- Check for SRCLINE_UNKNOWN case in "srcfile" processing (Andi Kleen)

- Wrap the slsmg_{printf,write_nstring} slang functions behing ui_browser, so
  that we can make the ui_browser based browsers (annotate, menus, hists, etc) UI
  library agnostic and usable with multiple backends (slang now, GTK+ and others
  in the future, maybe) (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Andi Kleen (1):
      perf sort: Check for SRCLINE_UNKNOWN case in "srcfile" processing

Arnaldo Carvalho de Melo (7):
      perf trace: Associate some more syscall args with the getname beautifier
      perf trace: Add missing clockid entries
      perf trace: Use the FD beautifier for socket syscall fds
      perf trace: Beautify keyctl's option arg
      perf ui browser: Introduce ui_browser__write_nstring()
      perf ui browser: Introduce ui_browser__printf()
      perf hists browser: Make ESC unzoom as well

Kan Liang (4):
      perf callchain: Per-event type selection support
      perf callchain: Allow disabling call graphs per event
      perf report: Show call graph from reference events
      perf tests: Add tests to callgraph and time parse

Masami Hiramatsu (1):
      perf probe: Fix to show lines of sys_ functions correctly

 tools/perf/Documentation/perf-record.txt |  4 ++
 tools/perf/Documentation/perf-report.txt | 11 ++++++
 tools/perf/builtin-annotate.c            |  2 +
 tools/perf/builtin-diff.c                |  3 ++
 tools/perf/builtin-report.c              |  7 ++++
 tools/perf/builtin-trace.c               | 54 +++++++++++++++++++------
 tools/perf/tests/hists_cumulate.c        |  4 ++
 tools/perf/tests/parse-events.c          | 38 ++++++++++++++++++
 tools/perf/ui/browser.c                  | 17 +++++++-
 tools/perf/ui/browser.h                  |  3 ++
 tools/perf/ui/browsers/annotate.c        | 43 ++++++++++----------
 tools/perf/ui/browsers/header.c          |  2 +-
 tools/perf/ui/browsers/hists.c           | 54 ++++++++++++-------------
 tools/perf/ui/browsers/map.c             | 11 +++---
 tools/perf/ui/browsers/scripts.c         |  2 +-
 tools/perf/ui/libslang.h                 |  3 ++
 tools/perf/ui/tui/util.c                 |  2 +-
 tools/perf/util/dwarf-aux.c              | 18 ++++++---
 tools/perf/util/evsel.c                  | 67 +++++++++++++++++++++++++++++++-
 tools/perf/util/evsel.h                  |  4 ++
 tools/perf/util/hist.c                   | 14 +++++--
 tools/perf/util/parse-events.c           | 12 ++++++
 tools/perf/util/parse-events.h           |  2 +
 tools/perf/util/parse-events.l           |  2 +
 tools/perf/util/pmu.c                    |  4 +-
 tools/perf/util/sort.c                   |  2 +
 tools/perf/util/symbol.h                 |  3 +-
 27 files changed, 307 insertions(+), 81 deletions(-)

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2015-07-20 20:58 Arnaldo Carvalho de Melo
@ 2015-07-21  6:00 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2015-07-21  6:00 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
	Brendan Gregg, David Ahern, Davidlohr Bueso, Frederic Weisbecker,
	Hemant Kumar, Jiri Olsa, Kan Liang, Masami Hiramatsu, Mel Gorman,
	Milian Wolff, Namhyung Kim, Peter Zijlstra, pi3orama,
	Sergei Trofimovich, Stephane Eranian, Steven Rostedt, 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 60cd37eb100c4880b28078a47f3062fac7572095:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-07-06 17:46:15 +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 d2f3f5d2e9cae6e73f9642a5ddc8c8a07c35e79b:
> 
>   perf bench futex: Add lock_pi stresser (2015-07-20 17:49:51 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Allow filtering perf's pid via 'perf record --exclude-perf' (Wang Nan)
> 
> - 'perf trace' now supports syscall groups, like strace, i.e:
> 
>     $ trace -e file touch file
> 
>   Will expand 'file' into multiple, file related, syscalls. More work needed to
>   add extra groups for other syscall groups, and also to complement what was
>   added for the 'file' group, included as a proof of concept. (Arnaldo Carvalho de Melo)
> 
> - Add lock_pi stresser to 'perf bench futex', to test the kernel code
>   related to FUTEX_(UN)LOCK_PI (Davidlohr Bueso)
> 
> User visible fixes:
> 
> - Apply --filter to all events in a glob matching, not just the last one (Wang Nan)
> 
> Documentation:
> 
> - Document setting '-e pmu/period=N/' in the 'perf record' man page (Kan Liang)
> 
> Infrastructure:
> 
> - 'perf probe' code simplifications and movements to separate files (Masami Hiramatsu)
> 
> - Fix makefile generation under 'dash' (Sergei Trofimovich)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (5):
>       perf strlist: load() should return a negative errno
>       perf strlist: Make dupstr be the default and part of an extensible config parm
>       perf strlist: Allow substitutions from file contents in a given directory
>       perf strlist: Make parse_list() private
>       perf trace: Support 'strace' syscall event groups
> 
> Davidlohr Bueso (1):
>       perf bench futex: Add lock_pi stresser
> 
> Kan Liang (1):
>       perf record: Document setting '-e pmu/period=N/' in man page
> 
> Masami Hiramatsu (3):
>       perf probe: Simplify __add_probe_trace_events code
>       perf probe: Move ftrace probe-event operations to probe-file.c
>       perf buildid: Use SBUILD_ID_SIZE macro
> 
> Sergei Trofimovich (1):
>       perf tools: Fix makefile generation under dash
> 
> Wang Nan (2):
>       perf record: Apply filter to all events in a glob matching
>       perf record: Allow filtering perf's pid via --exclude-perf
> 
>  tools/perf/Build                         |   1 +
>  tools/perf/Documentation/perf-bench.txt  |   4 +
>  tools/perf/Documentation/perf-record.txt |  19 +-
>  tools/perf/Makefile.perf                 |   5 +
>  tools/perf/bench/Build                   |   1 +
>  tools/perf/bench/bench.h                 |   2 +
>  tools/perf/bench/futex-lock-pi.c         | 219 +++++++++++++++++
>  tools/perf/bench/futex.h                 |  20 ++
>  tools/perf/builtin-bench.c               |   2 +
>  tools/perf/builtin-buildid-cache.c       |  16 +-
>  tools/perf/builtin-buildid-list.c        |   4 +-
>  tools/perf/builtin-record.c              |   3 +
>  tools/perf/builtin-trace.c               |   6 +-
>  tools/perf/config/Makefile               |   8 +-
>  tools/perf/trace/strace/groups/file      |  18 ++
>  tools/perf/util/Build                    |   1 +
>  tools/perf/util/build-id.c               |   6 +-
>  tools/perf/util/build-id.h               |   3 +-
>  tools/perf/util/evsel.c                  |   1 +
>  tools/perf/util/evsel.h                  |   1 +
>  tools/perf/util/machine.c                |   2 +-
>  tools/perf/util/parse-events.c           |  81 ++++++-
>  tools/perf/util/parse-events.h           |   1 +
>  tools/perf/util/probe-event.c            | 388 ++++++-------------------------
>  tools/perf/util/probe-event.h            |   7 +
>  tools/perf/util/probe-file.c             | 301 ++++++++++++++++++++++++
>  tools/perf/util/probe-file.h             |  18 ++
>  tools/perf/util/probe-finder.c           |   2 +-
>  tools/perf/util/strlist.c                |  43 +++-
>  tools/perf/util/strlist.h                |   9 +-
>  tools/perf/util/symbol.c                 |   2 +-
>  tools/perf/util/thread_map.c             |   6 +-
>  32 files changed, 842 insertions(+), 358 deletions(-)
>  create mode 100644 tools/perf/bench/futex-lock-pi.c
>  create mode 100644 tools/perf/trace/strace/groups/file
>  create mode 100644 tools/perf/util/probe-file.c
>  create mode 100644 tools/perf/util/probe-file.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2015-07-20 20:58 Arnaldo Carvalho de Melo
  2015-07-21  6:00 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-07-20 20:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, Brendan Gregg, David Ahern,
	Davidlohr Bueso, Frederic Weisbecker, Hemant Kumar, Jiri Olsa,
	Kan Liang, Masami Hiramatsu, Mel Gorman, Milian Wolff,
	Namhyung Kim, Peter Zijlstra, pi3orama, Sergei Trofimovich,
	Stephane Eranian, Steven Rostedt, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 60cd37eb100c4880b28078a47f3062fac7572095:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-07-06 17:46:15 +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 d2f3f5d2e9cae6e73f9642a5ddc8c8a07c35e79b:

  perf bench futex: Add lock_pi stresser (2015-07-20 17:49:51 -0300)

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

New features:

- Allow filtering perf's pid via 'perf record --exclude-perf' (Wang Nan)

- 'perf trace' now supports syscall groups, like strace, i.e:

    $ trace -e file touch file

  Will expand 'file' into multiple, file related, syscalls. More work needed to
  add extra groups for other syscall groups, and also to complement what was
  added for the 'file' group, included as a proof of concept. (Arnaldo Carvalho de Melo)

- Add lock_pi stresser to 'perf bench futex', to test the kernel code
  related to FUTEX_(UN)LOCK_PI (Davidlohr Bueso)

User visible fixes:

- Apply --filter to all events in a glob matching, not just the last one (Wang Nan)

Documentation:

- Document setting '-e pmu/period=N/' in the 'perf record' man page (Kan Liang)

Infrastructure:

- 'perf probe' code simplifications and movements to separate files (Masami Hiramatsu)

- Fix makefile generation under 'dash' (Sergei Trofimovich)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (5):
      perf strlist: load() should return a negative errno
      perf strlist: Make dupstr be the default and part of an extensible config parm
      perf strlist: Allow substitutions from file contents in a given directory
      perf strlist: Make parse_list() private
      perf trace: Support 'strace' syscall event groups

Davidlohr Bueso (1):
      perf bench futex: Add lock_pi stresser

Kan Liang (1):
      perf record: Document setting '-e pmu/period=N/' in man page

Masami Hiramatsu (3):
      perf probe: Simplify __add_probe_trace_events code
      perf probe: Move ftrace probe-event operations to probe-file.c
      perf buildid: Use SBUILD_ID_SIZE macro

Sergei Trofimovich (1):
      perf tools: Fix makefile generation under dash

Wang Nan (2):
      perf record: Apply filter to all events in a glob matching
      perf record: Allow filtering perf's pid via --exclude-perf

 tools/perf/Build                         |   1 +
 tools/perf/Documentation/perf-bench.txt  |   4 +
 tools/perf/Documentation/perf-record.txt |  19 +-
 tools/perf/Makefile.perf                 |   5 +
 tools/perf/bench/Build                   |   1 +
 tools/perf/bench/bench.h                 |   2 +
 tools/perf/bench/futex-lock-pi.c         | 219 +++++++++++++++++
 tools/perf/bench/futex.h                 |  20 ++
 tools/perf/builtin-bench.c               |   2 +
 tools/perf/builtin-buildid-cache.c       |  16 +-
 tools/perf/builtin-buildid-list.c        |   4 +-
 tools/perf/builtin-record.c              |   3 +
 tools/perf/builtin-trace.c               |   6 +-
 tools/perf/config/Makefile               |   8 +-
 tools/perf/trace/strace/groups/file      |  18 ++
 tools/perf/util/Build                    |   1 +
 tools/perf/util/build-id.c               |   6 +-
 tools/perf/util/build-id.h               |   3 +-
 tools/perf/util/evsel.c                  |   1 +
 tools/perf/util/evsel.h                  |   1 +
 tools/perf/util/machine.c                |   2 +-
 tools/perf/util/parse-events.c           |  81 ++++++-
 tools/perf/util/parse-events.h           |   1 +
 tools/perf/util/probe-event.c            | 388 ++++++-------------------------
 tools/perf/util/probe-event.h            |   7 +
 tools/perf/util/probe-file.c             | 301 ++++++++++++++++++++++++
 tools/perf/util/probe-file.h             |  18 ++
 tools/perf/util/probe-finder.c           |   2 +-
 tools/perf/util/strlist.c                |  43 +++-
 tools/perf/util/strlist.h                |   9 +-
 tools/perf/util/symbol.c                 |   2 +-
 tools/perf/util/thread_map.c             |   6 +-
 32 files changed, 842 insertions(+), 358 deletions(-)
 create mode 100644 tools/perf/bench/futex-lock-pi.c
 create mode 100644 tools/perf/trace/strace/groups/file
 create mode 100644 tools/perf/util/probe-file.c
 create mode 100644 tools/perf/util/probe-file.h

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2015-06-25  7:31 ` Ingo Molnar
@ 2015-06-25 13:48   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-06-25 13:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, David Ahern, He Kuang,
	Jiri Olsa, linuxppc-dev, Lukas Wunner, Madhavan Srinivasan,
	Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Peter Zijlstra,
	Stephane Eranian, Sukadev Bhattiprolu, Wang Nan

Em Thu, Jun 25, 2015 at 09:31:41AM +0200, Ingo Molnar escreveu:
> Pulled, thanks a lot Arnaldo!
> 
> Btw., one small thing I noticed about the status line in perf top: if I ever use 
> 'f' to freeze/unfreeze events, the following message:
> 
>   Press 'f' to disable the events or 'h' to see other hotkeys
> 
> sticks around forever, even after I look into annotation and exit it, etc.
 
> So I don't mind some default, helpful message there (such as 'Press 'h' to see 
> hotkeys'), but it appears this particular message is context and usage sensitive, 
> which wasn't really the goal, right?

Agreed, some more work is needed to change that message in more places,
will do it eventually.

- Arnaldo

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2015-06-23 21:47 Arnaldo Carvalho de Melo
@ 2015-06-25  7:31 ` Ingo Molnar
  2015-06-25 13:48   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 67+ messages in thread
From: Ingo Molnar @ 2015-06-25  7:31 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, David Ahern, He Kuang,
	Jiri Olsa, linuxppc-dev, Lukas Wunner, Madhavan Srinivasan,
	Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Peter Zijlstra,
	Stephane Eranian, Sukadev Bhattiprolu, 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 a9a3cd900fbbcbf837d65653105e7bfc583ced09:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-06-20 01:11:11 +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 83b2ea257eb1d43e52f76d756722aeb899a2852c:
> 
>   perf tools: Allow auxtrace data alignment (2015-06-23 18:28:37 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Move toggling event logic from 'perf top' and into hists browser, allowing
>   freeze/unfreeze with event lists with more than one entry (Namhyung Kim)
> 
> - Add missing newlines when dumping PERF_RECORD_FINISHED_ROUND and
>   showing the Aggregated stats in 'perf report -D' (Adrian Hunter)
> 
> Infrastructure:
> 
> - Allow auxtrace data alignment (Adrian Hunter)
> 
> - Allow events with dot (Andi Kleen)
> 
> - Fix failure to 'perf probe' events on arm (He Kuang)
> 
> - Add testing for Makefile.perf (Jiri Olsa)
> 
> - Add test for make install with prefix (Jiri Olsa)
> 
> - Fix single target build dependency check (Jiri Olsa)
> 
> - Access thread_map entries via accessors, prep patch to hold more info per
>   entry, for ongoing 'perf stat --per-thread' work (Jiri Olsa)
> 
> - Use __weak definition from compiler.h (Sukadev Bhattiprolu)
> 
> - Split perf_pmu__new_alias() (Sukadev Bhattiprolu)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (3):
>       perf session: Print a newline when dumping PERF_RECORD_FINISHED_ROUND
>       perf tools: Print a newline before dumping Aggregated stats
>       perf tools: Allow auxtrace data alignment
> 
> Andi Kleen (1):
>       perf tools: Allow events with dot
> 
> He Kuang (1):
>       perf probe: Fix failure to probe events on arm
> 
> Jiri Olsa (5):
>       perf tests: Add testing for Makefile.perf
>       perf tests: Add test for make install with prefix
>       perf build: Fix single target build dependency check
>       perf thread_map: Don't access the array entries directly
>       perf thread_map: Change map entries into a struct
> 
> Namhyung Kim (1):
>       perf top: Move toggling event logic into hists browser
> 
> Sukadev Bhattiprolu (2):
>       perf pmu: Use __weak definition from <linux/compiler.h>
>       perf pmu: Split perf_pmu__new_alias()
> 
>  tools/perf/Makefile                         |  4 +--
>  tools/perf/builtin-top.c                    | 24 ++-------------
>  tools/perf/builtin-trace.c                  |  4 +--
>  tools/perf/tests/make                       | 31 ++++++++++++++++++--
>  tools/perf/tests/openat-syscall-tp-fields.c |  2 +-
>  tools/perf/ui/browsers/hists.c              | 19 ++++++++++--
>  tools/perf/util/auxtrace.c                  | 11 +++++--
>  tools/perf/util/auxtrace.h                  |  1 +
>  tools/perf/util/event.c                     |  6 ++--
>  tools/perf/util/evlist.c                    |  4 +--
>  tools/perf/util/evsel.c                     |  2 +-
>  tools/perf/util/parse-events.l              |  5 ++--
>  tools/perf/util/pmu.c                       | 45 +++++++++++++++++++----------
>  tools/perf/util/probe-event.c               |  6 +++-
>  tools/perf/util/session.c                   |  4 ++-
>  tools/perf/util/thread_map.c                | 24 ++++++++-------
>  tools/perf/util/thread_map.h                | 16 +++++++++-
>  17 files changed, 136 insertions(+), 72 deletions(-)

Pulled, thanks a lot Arnaldo!

Btw., one small thing I noticed about the status line in perf top: if I ever use 
'f' to freeze/unfreeze events, the following message:

  Press 'f' to disable the events or 'h' to see other hotkeys

sticks around forever, even after I look into annotation and exit it, etc.

So I don't mind some default, helpful message there (such as 'Press 'h' to see 
hotkeys'), but it appears this particular message is context and usage sensitive, 
which wasn't really the goal, right?

Thanks,

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2015-06-23 21:47 Arnaldo Carvalho de Melo
  2015-06-25  7:31 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-06-23 21:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, David Ahern, He Kuang, Jiri Olsa, linuxppc-dev,
	Lukas Wunner, Madhavan Srinivasan, Masami Hiramatsu,
	Michael Ellerman, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
	Sukadev Bhattiprolu, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit a9a3cd900fbbcbf837d65653105e7bfc583ced09:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-06-20 01:11:11 +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 83b2ea257eb1d43e52f76d756722aeb899a2852c:

  perf tools: Allow auxtrace data alignment (2015-06-23 18:28:37 -0300)

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

User visible:

- Move toggling event logic from 'perf top' and into hists browser, allowing
  freeze/unfreeze with event lists with more than one entry (Namhyung Kim)

- Add missing newlines when dumping PERF_RECORD_FINISHED_ROUND and
  showing the Aggregated stats in 'perf report -D' (Adrian Hunter)

Infrastructure:

- Allow auxtrace data alignment (Adrian Hunter)

- Allow events with dot (Andi Kleen)

- Fix failure to 'perf probe' events on arm (He Kuang)

- Add testing for Makefile.perf (Jiri Olsa)

- Add test for make install with prefix (Jiri Olsa)

- Fix single target build dependency check (Jiri Olsa)

- Access thread_map entries via accessors, prep patch to hold more info per
  entry, for ongoing 'perf stat --per-thread' work (Jiri Olsa)

- Use __weak definition from compiler.h (Sukadev Bhattiprolu)

- Split perf_pmu__new_alias() (Sukadev Bhattiprolu)

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

----------------------------------------------------------------
Adrian Hunter (3):
      perf session: Print a newline when dumping PERF_RECORD_FINISHED_ROUND
      perf tools: Print a newline before dumping Aggregated stats
      perf tools: Allow auxtrace data alignment

Andi Kleen (1):
      perf tools: Allow events with dot

He Kuang (1):
      perf probe: Fix failure to probe events on arm

Jiri Olsa (5):
      perf tests: Add testing for Makefile.perf
      perf tests: Add test for make install with prefix
      perf build: Fix single target build dependency check
      perf thread_map: Don't access the array entries directly
      perf thread_map: Change map entries into a struct

Namhyung Kim (1):
      perf top: Move toggling event logic into hists browser

Sukadev Bhattiprolu (2):
      perf pmu: Use __weak definition from <linux/compiler.h>
      perf pmu: Split perf_pmu__new_alias()

 tools/perf/Makefile                         |  4 +--
 tools/perf/builtin-top.c                    | 24 ++-------------
 tools/perf/builtin-trace.c                  |  4 +--
 tools/perf/tests/make                       | 31 ++++++++++++++++++--
 tools/perf/tests/openat-syscall-tp-fields.c |  2 +-
 tools/perf/ui/browsers/hists.c              | 19 ++++++++++--
 tools/perf/util/auxtrace.c                  | 11 +++++--
 tools/perf/util/auxtrace.h                  |  1 +
 tools/perf/util/event.c                     |  6 ++--
 tools/perf/util/evlist.c                    |  4 +--
 tools/perf/util/evsel.c                     |  2 +-
 tools/perf/util/parse-events.l              |  5 ++--
 tools/perf/util/pmu.c                       | 45 +++++++++++++++++++----------
 tools/perf/util/probe-event.c               |  6 +++-
 tools/perf/util/session.c                   |  4 ++-
 tools/perf/util/thread_map.c                | 24 ++++++++-------
 tools/perf/util/thread_map.h                | 16 +++++++++-
 17 files changed, 136 insertions(+), 72 deletions(-)

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-09 19:08   ` Arnaldo Carvalho de Melo
@ 2014-09-10 13:19     ` Adrian Hunter
  0 siblings, 0 replies; 67+ messages in thread
From: Adrian Hunter @ 2014-09-10 13:19 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Alexander Shishkin, Alexander Yarygin,
	Anton Blanchard, Christian Borntraeger, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Jiri Olsa,
	Kyle McMartin, Michael Ellerman, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Sukadev Bhattiprolu

On 09/09/2014 10:08 PM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Sep 09, 2014 at 11:48:20AM +0300, Adrian Hunter escreveu:
>> On 09/09/2014 12:17 AM, Arnaldo Carvalho de Melo wrote:
>>> Hi Ingo,
>>>
>>> 	Please consider pulling,
>>>
>>> - Arnaldo
>>
>> I am very sorry Arnaldo but 2 patches are older versions, namely:
>>
>> 	perf tools: Build programs to copy 32-bit compatibility VDSOs
>> 	perf tools: Add support for 32-bit compatibility VDSOs
>>
>> Up-to-date versions can be found from 15 August:
>>
>> 	patchwork:
>>
>> 		https://patchwork.kernel.org/patch/4729131/
>> 		https://patchwork.kernel.org/patch/4729111/
> 
> Ok, those don't apply, as it expects other stuff, that you sent before,
> but were not processed yet, to be in place, I'm fixing it up.
> 

Something like this might prevent Ingo's error message:


From: Adrian Hunter <adrian.hunter@intel.com>
Date: Wed, 10 Sep 2014 16:14:50 +0300
Subject: [PATCH] perf tools: Do not attempt to run perf-read-vdso32 if it
 wasn't built

popen() causes an error message to print if perf-read-vdso32
does not run.  Avoid that by not trying to run it if it was
not built.  Ditto perf-read-vdsox32.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/config/Makefile |  8 ++++++--
 tools/perf/util/vdso.c     | 10 ++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 3ba2382..71264e4 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -627,7 +627,9 @@ endif
 ifeq (${IS_64_BIT}, 1)
   ifndef NO_PERF_READ_VDSO32
     $(call feature_check,compile-32)
-    ifneq ($(feature-compile-32), 1)
+    ifeq ($(feature-compile-32), 1)
+      CFLAGS += -DHAVE_PERF_READ_VDSO32
+    else
       NO_PERF_READ_VDSO32 := 1
     endif
   endif
@@ -636,7 +638,9 @@ ifeq (${IS_64_BIT}, 1)
   endif
   ifndef NO_PERF_READ_VDSOX32
     $(call feature_check,compile-x32)
-    ifneq ($(feature-compile-x32), 1)
+    ifeq ($(feature-compile-x32), 1)
+      CFLAGS += -DHAVE_PERF_READ_VDSOX32
+    else
       NO_PERF_READ_VDSOX32 := 1
     endif
   endif
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index 69daef6..5c7dd79 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -255,6 +255,16 @@ static int vdso__dso_findnew_compat(struct machine
*machine,
 	enum dso_type dso_type;

 	dso_type = machine__thread_dso_type(machine, thread);
+
+#ifndef HAVE_PERF_READ_VDSO32
+	if (dso_type == DSO__TYPE_32BIT)
+		return 0;
+#endif
+#ifndef HAVE_PERF_READ_VDSOX32
+	if (dso_type == DSO__TYPE_X32BIT)
+		return 0;
+#endif
+
 	switch (dso_type) {
 	case DSO__TYPE_32BIT:
 		*dso = vdso__findnew_compat(machine, &vdso_info->vdso32);
-- 
1.8.3.2




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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-09  8:48 ` Adrian Hunter
  2014-09-09 13:12   ` Arnaldo Carvalho de Melo
@ 2014-09-09 19:08   ` Arnaldo Carvalho de Melo
  2014-09-10 13:19     ` Adrian Hunter
  1 sibling, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-09-09 19:08 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Ingo Molnar, linux-kernel, Alexander Shishkin, Alexander Yarygin,
	Anton Blanchard, Christian Borntraeger, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Jiri Olsa,
	Kyle McMartin, Michael Ellerman, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Sukadev Bhattiprolu

Em Tue, Sep 09, 2014 at 11:48:20AM +0300, Adrian Hunter escreveu:
> On 09/09/2014 12:17 AM, Arnaldo Carvalho de Melo wrote:
> > Hi Ingo,
> > 
> > 	Please consider pulling,
> > 
> > - Arnaldo
> 
> I am very sorry Arnaldo but 2 patches are older versions, namely:
> 
> 	perf tools: Build programs to copy 32-bit compatibility VDSOs
> 	perf tools: Add support for 32-bit compatibility VDSOs
> 
> Up-to-date versions can be found from 15 August:
> 
> 	patchwork:
> 
> 		https://patchwork.kernel.org/patch/4729131/
> 		https://patchwork.kernel.org/patch/4729111/

Ok, those don't apply, as it expects other stuff, that you sent before,
but were not processed yet, to be in place, I'm fixing it up.

- Arnaldo
 
> 	marc.info:
> 
> 		http://marc.info/?l=linux-kernel&m=140812995414607&w=4
> 		http://marc.info/?l=linux-kernel&m=140812993814585&w=4
> 
> It looks like I reposted older versions by mistake on 31 July.
> Very sorry :-(
> 
> The originals were changed as described here:
> 
> 	http://marc.info/?l=linux-kernel&m=140621020918615
> 	http://marc.info/?l=linux-kernel&m=140618721010170
> 
> > 
> > The following changes since commit 39b5a56ec0be5effe9b7d0f18cb27724bf2e5d47:
> > 
> >   Merge branch 'rfc/perf' into perf/core, because it's ready for inclusion (2014-08-24 22:35:42 +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 fa3480cb0a96c8af9ded1a8c836c91bd5704bda1:
> > 
> >   perf tools: Add perf_pmu__scan_file() (2014-09-08 17:16:06 -0300)
> > 
> > ----------------------------------------------------------------
> > perf/core improvements and fixes:
> > 
> > User visible:
> > 
> > o Add +field argument support for --sort option (Jiri Olsa)
> > 
> > Infrastructure:
> > 
> > o More intel PT prep work, from Adrian Hunter, including:
> > 
> >   - Let a user specify a PMU event without any config terms
> >   - Add perf-with-kcore script
> >   - Build programs to copy 32-bit compatibility VDSOs
> >   - Add support for 32-bit compatibility VDSOs
> >   - Let default config be defined for a PMU
> >   - Add perf_pmu__scan_file()
> > 
> > o Add feature checks to .gitignore (Alexander Shishkin)
> > 
> > o "perf kvm stat report" improvements by Alexander Yarygin:
> >   o  Save pid string in opts.target.pid
> >   o  Enable the target.system_wide flag
> >   o  Unify the title bar output
> > 
> > o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)
> > 
> > o Allow to specify lib compile variable for spec usage (Jiri Olsa)
> > 
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > ----------------------------------------------------------------
> > Adrian Hunter (6):
> >       perf tools: Let a user specify a PMU event without any config terms
> >       perf tools: Add perf-with-kcore script
> >       perf tools: Build programs to copy 32-bit compatibility VDSOs
> >       perf tools: Add support for 32-bit compatibility VDSOs
> >       perf tools: Let default config be defined for a PMU
> >       perf tools: Add perf_pmu__scan_file()
> > 
> > Alexander Shishkin (1):
> >       perf tools: Add feature checks to .gitignore
> > 
> > Alexander Yarygin (3):
> >       perf kvm stat report: Save pid string in opts.target.pid
> >       perf kvm stat report: Enable the target.system_wide flag
> >       perf kvm stat report: Unify the title bar output
> > 
> > Anton Blanchard (1):
> >       perf tools powerpc: Fix build issue when DWARF support is disabled
> > 
> > Jiri Olsa (2):
> >       perf tools: Add +field argument support for --sort option
> >       perf tools: Allow to specify lib compile variable for spec usage
> > 
> >  tools/perf/.gitignore            |   2 +
> >  tools/perf/Makefile.perf         |  42 ++++++-
> >  tools/perf/arch/powerpc/Makefile |   2 +-
> >  tools/perf/builtin-kvm.c         |  23 ++--
> >  tools/perf/config/Makefile       |  33 ++++-
> >  tools/perf/config/Makefile.arch  |   8 ++
> >  tools/perf/perf-read-vdso.c      |  59 +++++++++
> >  tools/perf/perf-with-kcore.sh    | 259 +++++++++++++++++++++++++++++++++++++++
> >  tools/perf/tests/pmu.c           |   2 +-
> >  tools/perf/util/kvm-stat.h       |   1 -
> >  tools/perf/util/parse-events.c   |  13 +-
> >  tools/perf/util/parse-events.y   |  10 ++
> >  tools/perf/util/pmu.c            |  79 +++++++++---
> >  tools/perf/util/pmu.h            |  12 +-
> >  tools/perf/util/sort.c           |  37 +++++-
> >  tools/perf/util/vdso.c           | 170 ++++++++++++++++++++++++-
> >  tools/perf/util/vdso.h           |   4 +-
> >  17 files changed, 712 insertions(+), 44 deletions(-)
> >  create mode 100644 tools/perf/perf-read-vdso.c
> >  create mode 100644 tools/perf/perf-with-kcore.sh
> > 
> > 

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-09 14:54     ` Ingo Molnar
@ 2014-09-09 15:59       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-09-09 15:59 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Adrian Hunter, linux-kernel, Alexander Shishkin,
	Alexander Yarygin, Anton Blanchard, Christian Borntraeger,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jean Pihet,
	Jiri Olsa, Kyle McMartin, Michael Ellerman, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Sukadev Bhattiprolu

Em Tue, Sep 09, 2014 at 04:54:49PM +0200, Ingo Molnar escreveu:
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
 
> > Em Tue, Sep 09, 2014 at 11:48:20AM +0300, Adrian Hunter escreveu:
> > > It looks like I reposted older versions by mistake on 31 July.
> > > Very sorry :-(

> > > The originals were changed as described here:

> > > 	http://marc.info/?l=linux-kernel&m=140621020918615
> > > 	http://marc.info/?l=linux-kernel&m=140618721010170

> > No problem, the good thing is that we're almost getting it all 
> > in. I'll rework the branch and resubmit, Ingo, is that OK with 
> > you? [...]

> Yeah, that's perfectly OK.

> > [...] Or have you already pulled and we should instead send a 
> > patch on top, fixing the problem?

> I pulled it locally then unpulled as it didn't pass my (very 
> simple) tests and it looked like there's something fishy going 
> on.

Yeah, I should've tested this more, will make sure I test these things
this time.

Having a requirement that for each new feature we need an entry in 'perf
test' and/or in make -C tools/perf build-test seems a bit harsh, but
would be ideal, hook that to 'git request-pull' and this would hopefully
only happen every celestial aligment nights or so :-\
 
- Arnaldo

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-09 13:12   ` Arnaldo Carvalho de Melo
@ 2014-09-09 14:54     ` Ingo Molnar
  2014-09-09 15:59       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 67+ messages in thread
From: Ingo Molnar @ 2014-09-09 14:54 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Adrian Hunter, linux-kernel, Alexander Shishkin,
	Alexander Yarygin, Anton Blanchard, Christian Borntraeger,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jean Pihet,
	Jiri Olsa, Kyle McMartin, Michael Ellerman, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Sukadev Bhattiprolu


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

> Em Tue, Sep 09, 2014 at 11:48:20AM +0300, Adrian Hunter escreveu:
> > It looks like I reposted older versions by mistake on 31 July.
> > Very sorry :-(
> > 
> > The originals were changed as described here:
> > 
> > 	http://marc.info/?l=linux-kernel&m=140621020918615
> > 	http://marc.info/?l=linux-kernel&m=140618721010170
> 
> No problem, the good thing is that we're almost getting it all 
> in. I'll rework the branch and resubmit, Ingo, is that OK with 
> you? [...]

Yeah, that's perfectly OK.

> [...] Or have you already pulled and we should instead send a 
> patch on top, fixing the problem?

I pulled it locally then unpulled as it didn't pass my (very 
simple) tests and it looked like there's something fishy going 
on.

Thanks,

	Ingo

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-09  7:14   ` Adrian Hunter
  2014-09-09  7:45     ` Stephane Eranian
@ 2014-09-09 14:53     ` Ingo Molnar
  1 sibling, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2014-09-09 14:53 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Alexander Shishkin,
	Alexander Yarygin, Anton Blanchard, Christian Borntraeger,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jean Pihet,
	Jiri Olsa, Kyle McMartin, Michael Ellerman, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Sukadev Bhattiprolu, Arnaldo Carvalho de Melo


* Adrian Hunter <adrian.hunter@intel.com> wrote:

> On 09/09/2014 07:59 AM, Ingo Molnar wrote:
> > 
> > * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > 
> >> Hi Ingo,
> >>
> >> 	Please consider pulling,
> >>
> >> - Arnaldo
> >>
> >> The following changes since commit 39b5a56ec0be5effe9b7d0f18cb27724bf2e5d47:
> >>
> >>   Merge branch 'rfc/perf' into perf/core, because it's ready for inclusion (2014-08-24 22:35:42 +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 fa3480cb0a96c8af9ded1a8c836c91bd5704bda1:
> >>
> >>   perf tools: Add perf_pmu__scan_file() (2014-09-08 17:16:06 -0300)
> >>
> >> ----------------------------------------------------------------
> >> perf/core improvements and fixes:
> >>
> >> User visible:
> >>
> >> o Add +field argument support for --sort option (Jiri Olsa)
> >>
> >> Infrastructure:
> >>
> >> o More intel PT prep work, from Adrian Hunter, including:
> >>
> >>   - Let a user specify a PMU event without any config terms
> >>   - Add perf-with-kcore script
> >>   - Build programs to copy 32-bit compatibility VDSOs
> >>   - Add support for 32-bit compatibility VDSOs
> >>   - Let default config be defined for a PMU
> >>   - Add perf_pmu__scan_file()
> >>
> >> o Add feature checks to .gitignore (Alexander Shishkin)
> >>
> >> o "perf kvm stat report" improvements by Alexander Yarygin:
> >>   o  Save pid string in opts.target.pid
> >>   o  Enable the target.system_wide flag
> >>   o  Unify the title bar output
> >>
> >> o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)
> >>
> >> o Allow to specify lib compile variable for spec usage (Jiri Olsa)
> >>
> >> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> >>
> >> ----------------------------------------------------------------
> >> Adrian Hunter (6):
> >>       perf tools: Let a user specify a PMU event without any config terms
> >>       perf tools: Add perf-with-kcore script
> >>       perf tools: Build programs to copy 32-bit compatibility VDSOs
> >>       perf tools: Add support for 32-bit compatibility VDSOs
> >>       perf tools: Let default config be defined for a PMU
> >>       perf tools: Add perf_pmu__scan_file()
> >>
> >> Alexander Shishkin (1):
> >>       perf tools: Add feature checks to .gitignore
> >>
> >> Alexander Yarygin (3):
> >>       perf kvm stat report: Save pid string in opts.target.pid
> >>       perf kvm stat report: Enable the target.system_wide flag
> >>       perf kvm stat report: Unify the title bar output
> >>
> >> Anton Blanchard (1):
> >>       perf tools powerpc: Fix build issue when DWARF support is disabled
> >>
> >> Jiri Olsa (2):
> >>       perf tools: Add +field argument support for --sort option
> >>       perf tools: Allow to specify lib compile variable for spec usage
> >>
> >>  tools/perf/.gitignore            |   2 +
> >>  tools/perf/Makefile.perf         |  42 ++++++-
> >>  tools/perf/arch/powerpc/Makefile |   2 +-
> >>  tools/perf/builtin-kvm.c         |  23 ++--
> >>  tools/perf/config/Makefile       |  33 ++++-
> >>  tools/perf/config/Makefile.arch  |   8 ++
> >>  tools/perf/perf-read-vdso.c      |  59 +++++++++
> >>  tools/perf/perf-with-kcore.sh    | 259 +++++++++++++++++++++++++++++++++++++++
> >>  tools/perf/tests/pmu.c           |   2 +-
> >>  tools/perf/util/kvm-stat.h       |   1 -
> >>  tools/perf/util/parse-events.c   |  13 +-
> >>  tools/perf/util/parse-events.y   |  10 ++
> >>  tools/perf/util/pmu.c            |  79 +++++++++---
> >>  tools/perf/util/pmu.h            |  12 +-
> >>  tools/perf/util/sort.c           |  37 +++++-
> >>  tools/perf/util/vdso.c           | 170 ++++++++++++++++++++++++-
> >>  tools/perf/util/vdso.h           |   4 +-
> >>  17 files changed, 712 insertions(+), 44 deletions(-)
> >>  create mode 100644 tools/perf/perf-read-vdso.c
> >>  create mode 100644 tools/perf/perf-with-kcore.sh
> > 
> > Hm, so I'm getting this error, when trying to profile a 32-bit 
> > ELF binary on a 64-bit kernel, on a testbox:
> > 
> >  $ perf record ~/hackbench  10
> >  Time: 0.115
> >  [ perf record: Woken up 1 times to write data ]
> >  [ perf record: Captured and wrote 0.373 MB perf.data (~16279 samples) ]
> >  sh: perf-read-vdso32: command not found
> 
> Presumably perf-read-vdso32 is not in the PATH.  Did you 'make install'?

I did 'make install' as usual - that's the only thing that I type 
to install a new version of perf tooling.

Thanks,

	Ingo

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-09  8:48 ` Adrian Hunter
@ 2014-09-09 13:12   ` Arnaldo Carvalho de Melo
  2014-09-09 14:54     ` Ingo Molnar
  2014-09-09 19:08   ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-09-09 13:12 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Ingo Molnar, linux-kernel, Alexander Shishkin, Alexander Yarygin,
	Anton Blanchard, Christian Borntraeger, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Jiri Olsa,
	Kyle McMartin, Michael Ellerman, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Sukadev Bhattiprolu

Em Tue, Sep 09, 2014 at 11:48:20AM +0300, Adrian Hunter escreveu:
> It looks like I reposted older versions by mistake on 31 July.
> Very sorry :-(
> 
> The originals were changed as described here:
> 
> 	http://marc.info/?l=linux-kernel&m=140621020918615
> 	http://marc.info/?l=linux-kernel&m=140618721010170

No problem, the good thing is that we're almost getting it all in. I'll
rework the branch and resubmit, Ingo, is that OK with you? Or have you
already pulled and we should instead send a patch on top, fixing the
problem?

- Arnaldo

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-08 21:17 Arnaldo Carvalho de Melo
  2014-09-09  4:59 ` Ingo Molnar
@ 2014-09-09  8:48 ` Adrian Hunter
  2014-09-09 13:12   ` Arnaldo Carvalho de Melo
  2014-09-09 19:08   ` Arnaldo Carvalho de Melo
  1 sibling, 2 replies; 67+ messages in thread
From: Adrian Hunter @ 2014-09-09  8:48 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Alexander Shishkin, Alexander Yarygin,
	Anton Blanchard, Christian Borntraeger, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Jiri Olsa,
	Kyle McMartin, Michael Ellerman, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Sukadev Bhattiprolu

On 09/09/2014 12:17 AM, Arnaldo Carvalho de Melo wrote:
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo

I am very sorry Arnaldo but 2 patches are older versions, namely:

	perf tools: Build programs to copy 32-bit compatibility VDSOs
	perf tools: Add support for 32-bit compatibility VDSOs

Up-to-date versions can be found from 15 August:

	patchwork:

		https://patchwork.kernel.org/patch/4729131/
		https://patchwork.kernel.org/patch/4729111/

	marc.info:

		http://marc.info/?l=linux-kernel&m=140812995414607&w=4
		http://marc.info/?l=linux-kernel&m=140812993814585&w=4

It looks like I reposted older versions by mistake on 31 July.
Very sorry :-(

The originals were changed as described here:

	http://marc.info/?l=linux-kernel&m=140621020918615
	http://marc.info/?l=linux-kernel&m=140618721010170

> 
> The following changes since commit 39b5a56ec0be5effe9b7d0f18cb27724bf2e5d47:
> 
>   Merge branch 'rfc/perf' into perf/core, because it's ready for inclusion (2014-08-24 22:35:42 +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 fa3480cb0a96c8af9ded1a8c836c91bd5704bda1:
> 
>   perf tools: Add perf_pmu__scan_file() (2014-09-08 17:16:06 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> o Add +field argument support for --sort option (Jiri Olsa)
> 
> Infrastructure:
> 
> o More intel PT prep work, from Adrian Hunter, including:
> 
>   - Let a user specify a PMU event without any config terms
>   - Add perf-with-kcore script
>   - Build programs to copy 32-bit compatibility VDSOs
>   - Add support for 32-bit compatibility VDSOs
>   - Let default config be defined for a PMU
>   - Add perf_pmu__scan_file()
> 
> o Add feature checks to .gitignore (Alexander Shishkin)
> 
> o "perf kvm stat report" improvements by Alexander Yarygin:
>   o  Save pid string in opts.target.pid
>   o  Enable the target.system_wide flag
>   o  Unify the title bar output
> 
> o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)
> 
> o Allow to specify lib compile variable for spec usage (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (6):
>       perf tools: Let a user specify a PMU event without any config terms
>       perf tools: Add perf-with-kcore script
>       perf tools: Build programs to copy 32-bit compatibility VDSOs
>       perf tools: Add support for 32-bit compatibility VDSOs
>       perf tools: Let default config be defined for a PMU
>       perf tools: Add perf_pmu__scan_file()
> 
> Alexander Shishkin (1):
>       perf tools: Add feature checks to .gitignore
> 
> Alexander Yarygin (3):
>       perf kvm stat report: Save pid string in opts.target.pid
>       perf kvm stat report: Enable the target.system_wide flag
>       perf kvm stat report: Unify the title bar output
> 
> Anton Blanchard (1):
>       perf tools powerpc: Fix build issue when DWARF support is disabled
> 
> Jiri Olsa (2):
>       perf tools: Add +field argument support for --sort option
>       perf tools: Allow to specify lib compile variable for spec usage
> 
>  tools/perf/.gitignore            |   2 +
>  tools/perf/Makefile.perf         |  42 ++++++-
>  tools/perf/arch/powerpc/Makefile |   2 +-
>  tools/perf/builtin-kvm.c         |  23 ++--
>  tools/perf/config/Makefile       |  33 ++++-
>  tools/perf/config/Makefile.arch  |   8 ++
>  tools/perf/perf-read-vdso.c      |  59 +++++++++
>  tools/perf/perf-with-kcore.sh    | 259 +++++++++++++++++++++++++++++++++++++++
>  tools/perf/tests/pmu.c           |   2 +-
>  tools/perf/util/kvm-stat.h       |   1 -
>  tools/perf/util/parse-events.c   |  13 +-
>  tools/perf/util/parse-events.y   |  10 ++
>  tools/perf/util/pmu.c            |  79 +++++++++---
>  tools/perf/util/pmu.h            |  12 +-
>  tools/perf/util/sort.c           |  37 +++++-
>  tools/perf/util/vdso.c           | 170 ++++++++++++++++++++++++-
>  tools/perf/util/vdso.h           |   4 +-
>  17 files changed, 712 insertions(+), 44 deletions(-)
>  create mode 100644 tools/perf/perf-read-vdso.c
>  create mode 100644 tools/perf/perf-with-kcore.sh
> 
> 


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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-09  7:45     ` Stephane Eranian
@ 2014-09-09  7:55       ` Adrian Hunter
  0 siblings, 0 replies; 67+ messages in thread
From: Adrian Hunter @ 2014-09-09  7:55 UTC (permalink / raw)
  To: Stephane Eranian
  Cc: Ingo Molnar, Arnaldo Carvalho de Melo, LKML, Alexander Shishkin,
	Alexander Yarygin, Anton Blanchard, Christian Borntraeger,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jean Pihet,
	Jiri Olsa, Kyle McMartin, Michael Ellerman, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Sukadev Bhattiprolu,
	Arnaldo Carvalho de Melo

On 09/09/2014 10:45 AM, Stephane Eranian wrote:
> On Tue, Sep 9, 2014 at 9:14 AM, Adrian Hunter <adrian.hunter@intel.com> wrote:
>> On 09/09/2014 07:59 AM, Ingo Molnar wrote:
>>>
>>> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>>>
>>>> Hi Ingo,
>>>>
>>>>      Please consider pulling,
>>>>
>>>> - Arnaldo
>>>>
>>>> The following changes since commit 39b5a56ec0be5effe9b7d0f18cb27724bf2e5d47:
>>>>
>>>>   Merge branch 'rfc/perf' into perf/core, because it's ready for inclusion (2014-08-24 22:35:42 +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 fa3480cb0a96c8af9ded1a8c836c91bd5704bda1:
>>>>
>>>>   perf tools: Add perf_pmu__scan_file() (2014-09-08 17:16:06 -0300)
>>>>
>>>> ----------------------------------------------------------------
>>>> perf/core improvements and fixes:
>>>>
>>>> User visible:
>>>>
>>>> o Add +field argument support for --sort option (Jiri Olsa)
>>>>
>>>> Infrastructure:
>>>>
>>>> o More intel PT prep work, from Adrian Hunter, including:
>>>>
>>>>   - Let a user specify a PMU event without any config terms
>>>>   - Add perf-with-kcore script
>>>>   - Build programs to copy 32-bit compatibility VDSOs
>>>>   - Add support for 32-bit compatibility VDSOs
>>>>   - Let default config be defined for a PMU
>>>>   - Add perf_pmu__scan_file()
>>>>
>>>> o Add feature checks to .gitignore (Alexander Shishkin)
>>>>
>>>> o "perf kvm stat report" improvements by Alexander Yarygin:
>>>>   o  Save pid string in opts.target.pid
>>>>   o  Enable the target.system_wide flag
>>>>   o  Unify the title bar output
>>>>
>>>> o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)
>>>>
>>>> o Allow to specify lib compile variable for spec usage (Jiri Olsa)
>>>>
>>>> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>>>>
>>>> ----------------------------------------------------------------
>>>> Adrian Hunter (6):
>>>>       perf tools: Let a user specify a PMU event without any config terms
>>>>       perf tools: Add perf-with-kcore script
>>>>       perf tools: Build programs to copy 32-bit compatibility VDSOs
>>>>       perf tools: Add support for 32-bit compatibility VDSOs
>>>>       perf tools: Let default config be defined for a PMU
>>>>       perf tools: Add perf_pmu__scan_file()
>>>>
>>>> Alexander Shishkin (1):
>>>>       perf tools: Add feature checks to .gitignore
>>>>
>>>> Alexander Yarygin (3):
>>>>       perf kvm stat report: Save pid string in opts.target.pid
>>>>       perf kvm stat report: Enable the target.system_wide flag
>>>>       perf kvm stat report: Unify the title bar output
>>>>
>>>> Anton Blanchard (1):
>>>>       perf tools powerpc: Fix build issue when DWARF support is disabled
>>>>
>>>> Jiri Olsa (2):
>>>>       perf tools: Add +field argument support for --sort option
>>>>       perf tools: Allow to specify lib compile variable for spec usage
>>>>
>>>>  tools/perf/.gitignore            |   2 +
>>>>  tools/perf/Makefile.perf         |  42 ++++++-
>>>>  tools/perf/arch/powerpc/Makefile |   2 +-
>>>>  tools/perf/builtin-kvm.c         |  23 ++--
>>>>  tools/perf/config/Makefile       |  33 ++++-
>>>>  tools/perf/config/Makefile.arch  |   8 ++
>>>>  tools/perf/perf-read-vdso.c      |  59 +++++++++
>>>>  tools/perf/perf-with-kcore.sh    | 259 +++++++++++++++++++++++++++++++++++++++
>>>>  tools/perf/tests/pmu.c           |   2 +-
>>>>  tools/perf/util/kvm-stat.h       |   1 -
>>>>  tools/perf/util/parse-events.c   |  13 +-
>>>>  tools/perf/util/parse-events.y   |  10 ++
>>>>  tools/perf/util/pmu.c            |  79 +++++++++---
>>>>  tools/perf/util/pmu.h            |  12 +-
>>>>  tools/perf/util/sort.c           |  37 +++++-
>>>>  tools/perf/util/vdso.c           | 170 ++++++++++++++++++++++++-
>>>>  tools/perf/util/vdso.h           |   4 +-
>>>>  17 files changed, 712 insertions(+), 44 deletions(-)
>>>>  create mode 100644 tools/perf/perf-read-vdso.c
>>>>  create mode 100644 tools/perf/perf-with-kcore.sh
>>>
>>> Hm, so I'm getting this error, when trying to profile a 32-bit
>>> ELF binary on a 64-bit kernel, on a testbox:
>>>
>>>  $ perf record ~/hackbench  10
>>>  Time: 0.115
>>>  [ perf record: Woken up 1 times to write data ]
>>>  [ perf record: Captured and wrote 0.373 MB perf.data (~16279 samples) ]
>>>  sh: perf-read-vdso32: command not found
>>
>> Presumably perf-read-vdso32 is not in the PATH.  Did you 'make install'?
>>
> Why are we relying on an external command now in perf record?

We are not relying on it in the sense the 'record' works without it.
There is more explanation in "perf tools: Build programs to copy 32-bit
compatibility VDSOs" and "perf tools: Add support for 32-bit compatibility
VDSOs" (although those are the wrong versions of those patches - I will send
another email about that in a moment).

> 
>>>
>>> comet:~/tip> file ~/hackbench
>>> /home/mingo/hackbench: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped
>>>
>>> 64-bit executables work fine:
>>>
>>>  $ perf record perf bench sched pipe
>>>  # Running 'sched/pipe' benchmark:
>>>  # Executed 1000000 pipe operations between two processes
>>>
>>>       Total time: 13.374 [sec]
>>>
>>>        13.374352 usecs/op
>>>            74769 ops/sec
>>>  [ perf record: Woken up 14 times to write data ]
>>>  [ perf record: Captured and wrote 3.602 MB perf.data (~157354 samples) ]
>>>
>>> The kernel is an older one:
>>>
>>>  $ uname -a
>>>  Linux comet 3.14.17-100.fc19.x86_64 #1 SMP Thu Aug 14 17:17:26
>>>  UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
>>>
>>> Thanks,
>>>
>>>       Ingo
>>>
>>>
>>
> 
> 


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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-09  7:14   ` Adrian Hunter
@ 2014-09-09  7:45     ` Stephane Eranian
  2014-09-09  7:55       ` Adrian Hunter
  2014-09-09 14:53     ` Ingo Molnar
  1 sibling, 1 reply; 67+ messages in thread
From: Stephane Eranian @ 2014-09-09  7:45 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Ingo Molnar, Arnaldo Carvalho de Melo, LKML, Alexander Shishkin,
	Alexander Yarygin, Anton Blanchard, Christian Borntraeger,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jean Pihet,
	Jiri Olsa, Kyle McMartin, Michael Ellerman, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Sukadev Bhattiprolu,
	Arnaldo Carvalho de Melo

On Tue, Sep 9, 2014 at 9:14 AM, Adrian Hunter <adrian.hunter@intel.com> wrote:
> On 09/09/2014 07:59 AM, Ingo Molnar wrote:
>>
>> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>>
>>> Hi Ingo,
>>>
>>>      Please consider pulling,
>>>
>>> - Arnaldo
>>>
>>> The following changes since commit 39b5a56ec0be5effe9b7d0f18cb27724bf2e5d47:
>>>
>>>   Merge branch 'rfc/perf' into perf/core, because it's ready for inclusion (2014-08-24 22:35:42 +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 fa3480cb0a96c8af9ded1a8c836c91bd5704bda1:
>>>
>>>   perf tools: Add perf_pmu__scan_file() (2014-09-08 17:16:06 -0300)
>>>
>>> ----------------------------------------------------------------
>>> perf/core improvements and fixes:
>>>
>>> User visible:
>>>
>>> o Add +field argument support for --sort option (Jiri Olsa)
>>>
>>> Infrastructure:
>>>
>>> o More intel PT prep work, from Adrian Hunter, including:
>>>
>>>   - Let a user specify a PMU event without any config terms
>>>   - Add perf-with-kcore script
>>>   - Build programs to copy 32-bit compatibility VDSOs
>>>   - Add support for 32-bit compatibility VDSOs
>>>   - Let default config be defined for a PMU
>>>   - Add perf_pmu__scan_file()
>>>
>>> o Add feature checks to .gitignore (Alexander Shishkin)
>>>
>>> o "perf kvm stat report" improvements by Alexander Yarygin:
>>>   o  Save pid string in opts.target.pid
>>>   o  Enable the target.system_wide flag
>>>   o  Unify the title bar output
>>>
>>> o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)
>>>
>>> o Allow to specify lib compile variable for spec usage (Jiri Olsa)
>>>
>>> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>>>
>>> ----------------------------------------------------------------
>>> Adrian Hunter (6):
>>>       perf tools: Let a user specify a PMU event without any config terms
>>>       perf tools: Add perf-with-kcore script
>>>       perf tools: Build programs to copy 32-bit compatibility VDSOs
>>>       perf tools: Add support for 32-bit compatibility VDSOs
>>>       perf tools: Let default config be defined for a PMU
>>>       perf tools: Add perf_pmu__scan_file()
>>>
>>> Alexander Shishkin (1):
>>>       perf tools: Add feature checks to .gitignore
>>>
>>> Alexander Yarygin (3):
>>>       perf kvm stat report: Save pid string in opts.target.pid
>>>       perf kvm stat report: Enable the target.system_wide flag
>>>       perf kvm stat report: Unify the title bar output
>>>
>>> Anton Blanchard (1):
>>>       perf tools powerpc: Fix build issue when DWARF support is disabled
>>>
>>> Jiri Olsa (2):
>>>       perf tools: Add +field argument support for --sort option
>>>       perf tools: Allow to specify lib compile variable for spec usage
>>>
>>>  tools/perf/.gitignore            |   2 +
>>>  tools/perf/Makefile.perf         |  42 ++++++-
>>>  tools/perf/arch/powerpc/Makefile |   2 +-
>>>  tools/perf/builtin-kvm.c         |  23 ++--
>>>  tools/perf/config/Makefile       |  33 ++++-
>>>  tools/perf/config/Makefile.arch  |   8 ++
>>>  tools/perf/perf-read-vdso.c      |  59 +++++++++
>>>  tools/perf/perf-with-kcore.sh    | 259 +++++++++++++++++++++++++++++++++++++++
>>>  tools/perf/tests/pmu.c           |   2 +-
>>>  tools/perf/util/kvm-stat.h       |   1 -
>>>  tools/perf/util/parse-events.c   |  13 +-
>>>  tools/perf/util/parse-events.y   |  10 ++
>>>  tools/perf/util/pmu.c            |  79 +++++++++---
>>>  tools/perf/util/pmu.h            |  12 +-
>>>  tools/perf/util/sort.c           |  37 +++++-
>>>  tools/perf/util/vdso.c           | 170 ++++++++++++++++++++++++-
>>>  tools/perf/util/vdso.h           |   4 +-
>>>  17 files changed, 712 insertions(+), 44 deletions(-)
>>>  create mode 100644 tools/perf/perf-read-vdso.c
>>>  create mode 100644 tools/perf/perf-with-kcore.sh
>>
>> Hm, so I'm getting this error, when trying to profile a 32-bit
>> ELF binary on a 64-bit kernel, on a testbox:
>>
>>  $ perf record ~/hackbench  10
>>  Time: 0.115
>>  [ perf record: Woken up 1 times to write data ]
>>  [ perf record: Captured and wrote 0.373 MB perf.data (~16279 samples) ]
>>  sh: perf-read-vdso32: command not found
>
> Presumably perf-read-vdso32 is not in the PATH.  Did you 'make install'?
>
Why are we relying on an external command now in perf record?

>>
>> comet:~/tip> file ~/hackbench
>> /home/mingo/hackbench: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped
>>
>> 64-bit executables work fine:
>>
>>  $ perf record perf bench sched pipe
>>  # Running 'sched/pipe' benchmark:
>>  # Executed 1000000 pipe operations between two processes
>>
>>       Total time: 13.374 [sec]
>>
>>        13.374352 usecs/op
>>            74769 ops/sec
>>  [ perf record: Woken up 14 times to write data ]
>>  [ perf record: Captured and wrote 3.602 MB perf.data (~157354 samples) ]
>>
>> The kernel is an older one:
>>
>>  $ uname -a
>>  Linux comet 3.14.17-100.fc19.x86_64 #1 SMP Thu Aug 14 17:17:26
>>  UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
>>
>> Thanks,
>>
>>       Ingo
>>
>>
>

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-09  4:59 ` Ingo Molnar
@ 2014-09-09  7:14   ` Adrian Hunter
  2014-09-09  7:45     ` Stephane Eranian
  2014-09-09 14:53     ` Ingo Molnar
  0 siblings, 2 replies; 67+ messages in thread
From: Adrian Hunter @ 2014-09-09  7:14 UTC (permalink / raw)
  To: Ingo Molnar, Arnaldo Carvalho de Melo
  Cc: linux-kernel, Alexander Shishkin, Alexander Yarygin,
	Anton Blanchard, Christian Borntraeger, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Jiri Olsa,
	Kyle McMartin, Michael Ellerman, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Sukadev Bhattiprolu,
	Arnaldo Carvalho de Melo

On 09/09/2014 07:59 AM, Ingo Molnar wrote:
> 
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> 
>> Hi Ingo,
>>
>> 	Please consider pulling,
>>
>> - Arnaldo
>>
>> The following changes since commit 39b5a56ec0be5effe9b7d0f18cb27724bf2e5d47:
>>
>>   Merge branch 'rfc/perf' into perf/core, because it's ready for inclusion (2014-08-24 22:35:42 +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 fa3480cb0a96c8af9ded1a8c836c91bd5704bda1:
>>
>>   perf tools: Add perf_pmu__scan_file() (2014-09-08 17:16:06 -0300)
>>
>> ----------------------------------------------------------------
>> perf/core improvements and fixes:
>>
>> User visible:
>>
>> o Add +field argument support for --sort option (Jiri Olsa)
>>
>> Infrastructure:
>>
>> o More intel PT prep work, from Adrian Hunter, including:
>>
>>   - Let a user specify a PMU event without any config terms
>>   - Add perf-with-kcore script
>>   - Build programs to copy 32-bit compatibility VDSOs
>>   - Add support for 32-bit compatibility VDSOs
>>   - Let default config be defined for a PMU
>>   - Add perf_pmu__scan_file()
>>
>> o Add feature checks to .gitignore (Alexander Shishkin)
>>
>> o "perf kvm stat report" improvements by Alexander Yarygin:
>>   o  Save pid string in opts.target.pid
>>   o  Enable the target.system_wide flag
>>   o  Unify the title bar output
>>
>> o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)
>>
>> o Allow to specify lib compile variable for spec usage (Jiri Olsa)
>>
>> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>>
>> ----------------------------------------------------------------
>> Adrian Hunter (6):
>>       perf tools: Let a user specify a PMU event without any config terms
>>       perf tools: Add perf-with-kcore script
>>       perf tools: Build programs to copy 32-bit compatibility VDSOs
>>       perf tools: Add support for 32-bit compatibility VDSOs
>>       perf tools: Let default config be defined for a PMU
>>       perf tools: Add perf_pmu__scan_file()
>>
>> Alexander Shishkin (1):
>>       perf tools: Add feature checks to .gitignore
>>
>> Alexander Yarygin (3):
>>       perf kvm stat report: Save pid string in opts.target.pid
>>       perf kvm stat report: Enable the target.system_wide flag
>>       perf kvm stat report: Unify the title bar output
>>
>> Anton Blanchard (1):
>>       perf tools powerpc: Fix build issue when DWARF support is disabled
>>
>> Jiri Olsa (2):
>>       perf tools: Add +field argument support for --sort option
>>       perf tools: Allow to specify lib compile variable for spec usage
>>
>>  tools/perf/.gitignore            |   2 +
>>  tools/perf/Makefile.perf         |  42 ++++++-
>>  tools/perf/arch/powerpc/Makefile |   2 +-
>>  tools/perf/builtin-kvm.c         |  23 ++--
>>  tools/perf/config/Makefile       |  33 ++++-
>>  tools/perf/config/Makefile.arch  |   8 ++
>>  tools/perf/perf-read-vdso.c      |  59 +++++++++
>>  tools/perf/perf-with-kcore.sh    | 259 +++++++++++++++++++++++++++++++++++++++
>>  tools/perf/tests/pmu.c           |   2 +-
>>  tools/perf/util/kvm-stat.h       |   1 -
>>  tools/perf/util/parse-events.c   |  13 +-
>>  tools/perf/util/parse-events.y   |  10 ++
>>  tools/perf/util/pmu.c            |  79 +++++++++---
>>  tools/perf/util/pmu.h            |  12 +-
>>  tools/perf/util/sort.c           |  37 +++++-
>>  tools/perf/util/vdso.c           | 170 ++++++++++++++++++++++++-
>>  tools/perf/util/vdso.h           |   4 +-
>>  17 files changed, 712 insertions(+), 44 deletions(-)
>>  create mode 100644 tools/perf/perf-read-vdso.c
>>  create mode 100644 tools/perf/perf-with-kcore.sh
> 
> Hm, so I'm getting this error, when trying to profile a 32-bit 
> ELF binary on a 64-bit kernel, on a testbox:
> 
>  $ perf record ~/hackbench  10
>  Time: 0.115
>  [ perf record: Woken up 1 times to write data ]
>  [ perf record: Captured and wrote 0.373 MB perf.data (~16279 samples) ]
>  sh: perf-read-vdso32: command not found

Presumably perf-read-vdso32 is not in the PATH.  Did you 'make install'?

> 
> comet:~/tip> file ~/hackbench 
> /home/mingo/hackbench: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped
> 
> 64-bit executables work fine:
> 
>  $ perf record perf bench sched pipe
>  # Running 'sched/pipe' benchmark:
>  # Executed 1000000 pipe operations between two processes
> 
>       Total time: 13.374 [sec]
> 
>        13.374352 usecs/op
>            74769 ops/sec
>  [ perf record: Woken up 14 times to write data ]
>  [ perf record: Captured and wrote 3.602 MB perf.data (~157354 samples) ]
> 
> The kernel is an older one:
> 
>  $ uname -a
>  Linux comet 3.14.17-100.fc19.x86_64 #1 SMP Thu Aug 14 17:17:26 
>  UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
> 
> Thanks,
> 
> 	Ingo
> 
> 


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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-09-08 21:17 Arnaldo Carvalho de Melo
@ 2014-09-09  4:59 ` Ingo Molnar
  2014-09-09  7:14   ` Adrian Hunter
  2014-09-09  8:48 ` Adrian Hunter
  1 sibling, 1 reply; 67+ messages in thread
From: Ingo Molnar @ 2014-09-09  4:59 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexander Yarygin, Anton Blanchard, Christian Borntraeger,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jean Pihet,
	Jiri Olsa, Kyle McMartin, Michael Ellerman, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Sukadev Bhattiprolu, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 39b5a56ec0be5effe9b7d0f18cb27724bf2e5d47:
> 
>   Merge branch 'rfc/perf' into perf/core, because it's ready for inclusion (2014-08-24 22:35:42 +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 fa3480cb0a96c8af9ded1a8c836c91bd5704bda1:
> 
>   perf tools: Add perf_pmu__scan_file() (2014-09-08 17:16:06 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> o Add +field argument support for --sort option (Jiri Olsa)
> 
> Infrastructure:
> 
> o More intel PT prep work, from Adrian Hunter, including:
> 
>   - Let a user specify a PMU event without any config terms
>   - Add perf-with-kcore script
>   - Build programs to copy 32-bit compatibility VDSOs
>   - Add support for 32-bit compatibility VDSOs
>   - Let default config be defined for a PMU
>   - Add perf_pmu__scan_file()
> 
> o Add feature checks to .gitignore (Alexander Shishkin)
> 
> o "perf kvm stat report" improvements by Alexander Yarygin:
>   o  Save pid string in opts.target.pid
>   o  Enable the target.system_wide flag
>   o  Unify the title bar output
> 
> o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)
> 
> o Allow to specify lib compile variable for spec usage (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (6):
>       perf tools: Let a user specify a PMU event without any config terms
>       perf tools: Add perf-with-kcore script
>       perf tools: Build programs to copy 32-bit compatibility VDSOs
>       perf tools: Add support for 32-bit compatibility VDSOs
>       perf tools: Let default config be defined for a PMU
>       perf tools: Add perf_pmu__scan_file()
> 
> Alexander Shishkin (1):
>       perf tools: Add feature checks to .gitignore
> 
> Alexander Yarygin (3):
>       perf kvm stat report: Save pid string in opts.target.pid
>       perf kvm stat report: Enable the target.system_wide flag
>       perf kvm stat report: Unify the title bar output
> 
> Anton Blanchard (1):
>       perf tools powerpc: Fix build issue when DWARF support is disabled
> 
> Jiri Olsa (2):
>       perf tools: Add +field argument support for --sort option
>       perf tools: Allow to specify lib compile variable for spec usage
> 
>  tools/perf/.gitignore            |   2 +
>  tools/perf/Makefile.perf         |  42 ++++++-
>  tools/perf/arch/powerpc/Makefile |   2 +-
>  tools/perf/builtin-kvm.c         |  23 ++--
>  tools/perf/config/Makefile       |  33 ++++-
>  tools/perf/config/Makefile.arch  |   8 ++
>  tools/perf/perf-read-vdso.c      |  59 +++++++++
>  tools/perf/perf-with-kcore.sh    | 259 +++++++++++++++++++++++++++++++++++++++
>  tools/perf/tests/pmu.c           |   2 +-
>  tools/perf/util/kvm-stat.h       |   1 -
>  tools/perf/util/parse-events.c   |  13 +-
>  tools/perf/util/parse-events.y   |  10 ++
>  tools/perf/util/pmu.c            |  79 +++++++++---
>  tools/perf/util/pmu.h            |  12 +-
>  tools/perf/util/sort.c           |  37 +++++-
>  tools/perf/util/vdso.c           | 170 ++++++++++++++++++++++++-
>  tools/perf/util/vdso.h           |   4 +-
>  17 files changed, 712 insertions(+), 44 deletions(-)
>  create mode 100644 tools/perf/perf-read-vdso.c
>  create mode 100644 tools/perf/perf-with-kcore.sh

Hm, so I'm getting this error, when trying to profile a 32-bit 
ELF binary on a 64-bit kernel, on a testbox:

 $ perf record ~/hackbench  10
 Time: 0.115
 [ perf record: Woken up 1 times to write data ]
 [ perf record: Captured and wrote 0.373 MB perf.data (~16279 samples) ]
 sh: perf-read-vdso32: command not found

comet:~/tip> file ~/hackbench 
/home/mingo/hackbench: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped

64-bit executables work fine:

 $ perf record perf bench sched pipe
 # Running 'sched/pipe' benchmark:
 # Executed 1000000 pipe operations between two processes

      Total time: 13.374 [sec]

       13.374352 usecs/op
           74769 ops/sec
 [ perf record: Woken up 14 times to write data ]
 [ perf record: Captured and wrote 3.602 MB perf.data (~157354 samples) ]

The kernel is an older one:

 $ uname -a
 Linux comet 3.14.17-100.fc19.x86_64 #1 SMP Thu Aug 14 17:17:26 
 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Thanks,

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2014-09-08 21:17 Arnaldo Carvalho de Melo
  2014-09-09  4:59 ` Ingo Molnar
  2014-09-09  8:48 ` Adrian Hunter
  0 siblings, 2 replies; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-09-08 21:17 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexander Yarygin, Anton Blanchard,
	Christian Borntraeger, Corey Ashford, David Ahern,
	Frederic Weisbecker, Jean Pihet, Jiri Olsa, Kyle McMartin,
	Michael Ellerman, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian, Sukadev Bhattiprolu, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 39b5a56ec0be5effe9b7d0f18cb27724bf2e5d47:

  Merge branch 'rfc/perf' into perf/core, because it's ready for inclusion (2014-08-24 22:35:42 +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 fa3480cb0a96c8af9ded1a8c836c91bd5704bda1:

  perf tools: Add perf_pmu__scan_file() (2014-09-08 17:16:06 -0300)

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

User visible:

o Add +field argument support for --sort option (Jiri Olsa)

Infrastructure:

o More intel PT prep work, from Adrian Hunter, including:

  - Let a user specify a PMU event without any config terms
  - Add perf-with-kcore script
  - Build programs to copy 32-bit compatibility VDSOs
  - Add support for 32-bit compatibility VDSOs
  - Let default config be defined for a PMU
  - Add perf_pmu__scan_file()

o Add feature checks to .gitignore (Alexander Shishkin)

o "perf kvm stat report" improvements by Alexander Yarygin:
  o  Save pid string in opts.target.pid
  o  Enable the target.system_wide flag
  o  Unify the title bar output

o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)

o Allow to specify lib compile variable for spec usage (Jiri Olsa)

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

----------------------------------------------------------------
Adrian Hunter (6):
      perf tools: Let a user specify a PMU event without any config terms
      perf tools: Add perf-with-kcore script
      perf tools: Build programs to copy 32-bit compatibility VDSOs
      perf tools: Add support for 32-bit compatibility VDSOs
      perf tools: Let default config be defined for a PMU
      perf tools: Add perf_pmu__scan_file()

Alexander Shishkin (1):
      perf tools: Add feature checks to .gitignore

Alexander Yarygin (3):
      perf kvm stat report: Save pid string in opts.target.pid
      perf kvm stat report: Enable the target.system_wide flag
      perf kvm stat report: Unify the title bar output

Anton Blanchard (1):
      perf tools powerpc: Fix build issue when DWARF support is disabled

Jiri Olsa (2):
      perf tools: Add +field argument support for --sort option
      perf tools: Allow to specify lib compile variable for spec usage

 tools/perf/.gitignore            |   2 +
 tools/perf/Makefile.perf         |  42 ++++++-
 tools/perf/arch/powerpc/Makefile |   2 +-
 tools/perf/builtin-kvm.c         |  23 ++--
 tools/perf/config/Makefile       |  33 ++++-
 tools/perf/config/Makefile.arch  |   8 ++
 tools/perf/perf-read-vdso.c      |  59 +++++++++
 tools/perf/perf-with-kcore.sh    | 259 +++++++++++++++++++++++++++++++++++++++
 tools/perf/tests/pmu.c           |   2 +-
 tools/perf/util/kvm-stat.h       |   1 -
 tools/perf/util/parse-events.c   |  13 +-
 tools/perf/util/parse-events.y   |  10 ++
 tools/perf/util/pmu.c            |  79 +++++++++---
 tools/perf/util/pmu.h            |  12 +-
 tools/perf/util/sort.c           |  37 +++++-
 tools/perf/util/vdso.c           | 170 ++++++++++++++++++++++++-
 tools/perf/util/vdso.h           |   4 +-
 17 files changed, 712 insertions(+), 44 deletions(-)
 create mode 100644 tools/perf/perf-read-vdso.c
 create mode 100644 tools/perf/perf-with-kcore.sh

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-03-18 21:25 Arnaldo Carvalho de Melo
@ 2014-03-19  7:07 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2014-03-19  7:07 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Corey Ashford, David Ahern, Don Zickus,
	Frederic Weisbecker, Jiri Olsa, Joe Mario, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Ramkumar Ramachandra, Stanislav Fomichev, Stephane Eranian,
	Arnaldo Carvalho de Melo


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

> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 0afd2d51029961281572d02545c7bde1b3f4292c:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-03-18 09:23:09 +0100)
> 
> 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 a51e87cb5a0fbebee15a3373d951dbf6f59a76c2:
> 
>   perf tools: Remove unused simple_strtoul() function (2014-03-18 18:17:07 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> . Fixup header alignment in 'perf sched latency' output (Ramkumar Ramachandra)
> 
> . Fix off-by-one error in 'perf timechart record' argv handling (Ramkumar Ramachandra)
> 
> . Print the evsel name in the annotate stdio output, prep to fix support
>   outputting annotation for multiple events, not just for the first one
>   (Arnaldo Carvalho de Melo)
> 
> Internals:
> 
> . Use tid in mmap/mmap2 events to find maps (Don Zickus)
> 
> . Record the reason for filtering an address_location (Namhyung Kim)
> 
> . Apply all filters to an addr_location (Namhyung Kim)
> 
> . Merge al->filtered with hist_entry->filtered in report/hists (Namhyung Kim)
> 
> . Fix memory leak when synthesizing thread records (Namhyung Kim)
> 
> . Use ui__has_annotation() in 'report' (Namhyung Kim)
> 
> Cleanups:
> 
> . Remove unused thread__find_map function (Jiri Olsa)
> 
> . Remove unused simple_strtoul() function (Ramkumar Ramachandra)
> 
> Documentation:
> 
> . Update function names in debug messages (Ramkumar Ramachandra)
> 
> . Update some code references in design.txt (Ramkumar Ramachandra)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (1):
>       perf annotate: Print the evsel name in the stdio output
> 
> Don Zickus (1):
>       perf tools: Use tid in mmap/mmap2 events to find maps
> 
> Jiri Olsa (1):
>       perf tools: Remove thread__find_map function
> 
> Namhyung Kim (5):
>       perf symbols: Record the reason for filtering an address_location
>       perf symbols: Apply all filters to an addr_location
>       perf report: Merge al->filtered with hist_entry->filtered
>       perf tools: Fix memory leak when synthesizing thread records
>       perf report: Use ui__has_annotation()
> 
> Ramkumar Ramachandra (5):
>       perf timechart: Fix off-by-one error in 'record' argv handling
>       perf sched: Fixup header alignment in 'latency' output
>       perf evsel: Update function names in debug messages
>       perf tools: Update some code references in design.txt
>       perf tools: Remove unused simple_strtoul() function
> 
>  tools/perf/builtin-report.c            |  4 ++--
>  tools/perf/builtin-sched.c             | 10 +++++-----
>  tools/perf/builtin-timechart.c         |  4 ++--
>  tools/perf/design.txt                  | 12 ++++++------
>  tools/perf/tests/hists_link.c          |  1 +
>  tools/perf/util/annotate.c             | 14 +++++++++-----
>  tools/perf/util/event.c                | 34 +++++++++++++++++-----------------
>  tools/perf/util/evsel.c                |  4 ++--
>  tools/perf/util/hist.c                 |  9 +--------
>  tools/perf/util/hist.h                 |  9 +++++++++
>  tools/perf/util/include/linux/kernel.h |  6 ------
>  tools/perf/util/machine.c              |  6 +++---
>  tools/perf/util/symbol.h               |  2 +-
>  tools/perf/util/thread.h               |  6 ------
>  14 files changed, 58 insertions(+), 63 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2014-03-18 21:25 Arnaldo Carvalho de Melo
  2014-03-19  7:07 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-03-18 21:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Corey Ashford, David Ahern, Don Zickus,
	Frederic Weisbecker, Jiri Olsa, Joe Mario, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Ramkumar Ramachandra, Stanislav Fomichev, Stephane Eranian,
	Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 0afd2d51029961281572d02545c7bde1b3f4292c:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-03-18 09:23:09 +0100)

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 a51e87cb5a0fbebee15a3373d951dbf6f59a76c2:

  perf tools: Remove unused simple_strtoul() function (2014-03-18 18:17:07 -0300)

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

User visible:

. Fixup header alignment in 'perf sched latency' output (Ramkumar Ramachandra)

. Fix off-by-one error in 'perf timechart record' argv handling (Ramkumar Ramachandra)

. Print the evsel name in the annotate stdio output, prep to fix support
  outputting annotation for multiple events, not just for the first one
  (Arnaldo Carvalho de Melo)

Internals:

. Use tid in mmap/mmap2 events to find maps (Don Zickus)

. Record the reason for filtering an address_location (Namhyung Kim)

. Apply all filters to an addr_location (Namhyung Kim)

. Merge al->filtered with hist_entry->filtered in report/hists (Namhyung Kim)

. Fix memory leak when synthesizing thread records (Namhyung Kim)

. Use ui__has_annotation() in 'report' (Namhyung Kim)

Cleanups:

. Remove unused thread__find_map function (Jiri Olsa)

. Remove unused simple_strtoul() function (Ramkumar Ramachandra)

Documentation:

. Update function names in debug messages (Ramkumar Ramachandra)

. Update some code references in design.txt (Ramkumar Ramachandra)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (1):
      perf annotate: Print the evsel name in the stdio output

Don Zickus (1):
      perf tools: Use tid in mmap/mmap2 events to find maps

Jiri Olsa (1):
      perf tools: Remove thread__find_map function

Namhyung Kim (5):
      perf symbols: Record the reason for filtering an address_location
      perf symbols: Apply all filters to an addr_location
      perf report: Merge al->filtered with hist_entry->filtered
      perf tools: Fix memory leak when synthesizing thread records
      perf report: Use ui__has_annotation()

Ramkumar Ramachandra (5):
      perf timechart: Fix off-by-one error in 'record' argv handling
      perf sched: Fixup header alignment in 'latency' output
      perf evsel: Update function names in debug messages
      perf tools: Update some code references in design.txt
      perf tools: Remove unused simple_strtoul() function

 tools/perf/builtin-report.c            |  4 ++--
 tools/perf/builtin-sched.c             | 10 +++++-----
 tools/perf/builtin-timechart.c         |  4 ++--
 tools/perf/design.txt                  | 12 ++++++------
 tools/perf/tests/hists_link.c          |  1 +
 tools/perf/util/annotate.c             | 14 +++++++++-----
 tools/perf/util/event.c                | 34 +++++++++++++++++-----------------
 tools/perf/util/evsel.c                |  4 ++--
 tools/perf/util/hist.c                 |  9 +--------
 tools/perf/util/hist.h                 |  9 +++++++++
 tools/perf/util/include/linux/kernel.h |  6 ------
 tools/perf/util/machine.c              |  6 +++---
 tools/perf/util/symbol.h               |  2 +-
 tools/perf/util/thread.h               |  6 ------
 14 files changed, 58 insertions(+), 63 deletions(-)

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2014-01-15 20:32 Arnaldo Carvalho de Melo
@ 2014-01-16  8:36 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2014-01-16  8:36 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Arun Sharma, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Mark Rutland, Mike Galbraith, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Rodrigo Campos, Stephane Eranian,
	Steven Rostedt, Will Deacon, Arnaldo Carvalho de Melo


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

> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 197749981e539c1eb5863f417de6dd4e2c02b76c:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-01-14 17:25:12 +0100)
> 
> 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 0e9e79a13ab9d56b86db6538305babc23b1445cc:
> 
>   tools lib traceevent: fix pointer-integer size mismatch (2014-01-15 17:04:38 -0300)
> 
> ----------------------------------------------------------------
> Changes in user visible interfaces:
> 
> . Rename 'record's --no-delay option to --no-buffering, better reflecting its
>   purpose and freeing up '--delay' to take the place of '--initial-delay', so that
>   'record' and 'stat' are consistent.
> 
> Refactorings:
> 
> . Get rid of die() and friends (good riddance!) in libtraceevent (Namhyung Kim)
> 
> Developer stuff:
> 
> . Fix cross build problems related to pkgconfig and CROSS_COMPILE not being
>   propagated to the feature tests, leading to features being tested in the
>   host and then being enabled on the target. (Mark Rutland)
> 
> . Fix pointer-integer size mismatch in some libtraceevent plugins (Mark Rutland)
> 
> . Fix build error due to zfree() cast (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf record: Rename --no-delay to --no-buffering
>       perf record: Rename --initial-delay to --delay
> 
> Mark Rutland (2):
>       perf: tools: Fix cross building
>       tools lib traceevent: fix pointer-integer size mismatch
> 
> Namhyung Kim (9):
>       perf tools: Fix build error due to zfree() cast
>       tools lib traceevent: Add state member to struct trace_seq
>       tools lib traceevent: Check return value of realloc()
>       tools lib traceevent: Get rid of malloc_or_die() in trace_seq_init()
>       tools lib traceevent: Get rid of die() finally!!
>       tools lib traceevent: Make plugin unload function receive pevent
>       perf tools: Remove symbol_conf.use_callchain check
>       perf tools: Factor out sample__resolve_callchain()
>       perf hists: Convert hist entry functions to use struct he_stat
> 
>  tools/lib/traceevent/Makefile             |  2 +-
>  tools/lib/traceevent/event-parse.h        | 14 +++++--
>  tools/lib/traceevent/event-plugin.c       |  4 +-
>  tools/lib/traceevent/event-utils.h        |  4 --
>  tools/lib/traceevent/parse-utils.c        | 44 --------------------
>  tools/lib/traceevent/plugin_cfg80211.c    |  2 +-
>  tools/lib/traceevent/plugin_function.c    |  2 +-
>  tools/lib/traceevent/plugin_scsi.c        |  2 +-
>  tools/lib/traceevent/trace-seq.c          | 67 ++++++++++++++++++++++++-------
>  tools/perf/Documentation/perf-record.txt  |  6 +--
>  tools/perf/Makefile.perf                  |  1 +
>  tools/perf/builtin-record.c               |  4 +-
>  tools/perf/builtin-report.c               | 24 ++---------
>  tools/perf/builtin-top.c                  | 22 ++++------
>  tools/perf/builtin-trace.c                |  2 +-
>  tools/perf/config/Makefile                |  6 +--
>  tools/perf/config/feature-checks/Makefile |  9 +++--
>  tools/perf/perf.h                         |  2 +-
>  tools/perf/tests/open-syscall-tp-fields.c |  8 ++--
>  tools/perf/tests/perf-record.c            |  6 +--
>  tools/perf/util/callchain.c               | 23 +++++++++++
>  tools/perf/util/callchain.h               |  6 +++
>  tools/perf/util/evsel.c                   |  2 +-
>  tools/perf/util/hist.c                    | 22 +++++-----
>  tools/perf/util/machine.c                 |  2 -
>  tools/perf/util/srcline.c                 |  4 +-
>  tools/perf/util/strlist.c                 |  2 +-
>  tools/perf/util/trace-event.c             |  2 +-
>  28 files changed, 147 insertions(+), 147 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2014-01-15 20:32 Arnaldo Carvalho de Melo
  2014-01-16  8:36 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-15 20:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Arun Sharma, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Mark Rutland, Mike Galbraith, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Rodrigo Campos, Stephane Eranian,
	Steven Rostedt, Will Deacon, Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 197749981e539c1eb5863f417de6dd4e2c02b76c:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-01-14 17:25:12 +0100)

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 0e9e79a13ab9d56b86db6538305babc23b1445cc:

  tools lib traceevent: fix pointer-integer size mismatch (2014-01-15 17:04:38 -0300)

----------------------------------------------------------------
Changes in user visible interfaces:

. Rename 'record's --no-delay option to --no-buffering, better reflecting its
  purpose and freeing up '--delay' to take the place of '--initial-delay', so that
  'record' and 'stat' are consistent.

Refactorings:

. Get rid of die() and friends (good riddance!) in libtraceevent (Namhyung Kim)

Developer stuff:

. Fix cross build problems related to pkgconfig and CROSS_COMPILE not being
  propagated to the feature tests, leading to features being tested in the
  host and then being enabled on the target. (Mark Rutland)

. Fix pointer-integer size mismatch in some libtraceevent plugins (Mark Rutland)

. Fix build error due to zfree() cast (Namhyung Kim)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf record: Rename --no-delay to --no-buffering
      perf record: Rename --initial-delay to --delay

Mark Rutland (2):
      perf: tools: Fix cross building
      tools lib traceevent: fix pointer-integer size mismatch

Namhyung Kim (9):
      perf tools: Fix build error due to zfree() cast
      tools lib traceevent: Add state member to struct trace_seq
      tools lib traceevent: Check return value of realloc()
      tools lib traceevent: Get rid of malloc_or_die() in trace_seq_init()
      tools lib traceevent: Get rid of die() finally!!
      tools lib traceevent: Make plugin unload function receive pevent
      perf tools: Remove symbol_conf.use_callchain check
      perf tools: Factor out sample__resolve_callchain()
      perf hists: Convert hist entry functions to use struct he_stat

 tools/lib/traceevent/Makefile             |  2 +-
 tools/lib/traceevent/event-parse.h        | 14 +++++--
 tools/lib/traceevent/event-plugin.c       |  4 +-
 tools/lib/traceevent/event-utils.h        |  4 --
 tools/lib/traceevent/parse-utils.c        | 44 --------------------
 tools/lib/traceevent/plugin_cfg80211.c    |  2 +-
 tools/lib/traceevent/plugin_function.c    |  2 +-
 tools/lib/traceevent/plugin_scsi.c        |  2 +-
 tools/lib/traceevent/trace-seq.c          | 67 ++++++++++++++++++++++++-------
 tools/perf/Documentation/perf-record.txt  |  6 +--
 tools/perf/Makefile.perf                  |  1 +
 tools/perf/builtin-record.c               |  4 +-
 tools/perf/builtin-report.c               | 24 ++---------
 tools/perf/builtin-top.c                  | 22 ++++------
 tools/perf/builtin-trace.c                |  2 +-
 tools/perf/config/Makefile                |  6 +--
 tools/perf/config/feature-checks/Makefile |  9 +++--
 tools/perf/perf.h                         |  2 +-
 tools/perf/tests/open-syscall-tp-fields.c |  8 ++--
 tools/perf/tests/perf-record.c            |  6 +--
 tools/perf/util/callchain.c               | 23 +++++++++++
 tools/perf/util/callchain.h               |  6 +++
 tools/perf/util/evsel.c                   |  2 +-
 tools/perf/util/hist.c                    | 22 +++++-----
 tools/perf/util/machine.c                 |  2 -
 tools/perf/util/srcline.c                 |  4 +-
 tools/perf/util/strlist.c                 |  2 +-
 tools/perf/util/trace-event.c             |  2 +-
 28 files changed, 147 insertions(+), 147 deletions(-)

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2013-11-12 20:46 Arnaldo Carvalho de Melo
@ 2013-11-12 20:50 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2013-11-12 20:50 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Pekka Enberg, Peter Zijlstra,
	Stephane Eranian, Steven Rostedt, Arnaldo Carvalho de Melo


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

> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 67c1e4a53b17894e6a24f95057cc374c4be051cb:
> 
>   perf tests: Use lower sample_freq in sw clock event period test (2013-11-11 16:43:34 -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 0497a9ebaf7ae4d573497b3e053ad4c3d5c9921d:
> 
>   tools lib traceevent: Add direct access to dynamic arrays (2013-11-12 17:23:44 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Add summary only option to 'perf trace', suppressing the decoding of
>   events, from David Ahern
> 
> . 'perf trace --summary' formatting simplifications, from Pekka Emberg.
> 
> . Beautify fifth argument of mmap() as fd, in 'perf trace', from Namhyung Kim.
> 
> . Fix segfault on perf trace -i perf.data, from Namhyung Kim.
> 
> . Fix segfault with --no-mmap-pages, from David Ahern.
> 
> . Round mmap pages to power 2, from David Ahern.
> 
> . Add direct access to dynamic arrays in libtraceevent, from Steven Rostedt.
> 
> . Handle throttle events in 'object code reading' test, fix from Adrian Hunter.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (2):
>       perf tests: Compensate lower sample freq with longer test loop
>       perf tests: Handle throttle events in 'object code reading' test
> 
> Arnaldo Carvalho de Melo (1):
>       perf target: Shorten perf_target__ to target__
> 
> David Ahern (4):
>       perf trace: Add summary only option
>       perf record: Fix segfault with --no-mmap-pages
>       perf evlist: Round mmap pages to power 2 - v2
>       perf evlist: Refactor mmap_pages parsing
> 
> Namhyung Kim (3):
>       perf trace: Beautify fifth argument of mmap() as fd
>       perf trace: Separate tp syscall field caching into init routine to be reused
>       perf trace: Fix segfault on perf trace -i perf.data
> 
> Pekka Enberg (2):
>       perf trace: Change syscall summary duration order
>       perf trace: Simplify '--summary' output
> 
> Steven Rostedt (1):
>       tools lib traceevent: Add direct access to dynamic arrays
> 
>  tools/lib/traceevent/event-parse.c      |  13 ++++
>  tools/perf/Documentation/perf-trace.txt |  10 ++-
>  tools/perf/builtin-kvm.c                |   6 +-
>  tools/perf/builtin-record.c             |  14 ++--
>  tools/perf/builtin-stat.c               |  21 +++---
>  tools/perf/builtin-top.c                |  14 ++--
>  tools/perf/builtin-trace.c              | 121 +++++++++++++++++++-------------
>  tools/perf/perf.h                       |   2 +-
>  tools/perf/tests/code-reading.c         |  15 +++-
>  tools/perf/tests/sw-clock.c             |   2 +-
>  tools/perf/tests/task-exit.c            |   2 +-
>  tools/perf/util/evlist.c                |  64 ++++++++++-------
>  tools/perf/util/evlist.h                |   5 +-
>  tools/perf/util/evsel.c                 |   9 ++-
>  tools/perf/util/evsel.h                 |   3 +-
>  tools/perf/util/machine.c               |   6 +-
>  tools/perf/util/machine.h               |   4 +-
>  tools/perf/util/target.c                |  54 +++++++-------
>  tools/perf/util/target.h                |  44 ++++++------
>  tools/perf/util/top.c                   |   2 +-
>  20 files changed, 236 insertions(+), 175 deletions(-)

Pulled, including yesterday's bits as well - thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2013-11-12 20:46 Arnaldo Carvalho de Melo
  2013-11-12 20:50 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-12 20:46 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Pekka Enberg, Peter Zijlstra,
	Stephane Eranian, Steven Rostedt, Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 67c1e4a53b17894e6a24f95057cc374c4be051cb:

  perf tests: Use lower sample_freq in sw clock event period test (2013-11-11 16:43:34 -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 0497a9ebaf7ae4d573497b3e053ad4c3d5c9921d:

  tools lib traceevent: Add direct access to dynamic arrays (2013-11-12 17:23:44 -0300)

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

. Add summary only option to 'perf trace', suppressing the decoding of
  events, from David Ahern

. 'perf trace --summary' formatting simplifications, from Pekka Emberg.

. Beautify fifth argument of mmap() as fd, in 'perf trace', from Namhyung Kim.

. Fix segfault on perf trace -i perf.data, from Namhyung Kim.

. Fix segfault with --no-mmap-pages, from David Ahern.

. Round mmap pages to power 2, from David Ahern.

. Add direct access to dynamic arrays in libtraceevent, from Steven Rostedt.

. Handle throttle events in 'object code reading' test, fix from Adrian Hunter.

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

----------------------------------------------------------------
Adrian Hunter (2):
      perf tests: Compensate lower sample freq with longer test loop
      perf tests: Handle throttle events in 'object code reading' test

Arnaldo Carvalho de Melo (1):
      perf target: Shorten perf_target__ to target__

David Ahern (4):
      perf trace: Add summary only option
      perf record: Fix segfault with --no-mmap-pages
      perf evlist: Round mmap pages to power 2 - v2
      perf evlist: Refactor mmap_pages parsing

Namhyung Kim (3):
      perf trace: Beautify fifth argument of mmap() as fd
      perf trace: Separate tp syscall field caching into init routine to be reused
      perf trace: Fix segfault on perf trace -i perf.data

Pekka Enberg (2):
      perf trace: Change syscall summary duration order
      perf trace: Simplify '--summary' output

Steven Rostedt (1):
      tools lib traceevent: Add direct access to dynamic arrays

 tools/lib/traceevent/event-parse.c      |  13 ++++
 tools/perf/Documentation/perf-trace.txt |  10 ++-
 tools/perf/builtin-kvm.c                |   6 +-
 tools/perf/builtin-record.c             |  14 ++--
 tools/perf/builtin-stat.c               |  21 +++---
 tools/perf/builtin-top.c                |  14 ++--
 tools/perf/builtin-trace.c              | 121 +++++++++++++++++++-------------
 tools/perf/perf.h                       |   2 +-
 tools/perf/tests/code-reading.c         |  15 +++-
 tools/perf/tests/sw-clock.c             |   2 +-
 tools/perf/tests/task-exit.c            |   2 +-
 tools/perf/util/evlist.c                |  64 ++++++++++-------
 tools/perf/util/evlist.h                |   5 +-
 tools/perf/util/evsel.c                 |   9 ++-
 tools/perf/util/evsel.h                 |   3 +-
 tools/perf/util/machine.c               |   6 +-
 tools/perf/util/machine.h               |   4 +-
 tools/perf/util/target.c                |  54 +++++++-------
 tools/perf/util/target.h                |  44 ++++++------
 tools/perf/util/top.c                   |   2 +-
 20 files changed, 236 insertions(+), 175 deletions(-)

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

* Re: [GIT PULL 00/13] perf/core improvements and fixes
  2012-09-08  2:06 Arnaldo Carvalho de Melo
@ 2012-09-08 11:28 ` Ingo Molnar
  0 siblings, 0 replies; 67+ messages in thread
From: Ingo Molnar @ 2012-09-08 11:28 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Andrew Morton,
	Corey Ashford, David Ahern, Frederic Weisbecker, Irina Tirdea,
	Jiri Olsa, linux-mm, Michel Lespinasse, Namhyung Kim,
	Namhyung Kim, Paul E. McKenney, Paul Mackerras, Peter Zijlstra,
	Steven Rostedt, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 479d875835a49e849683743ec50c30b6a429696b:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2012-09-07 07:36:59 +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 b155a09015135cf59ada8d48109ccbd9891c1b42:
> 
>   perf tools: Fix build for another rbtree.c change (2012-09-07 22:21:59 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes
> 
>  . Fix build for another rbtree.c change, from Adrian Hunter.
> 
>  . Fixes for perf to build on Android, from Irina Tirdea.
> 
>  . Make 'perf diff' command work with evsel hists, from Jiri Olsa.
> 
>  . Use the only field_sep var that is set up: symbol_conf.field_sep,
>    fix from Jiri Olsa.
> 
>  . .gitignore compiled python binaries, from Namhyung Kim.
> 
>  . Get rid of die() in more libtraceevent places, from Namhyung Kim.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf tools: Fix build for another rbtree.c change
> 
> Irina Tirdea (6):
>       perf tools: include basename for non-glibc systems
>       perf tools: fix missing winsize definition
>       perf tools: include missing pthread.h header
>       perf tools: replace mkostemp with mkstemp
>       tools lib traceevent: replace mempcpy with memcpy
>       perf tools: add NO_BACKTRACE for application self-debugging
> 
> Jiri Olsa (2):
>       perf diff: Make diff command work with evsel hists
>       perf tools: Replace sort's standalone field_sep with symbol_conf.field_sep
> 
> Namhyung Kim (4):
>       perf tools: Ignore compiled python binaries
>       tools lib traceevent: Get rid of die() from pretty_print()
>       tools lib traceevent: Get rid of die() from pevent_register_event_handler
>       tools lib traceevent: Get rid of die() from pevent_register_print_function
> 
>  tools/lib/traceevent/event-parse.c     |   86 +++++++++++++++++++++--------
>  tools/lib/traceevent/event-parse.h     |    3 +-
>  tools/perf/.gitignore                  |    2 +
>  tools/perf/Documentation/perf-diff.txt |    3 ++
>  tools/perf/Makefile                    |    8 +++
>  tools/perf/builtin-diff.c              |   93 +++++++++++++++++++++-----------
>  tools/perf/config/feature-tests.mak    |   14 +++++
>  tools/perf/perf.c                      |    1 +
>  tools/perf/util/annotate.h             |    1 +
>  tools/perf/util/dso-test-data.c        |    2 +-
>  tools/perf/util/evsel.h                |    7 +++
>  tools/perf/util/help.c                 |    1 +
>  tools/perf/util/include/linux/rbtree.h |    1 +
>  tools/perf/util/session.h              |    4 +-
>  tools/perf/util/sort.c                 |    6 +--
>  tools/perf/util/sort.h                 |    1 -
>  tools/perf/util/symbol.h               |    3 ++
>  tools/perf/util/top.h                  |    1 +
>  tools/perf/util/util.c                 |    6 +++
>  19 files changed, 180 insertions(+), 63 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core improvements and fixes
@ 2012-09-08  2:06 Arnaldo Carvalho de Melo
  2012-09-08 11:28 ` Ingo Molnar
  0 siblings, 1 reply; 67+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-09-08  2:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Andrew Morton, Corey Ashford, David Ahern,
	Frederic Weisbecker, Irina Tirdea, Jiri Olsa, linux-mm,
	Michel Lespinasse, Namhyung Kim, Namhyung Kim, Paul E. McKenney,
	Paul Mackerras, Peter Zijlstra, Steven Rostedt,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 479d875835a49e849683743ec50c30b6a429696b:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2012-09-07 07:36:59 +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 b155a09015135cf59ada8d48109ccbd9891c1b42:

  perf tools: Fix build for another rbtree.c change (2012-09-07 22:21:59 -0300)

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

 . Fix build for another rbtree.c change, from Adrian Hunter.

 . Fixes for perf to build on Android, from Irina Tirdea.

 . Make 'perf diff' command work with evsel hists, from Jiri Olsa.

 . Use the only field_sep var that is set up: symbol_conf.field_sep,
   fix from Jiri Olsa.

 . .gitignore compiled python binaries, from Namhyung Kim.

 . Get rid of die() in more libtraceevent places, from Namhyung Kim.

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

----------------------------------------------------------------
Adrian Hunter (1):
      perf tools: Fix build for another rbtree.c change

Irina Tirdea (6):
      perf tools: include basename for non-glibc systems
      perf tools: fix missing winsize definition
      perf tools: include missing pthread.h header
      perf tools: replace mkostemp with mkstemp
      tools lib traceevent: replace mempcpy with memcpy
      perf tools: add NO_BACKTRACE for application self-debugging

Jiri Olsa (2):
      perf diff: Make diff command work with evsel hists
      perf tools: Replace sort's standalone field_sep with symbol_conf.field_sep

Namhyung Kim (4):
      perf tools: Ignore compiled python binaries
      tools lib traceevent: Get rid of die() from pretty_print()
      tools lib traceevent: Get rid of die() from pevent_register_event_handler
      tools lib traceevent: Get rid of die() from pevent_register_print_function

 tools/lib/traceevent/event-parse.c     |   86 +++++++++++++++++++++--------
 tools/lib/traceevent/event-parse.h     |    3 +-
 tools/perf/.gitignore                  |    2 +
 tools/perf/Documentation/perf-diff.txt |    3 ++
 tools/perf/Makefile                    |    8 +++
 tools/perf/builtin-diff.c              |   93 +++++++++++++++++++++-----------
 tools/perf/config/feature-tests.mak    |   14 +++++
 tools/perf/perf.c                      |    1 +
 tools/perf/util/annotate.h             |    1 +
 tools/perf/util/dso-test-data.c        |    2 +-
 tools/perf/util/evsel.h                |    7 +++
 tools/perf/util/help.c                 |    1 +
 tools/perf/util/include/linux/rbtree.h |    1 +
 tools/perf/util/session.h              |    4 +-
 tools/perf/util/sort.c                 |    6 +--
 tools/perf/util/sort.h                 |    1 -
 tools/perf/util/symbol.h               |    3 ++
 tools/perf/util/top.h                  |    1 +
 tools/perf/util/util.c                 |    6 +++
 19 files changed, 180 insertions(+), 63 deletions(-)

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

end of thread, other threads:[~2018-09-25  9:21 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-16 20:02 [GIT PULL 00/13] perf/core improvements and fixes Jiri Olsa
2014-07-16 20:02 ` [PATCH 01/13] perf tools: Enable close-on-exec flag on perf file descriptor Jiri Olsa
2014-07-16 20:02 ` [PATCH 02/13] perf tests: Update attr test with PERF_FLAG_FD_CLOEXEC flag Jiri Olsa
2014-07-16 20:02 ` [PATCH 03/13] perf tools: Add jsmn `jasmine' JSON parser Jiri Olsa
2014-07-16 20:02 ` [PATCH 04/13] perf tools: Add support for text descriptions of events and alias add Jiri Olsa
2014-07-16 20:02 ` [PATCH 05/13] perf tools: Update perf list to output descriptions Jiri Olsa
2014-07-16 20:02 ` [PATCH 06/13] perf tools: Allow events with dot Jiri Olsa
2014-07-16 20:02 ` [PATCH 07/13] perf tools: Add support for reading JSON event files Jiri Olsa
2014-07-16 20:02 ` [PATCH 08/13] perf tools: Automatically look for event file name for cpu Jiri Olsa
2014-07-16 20:02 ` [PATCH 09/13] perf tools: Add perf download to download event files Jiri Olsa
2014-07-17 10:47   ` Ingo Molnar
2014-07-17 10:51     ` Ingo Molnar
2014-07-18 17:35     ` Andi Kleen
2014-07-19  9:51       ` Ingo Molnar
2014-08-06  1:16         ` Michael Ellerman
2014-08-06  1:09     ` Michael Ellerman
2014-07-16 20:02 ` [PATCH 10/13] perf tools: Query terminal width and use in perf list Jiri Olsa
2014-07-16 20:02 ` [PATCH 11/13] perf tools: Add a new pmu interface to iterate over all events Jiri Olsa
2014-07-16 20:02 ` [PATCH 12/13] perf tests: Add test case for alias and JSON parsing Jiri Olsa
2014-07-16 20:02 ` [PATCH 13/13] perf tools: Add a --no-desc flag to perf list Jiri Olsa
  -- strict thread matches above, loose matches on Subject: below --
2018-09-19 14:25 [GIT PULL 00/13] perf/core improvements and fixes Arnaldo Carvalho de Melo
2018-09-25  9:21 ` Ingo Molnar
2017-09-04 14:00 Arnaldo Carvalho de Melo
2017-09-05  5:15 ` Ingo Molnar
2017-08-21 19:25 Arnaldo Carvalho de Melo
2017-08-22 10:20 ` Ingo Molnar
2017-04-05  0:17 Arnaldo Carvalho de Melo
2017-04-05  5:41 ` Ingo Molnar
2017-01-11 20:21 Arnaldo Carvalho de Melo
2017-01-12  8:25 ` Ingo Molnar
2016-10-06 16:11 Arnaldo Carvalho de Melo
2016-10-06 22:38 ` Ingo Molnar
2016-05-11 16:32 Arnaldo Carvalho de Melo
2016-05-12  6:58 ` Ingo Molnar
2016-04-29 14:57 Arnaldo Carvalho de Melo
2016-04-29 19:39 ` Ingo Molnar
2016-02-15 21:01 Arnaldo Carvalho de Melo
2016-02-16  7:48 ` Ingo Molnar
2015-11-26 20:45 Arnaldo Carvalho de Melo
2015-11-27  7:30 ` Ingo Molnar
2015-08-12 16:39 Arnaldo Carvalho de Melo
2015-08-13  7:25 ` Ingo Molnar
2015-07-20 20:58 Arnaldo Carvalho de Melo
2015-07-21  6:00 ` Ingo Molnar
2015-06-23 21:47 Arnaldo Carvalho de Melo
2015-06-25  7:31 ` Ingo Molnar
2015-06-25 13:48   ` Arnaldo Carvalho de Melo
2014-09-08 21:17 Arnaldo Carvalho de Melo
2014-09-09  4:59 ` Ingo Molnar
2014-09-09  7:14   ` Adrian Hunter
2014-09-09  7:45     ` Stephane Eranian
2014-09-09  7:55       ` Adrian Hunter
2014-09-09 14:53     ` Ingo Molnar
2014-09-09  8:48 ` Adrian Hunter
2014-09-09 13:12   ` Arnaldo Carvalho de Melo
2014-09-09 14:54     ` Ingo Molnar
2014-09-09 15:59       ` Arnaldo Carvalho de Melo
2014-09-09 19:08   ` Arnaldo Carvalho de Melo
2014-09-10 13:19     ` Adrian Hunter
2014-03-18 21:25 Arnaldo Carvalho de Melo
2014-03-19  7:07 ` Ingo Molnar
2014-01-15 20:32 Arnaldo Carvalho de Melo
2014-01-16  8:36 ` Ingo Molnar
2013-11-12 20:46 Arnaldo Carvalho de Melo
2013-11-12 20:50 ` Ingo Molnar
2012-09-08  2:06 Arnaldo Carvalho de Melo
2012-09-08 11:28 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).