linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 00/10] perf/urgent fixes
@ 2014-10-29 12:56 Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 01/10] perf callchain: Use global caching provided by libunwind Arnaldo Carvalho de Melo
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Arun Sharma,
	Corey Ashford, David Ahern, Frederic Weisbecker, Hemant Kumar,
	Jean Pihet, Jiri Olsa, Li Zefan, Masami Hiramatsu, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Srikar Dronamraju, Wang Nan,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 1776b10627e486dd431fe72d8d47e5a865cf65d1:

  perf/x86/intel: Revert incomplete and undocumented Broadwell client support (2014-10-29 11:07:58 +0100)

are available in the git repository at:

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

for you to fetch changes up to 4cdcc33db2f0455f297b4e14e434ba311ec5ca06:

  perf probe: Trivial typo fix for --demangle (2014-10-29 10:30:18 -0200)

----------------------------------------------------------------
perf/urgent fixes:

User visible:

* Fix report -F (abort, in_tx, mispredict, etc) segfaults for sample.data files
  without branch info (Jiri Olsa)

* Add patch that should have went in a previous patchkit to use global cache
  provided by libunwind (Namhyung Kim)

* Make CPUINFO_PROC an array to support different kernels, problem
  detected when the information reported via /proc/cpuinfo changed on ARM (Wang Nan)

* 'perf probe' --demangle typo fix and a new --quiet option (Masami Hiramatsu)

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

----------------------------------------------------------------
Jiri Olsa (7):
      perf tools: Fix report -F abort for data without branch info
      perf tools: Fix report -F in_tx for data without branch info
      perf tools: Fix report -F mispredict for data without branch info
      perf tools: Fix report -F symbol_to for data without branch info
      perf tools: Fix report -F symbol_from for data without branch info
      perf tools: Fix report -F dso_to for data without branch info
      perf tools: Fix report -F dso_from for data without branch info

Masami Hiramatsu (1):
      perf probe: Trivial typo fix for --demangle

Namhyung Kim (1):
      perf callchain: Use global caching provided by libunwind

Wang Nan (1):
      perf tools: Make CPUINFO_PROC an array to support different kernel versions

 tools/perf/builtin-probe.c         |   2 +-
 tools/perf/perf-sys.h              |  30 +++++------
 tools/perf/util/header.c           |  27 +++++++---
 tools/perf/util/sort.c             | 102 +++++++++++++++++++++++++++----------
 tools/perf/util/thread.c           |   3 ++
 tools/perf/util/unwind-libunwind.c |  12 +++++
 tools/perf/util/unwind.h           |   3 ++
 7 files changed, 131 insertions(+), 48 deletions(-)

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

* [PATCH 01/10] perf callchain: Use global caching provided by libunwind
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
@ 2014-10-29 12:56 ` Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 02/10] perf tools: Make CPUINFO_PROC an array to support different kernel versions Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Arun Sharma, David Ahern,
	Frederic Weisbecker, Jean Pihet, Jiri Olsa, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

The libunwind provides two caching policy which are global and
per-thread.  As perf unwinds callchains in a single thread, it'd
sufficient to use global caching.

This speeds up my perf report from 14s to 7s on a ~260MB data file.
Although the output sometimes contains a slight difference (~0.01% in
terms of number of lines printed) on callchains which were not resolved.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jean Pihet <jean.pihet@linaro.org>
Cc: Arun Sharma <asharma@fb.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1412556363-26229-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/thread.c           |  3 +++
 tools/perf/util/unwind-libunwind.c | 12 ++++++++++++
 tools/perf/util/unwind.h           |  3 +++
 3 files changed, 18 insertions(+)

diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index 2b7b2d91c016..c41411726c7a 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -117,6 +117,9 @@ int __thread__set_comm(struct thread *thread, const char *str, u64 timestamp,
 		if (!new)
 			return -ENOMEM;
 		list_add(&new->list, &thread->comm_list);
+
+		if (exec)
+			unwind__flush_access(thread);
 	}
 
 	thread->comm_set = true;
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index e060386165c5..4d45c0dfe343 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -539,11 +539,23 @@ int unwind__prepare_access(struct thread *thread)
 		return -ENOMEM;
 	}
 
+	unw_set_caching_policy(addr_space, UNW_CACHE_GLOBAL);
 	thread__set_priv(thread, addr_space);
 
 	return 0;
 }
 
+void unwind__flush_access(struct thread *thread)
+{
+	unw_addr_space_t addr_space;
+
+	if (callchain_param.record_mode != CALLCHAIN_DWARF)
+		return;
+
+	addr_space = thread__priv(thread);
+	unw_flush_cache(addr_space, 0, 0);
+}
+
 void unwind__finish_access(struct thread *thread)
 {
 	unw_addr_space_t addr_space;
diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h
index c17c4855bdbc..f50b737235eb 100644
--- a/tools/perf/util/unwind.h
+++ b/tools/perf/util/unwind.h
@@ -23,6 +23,7 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
 #ifdef HAVE_LIBUNWIND_SUPPORT
 int libunwind__arch_reg_id(int regnum);
 int unwind__prepare_access(struct thread *thread);
+void unwind__flush_access(struct thread *thread);
 void unwind__finish_access(struct thread *thread);
 #else
 static inline int unwind__prepare_access(struct thread *thread __maybe_unused)
@@ -30,6 +31,7 @@ static inline int unwind__prepare_access(struct thread *thread __maybe_unused)
 	return 0;
 }
 
+static inline void unwind__flush_access(struct thread *thread __maybe_unused) {}
 static inline void unwind__finish_access(struct thread *thread __maybe_unused) {}
 #endif
 #else
@@ -49,6 +51,7 @@ static inline int unwind__prepare_access(struct thread *thread __maybe_unused)
 	return 0;
 }
 
+static inline void unwind__flush_access(struct thread *thread __maybe_unused) {}
 static inline void unwind__finish_access(struct thread *thread __maybe_unused) {}
 #endif /* HAVE_DWARF_UNWIND_SUPPORT */
 #endif /* __UNWIND_H */
-- 
1.9.3


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

* [PATCH 02/10] perf tools: Make CPUINFO_PROC an array to support different kernel versions
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 01/10] perf callchain: Use global caching provided by libunwind Arnaldo Carvalho de Melo
@ 2014-10-29 12:56 ` Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 03/10] perf tools: Fix report -F abort for data without branch info Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Wang Nan, Li Zefan, Namhyung Kim,
	Arnaldo Carvalho de Melo

From: Wang Nan <wangnan0@huawei.com>

After kernel 3.7 (commit b4b8f770eb10a1bccaf8aa0ec1956e2dd7ed1e0a),
/proc/cpuinfo replaces 'Processor' to 'model name'.

This patch makes CPUINFO_PROC to an array and provides two choices for
ARM, makes it compatible for different kernel version.

v1 -> v2: minor changes as suggested by Namhyung Kim:

 - Doesn't pass @h and @evlist to __write_cpudesc;
 - Coding style fix.

v2 -> v3:
  - Rebase:
    git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/core

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1414115126-7479-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/perf-sys.h    | 30 +++++++++++++++---------------
 tools/perf/util/header.c | 27 +++++++++++++++++++++------
 2 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/tools/perf/perf-sys.h b/tools/perf/perf-sys.h
index 937e4324ad94..a3b13d7dc1d4 100644
--- a/tools/perf/perf-sys.h
+++ b/tools/perf/perf-sys.h
@@ -13,7 +13,7 @@
 #define wmb()		asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
 #define rmb()		asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
 #define cpu_relax()	asm volatile("rep; nop" ::: "memory");
-#define CPUINFO_PROC	"model name"
+#define CPUINFO_PROC	{"model name"}
 #ifndef __NR_perf_event_open
 # define __NR_perf_event_open 336
 #endif
@@ -30,7 +30,7 @@
 #define wmb()		asm volatile("sfence" ::: "memory")
 #define rmb()		asm volatile("lfence" ::: "memory")
 #define cpu_relax()	asm volatile("rep; nop" ::: "memory");
-#define CPUINFO_PROC	"model name"
+#define CPUINFO_PROC	{"model name"}
 #ifndef __NR_perf_event_open
 # define __NR_perf_event_open 298
 #endif
@@ -47,14 +47,14 @@
 #define mb()		asm volatile ("sync" ::: "memory")
 #define wmb()		asm volatile ("sync" ::: "memory")
 #define rmb()		asm volatile ("sync" ::: "memory")
-#define CPUINFO_PROC	"cpu"
+#define CPUINFO_PROC	{"cpu"}
 #endif
 
 #ifdef __s390__
 #define mb()		asm volatile("bcr 15,0" ::: "memory")
 #define wmb()		asm volatile("bcr 15,0" ::: "memory")
 #define rmb()		asm volatile("bcr 15,0" ::: "memory")
-#define CPUINFO_PROC	"vendor_id"
+#define CPUINFO_PROC	{"vendor_id"}
 #endif
 
 #ifdef __sh__
@@ -67,14 +67,14 @@
 # define wmb()		asm volatile("" ::: "memory")
 # define rmb()		asm volatile("" ::: "memory")
 #endif
-#define CPUINFO_PROC	"cpu type"
+#define CPUINFO_PROC	{"cpu type"}
 #endif
 
 #ifdef __hppa__
 #define mb()		asm volatile("" ::: "memory")
 #define wmb()		asm volatile("" ::: "memory")
 #define rmb()		asm volatile("" ::: "memory")
-#define CPUINFO_PROC	"cpu"
+#define CPUINFO_PROC	{"cpu"}
 #endif
 
 #ifdef __sparc__
@@ -87,14 +87,14 @@
 #endif
 #define wmb()		asm volatile("":::"memory")
 #define rmb()		asm volatile("":::"memory")
-#define CPUINFO_PROC	"cpu"
+#define CPUINFO_PROC	{"cpu"}
 #endif
 
 #ifdef __alpha__
 #define mb()		asm volatile("mb" ::: "memory")
 #define wmb()		asm volatile("wmb" ::: "memory")
 #define rmb()		asm volatile("mb" ::: "memory")
-#define CPUINFO_PROC	"cpu model"
+#define CPUINFO_PROC	{"cpu model"}
 #endif
 
 #ifdef __ia64__
@@ -102,7 +102,7 @@
 #define wmb()		asm volatile ("mf" ::: "memory")
 #define rmb()		asm volatile ("mf" ::: "memory")
 #define cpu_relax()	asm volatile ("hint @pause" ::: "memory")
-#define CPUINFO_PROC	"model name"
+#define CPUINFO_PROC	{"model name"}
 #endif
 
 #ifdef __arm__
@@ -113,7 +113,7 @@
 #define mb()		((void(*)(void))0xffff0fa0)()
 #define wmb()		((void(*)(void))0xffff0fa0)()
 #define rmb()		((void(*)(void))0xffff0fa0)()
-#define CPUINFO_PROC	"Processor"
+#define CPUINFO_PROC	{"model name", "Processor"}
 #endif
 
 #ifdef __aarch64__
@@ -133,28 +133,28 @@
 				: "memory")
 #define wmb()	mb()
 #define rmb()	mb()
-#define CPUINFO_PROC	"cpu model"
+#define CPUINFO_PROC	{"cpu model"}
 #endif
 
 #ifdef __arc__
 #define mb()		asm volatile("" ::: "memory")
 #define wmb()		asm volatile("" ::: "memory")
 #define rmb()		asm volatile("" ::: "memory")
-#define CPUINFO_PROC	"Processor"
+#define CPUINFO_PROC	{"Processor"}
 #endif
 
 #ifdef __metag__
 #define mb()		asm volatile("" ::: "memory")
 #define wmb()		asm volatile("" ::: "memory")
 #define rmb()		asm volatile("" ::: "memory")
-#define CPUINFO_PROC	"CPU"
+#define CPUINFO_PROC	{"CPU"}
 #endif
 
 #ifdef __xtensa__
 #define mb()		asm volatile("memw" ::: "memory")
 #define wmb()		asm volatile("memw" ::: "memory")
 #define rmb()		asm volatile("" ::: "memory")
-#define CPUINFO_PROC	"core ID"
+#define CPUINFO_PROC	{"core ID"}
 #endif
 
 #ifdef __tile__
@@ -162,7 +162,7 @@
 #define wmb()		asm volatile ("mf" ::: "memory")
 #define rmb()		asm volatile ("mf" ::: "memory")
 #define cpu_relax()	asm volatile ("mfspr zero, PASS" ::: "memory")
-#define CPUINFO_PROC    "model name"
+#define CPUINFO_PROC    {"model name"}
 #endif
 
 #define barrier() asm volatile ("" ::: "memory")
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index ce0de00399da..26f5b2fe5dc8 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -579,16 +579,12 @@ static int write_version(int fd, struct perf_header *h __maybe_unused,
 	return do_write_string(fd, perf_version_string);
 }
 
-static int write_cpudesc(int fd, struct perf_header *h __maybe_unused,
-		       struct perf_evlist *evlist __maybe_unused)
+static int __write_cpudesc(int fd, const char *cpuinfo_proc)
 {
-#ifndef CPUINFO_PROC
-#define CPUINFO_PROC NULL
-#endif
 	FILE *file;
 	char *buf = NULL;
 	char *s, *p;
-	const char *search = CPUINFO_PROC;
+	const char *search = cpuinfo_proc;
 	size_t len = 0;
 	int ret = -1;
 
@@ -638,6 +634,25 @@ done:
 	return ret;
 }
 
+static int write_cpudesc(int fd, struct perf_header *h __maybe_unused,
+		       struct perf_evlist *evlist __maybe_unused)
+{
+#ifndef CPUINFO_PROC
+#define CPUINFO_PROC {"model name", }
+#endif
+	const char *cpuinfo_procs[] = CPUINFO_PROC;
+	unsigned int i;
+
+	for (i = 0; i < ARRAY_SIZE(cpuinfo_procs); i++) {
+		int ret;
+		ret = __write_cpudesc(fd, cpuinfo_procs[i]);
+		if (ret >= 0)
+			return ret;
+	}
+	return -1;
+}
+
+
 static int write_nrcpus(int fd, struct perf_header *h __maybe_unused,
 			struct perf_evlist *evlist __maybe_unused)
 {
-- 
1.9.3


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

* [PATCH 03/10] perf tools: Fix report -F abort for data without branch info
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 01/10] perf callchain: Use global caching provided by libunwind Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 02/10] perf tools: Make CPUINFO_PROC an array to support different kernel versions Arnaldo Carvalho de Melo
@ 2014-10-29 12:56 ` Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 04/10] perf tools: Fix report -F in_tx " Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Andi Kleen, Corey Ashford, David Ahern,
	Frederic Weisbecker, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

The branch field sorting code assumes hist_entry::branch_info is
allocated, which is wrong and following perf session ends up with report
segfault.

  $ perf record ls
  $ perf report -F abort
  perf: Segmentation fault

Checking that hist_entry::branch_info is valid and display "N/A" string
in snprint callback if it's not.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
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/r/1413468427-31049-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 4906cd81cb56..82241fe54e4b 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -989,6 +989,9 @@ struct sort_entry sort_mem_dcacheline = {
 static int64_t
 sort__abort_cmp(struct hist_entry *left, struct hist_entry *right)
 {
+	if (!left->branch_info || !right->branch_info)
+		return cmp_null(left->branch_info, right->branch_info);
+
 	return left->branch_info->flags.abort !=
 		right->branch_info->flags.abort;
 }
@@ -996,10 +999,15 @@ sort__abort_cmp(struct hist_entry *left, struct hist_entry *right)
 static int hist_entry__abort_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
-	static const char *out = ".";
+	static const char *out = "N/A";
+
+	if (he->branch_info) {
+		if (he->branch_info->flags.abort)
+			out = "A";
+		else
+			out = ".";
+	}
 
-	if (he->branch_info->flags.abort)
-		out = "A";
 	return repsep_snprintf(bf, size, "%-*s", width, out);
 }
 
-- 
1.9.3


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

* [PATCH 04/10] perf tools: Fix report -F in_tx for data without branch info
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2014-10-29 12:56 ` [PATCH 03/10] perf tools: Fix report -F abort for data without branch info Arnaldo Carvalho de Melo
@ 2014-10-29 12:56 ` Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 05/10] perf tools: Fix report -F mispredict " Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Andi Kleen, Corey Ashford, David Ahern,
	Frederic Weisbecker, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

The branch field sorting code assumes hist_entry::branch_info is
allocated, which is wrong and following perf session ends up with report
segfault.

  $ perf record ls
  $ perf report -F in_tx
  perf: Segmentation fault

Checking that hist_entry::branch_info is valid and display "N/A" string
in snprint callback if it's not.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
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/r/1413468427-31049-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 82241fe54e4b..9bcdb57076b8 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -1021,6 +1021,9 @@ struct sort_entry sort_abort = {
 static int64_t
 sort__in_tx_cmp(struct hist_entry *left, struct hist_entry *right)
 {
+	if (!left->branch_info || !right->branch_info)
+		return cmp_null(left->branch_info, right->branch_info);
+
 	return left->branch_info->flags.in_tx !=
 		right->branch_info->flags.in_tx;
 }
@@ -1028,10 +1031,14 @@ sort__in_tx_cmp(struct hist_entry *left, struct hist_entry *right)
 static int hist_entry__in_tx_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
-	static const char *out = ".";
+	static const char *out = "N/A";
 
-	if (he->branch_info->flags.in_tx)
-		out = "T";
+	if (he->branch_info) {
+		if (he->branch_info->flags.in_tx)
+			out = "T";
+		else
+			out = ".";
+	}
 
 	return repsep_snprintf(bf, size, "%-*s", width, out);
 }
-- 
1.9.3


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

* [PATCH 05/10] perf tools: Fix report -F mispredict for data without branch info
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2014-10-29 12:56 ` [PATCH 04/10] perf tools: Fix report -F in_tx " Arnaldo Carvalho de Melo
@ 2014-10-29 12:56 ` Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 06/10] perf tools: Fix report -F symbol_to " Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Andi Kleen, Corey Ashford, David Ahern,
	Frederic Weisbecker, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

The branch field sorting code assumes hist_entry::branch_info is
allocated, which is wrong and following perf session ends up with report
segfault.

  $ perf record ls
  $ perf report -F mispredict
  perf: Segmentation fault

Checking that hist_entry::branch_info is valid and display "N/A" string
in snprint callback if it's not.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
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/r/1413468427-31049-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 9bcdb57076b8..0c68af83e7dd 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -471,11 +471,13 @@ struct sort_entry sort_sym_to = {
 static int64_t
 sort__mispredict_cmp(struct hist_entry *left, struct hist_entry *right)
 {
-	const unsigned char mp = left->branch_info->flags.mispred !=
-					right->branch_info->flags.mispred;
-	const unsigned char p = left->branch_info->flags.predicted !=
-					right->branch_info->flags.predicted;
+	unsigned char mp, p;
 
+	if (!left->branch_info || !right->branch_info)
+		return cmp_null(left->branch_info, right->branch_info);
+
+	mp = left->branch_info->flags.mispred != right->branch_info->flags.mispred;
+	p  = left->branch_info->flags.predicted != right->branch_info->flags.predicted;
 	return mp || p;
 }
 
@@ -483,10 +485,12 @@ static int hist_entry__mispredict_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width){
 	static const char *out = "N/A";
 
-	if (he->branch_info->flags.predicted)
-		out = "N";
-	else if (he->branch_info->flags.mispred)
-		out = "Y";
+	if (he->branch_info) {
+		if (he->branch_info->flags.predicted)
+			out = "N";
+		else if (he->branch_info->flags.mispred)
+			out = "Y";
+	}
 
 	return repsep_snprintf(bf, size, "%-*.*s", width, width, out);
 }
-- 
1.9.3


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

* [PATCH 06/10] perf tools: Fix report -F symbol_to for data without branch info
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2014-10-29 12:56 ` [PATCH 05/10] perf tools: Fix report -F mispredict " Arnaldo Carvalho de Melo
@ 2014-10-29 12:56 ` Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 07/10] perf tools: Fix report -F symbol_from " Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Andi Kleen, Corey Ashford, David Ahern,
	Frederic Weisbecker, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

The branch field sorting code assumes hist_entry::branch_info is
allocated, which is wrong and following perf session ends up with report
segfault.

  $ perf record ls
  $ perf report -F symbol_to
  perf: Segmentation fault

Checking that hist_entry::branch_info is valid and display "N/A" string
in snprint callback if it's not.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
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/r/1413468427-31049-5-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 0c68af83e7dd..57047c0a247c 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -413,8 +413,13 @@ sort__sym_from_cmp(struct hist_entry *left, struct hist_entry *right)
 static int64_t
 sort__sym_to_cmp(struct hist_entry *left, struct hist_entry *right)
 {
-	struct addr_map_symbol *to_l = &left->branch_info->to;
-	struct addr_map_symbol *to_r = &right->branch_info->to;
+	struct addr_map_symbol *to_l, *to_r;
+
+	if (!left->branch_info || !right->branch_info)
+		return cmp_null(left->branch_info, right->branch_info);
+
+	to_l = &left->branch_info->to;
+	to_r = &right->branch_info->to;
 
 	if (!to_l->sym && !to_r->sym)
 		return _sort__addr_cmp(to_l->addr, to_r->addr);
@@ -434,10 +439,14 @@ static int hist_entry__sym_from_snprintf(struct hist_entry *he, char *bf,
 static int hist_entry__sym_to_snprintf(struct hist_entry *he, char *bf,
 				       size_t size, unsigned int width)
 {
-	struct addr_map_symbol *to = &he->branch_info->to;
-	return _hist_entry__sym_snprintf(to->map, to->sym, to->addr,
-					 he->level, bf, size, width);
+	if (he->branch_info) {
+		struct addr_map_symbol *to = &he->branch_info->to;
+
+		return _hist_entry__sym_snprintf(to->map, to->sym, to->addr,
+						 he->level, bf, size, width);
+	}
 
+	return repsep_snprintf(bf, size, "%-*.*s", width, width, "N/A");
 }
 
 struct sort_entry sort_dso_from = {
-- 
1.9.3


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

* [PATCH 07/10] perf tools: Fix report -F symbol_from for data without branch info
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2014-10-29 12:56 ` [PATCH 06/10] perf tools: Fix report -F symbol_to " Arnaldo Carvalho de Melo
@ 2014-10-29 12:56 ` Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 08/10] perf tools: Fix report -F dso_to " Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Andi Kleen, Corey Ashford, David Ahern,
	Frederic Weisbecker, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

The branch field sorting code assumes hist_entry::branch_info is
allocated, which is wrong and following perf session ends up with report
segfault.

  $ perf record ls
  $ perf report -F symbol_from
  perf: Segmentation fault

Checking that hist_entry::branch_info is valid and display "N/A" string
in snprint callback if it's not.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
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/r/1413468427-31049-6-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 57047c0a247c..fc4ff2a96616 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -404,6 +404,12 @@ sort__sym_from_cmp(struct hist_entry *left, struct hist_entry *right)
 	struct addr_map_symbol *from_l = &left->branch_info->from;
 	struct addr_map_symbol *from_r = &right->branch_info->from;
 
+	if (!left->branch_info || !right->branch_info)
+		return cmp_null(left->branch_info, right->branch_info);
+
+	from_l = &left->branch_info->from;
+	from_r = &right->branch_info->from;
+
 	if (!from_l->sym && !from_r->sym)
 		return _sort__addr_cmp(from_l->addr, from_r->addr);
 
@@ -430,10 +436,14 @@ sort__sym_to_cmp(struct hist_entry *left, struct hist_entry *right)
 static int hist_entry__sym_from_snprintf(struct hist_entry *he, char *bf,
 					 size_t size, unsigned int width)
 {
-	struct addr_map_symbol *from = &he->branch_info->from;
-	return _hist_entry__sym_snprintf(from->map, from->sym, from->addr,
-					 he->level, bf, size, width);
+	if (he->branch_info) {
+		struct addr_map_symbol *from = &he->branch_info->from;
 
+		return _hist_entry__sym_snprintf(from->map, from->sym, from->addr,
+						 he->level, bf, size, width);
+	}
+
+	return repsep_snprintf(bf, size, "%-*.*s", width, width, "N/A");
 }
 
 static int hist_entry__sym_to_snprintf(struct hist_entry *he, char *bf,
-- 
1.9.3


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

* [PATCH 08/10] perf tools: Fix report -F dso_to for data without branch info
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2014-10-29 12:56 ` [PATCH 07/10] perf tools: Fix report -F symbol_from " Arnaldo Carvalho de Melo
@ 2014-10-29 12:56 ` Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 09/10] perf tools: Fix report -F dso_from " Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Andi Kleen, Corey Ashford, David Ahern,
	Frederic Weisbecker, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

The branch field sorting code assumes hist_entry::branch_info is
allocated, which is wrong and following perf session ends up with report
segfault.

  $ perf record ls
  $ perf report -F dso_to
  perf: Segmentation fault

Checking that hist_entry::branch_info is valid and display "N/A" string
in snprint callback if it's not.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
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/r/1413468427-31049-7-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index fc4ff2a96616..7a9054a23c36 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -387,6 +387,9 @@ static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf,
 static int64_t
 sort__dso_to_cmp(struct hist_entry *left, struct hist_entry *right)
 {
+	if (!left->branch_info || !right->branch_info)
+		return cmp_null(left->branch_info, right->branch_info);
+
 	return _sort__dso_cmp(left->branch_info->to.map,
 			      right->branch_info->to.map);
 }
@@ -394,8 +397,11 @@ sort__dso_to_cmp(struct hist_entry *left, struct hist_entry *right)
 static int hist_entry__dso_to_snprintf(struct hist_entry *he, char *bf,
 				       size_t size, unsigned int width)
 {
-	return _hist_entry__dso_snprintf(he->branch_info->to.map,
-					 bf, size, width);
+	if (he->branch_info)
+		return _hist_entry__dso_snprintf(he->branch_info->to.map,
+						 bf, size, width);
+	else
+		return repsep_snprintf(bf, size, "%-*.*s", width, width, "N/A");
 }
 
 static int64_t
-- 
1.9.3


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

* [PATCH 09/10] perf tools: Fix report -F dso_from for data without branch info
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2014-10-29 12:56 ` [PATCH 08/10] perf tools: Fix report -F dso_to " Arnaldo Carvalho de Melo
@ 2014-10-29 12:56 ` Arnaldo Carvalho de Melo
  2014-10-29 12:56 ` [PATCH 10/10] perf probe: Trivial typo fix for --demangle Arnaldo Carvalho de Melo
  2014-10-30  6:34 ` [GIT PULL 00/10] perf/urgent fixes Ingo Molnar
  10 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Andi Kleen, Corey Ashford, David Ahern,
	Frederic Weisbecker, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

The branch field sorting code assumes hist_entry::branch_info is
allocated, which is wrong and following perf session ends up with report
segfault.

  $ perf record ls
  $ perf report -F dso_from
  perf: Segmentation fault

Checking that hist_entry::branch_info is valid and display "N/A" string
in snprint callback if it's not.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
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/r/1413468427-31049-8-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 7a9054a23c36..9402885a77f3 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -373,6 +373,9 @@ struct sort_entry sort_cpu = {
 static int64_t
 sort__dso_from_cmp(struct hist_entry *left, struct hist_entry *right)
 {
+	if (!left->branch_info || !right->branch_info)
+		return cmp_null(left->branch_info, right->branch_info);
+
 	return _sort__dso_cmp(left->branch_info->from.map,
 			      right->branch_info->from.map);
 }
@@ -380,8 +383,11 @@ sort__dso_from_cmp(struct hist_entry *left, struct hist_entry *right)
 static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
-	return _hist_entry__dso_snprintf(he->branch_info->from.map,
-					 bf, size, width);
+	if (he->branch_info)
+		return _hist_entry__dso_snprintf(he->branch_info->from.map,
+						 bf, size, width);
+	else
+		return repsep_snprintf(bf, size, "%-*.*s", width, width, "N/A");
 }
 
 static int64_t
-- 
1.9.3


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

* [PATCH 10/10] perf probe: Trivial typo fix for --demangle
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2014-10-29 12:56 ` [PATCH 09/10] perf tools: Fix report -F dso_from " Arnaldo Carvalho de Melo
@ 2014-10-29 12:56 ` Arnaldo Carvalho de Melo
  2014-10-30  6:34 ` [GIT PULL 00/10] perf/urgent fixes Ingo Molnar
  10 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-10-29 12:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Hemant Kumar, Namhyung Kim,
	Peter Zijlstra, Srikar Dronamraju, Arnaldo Carvalho de Melo

From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Replace "Disable" with "Enable", since --demangle option enables symbol
demangling, not disable it.

perf probe has --demangle and --no-demangle options, but the
command-line help (--help) shows only --demangle option. So it should
explain about --demangle.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20141027203124.21219.68278.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-probe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 04412b4770a2..7af26acf06d9 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -375,7 +375,7 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
 	OPT_CALLBACK('x', "exec", NULL, "executable|path",
 			"target executable name or path", opt_set_target),
 	OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle,
-		    "Disable symbol demangling"),
+		    "Enable symbol demangling"),
 	OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel,
 		    "Enable kernel symbol demangling"),
 	OPT_END()
-- 
1.9.3


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

* Re: [GIT PULL 00/10] perf/urgent fixes
  2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2014-10-29 12:56 ` [PATCH 10/10] perf probe: Trivial typo fix for --demangle Arnaldo Carvalho de Melo
@ 2014-10-30  6:34 ` Ingo Molnar
  10 siblings, 0 replies; 18+ messages in thread
From: Ingo Molnar @ 2014-10-30  6:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Andi Kleen, Arun Sharma, Corey Ashford, David Ahern,
	Frederic Weisbecker, Hemant Kumar, Jean Pihet, Jiri Olsa,
	Li Zefan, Masami Hiramatsu, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Srikar Dronamraju, 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 1776b10627e486dd431fe72d8d47e5a865cf65d1:
> 
>   perf/x86/intel: Revert incomplete and undocumented Broadwell client support (2014-10-29 11:07:58 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to 4cdcc33db2f0455f297b4e14e434ba311ec5ca06:
> 
>   perf probe: Trivial typo fix for --demangle (2014-10-29 10:30:18 -0200)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> User visible:
> 
> * Fix report -F (abort, in_tx, mispredict, etc) segfaults for sample.data files
>   without branch info (Jiri Olsa)
> 
> * Add patch that should have went in a previous patchkit to use global cache
>   provided by libunwind (Namhyung Kim)
> 
> * Make CPUINFO_PROC an array to support different kernels, problem
>   detected when the information reported via /proc/cpuinfo changed on ARM (Wang Nan)
> 
> * 'perf probe' --demangle typo fix and a new --quiet option (Masami Hiramatsu)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Jiri Olsa (7):
>       perf tools: Fix report -F abort for data without branch info
>       perf tools: Fix report -F in_tx for data without branch info
>       perf tools: Fix report -F mispredict for data without branch info
>       perf tools: Fix report -F symbol_to for data without branch info
>       perf tools: Fix report -F symbol_from for data without branch info
>       perf tools: Fix report -F dso_to for data without branch info
>       perf tools: Fix report -F dso_from for data without branch info
> 
> Masami Hiramatsu (1):
>       perf probe: Trivial typo fix for --demangle
> 
> Namhyung Kim (1):
>       perf callchain: Use global caching provided by libunwind
> 
> Wang Nan (1):
>       perf tools: Make CPUINFO_PROC an array to support different kernel versions
> 
>  tools/perf/builtin-probe.c         |   2 +-
>  tools/perf/perf-sys.h              |  30 +++++------
>  tools/perf/util/header.c           |  27 +++++++---
>  tools/perf/util/sort.c             | 102 +++++++++++++++++++++++++++----------
>  tools/perf/util/thread.c           |   3 ++
>  tools/perf/util/unwind-libunwind.c |  12 +++++
>  tools/perf/util/unwind.h           |   3 ++
>  7 files changed, 131 insertions(+), 48 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/urgent fixes
@ 2015-01-16 21:22 Arnaldo Carvalho de Melo
  2015-01-17 10:06 ` Ingo Molnar
  0 siblings, 1 reply; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-16 21:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexey Brodkin, Borislav Petkov, Cody P Schafer, David Ahern,
	Don Zickus, Frederic Weisbecker, Jan Beulich, Jiri Olsa, Li Zefan,
	Masami Hiramatsu, Michael Ellerman, Mike Galbraith, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Sukadev Bhattiprolu, Vineet Gupta, Wang Nan,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 33636732dcd7cc738a5913bb730d663c6b03c8fb:

  perf/x86/intel: Fix bug for "cycles:p" and "cycles:pp" on SLM (2015-01-16 09:06:59 +0100)

are available in the git repository at:

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

for you to fetch changes up to 6bcf9c1ff3ec22fd81eba336737d9865476509b1:

  perf tools powerpc: Use dwfl_report_elf() instead of offline. (2015-01-16 17:49:30 -0300)

----------------------------------------------------------------
perf/urgent fixes:

User visible:

- Fix segfault when using both the map symtab viewer and annotation
  in the TUI (Namhyung Kim).

Developer stuff:

- uClibc build fixes (Alexey Brodkin, Vineet Gupta).

- bitops/hweight were moved from tools/perf/ too tools/include, move
  some leftovers (Arnaldo Carvalho de Melo)

- Fix dwarf unwind x86_64 build error (Namhyung Kim)

- Fix __machine__findnew_thread() error path (Namhyung Kim)

- Propagate error code when write(2) failed in 'perf probe' (Namhyung Kim)

- Use dwfl_report_elf() instead of offline in powerpc bits to
  properly handle non prelinked DSOs (Sukadev Bhattiprolu).

- Fix dwarf unwind using libunwind in 'perf test' (Wang Nan)

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

----------------------------------------------------------------
Alexey Brodkin (1):
      perf tools: Fix statfs.f_type data type mismatch build error with uclibc

Arnaldo Carvalho de Melo (1):
      tools: Remove bitops/hweight usage of bits in tools/perf

Namhyung Kim (4):
      perf probe: Propagate error code when write(2) failed
      perf tools: Fix building error in x86_64 when dwarf unwind is on
      perf machine: Fix __machine__findnew_thread() error path
      perf tools: Fix segfault for symbol annotation on TUI

Sukadev Bhattiprolu (1):
      perf tools powerpc: Use dwfl_report_elf() instead of offline.

Vineet Gupta (2):
      perf tools: Elide strlcpy warning with uclibc
      perf tools: Avoid build splat for syscall numbers with uclibc

Wang Nan (1):
      perf test: Fix dwarf unwind using libunwind.

 tools/include/asm-generic/bitops.h                |  2 ++
 tools/include/asm-generic/bitops/arch_hweight.h   |  1 +
 tools/include/asm-generic/bitops/const_hweight.h  |  1 +
 tools/include/asm-generic/bitops/hweight.h        |  7 +++++
 tools/include/linux/bitops.h                      |  7 ++++-
 tools/lib/api/fs/debugfs.c                        |  2 +-
 tools/lib/api/fs/fs.c                             |  2 +-
 tools/perf/MANIFEST                               |  6 ++++
 tools/perf/Makefile.perf                          | 11 +++++--
 tools/perf/arch/powerpc/util/skip-callchain-idx.c | 19 +++++++-----
 tools/perf/bench/sched-pipe.c                     |  2 +-
 tools/perf/builtin-top.c                          |  1 -
 tools/perf/config/Makefile                        |  2 +-
 tools/perf/config/Makefile.arch                   | 26 ++++++++--------
 tools/perf/perf-sys.h                             |  1 -
 tools/perf/tests/dwarf-unwind.c                   | 36 +++++++++++++++++++++--
 tools/perf/util/annotate.h                        |  8 +----
 tools/perf/util/cache.h                           |  2 ++
 tools/perf/util/hweight.c                         | 31 -------------------
 tools/perf/util/include/asm/hweight.h             |  8 -----
 tools/perf/util/machine.c                         |  4 ++-
 tools/perf/util/probe-event.c                     |  4 ++-
 tools/perf/util/python-ext-sources                |  2 +-
 tools/perf/util/unwind-libunwind.c                | 28 +++++++++++++++++-
 24 files changed, 131 insertions(+), 82 deletions(-)
 create mode 100644 tools/include/asm-generic/bitops/arch_hweight.h
 create mode 100644 tools/include/asm-generic/bitops/const_hweight.h
 create mode 100644 tools/include/asm-generic/bitops/hweight.h
 delete mode 100644 tools/perf/util/hweight.c
 delete mode 100644 tools/perf/util/include/asm/hweight.h

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

* Re: [GIT PULL 00/10] perf/urgent fixes
  2015-01-16 21:22 Arnaldo Carvalho de Melo
@ 2015-01-17 10:06 ` Ingo Molnar
  0 siblings, 0 replies; 18+ messages in thread
From: Ingo Molnar @ 2015-01-17 10:06 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexey Brodkin, Borislav Petkov,
	Cody P Schafer, David Ahern, Don Zickus, Frederic Weisbecker,
	Jan Beulich, Jiri Olsa, Li Zefan, Masami Hiramatsu,
	Michael Ellerman, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Sukadev Bhattiprolu,
	Vineet Gupta, 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 33636732dcd7cc738a5913bb730d663c6b03c8fb:
> 
>   perf/x86/intel: Fix bug for "cycles:p" and "cycles:pp" on SLM (2015-01-16 09:06:59 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to 6bcf9c1ff3ec22fd81eba336737d9865476509b1:
> 
>   perf tools powerpc: Use dwfl_report_elf() instead of offline. (2015-01-16 17:49:30 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> User visible:
> 
> - Fix segfault when using both the map symtab viewer and annotation
>   in the TUI (Namhyung Kim).
> 
> Developer stuff:
> 
> - uClibc build fixes (Alexey Brodkin, Vineet Gupta).
> 
> - bitops/hweight were moved from tools/perf/ too tools/include, move
>   some leftovers (Arnaldo Carvalho de Melo)
> 
> - Fix dwarf unwind x86_64 build error (Namhyung Kim)
> 
> - Fix __machine__findnew_thread() error path (Namhyung Kim)
> 
> - Propagate error code when write(2) failed in 'perf probe' (Namhyung Kim)
> 
> - Use dwfl_report_elf() instead of offline in powerpc bits to
>   properly handle non prelinked DSOs (Sukadev Bhattiprolu).
> 
> - Fix dwarf unwind using libunwind in 'perf test' (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Alexey Brodkin (1):
>       perf tools: Fix statfs.f_type data type mismatch build error with uclibc
> 
> Arnaldo Carvalho de Melo (1):
>       tools: Remove bitops/hweight usage of bits in tools/perf
> 
> Namhyung Kim (4):
>       perf probe: Propagate error code when write(2) failed
>       perf tools: Fix building error in x86_64 when dwarf unwind is on
>       perf machine: Fix __machine__findnew_thread() error path
>       perf tools: Fix segfault for symbol annotation on TUI
> 
> Sukadev Bhattiprolu (1):
>       perf tools powerpc: Use dwfl_report_elf() instead of offline.
> 
> Vineet Gupta (2):
>       perf tools: Elide strlcpy warning with uclibc
>       perf tools: Avoid build splat for syscall numbers with uclibc
> 
> Wang Nan (1):
>       perf test: Fix dwarf unwind using libunwind.
> 
>  tools/include/asm-generic/bitops.h                |  2 ++
>  tools/include/asm-generic/bitops/arch_hweight.h   |  1 +
>  tools/include/asm-generic/bitops/const_hweight.h  |  1 +
>  tools/include/asm-generic/bitops/hweight.h        |  7 +++++
>  tools/include/linux/bitops.h                      |  7 ++++-
>  tools/lib/api/fs/debugfs.c                        |  2 +-
>  tools/lib/api/fs/fs.c                             |  2 +-
>  tools/perf/MANIFEST                               |  6 ++++
>  tools/perf/Makefile.perf                          | 11 +++++--
>  tools/perf/arch/powerpc/util/skip-callchain-idx.c | 19 +++++++-----
>  tools/perf/bench/sched-pipe.c                     |  2 +-
>  tools/perf/builtin-top.c                          |  1 -
>  tools/perf/config/Makefile                        |  2 +-
>  tools/perf/config/Makefile.arch                   | 26 ++++++++--------
>  tools/perf/perf-sys.h                             |  1 -
>  tools/perf/tests/dwarf-unwind.c                   | 36 +++++++++++++++++++++--
>  tools/perf/util/annotate.h                        |  8 +----
>  tools/perf/util/cache.h                           |  2 ++
>  tools/perf/util/hweight.c                         | 31 -------------------
>  tools/perf/util/include/asm/hweight.h             |  8 -----
>  tools/perf/util/machine.c                         |  4 ++-
>  tools/perf/util/probe-event.c                     |  4 ++-
>  tools/perf/util/python-ext-sources                |  2 +-
>  tools/perf/util/unwind-libunwind.c                | 28 +++++++++++++++++-
>  24 files changed, 131 insertions(+), 82 deletions(-)
>  create mode 100644 tools/include/asm-generic/bitops/arch_hweight.h
>  create mode 100644 tools/include/asm-generic/bitops/const_hweight.h
>  create mode 100644 tools/include/asm-generic/bitops/hweight.h
>  delete mode 100644 tools/perf/util/hweight.c
>  delete mode 100644 tools/perf/util/include/asm/hweight.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/urgent fixes
@ 2016-05-12 20:03 Arnaldo Carvalho de Melo
  2016-05-13  5:36 ` Ingo Molnar
  0 siblings, 1 reply; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-05-12 20:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andy Lutomirski, David Ahern, Jiri Olsa, Kees Cook,
	Linus Torvalds, Masami Hiramatsu, Namhyung Kim, Peter Zijlstra,
	Steven Rostedt, Vinson Lee, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, test built on:

alldeps-fedora-rawhide: Ok
alldeps-ubuntu-14.04: Ok
alldeps-ubuntu-16.04: Ok
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

- Arnaldo

The following changes since commit 9f448cd3cbcec8995935e60b27802ae56aac8cc0:

  perf/core: Disable the event on a truncated AUX record (2016-05-12 14:46:11 +0200)

are available in the git repository at:

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

for you to fetch changes up to 42ef8a78c1f49f53f29f0f3a6f9a5bcbc653233e:

  perf stat: Fallback to user only counters when perf_event_paranoid > 1 (2016-05-12 16:25:18 -0300)

----------------------------------------------------------------
perf/urgent fixes:

User visible:

- Fallback to usermode only counters when perf_event_paranoid > 1, which
  is the case now (Arnaldo Carvalho de Melo)

- Do not reassign parg after collapse_tree() in libtraceevent, which
  may cause tool crashes (Steven Rostedt)

Build fixes:

- Fix the build on Fedora Rawhide, where readdir_r() is deprecated and
  also wrt -Werror=unused-const-variable= + x86_32_regoffset_table on
  !x86_64 (Arnaldo Carvalho de Melo)

- Fix the build on Ubuntu 12.04.5, where dwarf_getlocations() isn't
  available, i.e. libdw-dev < 0.157 (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (9):
      perf tools: Use readdir() instead of deprecated readdir_r()
      perf script: Use readdir() instead of deprecated readdir_r()
      perf thread_map: Use readdir() instead of deprecated readdir_r()
      perf tools: Use readdir() instead of deprecated readdir_r()
      perf dwarf: Guard !x86_64 definitions under #ifdef else clause
      perf probe: Check if dwarf_getlocations() is available
      perf evsel: Improve EPERM error handling in open_strerror()
      perf evsel: Handle EACCESS + perf_event_paranoid=2 in fallback()
      perf stat: Fallback to user only counters when perf_event_paranoid > 1

Steven Rostedt (1):
      tools lib traceevent: Do not reassign parg after collapse_tree()

 tools/build/Makefile.feature                  |  2 +
 tools/build/feature/Makefile                  |  4 ++
 tools/build/feature/test-all.c                |  5 ++
 tools/build/feature/test-dwarf_getlocations.c | 12 +++++
 tools/lib/traceevent/parse-filter.c           |  4 +-
 tools/perf/arch/x86/util/dwarf-regs.c         |  8 +--
 tools/perf/builtin-script.c                   | 70 +++++++++++++--------------
 tools/perf/builtin-stat.c                     |  7 ++-
 tools/perf/config/Makefile                    |  6 +++
 tools/perf/util/dwarf-aux.c                   |  9 ++++
 tools/perf/util/event.c                       | 12 ++---
 tools/perf/util/evsel.c                       | 23 ++++++++-
 tools/perf/util/parse-events.c                | 60 +++++++++++------------
 tools/perf/util/thread_map.c                  |  8 +--
 14 files changed, 145 insertions(+), 85 deletions(-)
 create mode 100644 tools/build/feature/test-dwarf_getlocations.c

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

* Re: [GIT PULL 00/10] perf/urgent fixes
  2016-05-12 20:03 Arnaldo Carvalho de Melo
@ 2016-05-13  5:36 ` Ingo Molnar
  0 siblings, 0 replies; 18+ messages in thread
From: Ingo Molnar @ 2016-05-13  5:36 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andy Lutomirski, David Ahern,
	Jiri Olsa, Kees Cook, Linus Torvalds, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, Steven Rostedt, Vinson Lee,
	Wang Nan, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling, test built on:
> 
> alldeps-fedora-rawhide: Ok
> alldeps-ubuntu-14.04: Ok
> alldeps-ubuntu-16.04: Ok
> 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
> 
> - Arnaldo
> 
> The following changes since commit 9f448cd3cbcec8995935e60b27802ae56aac8cc0:
> 
>   perf/core: Disable the event on a truncated AUX record (2016-05-12 14:46:11 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-20160512
> 
> for you to fetch changes up to 42ef8a78c1f49f53f29f0f3a6f9a5bcbc653233e:
> 
>   perf stat: Fallback to user only counters when perf_event_paranoid > 1 (2016-05-12 16:25:18 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> User visible:
> 
> - Fallback to usermode only counters when perf_event_paranoid > 1, which
>   is the case now (Arnaldo Carvalho de Melo)
> 
> - Do not reassign parg after collapse_tree() in libtraceevent, which
>   may cause tool crashes (Steven Rostedt)
> 
> Build fixes:
> 
> - Fix the build on Fedora Rawhide, where readdir_r() is deprecated and
>   also wrt -Werror=unused-const-variable= + x86_32_regoffset_table on
>   !x86_64 (Arnaldo Carvalho de Melo)
> 
> - Fix the build on Ubuntu 12.04.5, where dwarf_getlocations() isn't
>   available, i.e. libdw-dev < 0.157 (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (9):
>       perf tools: Use readdir() instead of deprecated readdir_r()
>       perf script: Use readdir() instead of deprecated readdir_r()
>       perf thread_map: Use readdir() instead of deprecated readdir_r()
>       perf tools: Use readdir() instead of deprecated readdir_r()
>       perf dwarf: Guard !x86_64 definitions under #ifdef else clause
>       perf probe: Check if dwarf_getlocations() is available
>       perf evsel: Improve EPERM error handling in open_strerror()
>       perf evsel: Handle EACCESS + perf_event_paranoid=2 in fallback()
>       perf stat: Fallback to user only counters when perf_event_paranoid > 1
> 
> Steven Rostedt (1):
>       tools lib traceevent: Do not reassign parg after collapse_tree()
> 
>  tools/build/Makefile.feature                  |  2 +
>  tools/build/feature/Makefile                  |  4 ++
>  tools/build/feature/test-all.c                |  5 ++
>  tools/build/feature/test-dwarf_getlocations.c | 12 +++++
>  tools/lib/traceevent/parse-filter.c           |  4 +-
>  tools/perf/arch/x86/util/dwarf-regs.c         |  8 +--
>  tools/perf/builtin-script.c                   | 70 +++++++++++++--------------
>  tools/perf/builtin-stat.c                     |  7 ++-
>  tools/perf/config/Makefile                    |  6 +++
>  tools/perf/util/dwarf-aux.c                   |  9 ++++
>  tools/perf/util/event.c                       | 12 ++---
>  tools/perf/util/evsel.c                       | 23 ++++++++-
>  tools/perf/util/parse-events.c                | 60 +++++++++++------------
>  tools/perf/util/thread_map.c                  |  8 +--
>  14 files changed, 145 insertions(+), 85 deletions(-)
>  create mode 100644 tools/build/feature/test-dwarf_getlocations.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/urgent fixes
@ 2018-02-05 19:56 Arnaldo Carvalho de Melo
  2018-02-05 21:28 ` Ingo Molnar
  0 siblings, 1 reply; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-02-05 19:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Andi Kleen,
	Christian Borntraeger, Dave Hansen, David Ahern, David Woodhouse,
	Fenghua Yu, Hendrik Brueckner, Jiri Olsa, Juri Lelli, Kan Liang,
	Maciej S . Szmigiero, Namhyung Kim, Paolo Bonzini, Paul Mackerras,
	Peter Zijlstra, Radim Krčmář, Ravi Bangoria,
	Stephane Eranian, Takashi Iwai, Thomas Gleixner, Thomas Richter,
	Wang Nan

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit 72906f38934a49faf4d2d38ea9ae32adcf7d5d0c:

  Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2018-01-30 13:04:50 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-4.16-20180205

for you to fetch changes up to 2fe2230d4183d2c311bbb7b426491ac486216a16:

  perf tools: Add trace/beauty/generated/ into .gitignore (2018-02-05 13:58:02 -0300)

----------------------------------------------------------------
perf/urgent fixes:

- 'period' and 'freq' handling fixes for 'perf record', also
  related: add Add PERF_SAMPLE_PERIOD into PEBS_FREERUNNING_FLAGS
  in the x86 perf kernel driver (Jiri Olsa)

- Fix 'perf trace -i perf.data' callgraph handling (Ravi Bangoria)

- Synchronize tooling headers for asound, s390 and powerpc KVM,
  sched and x86 features (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (5):
      tools headers: Synchronize sound/asound.h
      tooling headers: Synchronize updated s390 kvm UAPI headers
      tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h
      tools headers: Synchronize uapi/linux/sched.h
      tools headers: Synchoronize x86 features UAPI headers

Jiri Olsa (3):
      perf evsel: Fix period/freq terms setup
      perf record: Fix period option handling
      x86/events/intel/ds: Add PERF_SAMPLE_PERIOD into PEBS_FREERUNNING_FLAGS

Ravi Bangoria (2):
      perf trace: Fix call-graph output
      perf tools: Add trace/beauty/generated/ into .gitignore

 arch/x86/events/perf_event.h                   |  3 ++-
 tools/arch/powerpc/include/uapi/asm/kvm.h      | 25 +++++++++++++++++++++++++
 tools/arch/s390/include/uapi/asm/kvm.h         |  5 ++++-
 tools/arch/x86/include/asm/cpufeatures.h       | 24 ++++++++++++++++++++----
 tools/arch/x86/include/asm/disabled-features.h |  3 ++-
 tools/arch/x86/include/asm/required-features.h |  3 ++-
 tools/include/uapi/linux/kvm.h                 |  4 ++++
 tools/include/uapi/linux/sched.h               |  5 +++++
 tools/include/uapi/sound/asound.h              |  9 +++++++++
 tools/perf/.gitignore                          |  1 +
 tools/perf/builtin-record.c                    |  3 ++-
 tools/perf/builtin-trace.c                     |  5 ++++-
 tools/perf/perf.h                              |  1 +
 tools/perf/util/evsel.c                        | 13 ++++++++++---
 14 files changed, 91 insertions(+), 13 deletions(-)

Test results:

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

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

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

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

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

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

  # uname -a
  Linux jouet 4.15.0-rc9+ #7 SMP Mon Jan 22 18:16:36 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
  # perf test
   1: vmlinux symtab matches kallsyms                       : Ok
   2: Detect openat syscall event                           : Ok
   3: Detect openat syscall event on all cpus               : Ok
   4: Read samples using the mmap interface                 : Ok
   5: Test data source output                               : Ok
   6: Parse event definition strings                        : Ok
   7: Simple expression parser                              : Ok
   8: PERF_RECORD_* events & perf_sample fields             : Ok
   9: Parse perf pmu format                                 : Ok
  10: DSO data read                                         : Ok
  11: DSO data cache                                        : Ok
  12: DSO data reopen                                       : Ok
  13: Roundtrip evsel->name                                 : Ok
  14: Parse sched tracepoints fields                        : Ok
  15: syscalls:sys_enter_openat event fields                : Ok
  16: Setup struct perf_event_attr                          : Ok
  17: Match and link multiple hists                         : Ok
  18: 'import perf' in python                               : Ok
  19: Breakpoint overflow signal handler                    : Ok
  20: Breakpoint overflow sampling                          : Ok
  21: 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: 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/perf/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
            make_no_libaudit_O: make NO_LIBAUDIT=1
            make_no_demangle_O: make NO_DEMANGLE=1
                 make_static_O: make LDFLAGS=-static
         make_install_prefix_O: make install prefix=/tmp/krava
                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_help_O: make help
         make_with_clangllvm_O: make LIBCLANGLLVM=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
                    make_doc_O: make doc
           make_no_libunwind_O: make NO_LIBUNWIND=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
           make_no_libbionic_O: make NO_LIBBIONIC=1
              make_no_libelf_O: make NO_LIBELF=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
             make_util_map_o_O: make util/map.o
                make_install_O: make install
             make_no_libperl_O: make NO_LIBPERL=1
            make_install_bin_O: make install-bin
                 make_perf_o_O: make perf.o
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
               make_no_slang_O: make NO_SLANG=1
             make_no_libnuma_O: make NO_LIBNUMA=1
            make_no_auxtrace_O: make NO_AUXTRACE=1
           make_no_libpython_O: make NO_LIBPYTHON=1
                make_no_newt_O: make NO_NEWT=1
              make_clean_all_O: make clean all
              make_no_libbpf_O: make NO_LIBBPF=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
           make_no_backtrace_O: make NO_BACKTRACE=1
                  make_debug_O: make DEBUG=1
                   make_tags_O: make tags
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                   make_pure_O: make
                make_no_gtk2_O: make NO_GTK2=1
  OK
  make: Leaving directory '/home/acme/git/perf/tools/perf'
  $

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

* Re: [GIT PULL 00/10] perf/urgent fixes
  2018-02-05 19:56 Arnaldo Carvalho de Melo
@ 2018-02-05 21:28 ` Ingo Molnar
  0 siblings, 0 replies; 18+ messages in thread
From: Ingo Molnar @ 2018-02-05 21:28 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Andi Kleen,
	Christian Borntraeger, Dave Hansen, David Ahern, David Woodhouse,
	Fenghua Yu, Hendrik Brueckner, Jiri Olsa, Juri Lelli, Kan Liang,
	Maciej S . Szmigiero, Namhyung Kim, Paolo Bonzini, Paul Mackerras,
	Peter Zijlstra, Radim Krčmář, Ravi Bangoria,
	Stephane Eranian, Takashi Iwai, Thomas Gleixner, Thomas Richter,
	Wang Nan


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

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 72906f38934a49faf4d2d38ea9ae32adcf7d5d0c:
> 
>   Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2018-01-30 13:04:50 -0800)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-4.16-20180205
> 
> for you to fetch changes up to 2fe2230d4183d2c311bbb7b426491ac486216a16:
> 
>   perf tools: Add trace/beauty/generated/ into .gitignore (2018-02-05 13:58:02 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> - 'period' and 'freq' handling fixes for 'perf record', also
>   related: add Add PERF_SAMPLE_PERIOD into PEBS_FREERUNNING_FLAGS
>   in the x86 perf kernel driver (Jiri Olsa)
> 
> - Fix 'perf trace -i perf.data' callgraph handling (Ravi Bangoria)
> 
> - Synchronize tooling headers for asound, s390 and powerpc KVM,
>   sched and x86 features (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (5):
>       tools headers: Synchronize sound/asound.h
>       tooling headers: Synchronize updated s390 kvm UAPI headers
>       tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h
>       tools headers: Synchronize uapi/linux/sched.h
>       tools headers: Synchoronize x86 features UAPI headers
> 
> Jiri Olsa (3):
>       perf evsel: Fix period/freq terms setup
>       perf record: Fix period option handling
>       x86/events/intel/ds: Add PERF_SAMPLE_PERIOD into PEBS_FREERUNNING_FLAGS
> 
> Ravi Bangoria (2):
>       perf trace: Fix call-graph output
>       perf tools: Add trace/beauty/generated/ into .gitignore
> 
>  arch/x86/events/perf_event.h                   |  3 ++-
>  tools/arch/powerpc/include/uapi/asm/kvm.h      | 25 +++++++++++++++++++++++++
>  tools/arch/s390/include/uapi/asm/kvm.h         |  5 ++++-
>  tools/arch/x86/include/asm/cpufeatures.h       | 24 ++++++++++++++++++++----
>  tools/arch/x86/include/asm/disabled-features.h |  3 ++-
>  tools/arch/x86/include/asm/required-features.h |  3 ++-
>  tools/include/uapi/linux/kvm.h                 |  4 ++++
>  tools/include/uapi/linux/sched.h               |  5 +++++
>  tools/include/uapi/sound/asound.h              |  9 +++++++++
>  tools/perf/.gitignore                          |  1 +
>  tools/perf/builtin-record.c                    |  3 ++-
>  tools/perf/builtin-trace.c                     |  5 ++++-
>  tools/perf/perf.h                              |  1 +
>  tools/perf/util/evsel.c                        | 13 ++++++++++---
>  14 files changed, 91 insertions(+), 13 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

end of thread, other threads:[~2018-02-05 21:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-29 12:56 [GIT PULL 00/10] perf/urgent fixes Arnaldo Carvalho de Melo
2014-10-29 12:56 ` [PATCH 01/10] perf callchain: Use global caching provided by libunwind Arnaldo Carvalho de Melo
2014-10-29 12:56 ` [PATCH 02/10] perf tools: Make CPUINFO_PROC an array to support different kernel versions Arnaldo Carvalho de Melo
2014-10-29 12:56 ` [PATCH 03/10] perf tools: Fix report -F abort for data without branch info Arnaldo Carvalho de Melo
2014-10-29 12:56 ` [PATCH 04/10] perf tools: Fix report -F in_tx " Arnaldo Carvalho de Melo
2014-10-29 12:56 ` [PATCH 05/10] perf tools: Fix report -F mispredict " Arnaldo Carvalho de Melo
2014-10-29 12:56 ` [PATCH 06/10] perf tools: Fix report -F symbol_to " Arnaldo Carvalho de Melo
2014-10-29 12:56 ` [PATCH 07/10] perf tools: Fix report -F symbol_from " Arnaldo Carvalho de Melo
2014-10-29 12:56 ` [PATCH 08/10] perf tools: Fix report -F dso_to " Arnaldo Carvalho de Melo
2014-10-29 12:56 ` [PATCH 09/10] perf tools: Fix report -F dso_from " Arnaldo Carvalho de Melo
2014-10-29 12:56 ` [PATCH 10/10] perf probe: Trivial typo fix for --demangle Arnaldo Carvalho de Melo
2014-10-30  6:34 ` [GIT PULL 00/10] perf/urgent fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2015-01-16 21:22 Arnaldo Carvalho de Melo
2015-01-17 10:06 ` Ingo Molnar
2016-05-12 20:03 Arnaldo Carvalho de Melo
2016-05-13  5:36 ` Ingo Molnar
2018-02-05 19:56 Arnaldo Carvalho de Melo
2018-02-05 21: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).