linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 00/19] perf/core improvements and fixes
@ 2016-07-14  2:20 Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 01/19] tools: Fix up BITS_PER_LONG setting Arnaldo Carvalho de Melo
                   ` (19 more replies)
  0 siblings, 20 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Ananth N Mavinakayanahalli, Brendan Gregg,
	David Ahern, Hemant Kumar, Jiri Olsa, Josh Poimboeuf,
	Masami Hiramatsu, Namhyung Kim, Peter Zijlstra, pi3orama,
	Wang Nan, Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

I've added building objtool to most of the containers in my build test setup:

[root@jouet ~]# perf stat dm
alpine:3.4: Ok
centos:5: Ok
centos:6: Ok
centos:7: Ok
debian:7: Ok
debian:8: Ok
debian:experimental: Ok
fedora:21: Ok
fedora:22: Ok
fedora:23: Ok
fedora:24: Ok
fedora:rawhide: Ok
mageia:5: Ok
opensuse:13.2: Ok
opensuse:42.1: Ok
ubuntu:12.04.5: Ok
ubuntu:14.04.4: Ok
ubuntu:15.10: Ok
ubuntu:16.04: Ok

 Performance counter stats for 'dm':

       2601.121782      task-clock (msec)         #    0.002 CPUs utilized          
            86,368      context-switches          #    0.033 M/sec                  
             5,740      cpu-migrations            #    0.002 M/sec                  
            53,962      page-faults               #    0.021 M/sec                  
     7,217,605,183      cycles                    #    2.775 GHz                    
     6,534,540,119      instructions              #    0.91  insn per cycle         
     1,408,715,184      branches                  #  541.580 M/sec                  
        18,523,459      branch-misses             #    1.31% of all branches        

    1541.746171526 seconds time elapsed

[root@jouet ~]# 

- Arnaldo

The following changes since commit 7b39cafb7aa68ef8e32a9f51fbe737d96084ca74:

  tools: Work around BITS_PER_LONG related build failure in objtool (2016-07-13 09:37:43 +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-20160713

for you to fetch changes up to 8e5dc848356ecf6ea8d27d641c4d7ad8d42fe92b:

  perf test: Add a test case for SDT event (2016-07-13 23:09:10 -0300)

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

User visible:

- Finish merging initial SDT (Statically Defined Traces) support, see
  cset comments for details about how it all works (Masami Hiramatsu)

- Support attaching eBPF programs to tracepoints (Wang Nan)

Infrastructure:

- Fix up BITS_PER_LONG setting (Arnaldo Carvalho de Melo)

- Add fallback from ELF_C_READ_MMAP to ELF_C_READ in objtool, fixing
  the build in libelf implementations lacking that elf_begin() cmd,
  such as Alpine Linux's (Arnaldo Carvalho de Melo)

- Avoid checking code drift on busybox's diff in objtool (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
      tools: Fix up BITS_PER_LONG setting
      objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ
      objtool: Avoid checking code drift on busybox's diff

Masami Hiramatsu (11):
      perf probe: Fix to show correct error message for $vars and $params
      perf probe: Accept %sdt and %cached event name
      perf probe: Make --list show only available cached events
      perf probe-cache: Add for_each_probe_cache_entry() wrapper
      perf probe: Allow wildcard for cached events
      perf probe: Search SDT/cached event from all probe caches
      perf list: Show SDT and pre-cached events
      perf probe: Support @BUILDID or @FILE suffix for SDT events
      perf probe: Support a special SDT probe format
      perf build: Add sdt feature detection
      perf test: Add a test case for SDT event

Wang Nan (5):
      tools lib bpf: New API to adjust type of a BPF program
      tools lib bpf: Report error when kernel doesn't support program type
      perf event parser: Add const qualifier to evt_name and sys_name
      perf bpf: Rename bpf__foreach_tev() to bpf__foreach_event()
      perf bpf: Support BPF program attach to tracepoints

 tools/build/Makefile.feature            |   3 +-
 tools/build/feature/Makefile            |   6 +-
 tools/build/feature/test-all.c          |   5 +
 tools/build/feature/test-sdt.c          |   7 +
 tools/include/asm-generic/bitsperlong.h |  24 ++-
 tools/lib/bpf/libbpf.c                  |  80 +++++++--
 tools/lib/bpf/libbpf.h                  |  10 ++
 tools/objtool/Makefile                  |   5 +-
 tools/objtool/elf.c                     |   7 +
 tools/perf/Documentation/perf-probe.txt |  11 +-
 tools/perf/Makefile.perf                |   3 +
 tools/perf/builtin-list.c               |   6 +-
 tools/perf/builtin-probe.c              |   2 +-
 tools/perf/config/Makefile              |  10 ++
 tools/perf/tests/Build                  |   1 +
 tools/perf/tests/builtin-test.c         |   4 +
 tools/perf/tests/make                   |   3 +-
 tools/perf/tests/sdt.c                  | 115 ++++++++++++
 tools/perf/tests/tests.h                |   1 +
 tools/perf/util/bpf-loader.c            |  73 +++++++-
 tools/perf/util/bpf-loader.h            |  12 +-
 tools/perf/util/build-id.c              |  76 +++++++-
 tools/perf/util/build-id.h              |   3 +-
 tools/perf/util/parse-events.c          | 110 ++++++++++--
 tools/perf/util/parse-events.h          |   4 +-
 tools/perf/util/probe-event.c           | 309 +++++++++++++++++++++++++++-----
 tools/perf/util/probe-event.h           |   1 +
 tools/perf/util/probe-file.c            |  57 ++++--
 tools/perf/util/probe-file.h            |  14 ++
 29 files changed, 850 insertions(+), 112 deletions(-)
 create mode 100644 tools/build/feature/test-sdt.c
 create mode 100644 tools/perf/tests/sdt.c

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

* [PATCH 01/19] tools: Fix up BITS_PER_LONG setting
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 02/19] objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ Arnaldo Carvalho de Melo
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Namhyung Kim, Wang Nan

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

It was set based on CONFIG_64BIT, that is available only when using
Kconfig, which we're working towards but not to the point of having this
CONFIG variable set, so synthesize it from available compiler defined
defines, __SIZEOF_LONG__ or, lacking that, __WORDSIZE.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-og5fmkr17856lhupacihwxvb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/asm-generic/bitsperlong.h | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/tools/include/asm-generic/bitsperlong.h b/tools/include/asm-generic/bitsperlong.h
index d1d70aa19021..cfd661c6fc17 100644
--- a/tools/include/asm-generic/bitsperlong.h
+++ b/tools/include/asm-generic/bitsperlong.h
@@ -3,6 +3,24 @@
 
 #include <uapi/asm-generic/bitsperlong.h>
 
+/*
+ * In the kernel, where this file comes from, we can rely on CONFIG_64BIT,
+ * here we have to make amends with what the various compilers provides us
+ * to figure out if we're on a 64-bit machine...
+ */
+#ifdef __SIZEOF_LONG__
+# if __SIZEOF_LONG__ == 8
+#  define CONFIG_64BIT
+# endif
+#else
+# ifdef __WORDSIZE
+#  if __WORDSIZE == 64
+#   define CONFIG_64BIT
+#  endif
+# else
+#  error Failed to determine BITS_PER_LONG value
+# endif
+#endif
 
 #ifdef CONFIG_64BIT
 #define BITS_PER_LONG 64
@@ -10,11 +28,7 @@
 #define BITS_PER_LONG 32
 #endif /* CONFIG_64BIT */
 
-/*
- * FIXME: The check currently breaks x86-64 build, so it's
- * temporarily disabled. Please fix x86-64 and reenable
- */
-#if 0 && BITS_PER_LONG != __BITS_PER_LONG
+#if BITS_PER_LONG != __BITS_PER_LONG
 #error Inconsistent word size. Check asm/bitsperlong.h
 #endif
 
-- 
2.7.4

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

* [PATCH 02/19] objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 01/19] tools: Fix up BITS_PER_LONG setting Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 03/19] objtool: Avoid checking code drift on busybox's diff Arnaldo Carvalho de Melo
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Josh Poimboeuf, Namhyung Kim, Wang Nan

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

Not all libelf implementations have this "Please, ELF_C_READ, but use
mmap if possible" elf_begin() cmd, so provide a fallback to plain old
ELF_C_READ.

Case in point: Alpine Linux 3.4.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-1fctuknrawgoi5xqon4mu9dv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/objtool/elf.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index e11f6b69cce6..0d7983ac63ef 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -30,6 +30,13 @@
 #include "elf.h"
 #include "warn.h"
 
+/*
+ * Fallback for systems without this "read, mmaping if possible" cmd.
+ */
+#ifndef ELF_C_READ_MMAP
+#define ELF_C_READ_MMAP ELF_C_READ
+#endif
+
 struct section *find_section_by_name(struct elf *elf, const char *name)
 {
 	struct section *sec;
-- 
2.7.4

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

* [PATCH 03/19] objtool: Avoid checking code drift on busybox's diff
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 01/19] tools: Fix up BITS_PER_LONG setting Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 02/19] objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 04/19] tools lib bpf: New API to adjust type of a BPF program Arnaldo Carvalho de Melo
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Josh Poimboeuf, Namhyung Kim, Wang Nan

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

That doesn't have -I to match lines.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-1zqv1h6okt70e2huokkdtf1u@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/objtool/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index f094f3c4ed84..9a3110cac604 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -41,8 +41,11 @@ include $(srctree)/tools/build/Makefile.include
 $(OBJTOOL_IN): fixdep FORCE
 	@$(MAKE) $(build)=objtool
 
+# Busybox's diff doesn't have -I, avoid warning in that case
+#
 $(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)
-	@(test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \
+	@(diff -I 2>&1 | grep -q 'option requires an argument' && \
+	test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \
 	diff -I'^#include' arch/x86/insn/insn.c ../../arch/x86/lib/insn.c >/dev/null && \
 	diff -I'^#include' arch/x86/insn/inat.c ../../arch/x86/lib/inat.c >/dev/null && \
 	diff arch/x86/insn/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \
-- 
2.7.4

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

* [PATCH 04/19] tools lib bpf: New API to adjust type of a BPF program
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 03/19] objtool: Avoid checking code drift on busybox's diff Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 05/19] tools lib bpf: Report error when kernel doesn't support program type Arnaldo Carvalho de Melo
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Wang Nan, Alexei Starovoitov, Jiri Olsa, Zefan Li,
	pi3orama, Arnaldo Carvalho de Melo

From: Wang Nan <wangnan0@huawei.com>

Add 4 new APIs to adjust and query the type of a BPF program.
Load program according to type set by caller. Default is set to
BPF_PROG_TYPE_KPROBE.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1468406646-21642-2-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/bpf/libbpf.c | 53 +++++++++++++++++++++++++++++++++++++++++++-------
 tools/lib/bpf/libbpf.h |  9 +++++++++
 2 files changed, 55 insertions(+), 7 deletions(-)

diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 3dcda9e215b0..4751936831d7 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -158,6 +158,7 @@ struct bpf_program {
 	char *section_name;
 	struct bpf_insn *insns;
 	size_t insns_cnt;
+	enum bpf_prog_type type;
 
 	struct {
 		int insn_idx;
@@ -299,6 +300,7 @@ bpf_program__init(void *data, size_t size, char *name, int idx,
 	prog->idx = idx;
 	prog->instances.fds = NULL;
 	prog->instances.nr = -1;
+	prog->type = BPF_PROG_TYPE_KPROBE;
 
 	return 0;
 errout:
@@ -894,8 +896,8 @@ static int bpf_object__collect_reloc(struct bpf_object *obj)
 }
 
 static int
-load_program(struct bpf_insn *insns, int insns_cnt,
-	     char *license, u32 kern_version, int *pfd)
+load_program(enum bpf_prog_type type, struct bpf_insn *insns,
+	     int insns_cnt, char *license, u32 kern_version, int *pfd)
 {
 	int ret;
 	char *log_buf;
@@ -907,9 +909,8 @@ load_program(struct bpf_insn *insns, int insns_cnt,
 	if (!log_buf)
 		pr_warning("Alloc log buffer for bpf loader error, continue without log\n");
 
-	ret = bpf_load_program(BPF_PROG_TYPE_KPROBE, insns,
-			       insns_cnt, license, kern_version,
-			       log_buf, BPF_LOG_BUF_SIZE);
+	ret = bpf_load_program(type, insns, insns_cnt, license,
+			       kern_version, log_buf, BPF_LOG_BUF_SIZE);
 
 	if (ret >= 0) {
 		*pfd = ret;
@@ -968,7 +969,7 @@ bpf_program__load(struct bpf_program *prog,
 			pr_warning("Program '%s' is inconsistent: nr(%d) != 1\n",
 				   prog->section_name, prog->instances.nr);
 		}
-		err = load_program(prog->insns, prog->insns_cnt,
+		err = load_program(prog->type, prog->insns, prog->insns_cnt,
 				   license, kern_version, &fd);
 		if (!err)
 			prog->instances.fds[0] = fd;
@@ -997,7 +998,7 @@ bpf_program__load(struct bpf_program *prog,
 			continue;
 		}
 
-		err = load_program(result.new_insn_ptr,
+		err = load_program(prog->type, result.new_insn_ptr,
 				   result.new_insn_cnt,
 				   license, kern_version, &fd);
 
@@ -1316,6 +1317,44 @@ int bpf_program__nth_fd(struct bpf_program *prog, int n)
 	return fd;
 }
 
+static void bpf_program__set_type(struct bpf_program *prog,
+				  enum bpf_prog_type type)
+{
+	prog->type = type;
+}
+
+int bpf_program__set_tracepoint(struct bpf_program *prog)
+{
+	if (!prog)
+		return -EINVAL;
+	bpf_program__set_type(prog, BPF_PROG_TYPE_TRACEPOINT);
+	return 0;
+}
+
+int bpf_program__set_kprobe(struct bpf_program *prog)
+{
+	if (!prog)
+		return -EINVAL;
+	bpf_program__set_type(prog, BPF_PROG_TYPE_KPROBE);
+	return 0;
+}
+
+static bool bpf_program__is_type(struct bpf_program *prog,
+				 enum bpf_prog_type type)
+{
+	return prog ? (prog->type == type) : false;
+}
+
+bool bpf_program__is_tracepoint(struct bpf_program *prog)
+{
+	return bpf_program__is_type(prog, BPF_PROG_TYPE_TRACEPOINT);
+}
+
+bool bpf_program__is_kprobe(struct bpf_program *prog)
+{
+	return bpf_program__is_type(prog, BPF_PROG_TYPE_KPROBE);
+}
+
 int bpf_map__fd(struct bpf_map *map)
 {
 	return map ? map->fd : -EINVAL;
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index f392c5e04cc1..eb2a4c45f6b6 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -165,6 +165,15 @@ int bpf_program__set_prep(struct bpf_program *prog, int nr_instance,
 int bpf_program__nth_fd(struct bpf_program *prog, int n);
 
 /*
+ * Adjust type of bpf program. Default is kprobe.
+ */
+int bpf_program__set_tracepoint(struct bpf_program *prog);
+int bpf_program__set_kprobe(struct bpf_program *prog);
+
+bool bpf_program__is_tracepoint(struct bpf_program *prog);
+bool bpf_program__is_kprobe(struct bpf_program *prog);
+
+/*
  * We don't need __attribute__((packed)) now since it is
  * unnecessary for 'bpf_map_def' because they are all aligned.
  * In addition, using it will trigger -Wpacked warning message,
-- 
2.7.4

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

* [PATCH 05/19] tools lib bpf: Report error when kernel doesn't support program type
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 04/19] tools lib bpf: New API to adjust type of a BPF program Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 06/19] perf event parser: Add const qualifier to evt_name and sys_name Arnaldo Carvalho de Melo
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Wang Nan, Alexei Starovoitov, Jiri Olsa, Zefan Li,
	pi3orama, Arnaldo Carvalho de Melo

From: Wang Nan <wangnan0@huawei.com>

Now libbpf support tracepoint program type. Report meaningful error when kernel
version is less than 4.7.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1468406646-21642-3-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/bpf/libbpf.c | 27 ++++++++++++++++++++-------
 tools/lib/bpf/libbpf.h |  1 +
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 4751936831d7..32e6b6bc6f7d 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -90,6 +90,7 @@ static const char *libbpf_strerror_table[NR_ERRNO] = {
 	[ERRCODE_OFFSET(VERIFY)]	= "Kernel verifier blocks program loading",
 	[ERRCODE_OFFSET(PROG2BIG)]	= "Program too big",
 	[ERRCODE_OFFSET(KVER)]		= "Incorrect kernel version",
+	[ERRCODE_OFFSET(PROGTYPE)]	= "Kernel doesn't support this program type",
 };
 
 int libbpf_strerror(int err, char *buf, size_t size)
@@ -926,15 +927,27 @@ load_program(enum bpf_prog_type type, struct bpf_insn *insns,
 		pr_warning("-- BEGIN DUMP LOG ---\n");
 		pr_warning("\n%s\n", log_buf);
 		pr_warning("-- END LOG --\n");
+	} else if (insns_cnt >= BPF_MAXINSNS) {
+		pr_warning("Program too large (%d insns), at most %d insns\n",
+			   insns_cnt, BPF_MAXINSNS);
+		ret = -LIBBPF_ERRNO__PROG2BIG;
 	} else {
-		if (insns_cnt >= BPF_MAXINSNS) {
-			pr_warning("Program too large (%d insns), at most %d insns\n",
-				   insns_cnt, BPF_MAXINSNS);
-			ret = -LIBBPF_ERRNO__PROG2BIG;
-		} else if (log_buf) {
-			pr_warning("log buffer is empty\n");
-			ret = -LIBBPF_ERRNO__KVER;
+		/* Wrong program type? */
+		if (type != BPF_PROG_TYPE_KPROBE) {
+			int fd;
+
+			fd = bpf_load_program(BPF_PROG_TYPE_KPROBE, insns,
+					      insns_cnt, license, kern_version,
+					      NULL, 0);
+			if (fd >= 0) {
+				close(fd);
+				ret = -LIBBPF_ERRNO__PROGTYPE;
+				goto out;
+			}
 		}
+
+		if (log_buf)
+			ret = -LIBBPF_ERRNO__KVER;
 	}
 
 out:
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index eb2a4c45f6b6..dd7a513efb10 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -39,6 +39,7 @@ enum libbpf_errno {
 	LIBBPF_ERRNO__VERIFY,	/* Kernel verifier blocks program loading */
 	LIBBPF_ERRNO__PROG2BIG,	/* Program too big */
 	LIBBPF_ERRNO__KVER,	/* Incorrect kernel version */
+	LIBBPF_ERRNO__PROGTYPE,	/* Kernel doesn't support this program type */
 	__LIBBPF_ERRNO__END,
 };
 
-- 
2.7.4

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

* [PATCH 06/19] perf event parser: Add const qualifier to evt_name and sys_name
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 05/19] tools lib bpf: Report error when kernel doesn't support program type Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 07/19] perf bpf: Rename bpf__foreach_tev() to bpf__foreach_event() Arnaldo Carvalho de Melo
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Wang Nan, Alexei Starovoitov, Jiri Olsa, Zefan Li,
	pi3orama, Arnaldo Carvalho de Melo

From: Wang Nan <wangnan0@huawei.com>

Add missing 'const' qualifiers so following commits are able to create
tracepoints using const strings.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1468406646-21642-4-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/parse-events.c | 12 ++++++------
 tools/perf/util/parse-events.h |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index ebd87b773f56..d866824f2b42 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -436,7 +436,7 @@ int parse_events_add_cache(struct list_head *list, int *idx,
 }
 
 static void tracepoint_error(struct parse_events_error *e, int err,
-			     char *sys, char *name)
+			     const char *sys, const char *name)
 {
 	char help[BUFSIZ];
 
@@ -466,7 +466,7 @@ static void tracepoint_error(struct parse_events_error *e, int err,
 }
 
 static int add_tracepoint(struct list_head *list, int *idx,
-			  char *sys_name, char *evt_name,
+			  const char *sys_name, const char *evt_name,
 			  struct parse_events_error *err,
 			  struct list_head *head_config)
 {
@@ -491,7 +491,7 @@ static int add_tracepoint(struct list_head *list, int *idx,
 }
 
 static int add_tracepoint_multi_event(struct list_head *list, int *idx,
-				      char *sys_name, char *evt_name,
+				      const char *sys_name, const char *evt_name,
 				      struct parse_events_error *err,
 				      struct list_head *head_config)
 {
@@ -533,7 +533,7 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 }
 
 static int add_tracepoint_event(struct list_head *list, int *idx,
-				char *sys_name, char *evt_name,
+				const char *sys_name, const char *evt_name,
 				struct parse_events_error *err,
 				struct list_head *head_config)
 {
@@ -545,7 +545,7 @@ static int add_tracepoint_event(struct list_head *list, int *idx,
 }
 
 static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
-				    char *sys_name, char *evt_name,
+				    const char *sys_name, const char *evt_name,
 				    struct parse_events_error *err,
 				    struct list_head *head_config)
 {
@@ -1126,7 +1126,7 @@ do {								\
 }
 
 int parse_events_add_tracepoint(struct list_head *list, int *idx,
-				char *sys, char *event,
+				const char *sys, const char *event,
 				struct parse_events_error *err,
 				struct list_head *head_config)
 {
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index 46c05ccd5dfe..0bd664dfa53c 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -134,7 +134,7 @@ int parse_events__modifier_event(struct list_head *list, char *str, bool add);
 int parse_events__modifier_group(struct list_head *list, char *event_mod);
 int parse_events_name(struct list_head *list, char *name);
 int parse_events_add_tracepoint(struct list_head *list, int *idx,
-				char *sys, char *event,
+				const char *sys, const char *event,
 				struct parse_events_error *error,
 				struct list_head *head_config);
 int parse_events_load_bpf(struct parse_events_evlist *data,
-- 
2.7.4

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

* [PATCH 07/19] perf bpf: Rename bpf__foreach_tev() to bpf__foreach_event()
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 06/19] perf event parser: Add const qualifier to evt_name and sys_name Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 08/19] perf bpf: Support BPF program attach to tracepoints Arnaldo Carvalho de Melo
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Wang Nan, Alexei Starovoitov, Jiri Olsa, Zefan Li,
	pi3orama, Arnaldo Carvalho de Melo

From: Wang Nan <wangnan0@huawei.com>

Following commit will allow BPF script attach to tracepoints.
bpf__foreach_tev() will iterate over all events, not only kprobes.
Rename it to bpf__foreach_event().

Since only group and event are used by caller, there's no need to pass
full 'struct probe_trace_event' to bpf_prog_iter_callback_t. Pass only
these two strings. After this patch bpf_prog_iter_callback_t natually
support tracepoints.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1468406646-21642-5-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/bpf-loader.c   |  8 ++++----
 tools/perf/util/bpf-loader.h   | 12 ++++++------
 tools/perf/util/parse-events.c | 16 ++++++++--------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 8445e89621fe..f22701497112 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -693,9 +693,9 @@ int bpf__load(struct bpf_object *obj)
 	return 0;
 }
 
-int bpf__foreach_tev(struct bpf_object *obj,
-		     bpf_prog_iter_callback_t func,
-		     void *arg)
+int bpf__foreach_event(struct bpf_object *obj,
+		       bpf_prog_iter_callback_t func,
+		       void *arg)
 {
 	struct bpf_program *prog;
 	int err;
@@ -728,7 +728,7 @@ int bpf__foreach_tev(struct bpf_object *obj,
 				return fd;
 			}
 
-			err = (*func)(tev, fd, arg);
+			err = (*func)(tev->group, tev->event, fd, arg);
 			if (err) {
 				pr_debug("bpf: call back failed, stop iterate\n");
 				return err;
diff --git a/tools/perf/util/bpf-loader.h b/tools/perf/util/bpf-loader.h
index 941e17275aa7..f2b737b225f2 100644
--- a/tools/perf/util/bpf-loader.h
+++ b/tools/perf/util/bpf-loader.h
@@ -46,7 +46,7 @@ struct bpf_object;
 struct parse_events_term;
 #define PERF_BPF_PROBE_GROUP "perf_bpf_probe"
 
-typedef int (*bpf_prog_iter_callback_t)(struct probe_trace_event *tev,
+typedef int (*bpf_prog_iter_callback_t)(const char *group, const char *event,
 					int fd, void *arg);
 
 #ifdef HAVE_LIBBPF_SUPPORT
@@ -67,8 +67,8 @@ int bpf__strerror_probe(struct bpf_object *obj, int err,
 int bpf__load(struct bpf_object *obj);
 int bpf__strerror_load(struct bpf_object *obj, int err,
 		       char *buf, size_t size);
-int bpf__foreach_tev(struct bpf_object *obj,
-		     bpf_prog_iter_callback_t func, void *arg);
+int bpf__foreach_event(struct bpf_object *obj,
+		       bpf_prog_iter_callback_t func, void *arg);
 
 int bpf__config_obj(struct bpf_object *obj, struct parse_events_term *term,
 		    struct perf_evlist *evlist, int *error_pos);
@@ -107,9 +107,9 @@ static inline int bpf__unprobe(struct bpf_object *obj __maybe_unused) { return 0
 static inline int bpf__load(struct bpf_object *obj __maybe_unused) { return 0; }
 
 static inline int
-bpf__foreach_tev(struct bpf_object *obj __maybe_unused,
-		 bpf_prog_iter_callback_t func __maybe_unused,
-		 void *arg __maybe_unused)
+bpf__foreach_event(struct bpf_object *obj __maybe_unused,
+		   bpf_prog_iter_callback_t func __maybe_unused,
+		   void *arg __maybe_unused)
 {
 	return 0;
 }
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index d866824f2b42..6b4fff375d99 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -584,7 +584,7 @@ struct __add_bpf_event_param {
 	struct list_head *head_config;
 };
 
-static int add_bpf_event(struct probe_trace_event *tev, int fd,
+static int add_bpf_event(const char *group, const char *event, int fd,
 			 void *_param)
 {
 	LIST_HEAD(new_evsels);
@@ -595,27 +595,27 @@ static int add_bpf_event(struct probe_trace_event *tev, int fd,
 	int err;
 
 	pr_debug("add bpf event %s:%s and attach bpf program %d\n",
-		 tev->group, tev->event, fd);
+		 group, event, fd);
 
-	err = parse_events_add_tracepoint(&new_evsels, &evlist->idx, tev->group,
-					  tev->event, evlist->error,
+	err = parse_events_add_tracepoint(&new_evsels, &evlist->idx, group,
+					  event, evlist->error,
 					  param->head_config);
 	if (err) {
 		struct perf_evsel *evsel, *tmp;
 
 		pr_debug("Failed to add BPF event %s:%s\n",
-			 tev->group, tev->event);
+			 group, event);
 		list_for_each_entry_safe(evsel, tmp, &new_evsels, node) {
 			list_del(&evsel->node);
 			perf_evsel__delete(evsel);
 		}
 		return err;
 	}
-	pr_debug("adding %s:%s\n", tev->group, tev->event);
+	pr_debug("adding %s:%s\n", group, event);
 
 	list_for_each_entry(pos, &new_evsels, node) {
 		pr_debug("adding %s:%s to %p\n",
-			 tev->group, tev->event, pos);
+			 group, event, pos);
 		pos->bpf_fd = fd;
 	}
 	list_splice(&new_evsels, list);
@@ -661,7 +661,7 @@ int parse_events_load_bpf_obj(struct parse_events_evlist *data,
 		goto errout;
 	}
 
-	err = bpf__foreach_tev(obj, add_bpf_event, &param);
+	err = bpf__foreach_event(obj, add_bpf_event, &param);
 	if (err) {
 		snprintf(errbuf, sizeof(errbuf),
 			 "Attach events in BPF object failed");
-- 
2.7.4

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

* [PATCH 08/19] perf bpf: Support BPF program attach to tracepoints
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 07/19] perf bpf: Rename bpf__foreach_tev() to bpf__foreach_event() Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 09/19] perf probe: Fix to show correct error message for $vars and $params Arnaldo Carvalho de Melo
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Wang Nan, Alexei Starovoitov, Jiri Olsa, Zefan Li,
	pi3orama, Arnaldo Carvalho de Melo

From: Wang Nan <wangnan0@huawei.com>

To support 98b5c2c65c29 ("perf, bpf: allow bpf programs attach to
tracepoints"), this patch allows BPF scripts to select tracepoints in
their section name.

Example:

  # cat test_tracepoint.c
  /*********************************************/
  #include <uapi/linux/bpf.h>
  #define SEC(NAME) __attribute__((section(NAME), used))
  SEC("raw_syscalls:sys_enter")
  int func(void *ctx)
  {
 	/*
 	 * /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/format:
 	 * ...
 	 * field:long id;	offset:8;	size:8;	signed:1;
 	 * ...
 	 * ctx + 8 select 'id'
 	 */
 	u64 id = *((u64 *)(ctx + 8));
 	if (id == 1)
 		return 1;
 	return 0;
  }
  SEC("_write=sys_write")
  int _write(void *ctx)
  {
 	return 1;
  }
  char _license[] SEC("license") = "GPL";
  int _version SEC("version") = LINUX_VERSION_CODE;
  /*********************************************/
  # perf record -e ./test_tracepoint.c  dd if=/dev/zero of=/dev/null count=5
  5+0 records in
  5+0 records out
  2560 bytes (2.6 kB) copied, 6.2281e-05 s, 41.1 MB/s
  [ perf record: Woken up 1 times to write data ]
  # perf script
         dd 13436 [005] 1596.490869: raw_syscalls:sys_enter: NR 1 (1, 178d000, 200, 7ffe82470d60, ffffffffffffe020, fffff
         dd 13436 [005] 1596.490871:  perf_bpf_probe:_write: (ffffffff812351e0)
         dd 13436 [005] 1596.490873: raw_syscalls:sys_enter: NR 1 (1, 178d000, 200, ffffffffffffe000, ffffffffffffe020, f
         dd 13436 [005] 1596.490874:  perf_bpf_probe:_write: (ffffffff812351e0)
         dd 13436 [005] 1596.490876: raw_syscalls:sys_enter: NR 1 (1, 178d000, 200, ffffffffffffe000, ffffffffffffe020, f
         dd 13436 [005] 1596.490876:  perf_bpf_probe:_write: (ffffffff812351e0)
         dd 13436 [005] 1596.490878: raw_syscalls:sys_enter: NR 1 (1, 178d000, 200, ffffffffffffe000, ffffffffffffe020, f
         dd 13436 [005] 1596.490879:  perf_bpf_probe:_write: (ffffffff812351e0)
         dd 13436 [005] 1596.490881: raw_syscalls:sys_enter: NR 1 (1, 178d000, 200, ffffffffffffe000, ffffffffffffe020, f
         dd 13436 [005] 1596.490882:  perf_bpf_probe:_write: (ffffffff812351e0)
         dd 13436 [005] 1596.490900: raw_syscalls:sys_enter: NR 1 (2, 7ffe8246e640, 1f, 40acb8, 7f44bac74700, 7f44baa4fba
         dd 13436 [005] 1596.490901:  perf_bpf_probe:_write: (ffffffff812351e0)
         dd 13436 [005] 1596.490917: raw_syscalls:sys_enter: NR 1 (2, 7ffe8246e640, 1a, fffffffa, 7f44bac74700, 7f44baa4f
         dd 13436 [005] 1596.490918:  perf_bpf_probe:_write: (ffffffff812351e0)
         dd 13436 [005] 1596.490932: raw_syscalls:sys_enter: NR 1 (2, 7ffe8246e640, 1a, fffffff9, 7f44bac74700, 7f44baa4f
         dd 13436 [005] 1596.490933:  perf_bpf_probe:_write: (ffffffff812351e0)

Committer note:

Further testing:

  # trace --no-sys --event /home/acme/bpf/tracepoint.c cat /etc/passwd > /dev/null
     0.000 raw_syscalls:sys_enter:NR 1 (1, 7f0490504000, c48, 7f0490503010, ffffffffffffffff, 0))
     0.006 perf_bpf_probe:_write:(ffffffff81241bc0))
  #

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1468406646-21642-6-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/bpf-loader.c | 65 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 60 insertions(+), 5 deletions(-)

diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index f22701497112..1f12e4e40006 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -37,6 +37,9 @@ DEFINE_PRINT_FN(info, 1)
 DEFINE_PRINT_FN(debug, 1)
 
 struct bpf_prog_priv {
+	bool is_tp;
+	char *sys_name;
+	char *evt_name;
 	struct perf_probe_event pev;
 	bool need_prologue;
 	struct bpf_insn *insns_buf;
@@ -118,6 +121,8 @@ clear_prog_priv(struct bpf_program *prog __maybe_unused,
 	cleanup_perf_probe_events(&priv->pev, 1);
 	zfree(&priv->insns_buf);
 	zfree(&priv->type_mapping);
+	zfree(&priv->sys_name);
+	zfree(&priv->evt_name);
 	free(priv);
 }
 
@@ -269,7 +274,8 @@ nextline:
 }
 
 static int
-parse_prog_config(const char *config_str, struct perf_probe_event *pev)
+parse_prog_config(const char *config_str, const char **p_main_str,
+		  bool *is_tp, struct perf_probe_event *pev)
 {
 	int err;
 	const char *main_str = parse_prog_config_kvpair(config_str, pev);
@@ -277,6 +283,22 @@ parse_prog_config(const char *config_str, struct perf_probe_event *pev)
 	if (IS_ERR(main_str))
 		return PTR_ERR(main_str);
 
+	*p_main_str = main_str;
+	if (!strchr(main_str, '=')) {
+		/* Is a tracepoint event? */
+		const char *s = strchr(main_str, ':');
+
+		if (!s) {
+			pr_debug("bpf: '%s' is not a valid tracepoint\n",
+				 config_str);
+			return -BPF_LOADER_ERRNO__CONFIG;
+		}
+
+		*is_tp = true;
+		return 0;
+	}
+
+	*is_tp = false;
 	err = parse_perf_probe_command(main_str, pev);
 	if (err < 0) {
 		pr_debug("bpf: '%s' is not a valid config string\n",
@@ -292,7 +314,8 @@ config_bpf_program(struct bpf_program *prog)
 {
 	struct perf_probe_event *pev = NULL;
 	struct bpf_prog_priv *priv = NULL;
-	const char *config_str;
+	const char *config_str, *main_str;
+	bool is_tp = false;
 	int err;
 
 	/* Initialize per-program probing setting */
@@ -313,10 +336,19 @@ config_bpf_program(struct bpf_program *prog)
 	pev = &priv->pev;
 
 	pr_debug("bpf: config program '%s'\n", config_str);
-	err = parse_prog_config(config_str, pev);
+	err = parse_prog_config(config_str, &main_str, &is_tp, pev);
 	if (err)
 		goto errout;
 
+	if (is_tp) {
+		char *s = strchr(main_str, ':');
+
+		priv->is_tp = true;
+		priv->sys_name = strndup(main_str, s - main_str);
+		priv->evt_name = strdup(s + 1);
+		goto set_priv;
+	}
+
 	if (pev->group && strcmp(pev->group, PERF_BPF_PROBE_GROUP)) {
 		pr_debug("bpf: '%s': group for event is set and not '%s'.\n",
 			 config_str, PERF_BPF_PROBE_GROUP);
@@ -339,6 +371,7 @@ config_bpf_program(struct bpf_program *prog)
 	}
 	pr_debug("bpf: config '%s' is ok\n", config_str);
 
+set_priv:
 	err = bpf_program__set_priv(prog, priv, clear_prog_priv);
 	if (err) {
 		pr_debug("Failed to set priv for program '%s'\n", config_str);
@@ -387,7 +420,7 @@ preproc_gen_prologue(struct bpf_program *prog, int n,
 	size_t prologue_cnt = 0;
 	int i, err;
 
-	if (IS_ERR(priv) || !priv)
+	if (IS_ERR(priv) || !priv || priv->is_tp)
 		goto errout;
 
 	pev = &priv->pev;
@@ -544,6 +577,11 @@ static int hook_load_preprocessor(struct bpf_program *prog)
 		return -BPF_LOADER_ERRNO__INTERNAL;
 	}
 
+	if (priv->is_tp) {
+		priv->need_prologue = false;
+		return 0;
+	}
+
 	pev = &priv->pev;
 	for (i = 0; i < pev->ntevs; i++) {
 		struct probe_trace_event *tev = &pev->tevs[i];
@@ -610,6 +648,13 @@ int bpf__probe(struct bpf_object *obj)
 			err = PTR_ERR(priv);
 			goto out;
 		}
+
+		if (priv->is_tp) {
+			bpf_program__set_tracepoint(prog);
+			continue;
+		}
+
+		bpf_program__set_kprobe(prog);
 		pev = &priv->pev;
 
 		err = convert_perf_probe_events(pev, 1);
@@ -650,7 +695,7 @@ int bpf__unprobe(struct bpf_object *obj)
 		struct bpf_prog_priv *priv = bpf_program__priv(prog);
 		int i;
 
-		if (IS_ERR(priv) || !priv)
+		if (IS_ERR(priv) || !priv || priv->is_tp)
 			continue;
 
 		for (i = 0; i < priv->pev.ntevs; i++) {
@@ -711,6 +756,16 @@ int bpf__foreach_event(struct bpf_object *obj,
 			return -BPF_LOADER_ERRNO__INTERNAL;
 		}
 
+		if (priv->is_tp) {
+			fd = bpf_program__fd(prog);
+			err = (*func)(priv->sys_name, priv->evt_name, fd, arg);
+			if (err) {
+				pr_debug("bpf: tracepoint call back failed, stop iterate\n");
+				return err;
+			}
+			continue;
+		}
+
 		pev = &priv->pev;
 		for (i = 0; i < pev->ntevs; i++) {
 			tev = &pev->tevs[i];
-- 
2.7.4

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

* [PATCH 09/19] perf probe: Fix to show correct error message for $vars and $params
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 08/19] perf bpf: Support BPF program attach to tracepoints Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 10/19] perf probe: Accept %sdt and %cached event name Arnaldo Carvalho de Melo
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Brendan Gregg, Hemant Kumar, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <mhiramat@kernel.org>

Fix to show correct error messages for $vars and $params because
those special variables requires debug information to find the
real variables or function parameters.

E.g. without this fix;
  ----
  # perf probe -x /lib64/libc-2.23.so getaddrinfo \$params
  Failed to write event: Invalid argument
  Please upgrade your kernel to at least 3.14 to have access to feature $params
    Error: Failed to add events.
  ----

Perf ends up with an error, but the message is not correct.  With this
fix, perf shows correct error message as below.

  ----
  # perf probe -x /lib64/libc-2.23.so getaddrinfo \$params
  The /usr/lib64/libc-2.23.so file has no debug information.
  Rebuild with -g, or install an appropriate debuginfo package.
    Error: Failed to add events.
  ----

Reported-and-Tested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831787438.17065.6152436996780110699.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 2b222a7955c9..fef9768df429 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1547,7 +1547,9 @@ bool perf_probe_event_need_dwarf(struct perf_probe_event *pev)
 		return true;
 
 	for (i = 0; i < pev->nargs; i++)
-		if (is_c_varname(pev->args[i].var))
+		if (is_c_varname(pev->args[i].var) ||
+		    !strcmp(pev->args[i].var, "$params") ||
+		    !strcmp(pev->args[i].var, "$vars"))
 			return true;
 
 	return false;
-- 
2.7.4

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

* [PATCH 10/19] perf probe: Accept %sdt and %cached event name
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 09/19] perf probe: Fix to show correct error message for $vars and $params Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 11/19] perf probe: Make --list show only available cached events Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Masami Hiramatsu,
	Ananth N Mavinakayanahalli, Brendan Gregg, Hemant Kumar,
	Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo

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

To improve usability, support %[PROVIDER:]SDTEVENT format to add new
probes on SDT and cached events.

e.g.
  ----
  # perf probe -x /lib/libc-2.17.so  %lll_lock_wait_private
  Added new event:
    sdt_libc:lll_lock_wait_private (on %lll_lock_wait_private in /usr/lib/libc-2.17.so)

  You can now use it in all perf tools, such as:

          perf record -e sdt_libc:lll_lock_wait_private -aR sleep 1

  # perf probe -l | more
    sdt_libc:lll_lock_wait_private (on __lll_lock_wait_private+21 in /usr/lib/libc-2.17.so)
  ----

Note that this is not only for SDT events, but also normal
events with event-name.

e.g. define "myevent" on cache (-n doesn't add the real probe)
  ----
  # perf probe -x ./perf --cache -n --add 'myevent=dso__load $params'
  ----
  Reuse the "myevent" from cache as below.
  ----
  # perf probe -x ./perf %myevent
  ----

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831788372.17065.3645054540325909346.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-probe.txt |  9 +++-
 tools/perf/util/probe-event.c           | 82 +++++++++++++++++++++++----------
 tools/perf/util/probe-event.h           |  1 +
 tools/perf/util/probe-file.c            |  9 ++++
 4 files changed, 76 insertions(+), 25 deletions(-)

diff --git a/tools/perf/Documentation/perf-probe.txt b/tools/perf/Documentation/perf-probe.txt
index 7a258e953252..39e387042098 100644
--- a/tools/perf/Documentation/perf-probe.txt
+++ b/tools/perf/Documentation/perf-probe.txt
@@ -151,6 +151,8 @@ Probe points are defined by following syntax.
     3) Define event based on source file with lazy pattern
      [[GROUP:]EVENT=]SRC;PTN [ARG ...]
 
+    4) Pre-defined SDT events or cached event with name
+     %[PROVIDER:]SDTEVENT
 
 'EVENT' specifies the name of new event, if omitted, it will be set the name of the probed function. You can also specify a group name by 'GROUP', if omitted, set 'probe' is used for kprobe and 'probe_<bin>' is used for uprobe.
 Note that using existing group name can conflict with other events. Especially, using the group name reserved for kernel modules can hide embedded events in the
@@ -158,6 +160,11 @@ modules.
 'FUNC' specifies a probed function name, and it may have one of the following options; '+OFFS' is the offset from function entry address in bytes, ':RLN' is the relative-line number from function entry line, and '%return' means that it probes function return. And ';PTN' means lazy matching pattern (see LAZY MATCHING). Note that ';PTN' must be the end of the probe point definition.  In addition, '@SRC' specifies a source file which has that function.
 It is also possible to specify a probe point by the source line number or lazy matching by using 'SRC:ALN' or 'SRC;PTN' syntax, where 'SRC' is the source file path, ':ALN' is the line number and ';PTN' is the lazy matching pattern.
 'ARG' specifies the arguments of this probe point, (see PROBE ARGUMENT).
+'SDTEVENT' and 'PROVIDER' is the pre-defined event name which is defined by user SDT (Statically Defined Tracing) or the pre-cached probes with event name.
+Note that before using the SDT event, the target binary (on which SDT events are defined) must be scanned by linkperf:perf-buildid-cache[1] to make SDT events as cached events.
+
+For details of the SDT, see below.
+https://sourceware.org/gdb/onlinedocs/gdb/Static-Probe-Points.html
 
 PROBE ARGUMENT
 --------------
@@ -237,4 +244,4 @@ Add probes at malloc() function on libc
 
 SEE ALSO
 --------
-linkperf:perf-trace[1], linkperf:perf-record[1]
+linkperf:perf-trace[1], linkperf:perf-record[1], linkperf:perf-buildid-cache[1]
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index fef9768df429..85f25d41cf8d 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1197,6 +1197,34 @@ err:
 	return err;
 }
 
+static int parse_perf_probe_event_name(char **arg, struct perf_probe_event *pev)
+{
+	char *ptr;
+
+	ptr = strchr(*arg, ':');
+	if (ptr) {
+		*ptr = '\0';
+		if (!is_c_func_name(*arg))
+			goto ng_name;
+		pev->group = strdup(*arg);
+		if (!pev->group)
+			return -ENOMEM;
+		*arg = ptr + 1;
+	} else
+		pev->group = NULL;
+	if (!is_c_func_name(*arg)) {
+ng_name:
+		semantic_error("%s is bad for event name -it must "
+			       "follow C symbol-naming rule.\n", *arg);
+		return -EINVAL;
+	}
+	pev->event = strdup(*arg);
+	if (pev->event == NULL)
+		return -ENOMEM;
+
+	return 0;
+}
+
 /* Parse probepoint definition. */
 static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
 {
@@ -1204,38 +1232,43 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
 	char *ptr, *tmp;
 	char c, nc = 0;
 	bool file_spec = false;
+	int ret;
+
 	/*
 	 * <Syntax>
 	 * perf probe [GRP:][EVENT=]SRC[:LN|;PTN]
 	 * perf probe [GRP:][EVENT=]FUNC[@SRC][+OFFS|%return|:LN|;PAT]
+	 * perf probe %[GRP:]SDT_EVENT
 	 */
 	if (!arg)
 		return -EINVAL;
 
+	if (arg[0] == '%') {
+		pev->sdt = true;
+		arg++;
+	}
+
 	ptr = strpbrk(arg, ";=@+%");
-	if (ptr && *ptr == '=') {	/* Event name */
-		*ptr = '\0';
-		tmp = ptr + 1;
-		ptr = strchr(arg, ':');
+	if (pev->sdt) {
 		if (ptr) {
-			*ptr = '\0';
-			if (!is_c_func_name(arg))
-				goto not_fname;
-			pev->group = strdup(arg);
-			if (!pev->group)
-				return -ENOMEM;
-			arg = ptr + 1;
-		} else
-			pev->group = NULL;
-		if (!is_c_func_name(arg)) {
-not_fname:
-			semantic_error("%s is bad for event name -it must "
-				       "follow C symbol-naming rule.\n", arg);
+			semantic_error("%s must contain only an SDT event name.\n", arg);
 			return -EINVAL;
 		}
-		pev->event = strdup(arg);
-		if (pev->event == NULL)
-			return -ENOMEM;
+		ret = parse_perf_probe_event_name(&arg, pev);
+		if (ret == 0) {
+			if (asprintf(&pev->point.function, "%%%s", pev->event) < 0)
+				ret = -errno;
+		}
+		return ret;
+	}
+
+	if (ptr && *ptr == '=') {	/* Event name */
+		*ptr = '\0';
+		tmp = ptr + 1;
+		ret = parse_perf_probe_event_name(&arg, pev);
+		if (ret < 0)
+			return ret;
+
 		arg = tmp;
 	}
 
@@ -2876,7 +2909,8 @@ static int find_probe_trace_events_from_cache(struct perf_probe_event *pev,
 
 	entry = probe_cache__find(cache, pev);
 	if (!entry) {
-		ret = 0;
+		/* SDT must be in the cache */
+		ret = pev->sdt ? -ENOENT : 0;
 		goto out;
 	}
 
@@ -2915,7 +2949,7 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev,
 {
 	int ret;
 
-	if (!pev->group) {
+	if (!pev->group && !pev->sdt) {
 		/* Set group name if not given */
 		if (!pev->uprobes) {
 			pev->group = strdup(PERFPROBE_GROUP);
@@ -2934,8 +2968,8 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev,
 
 	/* At first, we need to lookup cache entry */
 	ret = find_probe_trace_events_from_cache(pev, tevs);
-	if (ret > 0)
-		return ret;	/* Found in probe cache */
+	if (ret > 0 || pev->sdt)	/* SDT can be found only in the cache */
+		return ret == 0 ? -ENOENT : ret; /* Found in probe cache */
 
 	if (arch__prefers_symtab() && !perf_probe_event_need_dwarf(pev)) {
 		ret = find_probe_trace_events_from_map(pev, tevs);
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index 432b690d3f17..e18ea9fe6385 100644
--- a/tools/perf/util/probe-event.h
+++ b/tools/perf/util/probe-event.h
@@ -85,6 +85,7 @@ struct perf_probe_event {
 	char			*group;	/* Group name */
 	struct perf_probe_point	point;	/* Probe point */
 	int			nargs;	/* Number of arguments */
+	bool			sdt;	/* SDT/cached event flag */
 	bool			uprobes;	/* Uprobe event flag */
 	char			*target;	/* Target binary */
 	struct perf_probe_arg	*args;	/* Arguments */
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index e705a742ee1e..fc16b172579f 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -547,6 +547,15 @@ probe_cache__find(struct probe_cache *pcache, struct perf_probe_event *pev)
 		return NULL;
 
 	list_for_each_entry(entry, &pcache->entries, node) {
+		if (pev->sdt) {
+			if (entry->pev.event &&
+			    streql(entry->pev.event, pev->event) &&
+			    (!pev->group ||
+			     streql(entry->pev.group, pev->group)))
+				goto found;
+
+			continue;
+		}
 		/* Hit if same event name or same command-string */
 		if ((pev->event &&
 		     (streql(entry->pev.group, pev->group) &&
-- 
2.7.4

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

* [PATCH 11/19] perf probe: Make --list show only available cached events
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 10/19] perf probe: Accept %sdt and %cached event name Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 12/19] perf probe-cache: Add for_each_probe_cache_entry() wrapper Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Masami Hiramatsu,
	Ananth N Mavinakayanahalli, Brendan Gregg, Hemant Kumar,
	Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo

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

Make "perf probe --cache --list" show only available cached events by
checking build-id validity.

E.g. without this patch:
  ----
  $ ./perf probe --cache --add oldevent=cmd_probe
  $ make #(to update ./perf)
  $ ./perf probe --cache --add newevent=cmd_probe
  $ ./perf probe --cache --list
  /home/mhiramat/ksrc/linux/tools/perf/perf (061e90539bac69
  probe_perf:newevent=cmd_probe
  /home/mhiramat/ksrc/linux/tools/perf/perf (c2e44d614e33e1
  probe_perf:oldevent=cmd_probe
  ----
It shows both of old and new events but user can not use old one.
With this;
  ----
  $ ./perf probe --cache -l
  /home/mhiramat/ksrc/linux/tools/perf/perf (061e90539bac69
  probe_perf:newevent=cmd_probe
  ----

This shows only new events which are on the existing binary.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831789417.17065.17896487479879669610.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-probe.c   |  2 +-
 tools/perf/util/build-id.c   | 33 ++++++++++++++++++++++++++++++++-
 tools/perf/util/build-id.h   |  2 +-
 tools/perf/util/probe-file.c |  2 +-
 4 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index c6d890ad2c1a..ee5b42173ba3 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -370,7 +370,7 @@ static int del_perf_probe_caches(struct strfilter *filter)
 	struct str_node *nd;
 	int ret;
 
-	bidlist = build_id_cache__list_all();
+	bidlist = build_id_cache__list_all(false);
 	if (!bidlist) {
 		ret = -errno;
 		pr_debug("Failed to get buildids: %d\n", ret);
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 1e504e40dac8..36b4279a9002 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -206,6 +206,31 @@ out:
 	return ret;
 }
 
+/* Check if the given build_id cache is valid on current running system */
+static bool build_id_cache__valid_id(char *sbuild_id)
+{
+	char real_sbuild_id[SBUILD_ID_SIZE] = "";
+	char *pathname;
+	int ret = 0;
+	bool result = false;
+
+	pathname = build_id_cache__origname(sbuild_id);
+	if (!pathname)
+		return false;
+
+	if (!strcmp(pathname, DSO__NAME_KALLSYMS))
+		ret = sysfs__sprintf_build_id("/", real_sbuild_id);
+	else if (pathname[0] == '/')
+		ret = filename__sprintf_build_id(pathname, real_sbuild_id);
+	else
+		ret = -EINVAL;	/* Should we support other special DSO cache? */
+	if (ret >= 0)
+		result = (strcmp(sbuild_id, real_sbuild_id) == 0);
+	free(pathname);
+
+	return result;
+}
+
 static const char *build_id_cache__basename(bool is_kallsyms, bool is_vdso)
 {
 	return is_kallsyms ? "kallsyms" : (is_vdso ? "vdso" : "elf");
@@ -433,13 +458,17 @@ static bool lsdir_bid_tail_filter(const char *name __maybe_unused,
 	return (i == SBUILD_ID_SIZE - 3) && (d->d_name[i] == '\0');
 }
 
-struct strlist *build_id_cache__list_all(void)
+struct strlist *build_id_cache__list_all(bool validonly)
 {
 	struct strlist *toplist, *linklist = NULL, *bidlist;
 	struct str_node *nd, *nd2;
 	char *topdir, *linkdir = NULL;
 	char sbuild_id[SBUILD_ID_SIZE];
 
+	/* for filename__ functions */
+	if (validonly)
+		symbol__init(NULL);
+
 	/* Open the top-level directory */
 	if (asprintf(&topdir, "%s/.build-id/", buildid_dir) < 0)
 		return NULL;
@@ -470,6 +499,8 @@ struct strlist *build_id_cache__list_all(void)
 			if (snprintf(sbuild_id, SBUILD_ID_SIZE, "%s%s",
 				     nd->s, nd2->s) != SBUILD_ID_SIZE - 1)
 				goto err_out;
+			if (validonly && !build_id_cache__valid_id(sbuild_id))
+				continue;
 			if (strlist__add(bidlist, sbuild_id) < 0)
 				goto err_out;
 		}
diff --git a/tools/perf/util/build-id.h b/tools/perf/util/build-id.h
index b742e271ea2c..64e740f4bc28 100644
--- a/tools/perf/util/build-id.h
+++ b/tools/perf/util/build-id.h
@@ -34,7 +34,7 @@ char *build_id_cache__origname(const char *sbuild_id);
 char *build_id_cache__linkname(const char *sbuild_id, char *bf, size_t size);
 char *build_id_cache__cachedir(const char *sbuild_id, const char *name,
 			       bool is_kallsyms, bool is_vdso);
-struct strlist *build_id_cache__list_all(void);
+struct strlist *build_id_cache__list_all(bool validonly);
 int build_id_cache__list_build_ids(const char *pathname,
 				   struct strlist **result);
 bool build_id_cache__cached(const char *sbuild_id);
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index fc16b172579f..a5059dc3921a 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -808,7 +808,7 @@ int probe_cache__show_all_caches(struct strfilter *filter)
 	pr_debug("list cache with filter: %s\n", buf);
 	free(buf);
 
-	bidlist = build_id_cache__list_all();
+	bidlist = build_id_cache__list_all(true);
 	if (!bidlist) {
 		pr_debug("Failed to get buildids: %d\n", errno);
 		return -EINVAL;
-- 
2.7.4

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

* [PATCH 12/19] perf probe-cache: Add for_each_probe_cache_entry() wrapper
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (10 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 11/19] perf probe: Make --list show only available cached events Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 13/19] perf probe: Allow wildcard for cached events Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Brendan Gregg, Hemant Kumar, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <mhiramat@kernel.org>

Add for_each_probe_cache_entry() wrapper macro for hiding list in
probe_cache.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831790386.17065.15082256697569419710.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-file.c | 8 ++++----
 tools/perf/util/probe-file.h | 2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index a5059dc3921a..abfb05cf135b 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -546,7 +546,7 @@ probe_cache__find(struct probe_cache *pcache, struct perf_probe_event *pev)
 	if (!cmd)
 		return NULL;
 
-	list_for_each_entry(entry, &pcache->entries, node) {
+	for_each_probe_cache_entry(entry, pcache) {
 		if (pev->sdt) {
 			if (entry->pev.event &&
 			    streql(entry->pev.event, pev->event) &&
@@ -576,7 +576,7 @@ probe_cache__find_by_name(struct probe_cache *pcache,
 {
 	struct probe_cache_entry *entry = NULL;
 
-	list_for_each_entry(entry, &pcache->entries, node) {
+	for_each_probe_cache_entry(entry, pcache) {
 		/* Hit if same event name or same command-string */
 		if (streql(entry->pev.group, group) &&
 		    streql(entry->pev.event, event))
@@ -748,7 +748,7 @@ int probe_cache__commit(struct probe_cache *pcache)
 	if (ret < 0)
 		goto out;
 
-	list_for_each_entry(entry, &pcache->entries, node) {
+	for_each_probe_cache_entry(entry, pcache) {
 		ret = probe_cache_entry__write(entry, pcache->fd);
 		pr_debug("Cache committed: %d\n", ret);
 		if (ret < 0)
@@ -790,7 +790,7 @@ static int probe_cache__show_entries(struct probe_cache *pcache,
 {
 	struct probe_cache_entry *entry;
 
-	list_for_each_entry(entry, &pcache->entries, node) {
+	for_each_probe_cache_entry(entry, pcache) {
 		if (probe_cache_entry__compare(entry, filter))
 			printf("%s\n", entry->spev);
 	}
diff --git a/tools/perf/util/probe-file.h b/tools/perf/util/probe-file.h
index ddf5ae212c2f..d513b346a70e 100644
--- a/tools/perf/util/probe-file.h
+++ b/tools/perf/util/probe-file.h
@@ -21,6 +21,8 @@ struct probe_cache {
 
 #define PF_FL_UPROBE	1
 #define PF_FL_RW	2
+#define for_each_probe_cache_entry(entry, pcache) \
+	list_for_each_entry(entry, &pcache->entries, node)
 
 int probe_file__open(int flag);
 int probe_file__open_both(int *kfd, int *ufd, int flag);
-- 
2.7.4

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

* [PATCH 13/19] perf probe: Allow wildcard for cached events
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (11 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 12/19] perf probe-cache: Add for_each_probe_cache_entry() wrapper Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 14/19] perf probe: Search SDT/cached event from all probe caches Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Brendan Gregg, Hemant Kumar, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <mhiramat@kernel.org>

Allo glob wildcard for reusing cached/SDT events. E.g.

  # perf probe -x /usr/lib64/libc-2.20.so -a %sdt_libc:\*

This example adds probes for all SDT in libc.
Note that the SDTs must have been scanned by perf buildid-cache.

Committer note:

Using it to check what of those SDT probes would take place when doing
a cargo run (rust):

  # trace --no-sys --event sdt_libc:* cargo run
     0.000 sdt_libc:setjmp:(7f326b69c4d1))
    28.423 sdt_libc:setjmp:(7f4b0a5364d1))
    29.000 sdt_libc:setjmp:(7f4b0a5364d1))
    88.597 sdt_libc:setjmp:(7fc01fd414d1))
    89.220 sdt_libc:setjmp:(7fc01fd414d1))
    95.501 sdt_libc:setjmp:(7f326b69c4d1))
     Running `target/debug/hello_world`
    97.110 sdt_libc:setjmp:(7f95e09234d1))
  Hello, world!
  #

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831791813.17065.17846564230840594888.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 107 ++++++++++++++++++++++++++++++++++++++++--
 tools/perf/util/probe-file.c  |  38 ++++++++++++---
 tools/perf/util/probe-file.h  |   3 ++
 3 files changed, 138 insertions(+), 10 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 85f25d41cf8d..7b96e687568e 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1204,7 +1204,7 @@ static int parse_perf_probe_event_name(char **arg, struct perf_probe_event *pev)
 	ptr = strchr(*arg, ':');
 	if (ptr) {
 		*ptr = '\0';
-		if (!is_c_func_name(*arg))
+		if (!pev->sdt && !is_c_func_name(*arg))
 			goto ng_name;
 		pev->group = strdup(*arg);
 		if (!pev->group)
@@ -1212,7 +1212,7 @@ static int parse_perf_probe_event_name(char **arg, struct perf_probe_event *pev)
 		*arg = ptr + 1;
 	} else
 		pev->group = NULL;
-	if (!is_c_func_name(*arg)) {
+	if (!pev->sdt && !is_c_func_name(*arg)) {
 ng_name:
 		semantic_error("%s is bad for event name -it must "
 			       "follow C symbol-naming rule.\n", *arg);
@@ -1644,6 +1644,7 @@ int parse_probe_trace_command(const char *cmd, struct probe_trace_event *tev)
 			ret = -ENOMEM;
 			goto out;
 		}
+		tev->uprobes = (tp->module[0] == '/');
 		p++;
 	} else
 		p = argv[1];
@@ -2518,7 +2519,7 @@ static int probe_trace_event__set_name(struct probe_trace_event *tev,
 	int ret;
 
 	/* If probe_event or trace_event already have the name, reuse it */
-	if (pev->event)
+	if (pev->event && !pev->sdt)
 		event = pev->event;
 	else if (tev->event)
 		event = tev->event;
@@ -2531,7 +2532,7 @@ static int probe_trace_event__set_name(struct probe_trace_event *tev,
 		else
 			event = tev->point.realname;
 	}
-	if (pev->group)
+	if (pev->group && !pev->sdt)
 		group = pev->group;
 	else if (tev->group)
 		group = tev->group;
@@ -2894,6 +2895,100 @@ errout:
 
 bool __weak arch__prefers_symtab(void) { return false; }
 
+/* Concatinate two arrays */
+static void *memcat(void *a, size_t sz_a, void *b, size_t sz_b)
+{
+	void *ret;
+
+	ret = malloc(sz_a + sz_b);
+	if (ret) {
+		memcpy(ret, a, sz_a);
+		memcpy(ret + sz_a, b, sz_b);
+	}
+	return ret;
+}
+
+static int
+concat_probe_trace_events(struct probe_trace_event **tevs, int *ntevs,
+			  struct probe_trace_event **tevs2, int ntevs2)
+{
+	struct probe_trace_event *new_tevs;
+	int ret = 0;
+
+	if (ntevs == 0) {
+		*tevs = *tevs2;
+		*ntevs = ntevs2;
+		*tevs2 = NULL;
+		return 0;
+	}
+
+	if (*ntevs + ntevs2 > probe_conf.max_probes)
+		ret = -E2BIG;
+	else {
+		/* Concatinate the array of probe_trace_event */
+		new_tevs = memcat(*tevs, (*ntevs) * sizeof(**tevs),
+				  *tevs2, ntevs2 * sizeof(**tevs2));
+		if (!new_tevs)
+			ret = -ENOMEM;
+		else {
+			free(*tevs);
+			*tevs = new_tevs;
+			*ntevs += ntevs2;
+		}
+	}
+	if (ret < 0)
+		clear_probe_trace_events(*tevs2, ntevs2);
+	zfree(tevs2);
+
+	return ret;
+}
+
+/*
+ * Try to find probe_trace_event from given probe caches. Return the number
+ * of cached events found, if an error occurs return the error.
+ */
+static int find_cached_events(struct perf_probe_event *pev,
+			      struct probe_trace_event **tevs,
+			      const char *target)
+{
+	struct probe_cache *cache;
+	struct probe_cache_entry *entry;
+	struct probe_trace_event *tmp_tevs = NULL;
+	int ntevs = 0;
+	int ret = 0;
+
+	cache = probe_cache__new(target);
+	/* Return 0 ("not found") if the target has no probe cache. */
+	if (!cache)
+		return 0;
+
+	for_each_probe_cache_entry(entry, cache) {
+		/* Skip the cache entry which has no name */
+		if (!entry->pev.event || !entry->pev.group)
+			continue;
+		if ((!pev->group || strglobmatch(entry->pev.group, pev->group)) &&
+		    strglobmatch(entry->pev.event, pev->event)) {
+			ret = probe_cache_entry__get_event(entry, &tmp_tevs);
+			if (ret > 0)
+				ret = concat_probe_trace_events(tevs, &ntevs,
+								&tmp_tevs, ret);
+			if (ret < 0)
+				break;
+		}
+	}
+	probe_cache__delete(cache);
+	if (ret < 0) {
+		clear_probe_trace_events(*tevs, ntevs);
+		zfree(tevs);
+	} else {
+		ret = ntevs;
+		if (ntevs > 0 && target && target[0] == '/')
+			pev->uprobes = true;
+	}
+
+	return ret;
+}
+
 static int find_probe_trace_events_from_cache(struct perf_probe_event *pev,
 					      struct probe_trace_event **tevs)
 {
@@ -2903,6 +2998,10 @@ static int find_probe_trace_events_from_cache(struct perf_probe_event *pev,
 	struct str_node *node;
 	int ret, i;
 
+	if (pev->sdt)
+		/* For SDT/cached events, we use special search functions */
+		return find_cached_events(pev, tevs, pev->target);
+
 	cache = probe_cache__new(pev->target);
 	if (!cache)
 		return 0;
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index abfb05cf135b..9aed9c332da6 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -362,13 +362,38 @@ probe_cache_entry__new(struct perf_probe_event *pev)
 	return entry;
 }
 
-/* For the kernel probe caches, pass target = NULL */
+int probe_cache_entry__get_event(struct probe_cache_entry *entry,
+				 struct probe_trace_event **tevs)
+{
+	struct probe_trace_event *tev;
+	struct str_node *node;
+	int ret, i;
+
+	ret = strlist__nr_entries(entry->tevlist);
+	if (ret > probe_conf.max_probes)
+		return -E2BIG;
+
+	*tevs = zalloc(ret * sizeof(*tev));
+	if (!*tevs)
+		return -ENOMEM;
+
+	i = 0;
+	strlist__for_each_entry(node, entry->tevlist) {
+		tev = &(*tevs)[i++];
+		ret = parse_probe_trace_command(node->s, tev);
+		if (ret < 0)
+			break;
+	}
+	return i;
+}
+
+/* For the kernel probe caches, pass target = NULL or DSO__NAME_KALLSYMS */
 static int probe_cache__open(struct probe_cache *pcache, const char *target)
 {
 	char cpath[PATH_MAX];
 	char sbuildid[SBUILD_ID_SIZE];
 	char *dir_name = NULL;
-	bool is_kallsyms = !target;
+	bool is_kallsyms = false;
 	int ret, fd;
 
 	if (target && build_id_cache__cached(target)) {
@@ -378,12 +403,13 @@ static int probe_cache__open(struct probe_cache *pcache, const char *target)
 		goto found;
 	}
 
-	if (target)
-		ret = filename__sprintf_build_id(target, sbuildid);
-	else {
+	if (!target || !strcmp(target, DSO__NAME_KALLSYMS)) {
 		target = DSO__NAME_KALLSYMS;
+		is_kallsyms = true;
 		ret = sysfs__sprintf_build_id("/", sbuildid);
-	}
+	} else
+		ret = filename__sprintf_build_id(target, sbuildid);
+
 	if (ret < 0) {
 		pr_debug("Failed to get build-id from %s.\n", target);
 		return ret;
diff --git a/tools/perf/util/probe-file.h b/tools/perf/util/probe-file.h
index d513b346a70e..cafbe1d3f3bf 100644
--- a/tools/perf/util/probe-file.h
+++ b/tools/perf/util/probe-file.h
@@ -34,6 +34,9 @@ int probe_file__get_events(int fd, struct strfilter *filter,
 				  struct strlist *plist);
 int probe_file__del_strlist(int fd, struct strlist *namelist);
 
+int probe_cache_entry__get_event(struct probe_cache_entry *entry,
+				 struct probe_trace_event **tevs);
+
 struct probe_cache *probe_cache__new(const char *target);
 int probe_cache__add_entry(struct probe_cache *pcache,
 			   struct perf_probe_event *pev,
-- 
2.7.4

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

* [PATCH 14/19] perf probe: Search SDT/cached event from all probe caches
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (12 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 13/19] perf probe: Allow wildcard for cached events Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 15/19] perf list: Show SDT and pre-cached events Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Brendan Gregg, Hemant Kumar, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <mhiramat@kernel.org>

Search SDT/cached event from all probe caches if user doesn't pass any
binary. With this, we don't have to specify target binary for SDT and
named cached events (which start with %).

E.g. without this, a target binary must be passed with -x.

  # perf probe -x /usr/lib64/libc-2.20.so -a %sdt_libc:\*

With this change, we don't need it anymore.

  # perf probe -a %sdt_libc:\*

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831792812.17065.2353705982669445313.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 105 ++++++++++++++++++++++++++++++++++--------
 1 file changed, 86 insertions(+), 19 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 7b96e687568e..c63e3b8704fe 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -2557,41 +2557,60 @@ static int probe_trace_event__set_name(struct probe_trace_event *tev,
 	return 0;
 }
 
-static int __add_probe_trace_events(struct perf_probe_event *pev,
-				     struct probe_trace_event *tevs,
-				     int ntevs, bool allow_suffix)
+static int __open_probe_file_and_namelist(bool uprobe,
+					  struct strlist **namelist)
 {
-	int i, fd, ret;
-	struct probe_trace_event *tev = NULL;
-	struct probe_cache *cache = NULL;
-	struct strlist *namelist;
+	int fd;
 
-	fd = probe_file__open(PF_FL_RW | (pev->uprobes ? PF_FL_UPROBE : 0));
+	fd = probe_file__open(PF_FL_RW | (uprobe ? PF_FL_UPROBE : 0));
 	if (fd < 0)
 		return fd;
 
 	/* Get current event names */
-	namelist = probe_file__get_namelist(fd);
-	if (!namelist) {
+	*namelist = probe_file__get_namelist(fd);
+	if (!(*namelist)) {
 		pr_debug("Failed to get current event list.\n");
-		ret = -ENOMEM;
-		goto close_out;
+		close(fd);
+		return -ENOMEM;
 	}
+	return fd;
+}
+
+static int __add_probe_trace_events(struct perf_probe_event *pev,
+				     struct probe_trace_event *tevs,
+				     int ntevs, bool allow_suffix)
+{
+	int i, fd[2] = {-1, -1}, up, ret;
+	struct probe_trace_event *tev = NULL;
+	struct probe_cache *cache = NULL;
+	struct strlist *namelist[2] = {NULL, NULL};
+
+	up = pev->uprobes ? 1 : 0;
+	fd[up] = __open_probe_file_and_namelist(up, &namelist[up]);
+	if (fd[up] < 0)
+		return fd[up];
 
 	ret = 0;
 	for (i = 0; i < ntevs; i++) {
 		tev = &tevs[i];
+		up = tev->uprobes ? 1 : 0;
+		if (fd[up] == -1) {	/* Open the kprobe/uprobe_events */
+			fd[up] = __open_probe_file_and_namelist(up,
+								&namelist[up]);
+			if (fd[up] < 0)
+				goto close_out;
+		}
 		/* Skip if the symbol is out of .text or blacklisted */
 		if (!tev->point.symbol && !pev->uprobes)
 			continue;
 
 		/* Set new name for tev (and update namelist) */
-		ret = probe_trace_event__set_name(tev, pev, namelist,
+		ret = probe_trace_event__set_name(tev, pev, namelist[up],
 						  allow_suffix);
 		if (ret < 0)
 			break;
 
-		ret = probe_file__add_event(fd, tev);
+		ret = probe_file__add_event(fd[up], tev);
 		if (ret < 0)
 			break;
 
@@ -2614,9 +2633,12 @@ static int __add_probe_trace_events(struct perf_probe_event *pev,
 		probe_cache__delete(cache);
 	}
 
-	strlist__delete(namelist);
 close_out:
-	close(fd);
+	for (up = 0; up < 2; up++) {
+		strlist__delete(namelist[up]);
+		if (fd[up] >= 0)
+			close(fd[up]);
+	}
 	return ret;
 }
 
@@ -2989,6 +3011,48 @@ static int find_cached_events(struct perf_probe_event *pev,
 	return ret;
 }
 
+/* Try to find probe_trace_event from all probe caches */
+static int find_cached_events_all(struct perf_probe_event *pev,
+				   struct probe_trace_event **tevs)
+{
+	struct probe_trace_event *tmp_tevs = NULL;
+	struct strlist *bidlist;
+	struct str_node *nd;
+	char *pathname;
+	int ntevs = 0;
+	int ret;
+
+	/* Get the buildid list of all valid caches */
+	bidlist = build_id_cache__list_all(true);
+	if (!bidlist) {
+		ret = -errno;
+		pr_debug("Failed to get buildids: %d\n", ret);
+		return ret;
+	}
+
+	ret = 0;
+	strlist__for_each_entry(nd, bidlist) {
+		pathname = build_id_cache__origname(nd->s);
+		ret = find_cached_events(pev, &tmp_tevs, pathname);
+		/* In the case of cnt == 0, we just skip it */
+		if (ret > 0)
+			ret = concat_probe_trace_events(tevs, &ntevs,
+							&tmp_tevs, ret);
+		free(pathname);
+		if (ret < 0)
+			break;
+	}
+	strlist__delete(bidlist);
+
+	if (ret < 0) {
+		clear_probe_trace_events(*tevs, ntevs);
+		zfree(tevs);
+	} else
+		ret = ntevs;
+
+	return ret;
+}
+
 static int find_probe_trace_events_from_cache(struct perf_probe_event *pev,
 					      struct probe_trace_event **tevs)
 {
@@ -2998,10 +3062,13 @@ static int find_probe_trace_events_from_cache(struct perf_probe_event *pev,
 	struct str_node *node;
 	int ret, i;
 
-	if (pev->sdt)
+	if (pev->sdt) {
 		/* For SDT/cached events, we use special search functions */
-		return find_cached_events(pev, tevs, pev->target);
-
+		if (!pev->target)
+			return find_cached_events_all(pev, tevs);
+		else
+			return find_cached_events(pev, tevs, pev->target);
+	}
 	cache = probe_cache__new(pev->target);
 	if (!cache)
 		return 0;
-- 
2.7.4

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

* [PATCH 15/19] perf list: Show SDT and pre-cached events
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (13 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 14/19] perf probe: Search SDT/cached event from all probe caches Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 16/19] perf probe: Support @BUILDID or @FILE suffix for SDT events Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Masami Hiramatsu,
	Ananth N Mavinakayanahalli, Brendan Gregg, Hemant Kumar,
	Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo

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

Show SDT and pre-cached events by perf-list with "sdt". This also shows
the binary and build-id where the events are placed only when there are
same name events on different binaries.

e.g.:

  # perf list sdt

  List of pre-defined events (to be used in -e):

    sdt_libc:lll_futex_wake                            [SDT event]
    sdt_libc:lll_lock_wait_private                     [SDT event]
    sdt_libc:longjmp                                   [SDT event]
    sdt_libc:longjmp_target                            [SDT event]
  ...
    sdt_libstdcxx:rethrow@/usr/bin/gcc(0cc207fc4b27)   [SDT event]
    sdt_libstdcxx:rethrow@/usr/lib64/libstdc++.so.6.0.20(91c7a88fdf49)
    sdt_libstdcxx:throw@/usr/bin/gcc(0cc207fc4b27)     [SDT event]
    sdt_libstdcxx:throw@/usr/lib64/libstdc++.so.6.0.20(91c7a88fdf49)

The binary path and build-id are shown in below format;

  <GROUP>:<EVENT>@<PATH>(<BUILD-ID>)

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20160624090646.25421.44225.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-list.c      |  6 +++-
 tools/perf/util/parse-events.c | 82 ++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/parse-events.h |  2 ++
 tools/perf/util/probe-file.h   |  9 +++++
 4 files changed, 98 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 5e22db4684b8..88ee419e5189 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -25,7 +25,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
 		OPT_END()
 	};
 	const char * const list_usage[] = {
-		"perf list [hw|sw|cache|tracepoint|pmu|event_glob]",
+		"perf list [hw|sw|cache|tracepoint|pmu|sdt|event_glob]",
 		NULL
 	};
 
@@ -62,6 +62,8 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
 			print_hwcache_events(NULL, raw_dump);
 		else if (strcmp(argv[i], "pmu") == 0)
 			print_pmu_events(NULL, raw_dump);
+		else if (strcmp(argv[i], "sdt") == 0)
+			print_sdt_events(NULL, NULL, raw_dump);
 		else if ((sep = strchr(argv[i], ':')) != NULL) {
 			int sep_idx;
 
@@ -76,6 +78,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
 
 			s[sep_idx] = '\0';
 			print_tracepoint_events(s, s + sep_idx + 1, raw_dump);
+			print_sdt_events(s, s + sep_idx + 1, raw_dump);
 			free(s);
 		} else {
 			if (asprintf(&s, "*%s*", argv[i]) < 0) {
@@ -89,6 +92,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
 			print_hwcache_events(s, raw_dump);
 			print_pmu_events(s, raw_dump);
 			print_tracepoint_events(NULL, s, raw_dump);
+			print_sdt_events(NULL, s, raw_dump);
 			free(s);
 		}
 	}
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 6b4fff375d99..375af0e02831 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -20,6 +20,7 @@
 #include "pmu.h"
 #include "thread_map.h"
 #include "cpumap.h"
+#include "probe-file.h"
 #include "asm/bug.h"
 
 #define MAX_NAME_LEN 100
@@ -1984,6 +1985,85 @@ static bool is_event_supported(u8 type, unsigned config)
 	return ret;
 }
 
+void print_sdt_events(const char *subsys_glob, const char *event_glob,
+		      bool name_only)
+{
+	struct probe_cache *pcache;
+	struct probe_cache_entry *ent;
+	struct strlist *bidlist, *sdtlist;
+	struct strlist_config cfg = {.dont_dupstr = true};
+	struct str_node *nd, *nd2;
+	char *buf, *path, *ptr = NULL;
+	bool show_detail = false;
+	int ret;
+
+	sdtlist = strlist__new(NULL, &cfg);
+	if (!sdtlist) {
+		pr_debug("Failed to allocate new strlist for SDT\n");
+		return;
+	}
+	bidlist = build_id_cache__list_all(true);
+	if (!bidlist) {
+		pr_debug("Failed to get buildids: %d\n", errno);
+		return;
+	}
+	strlist__for_each_entry(nd, bidlist) {
+		pcache = probe_cache__new(nd->s);
+		if (!pcache)
+			continue;
+		list_for_each_entry(ent, &pcache->entries, node) {
+			if (!ent->sdt)
+				continue;
+			if (subsys_glob &&
+			    !strglobmatch(ent->pev.group, subsys_glob))
+				continue;
+			if (event_glob &&
+			    !strglobmatch(ent->pev.event, event_glob))
+				continue;
+			ret = asprintf(&buf, "%s:%s@%s", ent->pev.group,
+					ent->pev.event, nd->s);
+			if (ret > 0)
+				strlist__add(sdtlist, buf);
+		}
+		probe_cache__delete(pcache);
+	}
+	strlist__delete(bidlist);
+
+	strlist__for_each_entry(nd, sdtlist) {
+		buf = strchr(nd->s, '@');
+		if (buf)
+			*(buf++) = '\0';
+		if (name_only) {
+			printf("%s ", nd->s);
+			continue;
+		}
+		nd2 = strlist__next(nd);
+		if (nd2) {
+			ptr = strchr(nd2->s, '@');
+			if (ptr)
+				*ptr = '\0';
+			if (strcmp(nd->s, nd2->s) == 0)
+				show_detail = true;
+		}
+		if (show_detail) {
+			path = build_id_cache__origname(buf);
+			ret = asprintf(&buf, "%s@%s(%.12s)", nd->s, path, buf);
+			if (ret > 0) {
+				printf("  %-50s [%s]\n", buf, "SDT event");
+				free(buf);
+			}
+		} else
+			printf("  %-50s [%s]\n", nd->s, "SDT event");
+		if (nd2) {
+			if (strcmp(nd->s, nd2->s) != 0)
+				show_detail = false;
+			if (ptr)
+				*ptr = '@';
+		}
+	}
+	strlist__delete(sdtlist);
+}
+
 int print_hwcache_events(const char *event_glob, bool name_only)
 {
 	unsigned int type, op, i, evt_i = 0, evt_num = 0;
@@ -2166,6 +2246,8 @@ void print_events(const char *event_glob, bool name_only)
 	}
 
 	print_tracepoint_events(NULL, NULL, name_only);
+
+	print_sdt_events(NULL, NULL, name_only);
 }
 
 int parse_events__is_hardcoded_term(struct parse_events_term *term)
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index 0bd664dfa53c..b4aa7eb2df73 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -183,6 +183,8 @@ void print_symbol_events(const char *event_glob, unsigned type,
 void print_tracepoint_events(const char *subsys_glob, const char *event_glob,
 			     bool name_only);
 int print_hwcache_events(const char *event_glob, bool name_only);
+void print_sdt_events(const char *subsys_glob, const char *event_glob,
+		      bool name_only);
 int is_valid_tracepoint(const char *event_string);
 
 int valid_event_mount(const char *eventfs);
diff --git a/tools/perf/util/probe-file.h b/tools/perf/util/probe-file.h
index cafbe1d3f3bf..9577b5c0b487 100644
--- a/tools/perf/util/probe-file.h
+++ b/tools/perf/util/probe-file.h
@@ -24,6 +24,8 @@ struct probe_cache {
 #define for_each_probe_cache_entry(entry, pcache) \
 	list_for_each_entry(entry, &pcache->entries, node)
 
+/* probe-file.c depends on libelf */
+#ifdef HAVE_LIBELF_SUPPORT
 int probe_file__open(int flag);
 int probe_file__open_both(int *kfd, int *ufd, int flag);
 struct strlist *probe_file__get_namelist(int fd);
@@ -52,4 +54,11 @@ struct probe_cache_entry *probe_cache__find(struct probe_cache *pcache,
 struct probe_cache_entry *probe_cache__find_by_name(struct probe_cache *pcache,
 					const char *group, const char *event);
 int probe_cache__show_all_caches(struct strfilter *filter);
+#else	/* ! HAVE_LIBELF_SUPPORT */
+static inline struct probe_cache *probe_cache__new(const char *tgt __maybe_unused)
+{
+	return NULL;
+}
+#define probe_cache__delete(pcache) do {} while (0)
+#endif
 #endif
-- 
2.7.4

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

* [PATCH 16/19] perf probe: Support @BUILDID or @FILE suffix for SDT events
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (14 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 15/19] perf list: Show SDT and pre-cached events Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 17/19] perf probe: Support a special SDT probe format Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Brendan Gregg, Hemant Kumar, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <mhiramat@kernel.org>

Support @BUILDID or @FILE suffix for SDT events. This allows perf to add
probes on SDTs/pre-cached events on given FILE or the file which has
given BUILDID (also, this complements BUILDID.)

For example, both gcc and libstdc++ has same SDTs as below.  If you
would like to add a probe on sdt_libstdcxx:catch on gcc, you can do as
below.

  ----
  # perf list sdt | tail -n 6
    sdt_libstdcxx:catch@/usr/bin/gcc(0cc207fc4b27)     [SDT event]
    sdt_libstdcxx:catch@/usr/lib64/libstdc++.so.6.0.20(91c7a88fdf49)
    sdt_libstdcxx:rethrow@/usr/bin/gcc(0cc207fc4b27)   [SDT event]
    sdt_libstdcxx:rethrow@/usr/lib64/libstdc++.so.6.0.20(91c7a88fdf49)
    sdt_libstdcxx:throw@/usr/bin/gcc(0cc207fc4b27)     [SDT event]
    sdt_libstdcxx:throw@/usr/lib64/libstdc++.so.6.0.20(91c7a88fdf49)
  # perf probe -a %sdt_libstdcxx:catch@0cc
  Added new event:
    sdt_libstdcxx:catch  (on %catch in /usr/bin/gcc)

  You can now use it in all perf tools, such as:

  	perf record -e sdt_libstdcxx:catch -aR sleep 1
  ----

Committer note:

Doing the full sequence of steps to get the results above:

With a clean build-id cache:

  [root@jouet ~]# rm -rf ~/.debug/
  [root@jouet ~]# perf list sdt

  List of pre-defined events (to be used in -e):

  [root@jouet ~]#

No events whatsoever, then, we can add all events in gcc to the build-id
cache, doing a --add + --dry-run:

  [root@jouet ~]# perf probe --dry-run --cache -x /usr/bin/gcc --add %sdt_libstdcxx:\*
  Added new events:
    sdt_libstdcxx:throw  (on %* in /usr/bin/gcc)
    sdt_libstdcxx:rethrow (on %* in /usr/bin/gcc)
    sdt_libstdcxx:catch  (on %* in /usr/bin/gcc)

  You can now use it in all perf tools, such as:

	perf record -e sdt_libstdcxx:catch -aR sleep 1

  [root@jouet ~]#

It really didn't add any events, it just cached them:

  [root@jouet ~]# perf probe -l
  [root@jouet ~]#

We can see that it was cached as:

  [root@jouet ~]# ls -la ~/.debug/usr/bin/gcc/9a0730e2bcc6d2a2003d21ac46807e8ee6bcb7c2/
  total 976
  drwxr-xr-x. 2 root root   4096 Jul 13 21:47 .
  drwxr-xr-x. 3 root root   4096 Jul 13 21:47 ..
  -rwxr-xr-x. 4 root root 985912 Jun 22 18:52 elf
  -rw-r--r--. 1 root root    303 Jul 13 21:47 probes
  [root@jouet ~]# file ~/.debug/usr/bin/gcc/9a0730e2bcc6d2a2003d21ac46807e8ee6bcb7c2/elf
  /root/.debug/usr/bin/gcc/9a0730e2bcc6d2a2003d21ac46807e8ee6bcb7c2/elf: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=9a0730e2bcc6d2a2003d21ac46807e8ee6bcb7c2, stripped
  [root@jouet ~]# cat ~/.debug/usr/bin/gcc/9a0730e2bcc6d2a2003d21ac46807e8ee6bcb7c2/probes
  %sdt_libstdcxx:throw=throw
  p:sdt_libstdcxx/throw /usr/bin/gcc:0x71ffd
  %sdt_libstdcxx:rethrow=rethrow
  p:sdt_libstdcxx/rethrow /usr/bin/gcc:0x720b8
  %sdt_libstdcxx:catch=catch
  p:sdt_libstdcxx/catch /usr/bin/gcc:0x7307f
  %sdt_libgcc:unwind=unwind
  p:sdt_libgcc/unwind /usr/bin/gcc:0x7eec0
  #sdt_libstdcxx:*=%*
  [root@jouet ~]#

Ok, now we can use 'perf probe' to refer to those cached entries as:

  Humm, nope, doing as above we end up with:

  [root@jouet ~]# perf probe -a %sdt_libstdcxx:catch
  Semantic error :* is bad for event name -it must follow C symbol-naming rule.
    Error: Failed to add events.
  [root@jouet ~]#

But it worked at some point, lets try not using --dry-run:

Resetting everything:

  # rm -rf ~/.debug/
  # perf probe -d *:*
  # perf probe -l
  # perf list sdt

    List of pre-defined events (to be used in -e):

  #

Ok, now it cached everything, even things we haven't asked it to
(sdt_libgcc:unwind):

  [root@jouet ~]# perf probe -x /usr/bin/gcc --add %sdt_libstdcxx:\*
  Added new events:
    sdt_libstdcxx:throw  (on %* in /usr/bin/gcc)
    sdt_libstdcxx:rethrow (on %* in /usr/bin/gcc)
    sdt_libstdcxx:catch  (on %* in /usr/bin/gcc)

  You can now use it in all perf tools, such as:

	perf record -e sdt_libstdcxx:catch -aR sleep 1

  [root@jouet ~]# perf list sdt

  List of pre-defined events (to be used in -e):

    sdt_libgcc:unwind                                  [SDT event]
    sdt_libstdcxx:catch                                [SDT event]
    sdt_libstdcxx:rethrow                              [SDT event]
    sdt_libstdcxx:throw                                [SDT event]
  [root@jouet ~]#

And we have the events in place:

  [root@jouet ~]# perf probe -l
    sdt_libstdcxx:catch  (on execute_cfa_program+1551@../../../libgcc/unwind-dw2.c in /usr/bin/gcc)
    sdt_libstdcxx:rethrow (on d_print_subexpr+280@libsupc++/cp-demangle.c in /usr/bin/gcc)
    sdt_libstdcxx:throw  (on d_print_subexpr+93@libsupc++/cp-demangle.c in /usr/bin/gcc)
  [root@jouet ~]#

And trying to use them at least has 'perf trace --event sdt*:*' working.

Then, if we try to add the ones in libstdc++:

  [root@jouet ~]# perf probe -x /usr/lib64/libstdc++.so.6 -a %sdt_libstdcxx:\*
  Error: event "catch" already exists.
   Hint: Remove existing event by 'perf probe -d'
         or force duplicates by 'perf probe -f'
         or set 'force=yes' in BPF source.
    Error: Failed to add events.
  [root@jouet ~]#

Doesn't work, dups, but at least this served to, unbeknownst to the user, add
the SDT probes in /usr/lib64/libstdc++.so.6!

  [root@jouet ~]# perf list sdt

  List of pre-defined events (to be used in -e):

    sdt_libgcc:unwind                                  [SDT event]
    sdt_libstdcxx:catch@/usr/bin/gcc(9a0730e2bcc6)     [SDT event]
    sdt_libstdcxx:catch@/usr/lib64/libstdc++.so.6.0.22(ef2b7066559a) [SDT event]
    sdt_libstdcxx:rethrow@/usr/bin/gcc(9a0730e2bcc6)   [SDT event]
    sdt_libstdcxx:rethrow@/usr/lib64/libstdc++.so.6.0.22(ef2b7066559a) [SDT event]
    sdt_libstdcxx:throw@/usr/bin/gcc(9a0730e2bcc6)     [SDT event]
    sdt_libstdcxx:throw@/usr/lib64/libstdc++.so.6.0.22(ef2b7066559a) [SDT event]
  [root@jouet ~]#

Now we should be able to get to the original cset comment, if we remove all
SDTs events in place, not from the cache, from the kernel, where it was set up as:

  [root@jouet ~]# ls -la /sys/kernel/debug/tracing/events/sdt_libstdcxx/
  total 0
  drwxr-xr-x.  5 root root 0 Jul 13 22:00 .
  drwxr-xr-x. 80 root root 0 Jul 13 21:56 ..
  drwxr-xr-x.  2 root root 0 Jul 13 22:00 catch
  -rw-r--r--.  1 root root 0 Jul 13 22:00 enable
  -rw-r--r--.  1 root root 0 Jul 13 22:00 filter
  drwxr-xr-x.  2 root root 0 Jul 13 22:00 rethrow
  drwxr-xr-x.  2 root root 0 Jul 13 22:00 throw
  [root@jouet ~]#

  [root@jouet ~]# head -2 /sys/kernel/debug/tracing/events/sdt_libstdcxx/throw/format
  name: throw
  ID: 2059
  [root@jouet ~]#

Now to remove it:

  [root@jouet ~]# perf probe -d sdt_libstdc*:*
  Removed event: sdt_libstdcxx:catch
  Removed event: sdt_libstdcxx:rethrow
  Removed event: sdt_libstdcxx:throw
  [root@jouet ~]#

Which caused:

  [root@jouet ~]# ls -la /sys/kernel/debug/tracing/events/sdt_libstdcxx/
  ls: cannot access '/sys/kernel/debug/tracing/events/sdt_libstdcxx/': No such file or directory
  [root@jouet ~]#

Ok, now we can do:

  [root@jouet ~]# perf list sdt_libstdcxx:catch

  List of pre-defined events (to be used in -e):

    sdt_libstdcxx:catch@/usr/bin/gcc(9a0730e2bcc6)     [SDT event]
    sdt_libstdcxx:catch@/usr/lib64/libstdc++.so.6.0.22(ef2b7066559a) [SDT event]
  [root@jouet ~]#

So, these are not really 'pre-defined events', i.e. we can't use them with
'perf record --event':

  [root@jouet ~]# perf record --event sdt_libstdcxx:catch*
  event syntax error: 'sdt_libstdcxx:catch*'
                       \___ unknown tracepoint

  Error:	File /sys/kernel/debug/tracing/events/sdt_libstdcxx/catch* not found.
  Hint:	Perhaps this kernel misses some CONFIG_ setting to enable this feature?.
<SNIP>
  [root@jouet ~]#

To have it really pre-defined we must use perf probe to get its definition from
the cache and set it up in the kernel, creating the tracepoint to _then_ use it
with 'perf record --event':

  [root@jouet ~]# perf probe -a sdt_libstdcxx:catch
  Semantic error :There is non-digit char in line number.
  <SNIP>

Oops, there is another gotcha here, we need that pesky '%' character:

  [root@jouet ~]# perf probe -a %sdt_libstdcxx:catch
  Added new events:
    sdt_libstdcxx:catch  (on %catch in /usr/bin/gcc)
    sdt_libstdcxx:catch_1 (on %catch in /usr/lib64/libstdc++.so.6.0.22)

  You can now use it in all perf tools, such as:

	perf record -e sdt_libstdcxx:catch_1 -aR sleep 1

  [root@jouet ~]#

But then we added _two_ events, one with the name we expected, the other one
with a _ added, when doing the analysis we need to pay attention to who maps to
who.

And here is where we get to the point of this patch, which is to be able to
disambiguate those definitions for 'catch' in the build-id cache, but first we need
remove those events we just added:

[root@jouet ~]# perf probe -d %sdt_libstdcxx:catch

Oops, that didn't remove anything, we need to _remove_ that % char in this case:

  [root@jouet ~]# perf probe -d sdt_libstdcxx:catch
  Removed event: sdt_libstdcxx:catch

And we need to remove the other event added, i.e. I forgot to add a * at the end:

  [root@jouet ~]# perf probe -d sdt_libstdcxx:catch*
  Removed event: sdt_libstdcxx:catch_1
  [root@jouet ~]#

Ok, disambiguating it using what is in this patch:

  [root@jouet ~]# perf list sdt_libstdcxx:catch

  List of pre-defined events (to be used in -e):

    sdt_libstdcxx:catch@/usr/bin/gcc(9a0730e2bcc6)     [SDT event]
    sdt_libstdcxx:catch@/usr/lib64/libstdc++.so.6.0.22(ef2b7066559a) [SDT event]
  [root@jouet ~]#
  [root@jouet ~]# perf probe -a %sdt_libstdcxx:catch@9a07
  Added new event:
    sdt_libstdcxx:catch  (on %catch in /usr/bin/gcc)

  You can now use it in all perf tools, such as:

	perf record -e sdt_libstdcxx:catch -aR sleep 1

  [root@jouet ~]# perf probe -l
    sdt_libstdcxx:catch  (on execute_cfa_program+1551@../../../libgcc/unwind-dw2.c in /usr/bin/gcc)
  [root@jouet ~]#

Yeah, it works! But we need to try and simplify this :-)

Update: Some aspects of this simplification take place in the following
        patches.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831793746.17065.13065062753978236612.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/build-id.c    | 43 +++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/build-id.h    |  1 +
 tools/perf/util/probe-event.c | 17 +++++++++++++++--
 3 files changed, 59 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 36b4279a9002..5651f3c12f93 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -523,6 +523,49 @@ err_out:
 	goto out_free;
 }
 
+static bool str_is_build_id(const char *maybe_sbuild_id, size_t len)
+{
+	size_t i;
+
+	for (i = 0; i < len; i++) {
+		if (!isxdigit(maybe_sbuild_id[i]))
+			return false;
+	}
+	return true;
+}
+
+/* Return the valid complete build-id */
+char *build_id_cache__complement(const char *incomplete_sbuild_id)
+{
+	struct strlist *bidlist;
+	struct str_node *nd, *cand = NULL;
+	char *sbuild_id = NULL;
+	size_t len = strlen(incomplete_sbuild_id);
+
+	if (len >= SBUILD_ID_SIZE ||
+	    !str_is_build_id(incomplete_sbuild_id, len))
+		return NULL;
+
+	bidlist = build_id_cache__list_all(true);
+	if (!bidlist)
+		return NULL;
+
+	strlist__for_each_entry(nd, bidlist) {
+		if (strncmp(nd->s, incomplete_sbuild_id, len) != 0)
+			continue;
+		if (cand) {	/* Error: There are more than 2 candidates. */
+			cand = NULL;
+			break;
+		}
+		cand = nd;
+	}
+	if (cand)
+		sbuild_id = strdup(cand->s);
+	strlist__delete(bidlist);
+
+	return sbuild_id;
+}
+
 char *build_id_cache__cachedir(const char *sbuild_id, const char *name,
 			       bool is_kallsyms, bool is_vdso)
 {
diff --git a/tools/perf/util/build-id.h b/tools/perf/util/build-id.h
index 64e740f4bc28..d27990610f9f 100644
--- a/tools/perf/util/build-id.h
+++ b/tools/perf/util/build-id.h
@@ -35,6 +35,7 @@ char *build_id_cache__linkname(const char *sbuild_id, char *bf, size_t size);
 char *build_id_cache__cachedir(const char *sbuild_id, const char *name,
 			       bool is_kallsyms, bool is_vdso);
 struct strlist *build_id_cache__list_all(bool validonly);
+char *build_id_cache__complement(const char *incomplete_sbuild_id);
 int build_id_cache__list_build_ids(const char *pathname,
 				   struct strlist **result);
 bool build_id_cache__cached(const char *sbuild_id);
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index c63e3b8704fe..f12081e48a32 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1251,8 +1251,21 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
 	ptr = strpbrk(arg, ";=@+%");
 	if (pev->sdt) {
 		if (ptr) {
-			semantic_error("%s must contain only an SDT event name.\n", arg);
-			return -EINVAL;
+			if (*ptr != '@') {
+				semantic_error("%s must be an SDT name.\n",
+					       arg);
+				return -EINVAL;
+			}
+			/* This must be a target file name or build id */
+			tmp = build_id_cache__complement(ptr + 1);
+			if (tmp) {
+				pev->target = build_id_cache__origname(tmp);
+				free(tmp);
+			} else
+				pev->target = strdup(ptr + 1);
+			if (!pev->target)
+				return -ENOMEM;
+			*ptr = '\0';
 		}
 		ret = parse_perf_probe_event_name(&arg, pev);
 		if (ret == 0) {
-- 
2.7.4

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

* [PATCH 17/19] perf probe: Support a special SDT probe format
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (15 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 16/19] perf probe: Support @BUILDID or @FILE suffix for SDT events Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 18/19] perf build: Add sdt feature detection Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Brendan Gregg, Hemant Kumar, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <mhiramat@kernel.org>

Support a special SDT probe format which can omit the '%' prefix only if
the SDT group name starts with "sdt_". So, for example both of
"%sdt_libc:setjump" and "sdt_libc:setjump" are acceptable for perf probe
--add.

E.g. without this:

  # perf probe -a sdt_libc:setjmp
  Semantic error :There is non-digit char in line number.
  ...

With this:

  # perf probe -a sdt_libc:setjmp
  Added new event:
    sdt_libc:setjmp      (on %setjmp in /usr/lib64/libc-2.20.so)

  You can now use it in all perf tools, such as:

  	perf record -e sdt_libc:setjmp -aR sleep 1

Suggested-by: Brendan Gregg <brendan.d.gregg@gmail.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831794674.17065.13359473252168740430.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-probe.txt |  4 +++-
 tools/perf/util/probe-event.c           | 12 ++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Documentation/perf-probe.txt b/tools/perf/Documentation/perf-probe.txt
index 39e387042098..736da44596e4 100644
--- a/tools/perf/Documentation/perf-probe.txt
+++ b/tools/perf/Documentation/perf-probe.txt
@@ -152,7 +152,9 @@ Probe points are defined by following syntax.
      [[GROUP:]EVENT=]SRC;PTN [ARG ...]
 
     4) Pre-defined SDT events or cached event with name
-     %[PROVIDER:]SDTEVENT
+     %[sdt_PROVIDER:]SDTEVENT
+     or,
+     sdt_PROVIDER:SDTEVENT
 
 'EVENT' specifies the name of new event, if omitted, it will be set the name of the probed function. You can also specify a group name by 'GROUP', if omitted, set 'probe' is used for kprobe and 'probe_<bin>' is used for uprobe.
 Note that using existing group name can conflict with other events. Especially, using the group name reserved for kernel modules can hide embedded events in the
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index f12081e48a32..d4f8835c0a27 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1243,9 +1243,17 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
 	if (!arg)
 		return -EINVAL;
 
-	if (arg[0] == '%') {
+	/*
+	 * If the probe point starts with '%',
+	 * or starts with "sdt_" and has a ':' but no '=',
+	 * then it should be a SDT/cached probe point.
+	 */
+	if (arg[0] == '%' ||
+	    (!strncmp(arg, "sdt_", 4) &&
+	     !!strchr(arg, ':') && !strchr(arg, '='))) {
 		pev->sdt = true;
-		arg++;
+		if (arg[0] == '%')
+			arg++;
 	}
 
 	ptr = strpbrk(arg, ";=@+%");
-- 
2.7.4

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

* [PATCH 18/19] perf build: Add sdt feature detection
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (16 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 17/19] perf probe: Support a special SDT probe format Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  2:20 ` [PATCH 19/19] perf test: Add a test case for SDT event Arnaldo Carvalho de Melo
  2016-07-14  6:58 ` [GIT PULL 00/19] perf/core improvements and fixes Ingo Molnar
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Brendan Gregg, Hemant Kumar, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <mhiramat@kernel.org>

This checks whether sys/sdt.h is available or not, which is required for
DTRACE_PROBE().

We can disable this feature by passing NO_SDT=1 when building.

This flag will be used for SDT test case and further SDT events in
perftools.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831795615.17065.17513820540591053933.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/build/Makefile.feature   |  3 ++-
 tools/build/feature/Makefile   |  6 +++++-
 tools/build/feature/test-all.c |  5 +++++
 tools/build/feature/test-sdt.c |  7 +++++++
 tools/perf/Makefile.perf       |  3 +++
 tools/perf/config/Makefile     | 10 ++++++++++
 tools/perf/tests/make          |  3 ++-
 7 files changed, 34 insertions(+), 3 deletions(-)
 create mode 100644 tools/build/feature/test-sdt.c

diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index fe12bee57418..a120c6b755a9 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -62,7 +62,8 @@ FEATURE_TESTS_BASIC :=			\
 	zlib				\
 	lzma				\
 	get_cpuid			\
-	bpf
+	bpf				\
+	sdt
 
 # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
 # of all feature tests
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index d6017c1abdb0..a0b29a311816 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -45,7 +45,8 @@ FILES=					\
 	test-zlib.bin			\
 	test-lzma.bin			\
 	test-bpf.bin			\
-	test-get_cpuid.bin
+	test-get_cpuid.bin		\
+	test-sdt.bin
 
 FILES := $(addprefix $(OUTPUT),$(FILES))
 
@@ -213,6 +214,9 @@ $(OUTPUT)test-get_cpuid.bin:
 $(OUTPUT)test-bpf.bin:
 	$(BUILD)
 
+$(OUTPUT)test-sdt.bin:
+	$(BUILD)
+
 -include $(OUTPUT)*.d
 
 ###############################
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
index 843aed024a3a..699e43627397 100644
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -145,6 +145,10 @@
 # include "test-libcrypto.c"
 #undef main
 
+#define main main_test_sdt
+# include "test-sdt.c"
+#undef main
+
 int main(int argc, char *argv[])
 {
 	main_test_libpython();
@@ -178,6 +182,7 @@ int main(int argc, char *argv[])
 	main_test_get_cpuid();
 	main_test_bpf();
 	main_test_libcrypto();
+	main_test_sdt();
 
 	return 0;
 }
diff --git a/tools/build/feature/test-sdt.c b/tools/build/feature/test-sdt.c
new file mode 100644
index 000000000000..e4531a6e80ea
--- /dev/null
+++ b/tools/build/feature/test-sdt.c
@@ -0,0 +1,7 @@
+#include <sys/sdt.h>
+
+int main(void)
+{
+	DTRACE_PROBE(provider, name);
+	return 0;
+}
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index feb2c66b110b..a129fbc1ed37 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -81,6 +81,9 @@ include ../scripts/utilities.mak
 #
 # Define NO_LIBBPF if you do not want BPF support
 #
+# Define NO_SDT if you do not want to define SDT event in perf tools,
+# note that it doesn't disable SDT scanning support.
+#
 # Define FEATURES_DUMP to provide features detection dump file
 # and bypass the feature detection
 
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 5ac428060779..24803c58049a 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -355,6 +355,16 @@ ifndef NO_LIBELF
   endif # NO_LIBBPF
 endif # NO_LIBELF
 
+ifndef NO_SDT
+  ifneq ($(feature-sdt), 1)
+    msg := $(warning No sys/sdt.h found, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev);
+    NO_SDT := 1;
+  else
+    CFLAGS += -DHAVE_SDT_EVENT
+    $(call detected,CONFIG_SDT_EVENT)
+  endif
+endif
+
 ifdef PERF_HAVE_JITDUMP
   ifndef NO_DWARF
     $(call detected,CONFIG_JITDUMP)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 51966d92fc82..143f4d549769 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -82,6 +82,7 @@ make_no_auxtrace    := NO_AUXTRACE=1
 make_no_libbpf	    := NO_LIBBPF=1
 make_no_libcrypto   := NO_LIBCRYPTO=1
 make_with_babeltrace:= LIBBABELTRACE=1
+make_no_sdt	    := NO_SDT=1
 make_tags           := tags
 make_cscope         := cscope
 make_help           := help
@@ -105,7 +106,7 @@ make_minimal        := NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1
 make_minimal        += NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1
 make_minimal        += NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1
 make_minimal        += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1
-make_minimal        += NO_LIBCRYPTO=1
+make_minimal        += NO_LIBCRYPTO=1 NO_SDT=1
 
 # $(run) contains all available tests
 run := make_pure
-- 
2.7.4

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

* [PATCH 19/19] perf test: Add a test case for SDT event
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (17 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 18/19] perf build: Add sdt feature detection Arnaldo Carvalho de Melo
@ 2016-07-14  2:20 ` Arnaldo Carvalho de Melo
  2016-07-14  6:58 ` [GIT PULL 00/19] perf/core improvements and fixes Ingo Molnar
  19 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-14  2:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Brendan Gregg, Hemant Kumar, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <mhiramat@kernel.org>

Add a basic test case for SDT event support.  This test scans an SDT
event in perftools and check whether the SDT event is correctly stored
into the buildid cache.

Here is an example:

  ----
  $ perf test sdt -v
  47: Test SDT event probing                                   :
  --- start ---
  test child forked, pid 20732
  Found 72 SDTs in /home/mhiramat/ksrc/linux/tools/perf/perf
  Writing cache: %sdt_perf:test_target=test_target
  Cache committed: 0
  symbol:test_target file:(null) line:0 offset:0 return:0 lazy:(null)
  test child finished with 0
  ---- end ----
  Test SDT event probing: Ok
  ----

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831796546.17065.1502584370844087537.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/Build          |   1 +
 tools/perf/tests/builtin-test.c |   4 ++
 tools/perf/tests/sdt.c          | 115 ++++++++++++++++++++++++++++++++++++++++
 tools/perf/tests/tests.h        |   1 +
 4 files changed, 121 insertions(+)
 create mode 100644 tools/perf/tests/sdt.c

diff --git a/tools/perf/tests/Build b/tools/perf/tests/Build
index 66a28982547b..4158422cc2a6 100644
--- a/tools/perf/tests/Build
+++ b/tools/perf/tests/Build
@@ -39,6 +39,7 @@ perf-y += stat.o
 perf-y += event_update.o
 perf-y += event-times.o
 perf-y += backward-ring-buffer.o
+perf-y += sdt.o
 
 $(OUTPUT)tests/llvm-src-base.c: tests/bpf-script-example.c tests/Build
 	$(call rule_mkdir)
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index c23cbf733549..4dd2d050788a 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -218,6 +218,10 @@ static struct test generic_tests[] = {
 		.func = test__cpu_map_print,
 	},
 	{
+		.desc = "Test SDT event probing",
+		.func = test__sdt_event,
+	},
+	{
 		.func = NULL,
 	},
 };
diff --git a/tools/perf/tests/sdt.c b/tools/perf/tests/sdt.c
new file mode 100644
index 000000000000..f59d210e1baf
--- /dev/null
+++ b/tools/perf/tests/sdt.c
@@ -0,0 +1,115 @@
+#include <stdio.h>
+#include <sys/epoll.h>
+#include <util/util.h>
+#include <util/evlist.h>
+#include <linux/filter.h>
+#include "tests.h"
+#include "debug.h"
+#include "probe-file.h"
+#include "build-id.h"
+
+/* To test SDT event, we need libelf support to scan elf binary */
+#if defined(HAVE_SDT_EVENT) && defined(HAVE_LIBELF_SUPPORT)
+
+#include <sys/sdt.h>
+
+static int target_function(void)
+{
+	DTRACE_PROBE(perf, test_target);
+	return TEST_OK;
+}
+
+/* Copied from builtin-buildid-cache.c */
+static int build_id_cache__add_file(const char *filename)
+{
+	char sbuild_id[SBUILD_ID_SIZE];
+	u8 build_id[BUILD_ID_SIZE];
+	int err;
+
+	err = filename__read_build_id(filename, &build_id, sizeof(build_id));
+	if (err < 0) {
+		pr_debug("Failed to read build id of %s\n", filename);
+		return err;
+	}
+
+	build_id__sprintf(build_id, sizeof(build_id), sbuild_id);
+	err = build_id_cache__add_s(sbuild_id, filename, false, false);
+	if (err < 0)
+		pr_debug("Failed to add build id cache of %s\n", filename);
+	return err;
+}
+
+static char *get_self_path(void)
+{
+	char *buf = calloc(PATH_MAX, sizeof(char));
+
+	if (buf && readlink("/proc/self/exe", buf, PATH_MAX) < 0) {
+		pr_debug("Failed to get correct path of perf\n");
+		free(buf);
+		return NULL;
+	}
+	return buf;
+}
+
+static int search_cached_probe(const char *target,
+			       const char *group, const char *event)
+{
+	struct probe_cache *cache = probe_cache__new(target);
+	int ret = 0;
+
+	if (!cache) {
+		pr_debug("Failed to open probe cache of %s\n", target);
+		return -EINVAL;
+	}
+
+	if (!probe_cache__find_by_name(cache, group, event)) {
+		pr_debug("Failed to find %s:%s in the cache\n", group, event);
+		ret = -ENOENT;
+	}
+	probe_cache__delete(cache);
+
+	return ret;
+}
+
+int test__sdt_event(int subtests __maybe_unused)
+{
+	int ret = TEST_FAIL;
+	char __tempdir[] = "./test-buildid-XXXXXX";
+	char *tempdir = NULL, *myself = get_self_path();
+
+	if (myself == NULL || mkdtemp(__tempdir) == NULL) {
+		pr_debug("Failed to make a tempdir for build-id cache\n");
+		goto error;
+	}
+	/* Note that buildid_dir must be an absolute path */
+	tempdir = realpath(__tempdir, NULL);
+
+	/* At first, scan itself */
+	set_buildid_dir(tempdir);
+	if (build_id_cache__add_file(myself) < 0)
+		goto error_rmdir;
+
+	/* Open a cache and make sure the SDT is stored */
+	if (search_cached_probe(myself, "sdt_perf", "test_target") < 0)
+		goto error_rmdir;
+
+	/* TBD: probing on the SDT event and collect logs */
+
+	/* Call the target and get an event */
+	ret = target_function();
+
+error_rmdir:
+	/* Cleanup temporary buildid dir */
+	rm_rf(tempdir);
+error:
+	free(tempdir);
+	free(myself);
+	return ret;
+}
+#else
+int test__sdt_event(int subtests __maybe_unused)
+{
+	pr_debug("Skip SDT event test because SDT support is not compiled\n");
+	return TEST_SKIP;
+}
+#endif
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
index 52f969570c97..a0288f8092b2 100644
--- a/tools/perf/tests/tests.h
+++ b/tools/perf/tests/tests.h
@@ -88,6 +88,7 @@ int test__event_update(int subtest);
 int test__event_times(int subtest);
 int test__backward_ring_buffer(int subtest);
 int test__cpu_map_print(int subtest);
+int test__sdt_event(int subtest);
 
 #if defined(__arm__) || defined(__aarch64__)
 #ifdef HAVE_DWARF_UNWIND_SUPPORT
-- 
2.7.4

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (18 preceding siblings ...)
  2016-07-14  2:20 ` [PATCH 19/19] perf test: Add a test case for SDT event Arnaldo Carvalho de Melo
@ 2016-07-14  6:58 ` Ingo Molnar
  19 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2016-07-14  6:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov,
	Ananth N Mavinakayanahalli, Brendan Gregg, David Ahern,
	Hemant Kumar, Jiri Olsa, Josh Poimboeuf, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, pi3orama, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> I've added building objtool to most of the containers in my build test setup:
> 
> [root@jouet ~]# perf stat dm
> alpine:3.4: Ok
> centos:5: Ok
> centos:6: Ok
> centos:7: Ok
> debian:7: Ok
> debian:8: Ok
> debian:experimental: Ok
> fedora:21: Ok
> fedora:22: Ok
> fedora:23: Ok
> fedora:24: Ok
> fedora:rawhide: Ok
> mageia:5: Ok
> opensuse:13.2: Ok
> opensuse:42.1: Ok
> ubuntu:12.04.5: Ok
> ubuntu:14.04.4: Ok
> ubuntu:15.10: Ok
> ubuntu:16.04: Ok
> 
>  Performance counter stats for 'dm':
> 
>        2601.121782      task-clock (msec)         #    0.002 CPUs utilized          
>             86,368      context-switches          #    0.033 M/sec                  
>              5,740      cpu-migrations            #    0.002 M/sec                  
>             53,962      page-faults               #    0.021 M/sec                  
>      7,217,605,183      cycles                    #    2.775 GHz                    
>      6,534,540,119      instructions              #    0.91  insn per cycle         
>      1,408,715,184      branches                  #  541.580 M/sec                  
>         18,523,459      branch-misses             #    1.31% of all branches        
> 
>     1541.746171526 seconds time elapsed
> 
> [root@jouet ~]# 
> 
> - Arnaldo
> 
> The following changes since commit 7b39cafb7aa68ef8e32a9f51fbe737d96084ca74:
> 
>   tools: Work around BITS_PER_LONG related build failure in objtool (2016-07-13 09:37:43 +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-20160713
> 
> for you to fetch changes up to 8e5dc848356ecf6ea8d27d641c4d7ad8d42fe92b:
> 
>   perf test: Add a test case for SDT event (2016-07-13 23:09:10 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Finish merging initial SDT (Statically Defined Traces) support, see
>   cset comments for details about how it all works (Masami Hiramatsu)
> 
> - Support attaching eBPF programs to tracepoints (Wang Nan)
> 
> Infrastructure:
> 
> - Fix up BITS_PER_LONG setting (Arnaldo Carvalho de Melo)
> 
> - Add fallback from ELF_C_READ_MMAP to ELF_C_READ in objtool, fixing
>   the build in libelf implementations lacking that elf_begin() cmd,
>   such as Alpine Linux's (Arnaldo Carvalho de Melo)
> 
> - Avoid checking code drift on busybox's diff in objtool (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (3):
>       tools: Fix up BITS_PER_LONG setting
>       objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ
>       objtool: Avoid checking code drift on busybox's diff
> 
> Masami Hiramatsu (11):
>       perf probe: Fix to show correct error message for $vars and $params
>       perf probe: Accept %sdt and %cached event name
>       perf probe: Make --list show only available cached events
>       perf probe-cache: Add for_each_probe_cache_entry() wrapper
>       perf probe: Allow wildcard for cached events
>       perf probe: Search SDT/cached event from all probe caches
>       perf list: Show SDT and pre-cached events
>       perf probe: Support @BUILDID or @FILE suffix for SDT events
>       perf probe: Support a special SDT probe format
>       perf build: Add sdt feature detection
>       perf test: Add a test case for SDT event
> 
> Wang Nan (5):
>       tools lib bpf: New API to adjust type of a BPF program
>       tools lib bpf: Report error when kernel doesn't support program type
>       perf event parser: Add const qualifier to evt_name and sys_name
>       perf bpf: Rename bpf__foreach_tev() to bpf__foreach_event()
>       perf bpf: Support BPF program attach to tracepoints
> 
>  tools/build/Makefile.feature            |   3 +-
>  tools/build/feature/Makefile            |   6 +-
>  tools/build/feature/test-all.c          |   5 +
>  tools/build/feature/test-sdt.c          |   7 +
>  tools/include/asm-generic/bitsperlong.h |  24 ++-
>  tools/lib/bpf/libbpf.c                  |  80 +++++++--
>  tools/lib/bpf/libbpf.h                  |  10 ++
>  tools/objtool/Makefile                  |   5 +-
>  tools/objtool/elf.c                     |   7 +
>  tools/perf/Documentation/perf-probe.txt |  11 +-
>  tools/perf/Makefile.perf                |   3 +
>  tools/perf/builtin-list.c               |   6 +-
>  tools/perf/builtin-probe.c              |   2 +-
>  tools/perf/config/Makefile              |  10 ++
>  tools/perf/tests/Build                  |   1 +
>  tools/perf/tests/builtin-test.c         |   4 +
>  tools/perf/tests/make                   |   3 +-
>  tools/perf/tests/sdt.c                  | 115 ++++++++++++
>  tools/perf/tests/tests.h                |   1 +
>  tools/perf/util/bpf-loader.c            |  73 +++++++-
>  tools/perf/util/bpf-loader.h            |  12 +-
>  tools/perf/util/build-id.c              |  76 +++++++-
>  tools/perf/util/build-id.h              |   3 +-
>  tools/perf/util/parse-events.c          | 110 ++++++++++--
>  tools/perf/util/parse-events.h          |   4 +-
>  tools/perf/util/probe-event.c           | 309 +++++++++++++++++++++++++++-----
>  tools/perf/util/probe-event.h           |   1 +
>  tools/perf/util/probe-file.c            |  57 ++++--
>  tools/perf/util/probe-file.h            |  14 ++
>  29 files changed, 850 insertions(+), 112 deletions(-)
>  create mode 100644 tools/build/feature/test-sdt.c
>  create mode 100644 tools/perf/tests/sdt.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2017-11-03 13:54 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-03 13:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Andi Kleen, Andrey Vagin, Andy Lutomirski,
	Changbin Du, Cyrill Gorcunov, David Ahern, Jin Yao, Jiri Olsa,
	kernel-team, Michael Ellerman, Milian Wolff, Namhyung Kim,
	Peter Zijlstra, Wang Nan, yuzhoujian, Arnaldo Carvalho de Melo

Hi Ingo,

	A bit of trivia info is now automatically shown in the container
builds, the gcc version used to build the tools, that gets changed as
the distros update gcc and as I update the container build images :-)

	Please consider pulling,

- Arnaldo

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

The following changes since commit 0d3d73aac2ff05c78387aa9dcc2c8aa3804405e7:

  perf/core: Rewrite event timekeeping (2017-10-27 10:31:59 +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.15-20171103

for you to fetch changes up to 7285cf3325b4a1dfb336d31eebc27dfbc30fb9aa:

  perf srcline: Show correct function name for srcline of callchains (2017-11-01 11:44:38 -0300)

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

- Beautify the 'kcmp' and 'prctl' syscall arguments in 'perf trace'
  (Arnaldo Carvalho de Melo)

- Implement a way to print formatted output to per-event files in 'perf script'
  to facilitate generate flamegraphs, elliminating the need to write scripts to
  do that separation (yuzhoujian, Arnaldo Carvalho de Melo)

  Make 'perf stat --per-thread' update shadow stats to show metrics (Jiri Olsa)

- Fix double mapping al->addr in callchain processing for children without self
  period (Namhyung Kim)

- Fix memory leak in addr2inlines() when libbfd is not used (Namhyung Kim)

- Show correct function name for srcline of callchains when libbfd is not used
  (Namhyung Kim)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (11):
      perf script: Add a few missing conversions to fprintf style
      perf script: Use pr_debug where appropriate
      perf script: Use event_format__fprintf()
      perf evsel: Restore evsel->priv as a tool private area
      perf script: Allow creating per-event dump files
      tools include uapi: Grab a copy of linux/prctl.h
      perf trace beauty prctl: Generate 'option' string table from kernel headers
      perf script: Print information about per-event-dump files
      tools include uapi: Grab a copy of linux/kcmp.h
      perf trace beauty: Implement pid_fd beautifier
      perf trace beauty kcmp: Beautify arguments

Jiri Olsa (5):
      perf tools: Rename struct perf_data_file to perf_data
      perf tools: Add struct perf_data_file
      perf tools: Add perf_data_file__write function
      perf stat: Move the shadow stats scale computation in perf_stat__update_shadow_stats
      perf stat: Make --per-thread update shadow stats to show metrics

Namhyung Kim (3):
      perf callchain: Fix double mapping al->addr for children without self period
      perf srcline: Fix memory leak in addr2inlines()
      perf srcline: Show correct function name for srcline of callchains

 tools/include/uapi/linux/kcmp.h          |  27 +++++
 tools/include/uapi/linux/prctl.h         | 200 +++++++++++++++++++++++++++++++
 tools/perf/Documentation/perf-script.txt |   4 +
 tools/perf/Makefile.perf                 |  22 +++-
 tools/perf/builtin-annotate.c            |  10 +-
 tools/perf/builtin-buildid-cache.c       |   8 +-
 tools/perf/builtin-buildid-list.c        |  16 +--
 tools/perf/builtin-c2c.c                 |  10 +-
 tools/perf/builtin-diff.c                |  18 +--
 tools/perf/builtin-evlist.c              |  12 +-
 tools/perf/builtin-inject.c              |  36 +++---
 tools/perf/builtin-kmem.c                |   8 +-
 tools/perf/builtin-kvm.c                 |  14 ++-
 tools/perf/builtin-lock.c                |  12 +-
 tools/perf/builtin-mem.c                 |  12 +-
 tools/perf/builtin-record.c              |  50 ++++----
 tools/perf/builtin-report.c              |  14 +--
 tools/perf/builtin-sched.c               |  24 ++--
 tools/perf/builtin-script.c              | 169 ++++++++++++++++++++++----
 tools/perf/builtin-stat.c                |  39 +++---
 tools/perf/builtin-timechart.c           |  14 ++-
 tools/perf/builtin-trace.c               |  40 ++++++-
 tools/perf/check-headers.sh              |   2 +
 tools/perf/tests/topology.c              |  22 ++--
 tools/perf/trace/beauty/Build            |   2 +
 tools/perf/trace/beauty/beauty.h         |  18 +++
 tools/perf/trace/beauty/kcmp.c           |  44 +++++++
 tools/perf/trace/beauty/kcmp_type.sh     |  10 ++
 tools/perf/trace/beauty/prctl.c          |  82 +++++++++++++
 tools/perf/trace/beauty/prctl_option.sh  |  17 +++
 tools/perf/util/auxtrace.c               |   4 +-
 tools/perf/util/callchain.c              |   5 +-
 tools/perf/util/data-convert-bt.c        |  12 +-
 tools/perf/util/data.c                   |  94 ++++++++-------
 tools/perf/util/data.h                   |  38 +++---
 tools/perf/util/evsel.h                  |   3 +
 tools/perf/util/header.c                 |  20 ++--
 tools/perf/util/intel-bts.c              |   6 +-
 tools/perf/util/intel-pt.c               |   6 +-
 tools/perf/util/jit.h                    |   2 +-
 tools/perf/util/jitdump.c                |  10 +-
 tools/perf/util/session.c                |  44 +++----
 tools/perf/util/session.h                |   4 +-
 tools/perf/util/srcline.c                | 102 +++++++++-------
 tools/perf/util/stat-shadow.c            |  48 ++++----
 tools/perf/util/stat.c                   |  24 ++--
 tools/perf/util/stat.h                   |   2 +-
 47 files changed, 999 insertions(+), 381 deletions(-)
 create mode 100644 tools/include/uapi/linux/kcmp.h
 create mode 100644 tools/include/uapi/linux/prctl.h
 create mode 100644 tools/perf/trace/beauty/kcmp.c
 create mode 100755 tools/perf/trace/beauty/kcmp_type.sh
 create mode 100644 tools/perf/trace/beauty/prctl.c
 create mode 100755 tools/perf/trace/beauty/prctl_option.sh

Test results:

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

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

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

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

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

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

  # uname -a
  Linux jouet 4.14.0-rc6+ #1 SMP Tue Oct 31 14:43:51 -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: 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_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
              make_clean_all_O: make clean all
             make_no_libnuma_O: make NO_LIBNUMA=1
            make_no_demangle_O: make NO_DEMANGLE=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
                make_no_gtk2_O: make NO_GTK2=1
                 make_static_O: make LDFLAGS=-static
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
                   make_pure_O: make
            make_no_libaudit_O: make NO_LIBAUDIT=1
                  make_debug_O: make DEBUG=1
                make_no_newt_O: make NO_NEWT=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
               make_no_slang_O: make NO_SLANG=1
            make_no_auxtrace_O: make NO_AUXTRACE=1
         make_install_prefix_O: make install prefix=/tmp/krava
           make_no_libbionic_O: make NO_LIBBIONIC=1
                    make_doc_O: make doc
                   make_tags_O: make tags
        make_with_babeltrace_O: make LIBBABELTRACE=1
              make_no_libelf_O: make NO_LIBELF=1
           make_no_libpython_O: make NO_LIBPYTHON=1
                   make_help_O: make help
              make_no_libbpf_O: make NO_LIBBPF=1
                 make_perf_o_O: make perf.o
           make_no_libunwind_O: make NO_LIBUNWIND=1
                make_install_O: make install
             make_util_map_o_O: make util/map.o
            make_install_bin_O: make install-bin
           make_no_backtrace_O: make NO_BACKTRACE=1
             make_no_libperl_O: make NO_LIBPERL=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
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2017-08-14 17:39 ` Ingo Molnar
@ 2017-08-14 17:52   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-08-14 17:52 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Kim Phillips, linux-kernel, linux-perf-users, Adrian Hunter,
	Andi Kleen, Anton Blanchard, David Ahern, Hendrik Brueckner,
	Jiri Olsa, linuxppc-dev, Matt Fleming, Michael Ellerman,
	Michael Petlan, Milian Wolff, Namhyung Kim, Naveen N . Rao,
	Paul Clarke, Peter Zijlstra, Sukadev Bhattiprolu,
	Thomas-Mich Richter, Wang Nan, Yao Jin, Zvonko Kosic, acme

Em Mon, Aug 14, 2017 at 07:39:48PM +0200, Ingo Molnar escreveu:
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > Infrastructure:

> > - Add support for shell based tests in 'perf test', add a few that
> >   run 'perf probe', 'perf trace', using kprobes, uprobes to check
> >   the output of those tools and the effects on the system, checking,
> >   for instance, DWARF backtraces from uprobes (Arnaldo Carvalho de Melo)
<SNIP>
> >  create mode 100644 tools/perf/tests/shell/lib/probe_vfs_getname.sh
> >  create mode 100755 tools/perf/tests/shell/probe_vfs_getname.sh
> >  create mode 100755 tools/perf/tests/shell/record+script_probe_vfs_getname.sh
> >  create mode 100755 tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
> >  create mode 100755 tools/perf/tests/shell/trace+probe_vfs_getname.sh
> 
> Pulled, thanks a lot Arnaldo!

Thanks! I'm working with Kim Phillips to fix some issues he noticed
while testing on his ARM systems where 'perf probe' is not available, my
perf/core branch has several fixes to handle this that will be in my
next pull request.

- Arnaldo

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2017-08-14 16:27 Arnaldo Carvalho de Melo
@ 2017-08-14 17:39 ` Ingo Molnar
  2017-08-14 17:52   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 53+ messages in thread
From: Ingo Molnar @ 2017-08-14 17:39 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Adrian Hunter, Andi Kleen,
	Anton Blanchard, David Ahern, Hendrik Brueckner, Jiri Olsa,
	linuxppc-dev, Matt Fleming, Michael Ellerman, Michael Petlan,
	Milian Wolff, Namhyung Kim, Naveen N . Rao, Paul Clarke,
	Peter Zijlstra, Sukadev Bhattiprolu, Thomas-Mich Richter,
	Wang Nan, Yao Jin, Zvonko Kosic, 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 82119cbe8e1e32cc2a941393e59816e731681310:
> 
>   Merge tag 'perf-core-for-mingo-4.14-20170801' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-10 17:07:02 +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-20170814
> 
> for you to fetch changes up to 8fc375d7d36c72b4c2d55f5c24be022a939295d4:
> 
>   perf test shell: Add uprobes + backtrace ping test (2017-08-11 16:18:49 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> Infrastructure:
> 
> - Do not consider empty files as valid srclines (Milian Wolff)
> 
> - Fix wrong size in perf_record_mmap for last kernel module,
>   which resulted in erroneous symbol resolution in at least s390x (Thomas Richter)
> 
> - Add missing newline to expr parser error messages (Andi Kleen)
> 
> - Fix saved values rbtree lookup in 'perf stat' (Andi Kleen)
> 
> - Add support for shell based tests in 'perf test', add a few that
>   run 'perf probe', 'perf trace', using kprobes, uprobes to check
>   the output of those tools and the effects on the system, checking,
>   for instance, DWARF backtraces from uprobes (Arnaldo Carvalho de Melo)
> 
> Arch specific:
> 
> - Add ppc64le to audit uname list in the python scripting support (Naveen N. Rao)
> 
> - Update POWER9 vendor events tables (Sukadev Bhattiprolu)
> 
> - Fix module symbol adjustment for s390x (Thomas Richter)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (2):
>       perf stat: Fix saved values rbtree lookup
>       perf tools: Add missing newline to expr parser error messages
> 
> Arnaldo Carvalho de Melo (10):
>       perf test: Make 'list' subcommand match main 'perf test' numbering/matching
>       perf test: Add 'struct test *' to the test functions
>       perf test: Add infrastructure to run shell based tests
>       perf test: Make 'list' use same filtering code as main 'perf test'
>       perf test shell: Add 'probe_vfs_getname' shell test
>       perf test shell: Install shell tests
>       perf test shell: Move vfs_getname probe function to lib
>       perf test shell: Add test using probe:vfs_getname and verifying results
>       perf test shell: Add test using vfs_getname + 'perf trace'
>       perf test shell: Add uprobes + backtrace ping test
> 
> Milian Wolff (2):
>       perf util: Take elf_name as const string in dso__demangle_sym
>       perf srcline: Do not consider empty files as valid srclines
> 
> Naveen N. Rao (1):
>       perf scripting python: Add ppc64le to audit uname list
> 
> Sukadev Bhattiprolu (2):
>       perf vendor events powerpc: remove suffix in mapfile
>       perf vendor events powerpc: Update POWER9 events
> 
> Thomas Richter (2):
>       perf record: Fix wrong size in perf_record_mmap for last kernel module
>       perf report: Fix module symbol adjustment for s390x
> 
>  tools/perf/Makefile.perf                           |    6 +-
>  tools/perf/arch/s390/util/sym-handling.c           |    7 +
>  tools/perf/arch/x86/include/arch-tests.h           |   11 +-
>  tools/perf/arch/x86/tests/insn-x86.c               |    2 +-
>  tools/perf/arch/x86/tests/intel-cqm.c              |    2 +-
>  tools/perf/arch/x86/tests/perf-time-to-tsc.c       |    2 +-
>  tools/perf/arch/x86/tests/rdpmc.c                  |    2 +-
>  tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   20 +-
>  .../perf/pmu-events/arch/powerpc/power9/cache.json |  191 +-
>  .../arch/powerpc/power9/floating-point.json        |   42 +-
>  .../pmu-events/arch/powerpc/power9/frontend.json   |  517 ++--
>  .../pmu-events/arch/powerpc/power9/marked.json     |  905 +++----
>  .../pmu-events/arch/powerpc/power9/memory.json     |  178 +-
>  .../perf/pmu-events/arch/powerpc/power9/other.json | 2768 ++++++++++++++++----
>  .../pmu-events/arch/powerpc/power9/pipeline.json   |  779 +++---
>  tools/perf/pmu-events/arch/powerpc/power9/pmc.json |  167 +-
>  .../arch/powerpc/power9/translation.json           |  314 +--
>  .../python/Perf-Trace-Util/lib/Perf/Trace/Util.py  |    1 +
>  tools/perf/tests/attr.c                            |    2 +-
>  tools/perf/tests/backward-ring-buffer.c            |    2 +-
>  tools/perf/tests/bitmap.c                          |    2 +-
>  tools/perf/tests/bp_signal.c                       |    2 +-
>  tools/perf/tests/bp_signal_overflow.c              |    2 +-
>  tools/perf/tests/bpf.c                             |    4 +-
>  tools/perf/tests/builtin-test.c                    |  184 +-
>  tools/perf/tests/clang.c                           |    4 +-
>  tools/perf/tests/code-reading.c                    |    2 +-
>  tools/perf/tests/cpumap.c                          |    4 +-
>  tools/perf/tests/dso-data.c                        |    6 +-
>  tools/perf/tests/dwarf-unwind.c                    |    2 +-
>  tools/perf/tests/event-times.c                     |    2 +-
>  tools/perf/tests/event_update.c                    |    2 +-
>  tools/perf/tests/evsel-roundtrip-name.c            |    2 +-
>  tools/perf/tests/evsel-tp-sched.c                  |    2 +-
>  tools/perf/tests/expr.c                            |    2 +-
>  tools/perf/tests/fdarray.c                         |    4 +-
>  tools/perf/tests/hists_cumulate.c                  |    2 +-
>  tools/perf/tests/hists_filter.c                    |    2 +-
>  tools/perf/tests/hists_link.c                      |    2 +-
>  tools/perf/tests/hists_output.c                    |    2 +-
>  tools/perf/tests/is_printable_array.c              |    2 +-
>  tools/perf/tests/keep-tracking.c                   |    2 +-
>  tools/perf/tests/kmod-path.c                       |    2 +-
>  tools/perf/tests/llvm.c                            |    2 +-
>  tools/perf/tests/mmap-basic.c                      |    2 +-
>  tools/perf/tests/mmap-thread-lookup.c              |    2 +-
>  tools/perf/tests/openat-syscall-all-cpus.c         |    2 +-
>  tools/perf/tests/openat-syscall-tp-fields.c        |    2 +-
>  tools/perf/tests/openat-syscall.c                  |    2 +-
>  tools/perf/tests/parse-events.c                    |    2 +-
>  tools/perf/tests/parse-no-sample-id-all.c          |    2 +-
>  tools/perf/tests/perf-hooks.c                      |    2 +-
>  tools/perf/tests/perf-record.c                     |    2 +-
>  tools/perf/tests/pmu.c                             |    2 +-
>  tools/perf/tests/python-use.c                      |    2 +-
>  tools/perf/tests/sample-parsing.c                  |    2 +-
>  tools/perf/tests/sdt.c                             |    4 +-
>  tools/perf/tests/shell/lib/probe_vfs_getname.sh    |   28 +
>  tools/perf/tests/shell/probe_vfs_getname.sh        |   10 +
>  .../tests/shell/record+script_probe_vfs_getname.sh |   37 +
>  .../perf/tests/shell/trace+probe_libc_inet_pton.sh |   40 +
>  tools/perf/tests/shell/trace+probe_vfs_getname.sh  |   31 +
>  tools/perf/tests/stat.c                            |    6 +-
>  tools/perf/tests/sw-clock.c                        |    2 +-
>  tools/perf/tests/switch-tracking.c                 |    2 +-
>  tools/perf/tests/task-exit.c                       |    2 +-
>  tools/perf/tests/tests.h                           |  113 +-
>  tools/perf/tests/thread-map.c                      |    6 +-
>  tools/perf/tests/thread-mg-share.c                 |    2 +-
>  tools/perf/tests/topology.c                        |    2 +-
>  tools/perf/tests/unit_number__scnprintf.c          |    2 +-
>  tools/perf/tests/vmlinux-kallsyms.c                |    2 +-
>  tools/perf/util/expr.y                             |    2 +-
>  tools/perf/util/machine.c                          |    4 +-
>  tools/perf/util/srcline.c                          |    6 +
>  tools/perf/util/stat-shadow.c                      |    6 +-
>  tools/perf/util/symbol-elf.c                       |   12 +-
>  tools/perf/util/symbol-minimal.c                   |    2 +-
>  tools/perf/util/symbol.c                           |   21 +-
>  tools/perf/util/symbol.h                           |    7 +-
>  80 files changed, 4054 insertions(+), 2479 deletions(-)
>  create mode 100644 tools/perf/tests/shell/lib/probe_vfs_getname.sh
>  create mode 100755 tools/perf/tests/shell/probe_vfs_getname.sh
>  create mode 100755 tools/perf/tests/shell/record+script_probe_vfs_getname.sh
>  create mode 100755 tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
>  create mode 100755 tools/perf/tests/shell/trace+probe_vfs_getname.sh

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2017-08-14 16:27 Arnaldo Carvalho de Melo
  2017-08-14 17:39 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-08-14 16:27 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Andi Kleen, Anton Blanchard, David Ahern,
	Hendrik Brueckner, Jiri Olsa, linuxppc-dev, Matt Fleming,
	Michael Ellerman, Michael Petlan, Milian Wolff, Namhyung Kim,
	Naveen N . Rao, Paul Clarke, Peter Zijlstra, Sukadev Bhattiprolu,
	Thomas-Mich Richter, Wang Nan, Yao Jin, Zvonko Kosic,
	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 82119cbe8e1e32cc2a941393e59816e731681310:

  Merge tag 'perf-core-for-mingo-4.14-20170801' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-10 17:07:02 +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-20170814

for you to fetch changes up to 8fc375d7d36c72b4c2d55f5c24be022a939295d4:

  perf test shell: Add uprobes + backtrace ping test (2017-08-11 16:18:49 -0300)

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

Infrastructure:

- Do not consider empty files as valid srclines (Milian Wolff)

- Fix wrong size in perf_record_mmap for last kernel module,
  which resulted in erroneous symbol resolution in at least s390x (Thomas Richter)

- Add missing newline to expr parser error messages (Andi Kleen)

- Fix saved values rbtree lookup in 'perf stat' (Andi Kleen)

- Add support for shell based tests in 'perf test', add a few that
  run 'perf probe', 'perf trace', using kprobes, uprobes to check
  the output of those tools and the effects on the system, checking,
  for instance, DWARF backtraces from uprobes (Arnaldo Carvalho de Melo)

Arch specific:

- Add ppc64le to audit uname list in the python scripting support (Naveen N. Rao)

- Update POWER9 vendor events tables (Sukadev Bhattiprolu)

- Fix module symbol adjustment for s390x (Thomas Richter)

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

----------------------------------------------------------------
Andi Kleen (2):
      perf stat: Fix saved values rbtree lookup
      perf tools: Add missing newline to expr parser error messages

Arnaldo Carvalho de Melo (10):
      perf test: Make 'list' subcommand match main 'perf test' numbering/matching
      perf test: Add 'struct test *' to the test functions
      perf test: Add infrastructure to run shell based tests
      perf test: Make 'list' use same filtering code as main 'perf test'
      perf test shell: Add 'probe_vfs_getname' shell test
      perf test shell: Install shell tests
      perf test shell: Move vfs_getname probe function to lib
      perf test shell: Add test using probe:vfs_getname and verifying results
      perf test shell: Add test using vfs_getname + 'perf trace'
      perf test shell: Add uprobes + backtrace ping test

Milian Wolff (2):
      perf util: Take elf_name as const string in dso__demangle_sym
      perf srcline: Do not consider empty files as valid srclines

Naveen N. Rao (1):
      perf scripting python: Add ppc64le to audit uname list

Sukadev Bhattiprolu (2):
      perf vendor events powerpc: remove suffix in mapfile
      perf vendor events powerpc: Update POWER9 events

Thomas Richter (2):
      perf record: Fix wrong size in perf_record_mmap for last kernel module
      perf report: Fix module symbol adjustment for s390x

 tools/perf/Makefile.perf                           |    6 +-
 tools/perf/arch/s390/util/sym-handling.c           |    7 +
 tools/perf/arch/x86/include/arch-tests.h           |   11 +-
 tools/perf/arch/x86/tests/insn-x86.c               |    2 +-
 tools/perf/arch/x86/tests/intel-cqm.c              |    2 +-
 tools/perf/arch/x86/tests/perf-time-to-tsc.c       |    2 +-
 tools/perf/arch/x86/tests/rdpmc.c                  |    2 +-
 tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   20 +-
 .../perf/pmu-events/arch/powerpc/power9/cache.json |  191 +-
 .../arch/powerpc/power9/floating-point.json        |   42 +-
 .../pmu-events/arch/powerpc/power9/frontend.json   |  517 ++--
 .../pmu-events/arch/powerpc/power9/marked.json     |  905 +++----
 .../pmu-events/arch/powerpc/power9/memory.json     |  178 +-
 .../perf/pmu-events/arch/powerpc/power9/other.json | 2768 ++++++++++++++++----
 .../pmu-events/arch/powerpc/power9/pipeline.json   |  779 +++---
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json |  167 +-
 .../arch/powerpc/power9/translation.json           |  314 +--
 .../python/Perf-Trace-Util/lib/Perf/Trace/Util.py  |    1 +
 tools/perf/tests/attr.c                            |    2 +-
 tools/perf/tests/backward-ring-buffer.c            |    2 +-
 tools/perf/tests/bitmap.c                          |    2 +-
 tools/perf/tests/bp_signal.c                       |    2 +-
 tools/perf/tests/bp_signal_overflow.c              |    2 +-
 tools/perf/tests/bpf.c                             |    4 +-
 tools/perf/tests/builtin-test.c                    |  184 +-
 tools/perf/tests/clang.c                           |    4 +-
 tools/perf/tests/code-reading.c                    |    2 +-
 tools/perf/tests/cpumap.c                          |    4 +-
 tools/perf/tests/dso-data.c                        |    6 +-
 tools/perf/tests/dwarf-unwind.c                    |    2 +-
 tools/perf/tests/event-times.c                     |    2 +-
 tools/perf/tests/event_update.c                    |    2 +-
 tools/perf/tests/evsel-roundtrip-name.c            |    2 +-
 tools/perf/tests/evsel-tp-sched.c                  |    2 +-
 tools/perf/tests/expr.c                            |    2 +-
 tools/perf/tests/fdarray.c                         |    4 +-
 tools/perf/tests/hists_cumulate.c                  |    2 +-
 tools/perf/tests/hists_filter.c                    |    2 +-
 tools/perf/tests/hists_link.c                      |    2 +-
 tools/perf/tests/hists_output.c                    |    2 +-
 tools/perf/tests/is_printable_array.c              |    2 +-
 tools/perf/tests/keep-tracking.c                   |    2 +-
 tools/perf/tests/kmod-path.c                       |    2 +-
 tools/perf/tests/llvm.c                            |    2 +-
 tools/perf/tests/mmap-basic.c                      |    2 +-
 tools/perf/tests/mmap-thread-lookup.c              |    2 +-
 tools/perf/tests/openat-syscall-all-cpus.c         |    2 +-
 tools/perf/tests/openat-syscall-tp-fields.c        |    2 +-
 tools/perf/tests/openat-syscall.c                  |    2 +-
 tools/perf/tests/parse-events.c                    |    2 +-
 tools/perf/tests/parse-no-sample-id-all.c          |    2 +-
 tools/perf/tests/perf-hooks.c                      |    2 +-
 tools/perf/tests/perf-record.c                     |    2 +-
 tools/perf/tests/pmu.c                             |    2 +-
 tools/perf/tests/python-use.c                      |    2 +-
 tools/perf/tests/sample-parsing.c                  |    2 +-
 tools/perf/tests/sdt.c                             |    4 +-
 tools/perf/tests/shell/lib/probe_vfs_getname.sh    |   28 +
 tools/perf/tests/shell/probe_vfs_getname.sh        |   10 +
 .../tests/shell/record+script_probe_vfs_getname.sh |   37 +
 .../perf/tests/shell/trace+probe_libc_inet_pton.sh |   40 +
 tools/perf/tests/shell/trace+probe_vfs_getname.sh  |   31 +
 tools/perf/tests/stat.c                            |    6 +-
 tools/perf/tests/sw-clock.c                        |    2 +-
 tools/perf/tests/switch-tracking.c                 |    2 +-
 tools/perf/tests/task-exit.c                       |    2 +-
 tools/perf/tests/tests.h                           |  113 +-
 tools/perf/tests/thread-map.c                      |    6 +-
 tools/perf/tests/thread-mg-share.c                 |    2 +-
 tools/perf/tests/topology.c                        |    2 +-
 tools/perf/tests/unit_number__scnprintf.c          |    2 +-
 tools/perf/tests/vmlinux-kallsyms.c                |    2 +-
 tools/perf/util/expr.y                             |    2 +-
 tools/perf/util/machine.c                          |    4 +-
 tools/perf/util/srcline.c                          |    6 +
 tools/perf/util/stat-shadow.c                      |    6 +-
 tools/perf/util/symbol-elf.c                       |   12 +-
 tools/perf/util/symbol-minimal.c                   |    2 +-
 tools/perf/util/symbol.c                           |   21 +-
 tools/perf/util/symbol.h                           |    7 +-
 80 files changed, 4054 insertions(+), 2479 deletions(-)
 create mode 100644 tools/perf/tests/shell/lib/probe_vfs_getname.sh
 create mode 100755 tools/perf/tests/shell/probe_vfs_getname.sh
 create mode 100755 tools/perf/tests/shell/record+script_probe_vfs_getname.sh
 create mode 100755 tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
 create mode 100755 tools/perf/tests/shell/trace+probe_vfs_getname.sh

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
  #

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

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2017-03-14 18:50 Arnaldo Carvalho de Melo
@ 2017-03-15 18:29 ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2017-03-15 18:29 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Alexander Shishkin, Alexei Starovoitov,
	Ananth N Mavinakayanahalli, Andi Kleen, Aravinda Prasad,
	Brendan Gregg, Changbin Du, Daniel Borkmann, Eric Biederman,
	Feng Tang, Hari Bathini, Jiri Olsa, kernel-team, linuxppc-dev,
	Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Naveen N . Rao,
	Peter Zijlstra, Sargun Dhillon, Steven Rostedt,
	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 84e5b549214f2160c12318aac549de85f600c79a:
> 
>   Merge tag 'perf-core-for-mingo-4.11-20170306' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-07 08:14:14 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170314
> 
> for you to fetch changes up to 5f6bee34707973ea7879a7857fd63ddccc92fff3:
> 
>   kprobes: Convert kprobe_exceptions_notify to use NOKPROBE_SYMBOL (2017-03-14 15:17:40 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Add PERF_RECORD_NAMESPACES so that the kernel can record information
>   required to associate samples to namespaces, helping in container
>   problem characterization.
> 
>   Now the 'perf record has a --namespace' option to ask for such info,
>   and when present, it can be used, initially, via a new sort order,
>   'cgroup_id', allowing histogram entry bucketization by a (device, inode)
>   based cgroup identifier (Hari Bathini)
> 
> - Add --next option to 'perf sched timehist', showing what is the next
>   thread to run (Brendan Gregg)
> 
> Fixes:
> 
> - Fix segfault with basic block 'cycles' sort dimension (Changbin Du)
> 
> - Add c2c to command-list.txt, making it appear in the 'perf help'
>   output (Changbin Du)
> 
> - Fix zeroing of 'abs_path' variable in the perf hists browser switch
>   file code (Changbin Du)
> 
> - Hide tips messages when -q/--quiet is given to 'perf report' (Namhyung Kim)
> 
> Infrastructure:
> 
> - Use ref_reloc_sym + offset to setup kretprobes (Naveen Rao)
> 
> - Ignore generated files pmu-events/{jevents,pmu-events.c} for git (Changbin Du)
> 
> Documentation:
> 
> - Document +field style argument support for --field option (Changbin Du)
> 
> - Clarify 'perf c2c --stats' help message (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Brendan Gregg (1):
>       perf sched timehist: Add --next option
> 
> Changbin Du (5):
>       perf tools: Missing c2c command in command-list
>       perf tools: Ignore generated files pmu-events/{jevents,pmu-events.c} for git
>       perf sort: Fix segfault with basic block 'cycles' sort dimension
>       perf report: Document +field style argument support for --field option
>       perf hists browser: Fix typo in function switch_data_file
> 
> Hari Bathini (5):
>       perf: Add PERF_RECORD_NAMESPACES to include namespaces related info
>       perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info
>       perf record: Synthesize namespace events for current processes
>       perf script: Add script print support for namespace events
>       perf tools: Add 'cgroup_id' sort order keyword
> 
> Namhyung Kim (3):
>       perf report: Hide tip message when -q option is given
>       perf c2c: Clarify help message of --stats option
>       perf c2c: Fix display bug when using pipe
> 
> Naveen N. Rao (5):
>       perf probe: Factor out the ftrace README scanning
>       perf kretprobes: Offset from reloc_sym if kernel supports it
>       perf powerpc: Choose local entry point with kretprobes
>       doc: trace/kprobes: add information about NOKPROBE_SYMBOL
>       kprobes: Convert kprobe_exceptions_notify to use NOKPROBE_SYMBOL
> 
>  Documentation/trace/kprobetrace.txt         |   5 +-
>  include/linux/perf_event.h                  |   2 +
>  include/uapi/linux/perf_event.h             |  32 +++++-
>  kernel/events/core.c                        | 139 ++++++++++++++++++++++++++
>  kernel/fork.c                               |   2 +
>  kernel/kprobes.c                            |   5 +-
>  kernel/nsproxy.c                            |   3 +
>  tools/include/uapi/linux/perf_event.h       |  32 +++++-
>  tools/perf/.gitignore                       |   2 +
>  tools/perf/Documentation/perf-record.txt    |   3 +
>  tools/perf/Documentation/perf-report.txt    |   7 +-
>  tools/perf/Documentation/perf-sched.txt     |   4 +
>  tools/perf/Documentation/perf-script.txt    |   3 +
>  tools/perf/arch/powerpc/util/sym-handling.c |  14 ++-
>  tools/perf/builtin-annotate.c               |   1 +
>  tools/perf/builtin-c2c.c                    |   4 +-
>  tools/perf/builtin-diff.c                   |   1 +
>  tools/perf/builtin-inject.c                 |  13 +++
>  tools/perf/builtin-kmem.c                   |   1 +
>  tools/perf/builtin-kvm.c                    |   2 +
>  tools/perf/builtin-lock.c                   |   1 +
>  tools/perf/builtin-mem.c                    |   1 +
>  tools/perf/builtin-record.c                 |  35 ++++++-
>  tools/perf/builtin-report.c                 |   4 +-
>  tools/perf/builtin-sched.c                  |  26 ++++-
>  tools/perf/builtin-script.c                 |  41 ++++++++
>  tools/perf/builtin-trace.c                  |   3 +-
>  tools/perf/command-list.txt                 |   1 +
>  tools/perf/perf.h                           |   1 +
>  tools/perf/ui/browsers/hists.c              |   2 +-
>  tools/perf/util/Build                       |   1 +
>  tools/perf/util/data-convert-bt.c           |   1 +
>  tools/perf/util/event.c                     | 150 ++++++++++++++++++++++++++--
>  tools/perf/util/event.h                     |  19 ++++
>  tools/perf/util/evsel.c                     |   3 +
>  tools/perf/util/hist.c                      |   7 ++
>  tools/perf/util/hist.h                      |   1 +
>  tools/perf/util/machine.c                   |  34 +++++++
>  tools/perf/util/machine.h                   |   3 +
>  tools/perf/util/namespaces.c                |  36 +++++++
>  tools/perf/util/namespaces.h                |  26 +++++
>  tools/perf/util/probe-event.c               |  12 +--
>  tools/perf/util/probe-file.c                |  77 ++++++++------
>  tools/perf/util/probe-file.h                |   1 +
>  tools/perf/util/session.c                   |   7 ++
>  tools/perf/util/sort.c                      |  46 +++++++++
>  tools/perf/util/sort.h                      |   7 ++
>  tools/perf/util/thread.c                    |  44 +++++++-
>  tools/perf/util/thread.h                    |   6 ++
>  tools/perf/util/tool.h                      |   2 +
>  50 files changed, 799 insertions(+), 74 deletions(-)
>  create mode 100644 tools/perf/util/namespaces.c
>  create mode 100644 tools/perf/util/namespaces.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2017-03-14 18:50 Arnaldo Carvalho de Melo
  2017-03-15 18:29 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-03-14 18:50 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Alexei Starovoitov, Ananth N Mavinakayanahalli, Andi Kleen,
	Aravinda Prasad, Brendan Gregg, Changbin Du, Daniel Borkmann,
	Eric Biederman, Feng Tang, Hari Bathini, Jiri Olsa, kernel-team,
	linuxppc-dev, Masami Hiramatsu, Michael Ellerman, Namhyung Kim,
	Naveen N . Rao, Peter Zijlstra, Sargun Dhillon, Steven Rostedt,
	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 84e5b549214f2160c12318aac549de85f600c79a:

  Merge tag 'perf-core-for-mingo-4.11-20170306' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-07 08:14:14 +0100)

are available in the git repository at:

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

for you to fetch changes up to 5f6bee34707973ea7879a7857fd63ddccc92fff3:

  kprobes: Convert kprobe_exceptions_notify to use NOKPROBE_SYMBOL (2017-03-14 15:17:40 -0300)

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

New features:

- Add PERF_RECORD_NAMESPACES so that the kernel can record information
  required to associate samples to namespaces, helping in container
  problem characterization.

  Now the 'perf record has a --namespace' option to ask for such info,
  and when present, it can be used, initially, via a new sort order,
  'cgroup_id', allowing histogram entry bucketization by a (device, inode)
  based cgroup identifier (Hari Bathini)

- Add --next option to 'perf sched timehist', showing what is the next
  thread to run (Brendan Gregg)

Fixes:

- Fix segfault with basic block 'cycles' sort dimension (Changbin Du)

- Add c2c to command-list.txt, making it appear in the 'perf help'
  output (Changbin Du)

- Fix zeroing of 'abs_path' variable in the perf hists browser switch
  file code (Changbin Du)

- Hide tips messages when -q/--quiet is given to 'perf report' (Namhyung Kim)

Infrastructure:

- Use ref_reloc_sym + offset to setup kretprobes (Naveen Rao)

- Ignore generated files pmu-events/{jevents,pmu-events.c} for git (Changbin Du)

Documentation:

- Document +field style argument support for --field option (Changbin Du)

- Clarify 'perf c2c --stats' help message (Namhyung Kim)

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

----------------------------------------------------------------
Brendan Gregg (1):
      perf sched timehist: Add --next option

Changbin Du (5):
      perf tools: Missing c2c command in command-list
      perf tools: Ignore generated files pmu-events/{jevents,pmu-events.c} for git
      perf sort: Fix segfault with basic block 'cycles' sort dimension
      perf report: Document +field style argument support for --field option
      perf hists browser: Fix typo in function switch_data_file

Hari Bathini (5):
      perf: Add PERF_RECORD_NAMESPACES to include namespaces related info
      perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info
      perf record: Synthesize namespace events for current processes
      perf script: Add script print support for namespace events
      perf tools: Add 'cgroup_id' sort order keyword

Namhyung Kim (3):
      perf report: Hide tip message when -q option is given
      perf c2c: Clarify help message of --stats option
      perf c2c: Fix display bug when using pipe

Naveen N. Rao (5):
      perf probe: Factor out the ftrace README scanning
      perf kretprobes: Offset from reloc_sym if kernel supports it
      perf powerpc: Choose local entry point with kretprobes
      doc: trace/kprobes: add information about NOKPROBE_SYMBOL
      kprobes: Convert kprobe_exceptions_notify to use NOKPROBE_SYMBOL

 Documentation/trace/kprobetrace.txt         |   5 +-
 include/linux/perf_event.h                  |   2 +
 include/uapi/linux/perf_event.h             |  32 +++++-
 kernel/events/core.c                        | 139 ++++++++++++++++++++++++++
 kernel/fork.c                               |   2 +
 kernel/kprobes.c                            |   5 +-
 kernel/nsproxy.c                            |   3 +
 tools/include/uapi/linux/perf_event.h       |  32 +++++-
 tools/perf/.gitignore                       |   2 +
 tools/perf/Documentation/perf-record.txt    |   3 +
 tools/perf/Documentation/perf-report.txt    |   7 +-
 tools/perf/Documentation/perf-sched.txt     |   4 +
 tools/perf/Documentation/perf-script.txt    |   3 +
 tools/perf/arch/powerpc/util/sym-handling.c |  14 ++-
 tools/perf/builtin-annotate.c               |   1 +
 tools/perf/builtin-c2c.c                    |   4 +-
 tools/perf/builtin-diff.c                   |   1 +
 tools/perf/builtin-inject.c                 |  13 +++
 tools/perf/builtin-kmem.c                   |   1 +
 tools/perf/builtin-kvm.c                    |   2 +
 tools/perf/builtin-lock.c                   |   1 +
 tools/perf/builtin-mem.c                    |   1 +
 tools/perf/builtin-record.c                 |  35 ++++++-
 tools/perf/builtin-report.c                 |   4 +-
 tools/perf/builtin-sched.c                  |  26 ++++-
 tools/perf/builtin-script.c                 |  41 ++++++++
 tools/perf/builtin-trace.c                  |   3 +-
 tools/perf/command-list.txt                 |   1 +
 tools/perf/perf.h                           |   1 +
 tools/perf/ui/browsers/hists.c              |   2 +-
 tools/perf/util/Build                       |   1 +
 tools/perf/util/data-convert-bt.c           |   1 +
 tools/perf/util/event.c                     | 150 ++++++++++++++++++++++++++--
 tools/perf/util/event.h                     |  19 ++++
 tools/perf/util/evsel.c                     |   3 +
 tools/perf/util/hist.c                      |   7 ++
 tools/perf/util/hist.h                      |   1 +
 tools/perf/util/machine.c                   |  34 +++++++
 tools/perf/util/machine.h                   |   3 +
 tools/perf/util/namespaces.c                |  36 +++++++
 tools/perf/util/namespaces.h                |  26 +++++
 tools/perf/util/probe-event.c               |  12 +--
 tools/perf/util/probe-file.c                |  77 ++++++++------
 tools/perf/util/probe-file.h                |   1 +
 tools/perf/util/session.c                   |   7 ++
 tools/perf/util/sort.c                      |  46 +++++++++
 tools/perf/util/sort.h                      |   7 ++
 tools/perf/util/thread.c                    |  44 +++++++-
 tools/perf/util/thread.h                    |   6 ++
 tools/perf/util/tool.h                      |   2 +
 50 files changed, 799 insertions(+), 74 deletions(-)
 create mode 100644 tools/perf/util/namespaces.c
 create mode 100644 tools/perf/util/namespaces.h

Test results:

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

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

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

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

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

  # uname -a
  Linux zoo 4.9.13-100.fc24.x86_64 #1 SMP Mon Feb 27 16:57:22 UTC 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: 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 pinning                              : Ok
  37.3: BPF prologue generation                  : Ok
  37.4: 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
  # 

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

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-12-01 18:02 Arnaldo Carvalho de Melo
@ 2016-12-02  9:10 ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2016-12-02  9:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexei Starovoitov, Chris Ryder, David Ahern, He Kuang,
	Jiri Olsa, Joe Stringer, Kim Phillips, Mark Rutland,
	Namhyung Kim, Pawel Moll, Peter Zijlstra, Wang Nan, Will Deacon,
	Zefan Li, pi3orama, 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 2471cece40d61b0035360338569d338f9dea6099:
> 
>   Merge tag 'perf-core-for-mingo-20161125' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-11-25 18:12:41 +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-20161201
> 
> for you to fetch changes up to 0fcb1da4aba6e6c7b32de5e0948b740b31ad822d:
> 
>   perf annotate: AArch64 support (2016-12-01 13:03:19 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Support AArch64 in the 'annotate' code, native/local and
>   cross-arch/remote (Kim Phillips)
> 
> - Allow considering just events in a given time interval, via the
>   '--time start.s.ms,end.s.ms' command line, added to 'perf kmem',
>   'perf report', 'perf sched timehist' and 'perf script' (David Ahern)
> 
> - Add option to stop printing a callchain at one of a given group of
>   symbol names (David Ahern)
> 
> - Handle cpu migration events in 'perf sched timehist' (David Ahern)
> 
> - Track memory freed in 'perf kmem stat' (David Ahern)
> 
> Infrastructure:
> 
> - Initial support (and perf test entry) for tooling hooks, starting with
>   'record_start' and 'record_end', that will have as its initial user the
>   eBPF infrastructure, where perf_ prefixed functions will be JITed and
>   run when such hooks are called (Wang Nan)
> 
> - Remove redundant "test" and similar strings from 'perf test' descriptions
>   (Arnaldo Carvalho de Melo)
> 
> - libbpf assorted improvements (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (3):
>       perf ui helpline: Provide a printf variant
>       perf annotate: Show invalid jump offset in error message
>       perf test: Remove "test" and similar strings from test descriptions
> 
> David Ahern (10):
>       perf sched timehist: Handle cpu migration events
>       perf trace: Update tid/pid filtering option to leverage symbol_conf
>       perf kmem stat: Track memory freed
>       perf script: Add option to stop printing callchain
>       perf tools: Add time-based utility functions
>       perf tools: Move parse_nsec_time to time-utils.c
>       perf script: Add option to specify time window of interest
>       perf sched timehist: Add option to specify time window of interest
>       perf kmem: Add option to specify time window of interest
>       perf report: Add option to specify time window of interest
> 
> Kim Phillips (2):
>       perf annotate: Use arch->objdump.comment_char in dec__parse()
>       perf annotate: AArch64 support
> 
> Wang Nan (4):
>       tools lib bpf: Add missing BPF functions
>       tools lib bpf: Add private field for bpf_object
>       tools lib bpf: Retrive bpf_map through offset of bpf_map_def
>       perf tools: Introduce perf hooks
> 
>  tools/lib/bpf/bpf.c                           |  56 ++++++++++
>  tools/lib/bpf/bpf.h                           |   7 ++
>  tools/lib/bpf/libbpf.c                        |  35 ++++++
>  tools/lib/bpf/libbpf.h                        |  13 +++
>  tools/perf/Documentation/perf-kmem.txt        |   7 ++
>  tools/perf/Documentation/perf-report.txt      |   7 ++
>  tools/perf/Documentation/perf-sched.txt       |  12 +++
>  tools/perf/Documentation/perf-script.txt      |  10 ++
>  tools/perf/arch/arm64/annotate/instructions.c |  62 +++++++++++
>  tools/perf/arch/x86/tests/arch-tests.c        |  10 +-
>  tools/perf/builtin-kmem.c                     |  36 ++++++-
>  tools/perf/builtin-record.c                   |  11 ++
>  tools/perf/builtin-report.c                   |  14 ++-
>  tools/perf/builtin-sched.c                    | 148 ++++++++++++++++++++++++--
>  tools/perf/builtin-script.c                   |  17 ++-
>  tools/perf/builtin-trace.c                    |  49 ++-------
>  tools/perf/tests/Build                        |   1 +
>  tools/perf/tests/bpf.c                        |   6 +-
>  tools/perf/tests/builtin-test.c               |  96 +++++++++--------
>  tools/perf/tests/llvm.c                       |   8 +-
>  tools/perf/tests/perf-hooks.c                 |  44 ++++++++
>  tools/perf/tests/tests.h                      |   1 +
>  tools/perf/ui/browsers/annotate.c             |   6 +-
>  tools/perf/ui/helpline.c                      |  10 ++
>  tools/perf/ui/helpline.h                      |   1 +
>  tools/perf/util/Build                         |   3 +
>  tools/perf/util/annotate.c                    |   7 +-
>  tools/perf/util/evsel_fprintf.c               |   8 ++
>  tools/perf/util/perf-hooks-list.h             |   3 +
>  tools/perf/util/perf-hooks.c                  |  84 +++++++++++++++
>  tools/perf/util/perf-hooks.h                  |  37 +++++++
>  tools/perf/util/symbol.c                      |   8 ++
>  tools/perf/util/symbol.h                      |   6 +-
>  tools/perf/util/time-utils.c                  | 119 +++++++++++++++++++++
>  tools/perf/util/time-utils.h                  |  14 +++
>  tools/perf/util/util.c                        |  33 ------
>  tools/perf/util/util.h                        |   2 -
>  37 files changed, 842 insertions(+), 149 deletions(-)
>  create mode 100644 tools/perf/arch/arm64/annotate/instructions.c
>  create mode 100644 tools/perf/tests/perf-hooks.c
>  create mode 100644 tools/perf/util/perf-hooks-list.h
>  create mode 100644 tools/perf/util/perf-hooks.c
>  create mode 100644 tools/perf/util/perf-hooks.h
>  create mode 100644 tools/perf/util/time-utils.c
>  create mode 100644 tools/perf/util/time-utils.h
> 
>   # uname -a
>   Linux jouet 4.8.8-300.fc25.x86_64 #1 SMP Tue Nov 15 18:10:06 UTC 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: Synthesize cpu map                         : Ok
>   40: Synthesize stat config                     : Ok
>   41: Synthesize stat                            : Ok
>   42: Synthesize stat round                      : Ok
>   43: Synthesize attr update                     : Ok
>   44: Event times                                : Ok
>   45: Read backward ring buffer                  : Ok
>   46: Print cpu map                              : Ok
>   47: Probe SDT events                           : Ok
>   48: is_printable_array                         : Ok
>   49: Print bitmap                               : Ok
>   50: perf hooks                                 : Ok
>   51: x86 rdpmc                                  : Ok
>   52: Convert perf time to TSC                   : Ok
>   53: DWARF unwind                               : Ok
>   54: x86 instruction decoder - new instructions : Ok
>   55: Intel cqm nmi context read                 : Skip
>   # 
>   # uname -a
>   Linux zoo 4.7.3-200.fc24.x86_64 #1 SMP Wed Sep 7 17:31:21 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>   # 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
>   #
>   $ grep PRETTY_NAME /etc/os-release 
>   PRETTY_NAME="Fedora 25 (Workstation Edition)"
>   $ 
>   $ perf stat make -C tools/perf build-test
>   make: Entering directory '/home/acme/git/linux/tools/perf'
>   - tarpkg: ./tests/perf-targz-src-pkg .
>                make_no_slang_O: make NO_SLANG=1
>              make_util_map_o_O: make util/map.o
>                  make_static_O: make LDFLAGS=-static
>   make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
>                  make_perf_o_O: make perf.o
>            make_no_libunwind_O: make NO_LIBUNWIND=1
>               make_no_libelf_O: make NO_LIBELF=1
>        make_util_pmu_bison_o_O: make util/pmu-bison.o
>            make_no_backtrace_O: make NO_BACKTRACE=1
>                   make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
>             make_no_demangle_O: make NO_DEMANGLE=1
>              make_no_libperl_O: make NO_LIBPERL=1
>                    make_tags_O: make tags
>              make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
>    make_install_prefix_slash_O: make install prefix=/tmp/krava/
>             make_no_auxtrace_O: make NO_AUXTRACE=1
>              make_no_libnuma_O: make NO_LIBNUMA=1
>             make_install_bin_O: make install-bin
>                 make_no_newt_O: make NO_NEWT=1
>                    make_pure_O: make
>                 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_clean_all_O: make clean all
>                 make_no_gtk2_O: make NO_GTK2=1
>            make_no_libbionic_O: make NO_LIBBIONIC=1
>          make_install_prefix_O: make install prefix=/tmp/krava
>               make_no_libbpf_O: make NO_LIBBPF=1
>             make_no_libaudit_O: make NO_LIBAUDIT=1
>         make_with_babeltrace_O: make LIBBABELTRACE=1
>            make_no_libpython_O: make NO_LIBPYTHON=1
>                    make_help_O: make help
>                     make_doc_O: make doc
>                   make_debug_O: make DEBUG=1
>                 make_install_O: make install
>   OK
>   make: Leaving directory '/home/acme/git/linux/tools/perf'
>   $ 
>   

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2016-12-01 18:02 Arnaldo Carvalho de Melo
  2016-12-02  9:10 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-12-01 18:02 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexei Starovoitov, Chris Ryder, David Ahern,
	He Kuang, Jiri Olsa, Joe Stringer, Kim Phillips, Mark Rutland,
	Namhyung Kim, Pawel Moll, Peter Zijlstra, Wang Nan, Will Deacon,
	Zefan Li, pi3orama, 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 2471cece40d61b0035360338569d338f9dea6099:

  Merge tag 'perf-core-for-mingo-20161125' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-11-25 18:12:41 +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-20161201

for you to fetch changes up to 0fcb1da4aba6e6c7b32de5e0948b740b31ad822d:

  perf annotate: AArch64 support (2016-12-01 13:03:19 -0300)

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

New features:

- Support AArch64 in the 'annotate' code, native/local and
  cross-arch/remote (Kim Phillips)

- Allow considering just events in a given time interval, via the
  '--time start.s.ms,end.s.ms' command line, added to 'perf kmem',
  'perf report', 'perf sched timehist' and 'perf script' (David Ahern)

- Add option to stop printing a callchain at one of a given group of
  symbol names (David Ahern)

- Handle cpu migration events in 'perf sched timehist' (David Ahern)

- Track memory freed in 'perf kmem stat' (David Ahern)

Infrastructure:

- Initial support (and perf test entry) for tooling hooks, starting with
  'record_start' and 'record_end', that will have as its initial user the
  eBPF infrastructure, where perf_ prefixed functions will be JITed and
  run when such hooks are called (Wang Nan)

- Remove redundant "test" and similar strings from 'perf test' descriptions
  (Arnaldo Carvalho de Melo)

- libbpf assorted improvements (Wang Nan)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
      perf ui helpline: Provide a printf variant
      perf annotate: Show invalid jump offset in error message
      perf test: Remove "test" and similar strings from test descriptions

David Ahern (10):
      perf sched timehist: Handle cpu migration events
      perf trace: Update tid/pid filtering option to leverage symbol_conf
      perf kmem stat: Track memory freed
      perf script: Add option to stop printing callchain
      perf tools: Add time-based utility functions
      perf tools: Move parse_nsec_time to time-utils.c
      perf script: Add option to specify time window of interest
      perf sched timehist: Add option to specify time window of interest
      perf kmem: Add option to specify time window of interest
      perf report: Add option to specify time window of interest

Kim Phillips (2):
      perf annotate: Use arch->objdump.comment_char in dec__parse()
      perf annotate: AArch64 support

Wang Nan (4):
      tools lib bpf: Add missing BPF functions
      tools lib bpf: Add private field for bpf_object
      tools lib bpf: Retrive bpf_map through offset of bpf_map_def
      perf tools: Introduce perf hooks

 tools/lib/bpf/bpf.c                           |  56 ++++++++++
 tools/lib/bpf/bpf.h                           |   7 ++
 tools/lib/bpf/libbpf.c                        |  35 ++++++
 tools/lib/bpf/libbpf.h                        |  13 +++
 tools/perf/Documentation/perf-kmem.txt        |   7 ++
 tools/perf/Documentation/perf-report.txt      |   7 ++
 tools/perf/Documentation/perf-sched.txt       |  12 +++
 tools/perf/Documentation/perf-script.txt      |  10 ++
 tools/perf/arch/arm64/annotate/instructions.c |  62 +++++++++++
 tools/perf/arch/x86/tests/arch-tests.c        |  10 +-
 tools/perf/builtin-kmem.c                     |  36 ++++++-
 tools/perf/builtin-record.c                   |  11 ++
 tools/perf/builtin-report.c                   |  14 ++-
 tools/perf/builtin-sched.c                    | 148 ++++++++++++++++++++++++--
 tools/perf/builtin-script.c                   |  17 ++-
 tools/perf/builtin-trace.c                    |  49 ++-------
 tools/perf/tests/Build                        |   1 +
 tools/perf/tests/bpf.c                        |   6 +-
 tools/perf/tests/builtin-test.c               |  96 +++++++++--------
 tools/perf/tests/llvm.c                       |   8 +-
 tools/perf/tests/perf-hooks.c                 |  44 ++++++++
 tools/perf/tests/tests.h                      |   1 +
 tools/perf/ui/browsers/annotate.c             |   6 +-
 tools/perf/ui/helpline.c                      |  10 ++
 tools/perf/ui/helpline.h                      |   1 +
 tools/perf/util/Build                         |   3 +
 tools/perf/util/annotate.c                    |   7 +-
 tools/perf/util/evsel_fprintf.c               |   8 ++
 tools/perf/util/perf-hooks-list.h             |   3 +
 tools/perf/util/perf-hooks.c                  |  84 +++++++++++++++
 tools/perf/util/perf-hooks.h                  |  37 +++++++
 tools/perf/util/symbol.c                      |   8 ++
 tools/perf/util/symbol.h                      |   6 +-
 tools/perf/util/time-utils.c                  | 119 +++++++++++++++++++++
 tools/perf/util/time-utils.h                  |  14 +++
 tools/perf/util/util.c                        |  33 ------
 tools/perf/util/util.h                        |   2 -
 37 files changed, 842 insertions(+), 149 deletions(-)
 create mode 100644 tools/perf/arch/arm64/annotate/instructions.c
 create mode 100644 tools/perf/tests/perf-hooks.c
 create mode 100644 tools/perf/util/perf-hooks-list.h
 create mode 100644 tools/perf/util/perf-hooks.c
 create mode 100644 tools/perf/util/perf-hooks.h
 create mode 100644 tools/perf/util/time-utils.c
 create mode 100644 tools/perf/util/time-utils.h

  # uname -a
  Linux jouet 4.8.8-300.fc25.x86_64 #1 SMP Tue Nov 15 18:10:06 UTC 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: Synthesize cpu map                         : Ok
  40: Synthesize stat config                     : Ok
  41: Synthesize stat                            : Ok
  42: Synthesize stat round                      : Ok
  43: Synthesize attr update                     : Ok
  44: Event times                                : Ok
  45: Read backward ring buffer                  : Ok
  46: Print cpu map                              : Ok
  47: Probe SDT events                           : Ok
  48: is_printable_array                         : Ok
  49: Print bitmap                               : Ok
  50: perf hooks                                 : Ok
  51: x86 rdpmc                                  : Ok
  52: Convert perf time to TSC                   : Ok
  53: DWARF unwind                               : Ok
  54: x86 instruction decoder - new instructions : Ok
  55: Intel cqm nmi context read                 : Skip
  # 
  # uname -a
  Linux zoo 4.7.3-200.fc24.x86_64 #1 SMP Wed Sep 7 17:31:21 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  # 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
  #
  $ grep PRETTY_NAME /etc/os-release 
  PRETTY_NAME="Fedora 25 (Workstation Edition)"
  $ 
  $ perf stat make -C tools/perf build-test
  make: Entering directory '/home/acme/git/linux/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
               make_no_slang_O: make NO_SLANG=1
             make_util_map_o_O: make util/map.o
                 make_static_O: make LDFLAGS=-static
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
                 make_perf_o_O: make perf.o
           make_no_libunwind_O: make NO_LIBUNWIND=1
              make_no_libelf_O: make NO_LIBELF=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
           make_no_backtrace_O: make NO_BACKTRACE=1
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
            make_no_demangle_O: make NO_DEMANGLE=1
             make_no_libperl_O: make NO_LIBPERL=1
                   make_tags_O: make tags
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
            make_no_auxtrace_O: make NO_AUXTRACE=1
             make_no_libnuma_O: make NO_LIBNUMA=1
            make_install_bin_O: make install-bin
                make_no_newt_O: make NO_NEWT=1
                   make_pure_O: make
                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_clean_all_O: make clean all
                make_no_gtk2_O: make NO_GTK2=1
           make_no_libbionic_O: make NO_LIBBIONIC=1
         make_install_prefix_O: make install prefix=/tmp/krava
              make_no_libbpf_O: make NO_LIBBPF=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
           make_no_libpython_O: make NO_LIBPYTHON=1
                   make_help_O: make help
                    make_doc_O: make doc
                  make_debug_O: make DEBUG=1
                make_install_O: make install
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $ 
  

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-09-01 16:45 Arnaldo Carvalho de Melo
@ 2016-09-05 13:16 ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2016-09-05 13:16 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin, Anton Blanchard,
	David Ahern, Hemant Kumar, Jiri Olsa, Masami Hiramatsu,
	Michael Petlan, Milian Wolff, Namhyung Kim, Naveen N . Rao,
	Peter Zijlstra, Ravi Bangoria, Shawn Lin, Wang Nan,
	Yauheni Kaliuta, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 36e674a05164cdbb9d4a5b1b0b279fabae6c13bd:
> 
>   Merge tag 'perf-core-for-mingo-20160823' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-08-24 11:08:10 +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-20160901
> 
> for you to fetch changes up to 6243b9dc4c991fe8bdc53a0e029908aef3ddb101:
> 
>   perf probe: Move dwarf specific functions to dwarf-aux.c (2016-09-01 12:42:26 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Support generating cross arch probes, i.e. if you specify a vmlinux
>   file for different arch than the one in the host machine,
> 
> 	 $ perf probe --definition function_name args
> 
>   will generate the probe definition string needed to append to the
>   target machine /sys/kernel/debug/tracing/kprobes_events file, using
>   scripting (Masami Hiramatsu).
> 
> - Make 'perf probe' skip the function prologue in uprobes if program
>   compiled without optimization, using the same strategy as gdb and
>   systemtap uses, fixing a bug where:
> 
> 	$ perf probe -x ./test 'foo i'
> 
>   When 'foo(42)' was used on the "./test" executable would produce i=0
>   instead of the expected i=42 (Ravi Bangoria)
> 
> - Demangle symbols for synthesized @plt entries too (Millian Wolff)
> 
> Documentation:
> 
> - Show default report configuration in 'perf config' example
>   and docs (Millian Wolff)
> 
> Infrastructure:
> 
> - Make 'perf test vmlinux' tolerate the symbol aliasing pruning done when
>   loading kallsyms and vmlinux (Arnaldo Carvalho de Melo)
> 
> - Improve output of 'perf test vmlinux' test, to help identify on the verbose
>   output which lines are warning and which are errors (Arnaldo Carvalho de Melo)
> 
> - Prep work to stop having to pass symbol_filter_t to lots of functions,
>   simplifying symtab loading routines (Arnaldo Carvalho de Melo)
> 
> - Honor symbol_conf.allow_aliases when loading kallsyms as well, it was using
>   it only when loading vmlinux files (Arnaldo Carvalho de Melo)
> 
> - Fixup symbol->end before doing alias pruning when loading symbol tables
>   (Arnaldo Carvalho de Melo)
> 
> - Fix error handling of lzma kernel module decompression (Shawn Lin)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (8):
>       perf annotate: Initialize the priv are in symbol__new()
>       perf symbols: Rename ->ignore to ->idle
>       perf probe: Do not use map_load filters for function
>       perf test vmlinux: Clarify which -v lines are errors or warning
>       perf test vmlinux: Avoid printing headers for empty lists
>       perf test vmlinux: Tolerate symbol aliases
>       perf symbols: Check symbol_conf.allow_aliases for kallsyms loading too
>       perf symbols: Fixup symbol sizes before picking best ones
> 
> Masami Hiramatsu (5):
>       perf probe: Remove unused tracing_dir variable
>       perf probe: Show trace event definition
>       perf probe: Ignore vmlinux buildid if offline kernel is given
>       perf probe: Support probing on offline cross-arch binary
>       perf probe: Ignore vmlinux Build-id when offline vmlinux given
> 
> Milian Wolff (2):
>       perf symbols: Demangle symbols for synthesized @plt entries.
>       perf config: Show default report configuration in example and docs
> 
> Ravi Bangoria (3):
>       perf probe: Add helper function to check if probe with variable
>       perf uprobe: Skip prologue if program compiled without optimization
>       perf probe: Move dwarf specific functions to dwarf-aux.c
> 
> Shawn Lin (1):
>       perf tools: Fix error handling of lzma decompression
> 
>  tools/perf/Documentation/perf-config.txt           |   8 +
>  tools/perf/Documentation/perf-probe.txt            |   9 ++
>  tools/perf/Documentation/perfconfig.example        |   9 ++
>  tools/perf/arch/arm/include/dwarf-regs-table.h     |   9 ++
>  tools/perf/arch/arm64/include/dwarf-regs-table.h   |  13 ++
>  tools/perf/arch/powerpc/include/dwarf-regs-table.h |  27 ++++
>  tools/perf/arch/s390/include/dwarf-regs-table.h    |   8 +
>  tools/perf/arch/sh/include/dwarf-regs-table.h      |  25 +++
>  tools/perf/arch/sparc/include/dwarf-regs-table.h   |  18 +++
>  tools/perf/arch/x86/include/dwarf-regs-table.h     |  14 ++
>  tools/perf/arch/xtensa/include/dwarf-regs-table.h  |   8 +
>  tools/perf/builtin-annotate.c                      |   7 +-
>  tools/perf/builtin-probe.c                         |  35 +++-
>  tools/perf/builtin-report.c                        |   6 +-
>  tools/perf/builtin-top.c                           |   8 +-
>  tools/perf/tests/vmlinux-kallsyms.c                |  44 +++--
>  tools/perf/util/Build                              |   1 +
>  tools/perf/util/annotate.c                         |   7 -
>  tools/perf/util/annotate.h                         |   1 -
>  tools/perf/util/dwarf-aux.c                        | 179 +++++++++++++++++++++
>  tools/perf/util/dwarf-aux.h                        |   8 +
>  tools/perf/util/dwarf-regs.c                       |  59 +++++++
>  tools/perf/util/evsel_fprintf.c                    |   4 +-
>  tools/perf/util/include/dwarf-regs.h               |   6 +
>  tools/perf/util/lzma.c                             |  15 +-
>  tools/perf/util/probe-event.c                      | 101 +++++++++---
>  tools/perf/util/probe-event.h                      |   3 +
>  tools/perf/util/probe-file.c                       |   5 +-
>  tools/perf/util/probe-finder.c                     |  60 +++++--
>  tools/perf/util/probe-finder.h                     |   1 +
>  tools/perf/util/symbol-elf.c                       |  86 ++++++----
>  tools/perf/util/symbol.c                           |  30 +++-
>  tools/perf/util/symbol.h                           |   5 +-
>  33 files changed, 698 insertions(+), 121 deletions(-)
>  create mode 100644 tools/perf/arch/arm/include/dwarf-regs-table.h
>  create mode 100644 tools/perf/arch/arm64/include/dwarf-regs-table.h
>  create mode 100644 tools/perf/arch/powerpc/include/dwarf-regs-table.h
>  create mode 100644 tools/perf/arch/s390/include/dwarf-regs-table.h
>  create mode 100644 tools/perf/arch/sh/include/dwarf-regs-table.h
>  create mode 100644 tools/perf/arch/sparc/include/dwarf-regs-table.h
>  create mode 100644 tools/perf/arch/x86/include/dwarf-regs-table.h
>  create mode 100644 tools/perf/arch/xtensa/include/dwarf-regs-table.h
>  create mode 100644 tools/perf/util/dwarf-regs.c
> 
> Build stats:
> 
>   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 fedora:20: Ok
>  10 fedora:21: Ok
>  11 fedora:22: Ok
>  12 fedora:23: Ok
>  13 fedora:24: Ok
>  14 fedora:24-x-ARC-uClibc: Ok
>  15 fedora:rawhide: Ok
>  16 mageia:5: Ok
>  17 opensuse:13.2: Ok
>  18 opensuse:42.1: Ok
>  19 opensuse:tumbleweed: Ok
>  20 ubuntu:12.04.5: Ok
>  21 ubuntu:14.04.4: Ok
>  22 ubuntu:15.10: Ok
>  23 ubuntu:16.04: Ok
>  24 ubuntu:16.04-x-arm: Ok
>  25 ubuntu:16.04-x-arm64: Ok
>  26 ubuntu:16.04-x-powerpc64: Ok
>  27 ubuntu:16.04-x-powerpc64el: Ok
>  28 ubuntu:16.10: Ok
>  29 ubuntu:16.10-x-s390: Ok

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2016-09-01 16:45 Arnaldo Carvalho de Melo
  2016-09-05 13:16 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-09-01 16:45 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Anton Blanchard, David Ahern, Hemant Kumar,
	Jiri Olsa, Masami Hiramatsu, Michael Petlan, Milian Wolff,
	Namhyung Kim, Naveen N . Rao, Peter Zijlstra, Ravi Bangoria,
	Shawn Lin, Wang Nan, Yauheni Kaliuta, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 36e674a05164cdbb9d4a5b1b0b279fabae6c13bd:

  Merge tag 'perf-core-for-mingo-20160823' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-08-24 11:08:10 +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-20160901

for you to fetch changes up to 6243b9dc4c991fe8bdc53a0e029908aef3ddb101:

  perf probe: Move dwarf specific functions to dwarf-aux.c (2016-09-01 12:42:26 -0300)

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

User visible:

- Support generating cross arch probes, i.e. if you specify a vmlinux
  file for different arch than the one in the host machine,

	 $ perf probe --definition function_name args

  will generate the probe definition string needed to append to the
  target machine /sys/kernel/debug/tracing/kprobes_events file, using
  scripting (Masami Hiramatsu).

- Make 'perf probe' skip the function prologue in uprobes if program
  compiled without optimization, using the same strategy as gdb and
  systemtap uses, fixing a bug where:

	$ perf probe -x ./test 'foo i'

  When 'foo(42)' was used on the "./test" executable would produce i=0
  instead of the expected i=42 (Ravi Bangoria)

- Demangle symbols for synthesized @plt entries too (Millian Wolff)

Documentation:

- Show default report configuration in 'perf config' example
  and docs (Millian Wolff)

Infrastructure:

- Make 'perf test vmlinux' tolerate the symbol aliasing pruning done when
  loading kallsyms and vmlinux (Arnaldo Carvalho de Melo)

- Improve output of 'perf test vmlinux' test, to help identify on the verbose
  output which lines are warning and which are errors (Arnaldo Carvalho de Melo)

- Prep work to stop having to pass symbol_filter_t to lots of functions,
  simplifying symtab loading routines (Arnaldo Carvalho de Melo)

- Honor symbol_conf.allow_aliases when loading kallsyms as well, it was using
  it only when loading vmlinux files (Arnaldo Carvalho de Melo)

- Fixup symbol->end before doing alias pruning when loading symbol tables
  (Arnaldo Carvalho de Melo)

- Fix error handling of lzma kernel module decompression (Shawn Lin)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (8):
      perf annotate: Initialize the priv are in symbol__new()
      perf symbols: Rename ->ignore to ->idle
      perf probe: Do not use map_load filters for function
      perf test vmlinux: Clarify which -v lines are errors or warning
      perf test vmlinux: Avoid printing headers for empty lists
      perf test vmlinux: Tolerate symbol aliases
      perf symbols: Check symbol_conf.allow_aliases for kallsyms loading too
      perf symbols: Fixup symbol sizes before picking best ones

Masami Hiramatsu (5):
      perf probe: Remove unused tracing_dir variable
      perf probe: Show trace event definition
      perf probe: Ignore vmlinux buildid if offline kernel is given
      perf probe: Support probing on offline cross-arch binary
      perf probe: Ignore vmlinux Build-id when offline vmlinux given

Milian Wolff (2):
      perf symbols: Demangle symbols for synthesized @plt entries.
      perf config: Show default report configuration in example and docs

Ravi Bangoria (3):
      perf probe: Add helper function to check if probe with variable
      perf uprobe: Skip prologue if program compiled without optimization
      perf probe: Move dwarf specific functions to dwarf-aux.c

Shawn Lin (1):
      perf tools: Fix error handling of lzma decompression

 tools/perf/Documentation/perf-config.txt           |   8 +
 tools/perf/Documentation/perf-probe.txt            |   9 ++
 tools/perf/Documentation/perfconfig.example        |   9 ++
 tools/perf/arch/arm/include/dwarf-regs-table.h     |   9 ++
 tools/perf/arch/arm64/include/dwarf-regs-table.h   |  13 ++
 tools/perf/arch/powerpc/include/dwarf-regs-table.h |  27 ++++
 tools/perf/arch/s390/include/dwarf-regs-table.h    |   8 +
 tools/perf/arch/sh/include/dwarf-regs-table.h      |  25 +++
 tools/perf/arch/sparc/include/dwarf-regs-table.h   |  18 +++
 tools/perf/arch/x86/include/dwarf-regs-table.h     |  14 ++
 tools/perf/arch/xtensa/include/dwarf-regs-table.h  |   8 +
 tools/perf/builtin-annotate.c                      |   7 +-
 tools/perf/builtin-probe.c                         |  35 +++-
 tools/perf/builtin-report.c                        |   6 +-
 tools/perf/builtin-top.c                           |   8 +-
 tools/perf/tests/vmlinux-kallsyms.c                |  44 +++--
 tools/perf/util/Build                              |   1 +
 tools/perf/util/annotate.c                         |   7 -
 tools/perf/util/annotate.h                         |   1 -
 tools/perf/util/dwarf-aux.c                        | 179 +++++++++++++++++++++
 tools/perf/util/dwarf-aux.h                        |   8 +
 tools/perf/util/dwarf-regs.c                       |  59 +++++++
 tools/perf/util/evsel_fprintf.c                    |   4 +-
 tools/perf/util/include/dwarf-regs.h               |   6 +
 tools/perf/util/lzma.c                             |  15 +-
 tools/perf/util/probe-event.c                      | 101 +++++++++---
 tools/perf/util/probe-event.h                      |   3 +
 tools/perf/util/probe-file.c                       |   5 +-
 tools/perf/util/probe-finder.c                     |  60 +++++--
 tools/perf/util/probe-finder.h                     |   1 +
 tools/perf/util/symbol-elf.c                       |  86 ++++++----
 tools/perf/util/symbol.c                           |  30 +++-
 tools/perf/util/symbol.h                           |   5 +-
 33 files changed, 698 insertions(+), 121 deletions(-)
 create mode 100644 tools/perf/arch/arm/include/dwarf-regs-table.h
 create mode 100644 tools/perf/arch/arm64/include/dwarf-regs-table.h
 create mode 100644 tools/perf/arch/powerpc/include/dwarf-regs-table.h
 create mode 100644 tools/perf/arch/s390/include/dwarf-regs-table.h
 create mode 100644 tools/perf/arch/sh/include/dwarf-regs-table.h
 create mode 100644 tools/perf/arch/sparc/include/dwarf-regs-table.h
 create mode 100644 tools/perf/arch/x86/include/dwarf-regs-table.h
 create mode 100644 tools/perf/arch/xtensa/include/dwarf-regs-table.h
 create mode 100644 tools/perf/util/dwarf-regs.c

Build stats:

  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 fedora:20: Ok
 10 fedora:21: Ok
 11 fedora:22: Ok
 12 fedora:23: Ok
 13 fedora:24: Ok
 14 fedora:24-x-ARC-uClibc: Ok
 15 fedora:rawhide: Ok
 16 mageia:5: Ok
 17 opensuse:13.2: Ok
 18 opensuse:42.1: Ok
 19 opensuse:tumbleweed: Ok
 20 ubuntu:12.04.5: Ok
 21 ubuntu:14.04.4: Ok
 22 ubuntu:15.10: Ok
 23 ubuntu:16.04: Ok
 24 ubuntu:16.04-x-arm: Ok
 25 ubuntu:16.04-x-arm64: Ok
 26 ubuntu:16.04-x-powerpc64: Ok
 27 ubuntu:16.04-x-powerpc64el: Ok
 28 ubuntu:16.10: Ok
 29 ubuntu:16.10-x-s390: Ok

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-06-16  6:29 ` Jiri Olsa
@ 2016-06-16 19:54   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-06-16 19:54 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Ingo Molnar, linux-kernel, Alexander Shishkin,
	Ananth N Mavinakayanahalli, Brendan Gregg, David Ahern, He Kuang,
	Hemant Kumar, Masami Hiramatsu, Namhyung Kim, Peter Zijlstra,
	Taeung Song, Wang Nan, Arnaldo Carvalho de Melo

Em Thu, Jun 16, 2016 at 08:29:47AM +0200, Jiri Olsa escreveu:
> On Wed, Jun 15, 2016 at 03:13:09PM -0300, Arnaldo Carvalho de Melo wrote:
> 
> SNIP
> 
> > ----------------------------------------------------------------
> > He Kuang (1):
> >       perf unwind: Fix compile error for static cross build
> > 
> > Jiri Olsa (10):
> >       perf mem: Add --ldlat option
> >       perf tools: Fix Data Object sort entry width index
> >       perf tui: Separate hierarchy and standard headers output
> >       perf stdio: Separate headers output
> >       perf stdio: Separate hierarchy headers output
> >       perf stdio: Separate standard headers output
> >       perf stdio: Do not pass hists in hist_entry__fprintf
> >       perf stdio: Add use_callchain parameter to hists__fprintf
> >       perf hists: Replace perf_evsel arg perf_hpp_fmt's header callback
> >       perf hists: Replace perf_evsel arg perf_hpp_fmt's width callback
> hi,
> any reason for skipping this one?:
>   perf tools: Rename __hists__add_entry to hists__add_entry

nope, will apply.

- Arnaldo

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-06-15 18:13 Arnaldo Carvalho de Melo
  2016-06-16  6:29 ` Jiri Olsa
@ 2016-06-16  8:29 ` Ingo Molnar
  1 sibling, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2016-06-16  8:29 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Alexander Shishkin, Ananth N Mavinakayanahalli,
	Brendan Gregg, David Ahern, He Kuang, Hemant Kumar, Jiri Olsa,
	Masami Hiramatsu, 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
> 
> The following changes since commit 2c95afc1e83d93fac3be6923465e1753c2c53b0a:
> 
>   perf/x86/intel, watchdog: Switch NMI watchdog to ref cycles on x86 (2016-06-14 11:16:59 +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-20160615
> 
> for you to fetch changes up to 2fd457a34525ea3bc609e377b46af759af8a7934:
> 
>   perf probe: Add --cache option to cache the probe definitions (2016-06-15 14:34:42 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Add --ldlat option to 'perf mem' to specify load latency for loads
>   event (e.g. cpu/mem-loads/ ) (Jiri Olsa)
> 
> Build fixes:
> 
> - Fix libunwind related compile error for static cross build (He Kuang)
> 
> Infrastructure:
> 
> - UI refactorings to support headers with multiple lines, non-evsel
>   hists browsers, toggle showing callchains, etc (Jiri Olsa)
> 
> - More prep work for caching probe definitions, paving the way
>   for supporting SDT (Statically Defined Traces) userspace probes (Masami Hiramatsu)
> 
> - Handle NULL at perf_config_set__delete() (Taeung Song)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> He Kuang (1):
>       perf unwind: Fix compile error for static cross build
> 
> Jiri Olsa (10):
>       perf mem: Add --ldlat option
>       perf tools: Fix Data Object sort entry width index
>       perf tui: Separate hierarchy and standard headers output
>       perf stdio: Separate headers output
>       perf stdio: Separate hierarchy headers output
>       perf stdio: Separate standard headers output
>       perf stdio: Do not pass hists in hist_entry__fprintf
>       perf stdio: Add use_callchain parameter to hists__fprintf
>       perf hists: Replace perf_evsel arg perf_hpp_fmt's header callback
>       perf hists: Replace perf_evsel arg perf_hpp_fmt's width callback
> 
> Masami Hiramatsu (7):
>       perf tools: Fix rm_rf() to handle non-regular files correctly
>       perf probe: Fix to add NULL check for strndup
>       perf buildid: Rename and export build_id_cache__cachedir()
>       perf probe: Add perf_probe_event__copy()
>       perf probe: Uncomment and export synthesize_perf_probe_point()
>       perf probe: Introduce perf_cache interfaces
>       perf probe: Add --cache option to cache the probe definitions
> 
> Taeung Song (1):
>       perf config: Handle NULL at perf_config_set__delete()
> 
>  tools/perf/Documentation/perf-mem.txt   |   3 +
>  tools/perf/Documentation/perf-probe.txt |   4 +
>  tools/perf/builtin-diff.c               |   7 +-
>  tools/perf/builtin-mem.c                |   1 +
>  tools/perf/builtin-probe.c              |   1 +
>  tools/perf/builtin-report.c             |   3 +-
>  tools/perf/builtin-top.c                |   2 +-
>  tools/perf/config/Makefile              |   3 +
>  tools/perf/ui/browsers/hists.c          |  39 ++--
>  tools/perf/ui/gtk/hists.c               |   2 +-
>  tools/perf/ui/hist.c                    |  11 +-
>  tools/perf/ui/stdio/hist.c              | 133 +++++++------
>  tools/perf/util/build-id.c              |  12 +-
>  tools/perf/util/build-id.h              |   2 +
>  tools/perf/util/config.c                |   3 +
>  tools/perf/util/hist.c                  |   2 +-
>  tools/perf/util/hist.h                  |   7 +-
>  tools/perf/util/mem-events.c            |  17 +-
>  tools/perf/util/mem-events.h            |   1 +
>  tools/perf/util/probe-event.c           | 128 ++++++++++--
>  tools/perf/util/probe-event.h           |   5 +
>  tools/perf/util/probe-file.c            | 331 ++++++++++++++++++++++++++++++++
>  tools/perf/util/probe-file.h            |  20 ++
>  tools/perf/util/sort.c                  |  14 +-
>  tools/perf/util/util.c                  |  13 +-
>  25 files changed, 640 insertions(+), 124 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-06-15 18:13 Arnaldo Carvalho de Melo
@ 2016-06-16  6:29 ` Jiri Olsa
  2016-06-16 19:54   ` Arnaldo Carvalho de Melo
  2016-06-16  8:29 ` Ingo Molnar
  1 sibling, 1 reply; 53+ messages in thread
From: Jiri Olsa @ 2016-06-16  6:29 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Alexander Shishkin,
	Ananth N Mavinakayanahalli, Brendan Gregg, David Ahern, He Kuang,
	Hemant Kumar, Masami Hiramatsu, Namhyung Kim, Peter Zijlstra,
	Taeung Song, Wang Nan, Arnaldo Carvalho de Melo

On Wed, Jun 15, 2016 at 03:13:09PM -0300, Arnaldo Carvalho de Melo wrote:

SNIP

> ----------------------------------------------------------------
> He Kuang (1):
>       perf unwind: Fix compile error for static cross build
> 
> Jiri Olsa (10):
>       perf mem: Add --ldlat option
>       perf tools: Fix Data Object sort entry width index
>       perf tui: Separate hierarchy and standard headers output
>       perf stdio: Separate headers output
>       perf stdio: Separate hierarchy headers output
>       perf stdio: Separate standard headers output
>       perf stdio: Do not pass hists in hist_entry__fprintf
>       perf stdio: Add use_callchain parameter to hists__fprintf
>       perf hists: Replace perf_evsel arg perf_hpp_fmt's header callback
>       perf hists: Replace perf_evsel arg perf_hpp_fmt's width callback
hi,
any reason for skipping this one?:
  perf tools: Rename __hists__add_entry to hists__add_entry

thanks,
jirka

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2016-06-15 18:13 Arnaldo Carvalho de Melo
  2016-06-16  6:29 ` Jiri Olsa
  2016-06-16  8:29 ` Ingo Molnar
  0 siblings, 2 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-06-15 18:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Ananth N Mavinakayanahalli, Brendan Gregg, David Ahern, He Kuang,
	Hemant Kumar, Jiri Olsa, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, Taeung Song, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 2c95afc1e83d93fac3be6923465e1753c2c53b0a:

  perf/x86/intel, watchdog: Switch NMI watchdog to ref cycles on x86 (2016-06-14 11:16:59 +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-20160615

for you to fetch changes up to 2fd457a34525ea3bc609e377b46af759af8a7934:

  perf probe: Add --cache option to cache the probe definitions (2016-06-15 14:34:42 -0300)

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

User visible:

- Add --ldlat option to 'perf mem' to specify load latency for loads
  event (e.g. cpu/mem-loads/ ) (Jiri Olsa)

Build fixes:

- Fix libunwind related compile error for static cross build (He Kuang)

Infrastructure:

- UI refactorings to support headers with multiple lines, non-evsel
  hists browsers, toggle showing callchains, etc (Jiri Olsa)

- More prep work for caching probe definitions, paving the way
  for supporting SDT (Statically Defined Traces) userspace probes (Masami Hiramatsu)

- Handle NULL at perf_config_set__delete() (Taeung Song)

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

----------------------------------------------------------------
He Kuang (1):
      perf unwind: Fix compile error for static cross build

Jiri Olsa (10):
      perf mem: Add --ldlat option
      perf tools: Fix Data Object sort entry width index
      perf tui: Separate hierarchy and standard headers output
      perf stdio: Separate headers output
      perf stdio: Separate hierarchy headers output
      perf stdio: Separate standard headers output
      perf stdio: Do not pass hists in hist_entry__fprintf
      perf stdio: Add use_callchain parameter to hists__fprintf
      perf hists: Replace perf_evsel arg perf_hpp_fmt's header callback
      perf hists: Replace perf_evsel arg perf_hpp_fmt's width callback

Masami Hiramatsu (7):
      perf tools: Fix rm_rf() to handle non-regular files correctly
      perf probe: Fix to add NULL check for strndup
      perf buildid: Rename and export build_id_cache__cachedir()
      perf probe: Add perf_probe_event__copy()
      perf probe: Uncomment and export synthesize_perf_probe_point()
      perf probe: Introduce perf_cache interfaces
      perf probe: Add --cache option to cache the probe definitions

Taeung Song (1):
      perf config: Handle NULL at perf_config_set__delete()

 tools/perf/Documentation/perf-mem.txt   |   3 +
 tools/perf/Documentation/perf-probe.txt |   4 +
 tools/perf/builtin-diff.c               |   7 +-
 tools/perf/builtin-mem.c                |   1 +
 tools/perf/builtin-probe.c              |   1 +
 tools/perf/builtin-report.c             |   3 +-
 tools/perf/builtin-top.c                |   2 +-
 tools/perf/config/Makefile              |   3 +
 tools/perf/ui/browsers/hists.c          |  39 ++--
 tools/perf/ui/gtk/hists.c               |   2 +-
 tools/perf/ui/hist.c                    |  11 +-
 tools/perf/ui/stdio/hist.c              | 133 +++++++------
 tools/perf/util/build-id.c              |  12 +-
 tools/perf/util/build-id.h              |   2 +
 tools/perf/util/config.c                |   3 +
 tools/perf/util/hist.c                  |   2 +-
 tools/perf/util/hist.h                  |   7 +-
 tools/perf/util/mem-events.c            |  17 +-
 tools/perf/util/mem-events.h            |   1 +
 tools/perf/util/probe-event.c           | 128 ++++++++++--
 tools/perf/util/probe-event.h           |   5 +
 tools/perf/util/probe-file.c            | 331 ++++++++++++++++++++++++++++++++
 tools/perf/util/probe-file.h            |  20 ++
 tools/perf/util/sort.c                  |  14 +-
 tools/perf/util/util.c                  |  13 +-
 25 files changed, 640 insertions(+), 124 deletions(-)

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-04-08 13:15 ` Arnaldo Carvalho de Melo
@ 2016-04-13  6:58   ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2016-04-13  6:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexei Starovoitov, Andi Kleen, Andreas Hollmann, Cody P Schafer,
	David Ahern, Dima Kogan, Frederic Weisbecker, He Kuang,
	Jiri Olsa, Josh Poimboeuf, Kirill Smelkov, Li Zefan,
	Masami Hiramatsu, Milian Wolff, Namhyung Kim, Peter Zijlstra,
	pi3orama, Steven Rostedt, Taeung Song, Vinson Lee, Wang Nan,
	Arnaldo Carvalho de Melo


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

> Em Thu, Apr 07, 2016 at 05:58:21PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Hi Ingo,
> > 
> > 	Please consider pulling, build tested on:
> 
> Ingo, if you haven't pulled this one, please pull instead
> perf-core-for-mingo-20160408, which has the same tag text and contents +
> a Tested-by tag from Milian for the unwind thread one and a bisection
> fix one liner for the syscall_tbl generation from Wang,

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-04-07 20:58 Arnaldo Carvalho de Melo
@ 2016-04-08 13:15 ` Arnaldo Carvalho de Melo
  2016-04-13  6:58   ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-04-08 13:15 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexei Starovoitov, Andi Kleen, Andreas Hollmann, Cody P Schafer,
	David Ahern, Dima Kogan, Frederic Weisbecker, He Kuang,
	Jiri Olsa, Josh Poimboeuf, Kirill Smelkov, Li Zefan,
	Masami Hiramatsu, Milian Wolff, Namhyung Kim, Peter Zijlstra,
	pi3orama, Steven Rostedt, Taeung Song, Vinson Lee, Wang Nan,
	Arnaldo Carvalho de Melo

Em Thu, Apr 07, 2016 at 05:58:21PM -0300, Arnaldo Carvalho de Melo escreveu:
> Hi Ingo,
> 
> 	Please consider pulling, build tested on:

Ingo, if you haven't pulled this one, please pull instead
perf-core-for-mingo-20160408, which has the same tag text and contents +
a Tested-by tag from Milian for the unwind thread one and a bisection
fix one liner for the syscall_tbl generation from Wang,

Thanks,

- Arnaldo
 
>   # perf stat -e cycles dm
>   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
>   alldeps-ubuntu: Ok
> 
>    Performance counter stats for 'dm':
> 
>      3,095,685,547      cycles                                                      
> 
>      454.805537820 seconds time elapsed
> 
>   #
> 
> 	'perf test' passes on fedora23 x86_64,
> 
> Thanks,
> 
> - Arnaldo
> 
> The following changes since commit dad38ca64a252144b4ccdfe9730a3fe2b7c61957:
> 
>   Merge tag 'perf-core-for-mingo-20160401' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-04-06 08:46:23 +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-20160407
> 
> for you to fetch changes up to 98c3d844cd0bc56d33800114e6b6adcd0a5ec381:
> 
>   perf symbols: Adjust symbol for shared objects (2016-04-07 17:17:01 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Beautify more syscall arguments in 'perf trace', using the type column in
>   tracepoint /format fields to attach, for instance, a pid_t resolver to the
>   thread COMM, also attach a mode_t beautifier in the same fashion
>   (Arnaldo Carvalho de Melo)
> 
> - Build the syscall table id <-> name resolver using the same .tbl file
>   used in the kernel to generate headers, to avoid the delay in getting
>   new syscalls supported in the audit-libs external dependency, done so
>   far only for x86_64 (Arnaldo Carvalho de Melo)
> 
> - Improve the documentation of event specifications (Andi Kleen)
> 
> - Process update events in 'perf script', fixing up this use case:
> 
>     # perf stat -a -I 1000 -e cycles record | perf script -s script.py
> 
> - Shared object symbol adjustment fixes, fixing symbol resolution in
>   Android (Wang Nan)
> 
> Infrastructure:
> 
> - Add dedicated unwind addr_space member into thread struct, to allow
>   tools to use thread->priv, noticed while working on having callchains
>   in 'perf trace' (Jiri Olsa)
> 
> Build fixes:
> 
> - Fix the build in Ubuntu 12.04 (Arnaldo Carvalho de Melo, Vinson Lee)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf list: Document event specifications better
> 
> Arnaldo Carvalho de Melo (11):
>       perf probe: Check if dwarf_getlocations() is available
>       perf script perl: Do error checking on new backtrace routine
>       perf trace: Beautify sched_setscheduler 'policy' argument
>       perf trace: Beautify wait4/waitid 'options' argument
>       perf trace: Infrastructure to show COMM strings for syscalls returning PIDs
>       perf trace: Beautify set_tid_address, getpid, getppid return values
>       perf trace: Beautify pid_t arguments
>       perf trace: Beautify mode_t arguments
>       perf trace: Move syscall table id <-> name routines to separate class
>       perf tools: Allow generating per-arch syscall table arrays
>       perf tools: Build syscall table .c header from kernel's syscall_64.tbl
> 
> Jiri Olsa (4):
>       perf tools: Remove superfluous ARCH Makefile includes
>       perf tools: Introduce trim function
>       perf tools: Add dedicated unwind addr_space member into thread struct
>       perf script: Process event update events
> 
> Vinson Lee (1):
>       perf config: Fix build with older toolchain.
> 
> Wang Nan (2):
>       perf symbols: Record text offset in dso to calculate objdump address
>       perf symbols: Adjust symbol for shared objects
> 
>  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/perf/Documentation/perf-list.txt             | 107 +++++-
>  tools/perf/Makefile.perf                           |  13 +-
>  tools/perf/arch/x86/Makefile                       |  23 ++
>  tools/perf/arch/x86/entry/syscalls/syscall_64.tbl  | 374 +++++++++++++++++++++
>  tools/perf/arch/x86/entry/syscalls/syscalltbl.sh   |  39 +++
>  tools/perf/builtin-script.c                        |   1 +
>  tools/perf/builtin-trace.c                         | 156 +++++----
>  tools/perf/config/Makefile                         |  11 +-
>  tools/perf/trace/beauty/mode_t.c                   |  68 ++++
>  tools/perf/trace/beauty/pid.c                      |  18 +
>  tools/perf/trace/beauty/sched_policy.c             |  44 +++
>  tools/perf/trace/beauty/waitid_options.c           |  26 ++
>  tools/perf/ui/browsers/hists.c                     |   3 +-
>  tools/perf/ui/stdio/hist.c                         |   3 +-
>  tools/perf/util/Build                              |   5 +
>  tools/perf/util/config.c                           |   6 +-
>  tools/perf/util/dwarf-aux.c                        |   9 +
>  tools/perf/util/map.c                              |  14 +
>  .../perf/util/scripting-engines/trace-event-perl.c |  30 +-
>  tools/perf/util/symbol-elf.c                       |  13 +-
>  tools/perf/util/syscalltbl.c                       | 134 ++++++++
>  tools/perf/util/syscalltbl.h                       |  20 ++
>  tools/perf/util/thread.h                           |   6 +
>  tools/perf/util/unwind-libunwind.c                 |  25 +-
>  tools/perf/util/util.h                             |   5 +
>  29 files changed, 1060 insertions(+), 116 deletions(-)
>  create mode 100644 tools/build/feature/test-dwarf_getlocations.c
>  create mode 100644 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
>  create mode 100755 tools/perf/arch/x86/entry/syscalls/syscalltbl.sh
>  create mode 100644 tools/perf/trace/beauty/mode_t.c
>  create mode 100644 tools/perf/trace/beauty/pid.c
>  create mode 100644 tools/perf/trace/beauty/sched_policy.c
>  create mode 100644 tools/perf/trace/beauty/waitid_options.c
>  create mode 100644 tools/perf/util/syscalltbl.c
>  create mode 100644 tools/perf/util/syscalltbl.h

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2016-04-07 20:58 Arnaldo Carvalho de Melo
  2016-04-08 13:15 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-04-07 20:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexei Starovoitov, Andi Kleen,
	Andreas Hollmann, Cody P Schafer, David Ahern, Dima Kogan,
	Frederic Weisbecker, He Kuang, Jiri Olsa, Josh Poimboeuf,
	Kirill Smelkov, Li Zefan, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Peter Zijlstra, pi3orama, Steven Rostedt,
	Taeung Song, Vinson Lee, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, build tested on:

  # perf stat -e cycles dm
  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
  alldeps-ubuntu: Ok

   Performance counter stats for 'dm':

     3,095,685,547      cycles                                                      

     454.805537820 seconds time elapsed

  #

	'perf test' passes on fedora23 x86_64,

Thanks,

- Arnaldo

The following changes since commit dad38ca64a252144b4ccdfe9730a3fe2b7c61957:

  Merge tag 'perf-core-for-mingo-20160401' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-04-06 08:46:23 +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-20160407

for you to fetch changes up to 98c3d844cd0bc56d33800114e6b6adcd0a5ec381:

  perf symbols: Adjust symbol for shared objects (2016-04-07 17:17:01 -0300)

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

User visible:

- Beautify more syscall arguments in 'perf trace', using the type column in
  tracepoint /format fields to attach, for instance, a pid_t resolver to the
  thread COMM, also attach a mode_t beautifier in the same fashion
  (Arnaldo Carvalho de Melo)

- Build the syscall table id <-> name resolver using the same .tbl file
  used in the kernel to generate headers, to avoid the delay in getting
  new syscalls supported in the audit-libs external dependency, done so
  far only for x86_64 (Arnaldo Carvalho de Melo)

- Improve the documentation of event specifications (Andi Kleen)

- Process update events in 'perf script', fixing up this use case:

    # perf stat -a -I 1000 -e cycles record | perf script -s script.py

- Shared object symbol adjustment fixes, fixing symbol resolution in
  Android (Wang Nan)

Infrastructure:

- Add dedicated unwind addr_space member into thread struct, to allow
  tools to use thread->priv, noticed while working on having callchains
  in 'perf trace' (Jiri Olsa)

Build fixes:

- Fix the build in Ubuntu 12.04 (Arnaldo Carvalho de Melo, Vinson Lee)

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

----------------------------------------------------------------
Andi Kleen (1):
      perf list: Document event specifications better

Arnaldo Carvalho de Melo (11):
      perf probe: Check if dwarf_getlocations() is available
      perf script perl: Do error checking on new backtrace routine
      perf trace: Beautify sched_setscheduler 'policy' argument
      perf trace: Beautify wait4/waitid 'options' argument
      perf trace: Infrastructure to show COMM strings for syscalls returning PIDs
      perf trace: Beautify set_tid_address, getpid, getppid return values
      perf trace: Beautify pid_t arguments
      perf trace: Beautify mode_t arguments
      perf trace: Move syscall table id <-> name routines to separate class
      perf tools: Allow generating per-arch syscall table arrays
      perf tools: Build syscall table .c header from kernel's syscall_64.tbl

Jiri Olsa (4):
      perf tools: Remove superfluous ARCH Makefile includes
      perf tools: Introduce trim function
      perf tools: Add dedicated unwind addr_space member into thread struct
      perf script: Process event update events

Vinson Lee (1):
      perf config: Fix build with older toolchain.

Wang Nan (2):
      perf symbols: Record text offset in dso to calculate objdump address
      perf symbols: Adjust symbol for shared objects

 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/perf/Documentation/perf-list.txt             | 107 +++++-
 tools/perf/Makefile.perf                           |  13 +-
 tools/perf/arch/x86/Makefile                       |  23 ++
 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl  | 374 +++++++++++++++++++++
 tools/perf/arch/x86/entry/syscalls/syscalltbl.sh   |  39 +++
 tools/perf/builtin-script.c                        |   1 +
 tools/perf/builtin-trace.c                         | 156 +++++----
 tools/perf/config/Makefile                         |  11 +-
 tools/perf/trace/beauty/mode_t.c                   |  68 ++++
 tools/perf/trace/beauty/pid.c                      |  18 +
 tools/perf/trace/beauty/sched_policy.c             |  44 +++
 tools/perf/trace/beauty/waitid_options.c           |  26 ++
 tools/perf/ui/browsers/hists.c                     |   3 +-
 tools/perf/ui/stdio/hist.c                         |   3 +-
 tools/perf/util/Build                              |   5 +
 tools/perf/util/config.c                           |   6 +-
 tools/perf/util/dwarf-aux.c                        |   9 +
 tools/perf/util/map.c                              |  14 +
 .../perf/util/scripting-engines/trace-event-perl.c |  30 +-
 tools/perf/util/symbol-elf.c                       |  13 +-
 tools/perf/util/syscalltbl.c                       | 134 ++++++++
 tools/perf/util/syscalltbl.h                       |  20 ++
 tools/perf/util/thread.h                           |   6 +
 tools/perf/util/unwind-libunwind.c                 |  25 +-
 tools/perf/util/util.h                             |   5 +
 29 files changed, 1060 insertions(+), 116 deletions(-)
 create mode 100644 tools/build/feature/test-dwarf_getlocations.c
 create mode 100644 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
 create mode 100755 tools/perf/arch/x86/entry/syscalls/syscalltbl.sh
 create mode 100644 tools/perf/trace/beauty/mode_t.c
 create mode 100644 tools/perf/trace/beauty/pid.c
 create mode 100644 tools/perf/trace/beauty/sched_policy.c
 create mode 100644 tools/perf/trace/beauty/waitid_options.c
 create mode 100644 tools/perf/util/syscalltbl.c
 create mode 100644 tools/perf/util/syscalltbl.h

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-03-10 21:04 Arnaldo Carvalho de Melo
@ 2016-03-11  8:43 ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2016-03-11  8:43 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin, Andi Kleen,
	Borislav Petkov, Chris Phlipot, Colin Ian King, David Ahern,
	Davidlohr Bueso, He Kuang, H . Peter Anvin, Jiri Olsa,
	Mel Gorman, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
	Steven Rostedt, Thomas Gleixner, Wang Nan,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 3a99e6db539e53cc9c79282e80f8362b0cb96ac8:
> 
>   perf bench mem: Prepare the x86-64 build for upstream memcpy_mcsafe() changes (2016-03-09 10:40:01 +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-20160310
> 
> for you to fetch changes up to 206cab651d07563d766c7f4cb73f858c5df3dec5:
> 
>   perf stat: Add --metric-only support for -A (2016-03-10 16:50:47 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Implement 'perf stat --metric-only' (Andi Kleen)
> 
> - Fix perf script python database export crash (Chris Phlipot)
> 
> Infrastructure:
> 
> - perf top/report --hierarchy assorted fixes for problems introduced in this
>   perf/core cycle (Namhyung Kim)
> 
> - Support '~' operation in libtraceevent (Steven Rosted)
> 
> Build fixes:
> 
> - Fix bulding of jitdump on opensuse on ubuntu systems when the DWARF
>   devel files are not installed (Arnaldo Carvalho de Melo)
> 
> - Do not try building jitdump on unsupported arches (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (3):
>       perf stat: Document CSV format in manpage
>       perf stat: Implement --metric-only mode
>       perf stat: Add --metric-only support for -A
> 
> Arnaldo Carvalho de Melo (1):
>       perf jitdump: DWARF is also needed
> 
> Chris Phlipot (1):
>       perf tools: Fix perf script python database export crash
> 
> Jiri Olsa (3):
>       perf tools: Pass perf_hpp_list all the way through setup_sort_list
>       perf tools: Omit unnecessary cast in perf_pmu__parse_scale
>       perf jitdump: Build only on supported archs
> 
> Namhyung Kim (10):
>       perf tools: Fix hist_entry__filter() for hierarchy
>       perf tools: Add more sort entry check functions
>       perf tools: Fix command line filters in hierarchy mode
>       perf tools: Remove hist_entry->fmt field
>       perf hists browser: Cleanup hist_browser__fprintf_hierarchy_entry()
>       perf tools: Remove nr_sort_keys field
>       perf tools: Recalc total periods using top-level entries in hierarchy
>       perf tools: Add sort__has_comm variable
>       perf hists browser: Allow thread filtering for comm sort key
>       perf hists browser: Check sort keys before hot key actions
> 
> Steven Rostedt (1):
>       tools lib traceevent: Add '~' operation within arg_num_eval()
> 
>  tools/lib/traceevent/event-parse.c     |   6 +
>  tools/perf/Documentation/perf-stat.txt |  27 ++++
>  tools/perf/arch/arm/Makefile           |   1 +
>  tools/perf/arch/arm64/Makefile         |   1 +
>  tools/perf/arch/powerpc/Makefile       |   1 +
>  tools/perf/arch/x86/Makefile           |   1 +
>  tools/perf/builtin-inject.c            |  12 +-
>  tools/perf/builtin-stat.c              | 244 +++++++++++++++++++++++++++++++--
>  tools/perf/config/Makefile             |   7 +
>  tools/perf/ui/browsers/hists.c         |  73 ++++++----
>  tools/perf/ui/hist.c                   |   3 -
>  tools/perf/util/Build                  |   3 +
>  tools/perf/util/evsel.h                |   6 +-
>  tools/perf/util/hist.c                 | 144 +++++++++++++++++--
>  tools/perf/util/hist.h                 |   6 +-
>  tools/perf/util/pmu.c                  |   4 +-
>  tools/perf/util/sort.c                 | 147 +++++++++-----------
>  tools/perf/util/sort.h                 |   2 +-
>  18 files changed, 542 insertions(+), 146 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2016-03-10 21:04 Arnaldo Carvalho de Melo
  2016-03-11  8:43 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-03-10 21:04 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Borislav Petkov, Chris Phlipot,
	Colin Ian King, David Ahern, Davidlohr Bueso, He Kuang,
	H . Peter Anvin, Jiri Olsa, Mel Gorman, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian, Steven Rostedt,
	Thomas Gleixner, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 3a99e6db539e53cc9c79282e80f8362b0cb96ac8:

  perf bench mem: Prepare the x86-64 build for upstream memcpy_mcsafe() changes (2016-03-09 10:40:01 +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-20160310

for you to fetch changes up to 206cab651d07563d766c7f4cb73f858c5df3dec5:

  perf stat: Add --metric-only support for -A (2016-03-10 16:50:47 -0300)

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

User visible:

- Implement 'perf stat --metric-only' (Andi Kleen)

- Fix perf script python database export crash (Chris Phlipot)

Infrastructure:

- perf top/report --hierarchy assorted fixes for problems introduced in this
  perf/core cycle (Namhyung Kim)

- Support '~' operation in libtraceevent (Steven Rosted)

Build fixes:

- Fix bulding of jitdump on opensuse on ubuntu systems when the DWARF
  devel files are not installed (Arnaldo Carvalho de Melo)

- Do not try building jitdump on unsupported arches (Jiri Olsa)

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

----------------------------------------------------------------
Andi Kleen (3):
      perf stat: Document CSV format in manpage
      perf stat: Implement --metric-only mode
      perf stat: Add --metric-only support for -A

Arnaldo Carvalho de Melo (1):
      perf jitdump: DWARF is also needed

Chris Phlipot (1):
      perf tools: Fix perf script python database export crash

Jiri Olsa (3):
      perf tools: Pass perf_hpp_list all the way through setup_sort_list
      perf tools: Omit unnecessary cast in perf_pmu__parse_scale
      perf jitdump: Build only on supported archs

Namhyung Kim (10):
      perf tools: Fix hist_entry__filter() for hierarchy
      perf tools: Add more sort entry check functions
      perf tools: Fix command line filters in hierarchy mode
      perf tools: Remove hist_entry->fmt field
      perf hists browser: Cleanup hist_browser__fprintf_hierarchy_entry()
      perf tools: Remove nr_sort_keys field
      perf tools: Recalc total periods using top-level entries in hierarchy
      perf tools: Add sort__has_comm variable
      perf hists browser: Allow thread filtering for comm sort key
      perf hists browser: Check sort keys before hot key actions

Steven Rostedt (1):
      tools lib traceevent: Add '~' operation within arg_num_eval()

 tools/lib/traceevent/event-parse.c     |   6 +
 tools/perf/Documentation/perf-stat.txt |  27 ++++
 tools/perf/arch/arm/Makefile           |   1 +
 tools/perf/arch/arm64/Makefile         |   1 +
 tools/perf/arch/powerpc/Makefile       |   1 +
 tools/perf/arch/x86/Makefile           |   1 +
 tools/perf/builtin-inject.c            |  12 +-
 tools/perf/builtin-stat.c              | 244 +++++++++++++++++++++++++++++++--
 tools/perf/config/Makefile             |   7 +
 tools/perf/ui/browsers/hists.c         |  73 ++++++----
 tools/perf/ui/hist.c                   |   3 -
 tools/perf/util/Build                  |   3 +
 tools/perf/util/evsel.h                |   6 +-
 tools/perf/util/hist.c                 | 144 +++++++++++++++++--
 tools/perf/util/hist.h                 |   6 +-
 tools/perf/util/pmu.c                  |   4 +-
 tools/perf/util/sort.c                 | 147 +++++++++-----------
 tools/perf/util/sort.h                 |   2 +-
 18 files changed, 542 insertions(+), 146 deletions(-)

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-02-26 23:18 Arnaldo Carvalho de Melo
@ 2016-02-27  9:36 ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2016-02-27  9:36 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Andi Kleen,
	David Ahern, Jiri Olsa, Kan Liang, Li Zefan, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, pi3orama, Stephane Eranian,
	Taeung Song, 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 06466212a69c0511c5dcff7363c207ffc8913731:
> 
>   Merge tag 'perf-core-for-mingo-20160224' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-02-25 08:20:56 +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-20160226
> 
> for you to fetch changes up to 1d6c9407d45dd622b277ca9f725da3cc9e95b5de:
> 
>   perf trace: Print content of bpf-output event (2016-02-26 19:57:07 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Show extra line telling no entries below --percent-limit are
>   at that --hierarchy level (Namhyung Kim)
> 
> - 'perf report/top --hierarchy' assorted alignment fixes (Namhyung Kim)
> 
> - Handle empty print fmts in 'perf script -s' i.e. when running
>   python or perl scripts (Taeung Song)
> 
> - Improve support for bpf-output events in 'perf trace' (Wang Nan)
> 
> - Fix parsing of pmu events with empty list of modifiers, this
>   cures a perf/core-only regression where '-e intel_pt//' got
>   broken (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Improve missing OpenJDK devel files error message in jvmti
>   Makefile (Stephane Eranian)
> 
> - Remove duplicated code and needless script_spec__findnew() (Taeung Song)
> 
> - Bring perf_default_config to the very beginning at main(), removing
>   the need for each subcommand to do this (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf tools: Use asprintf() for simple string formatting/allocation
>       perf tools: Fix parsing of pmu events with empty list of modifiers
> 
> Namhyung Kim (10):
>       perf hists: Add more helper functions for the hierarchy mode
>       perf report: Show message for percent limit on stdio
>       perf hists browser: Cleanup hist_browser__update_percent_limit()
>       perf hists browser: Show message for percent limit
>       perf report: Show message for percent limit on gtk
>       perf hists: Fix comparing of dynamic entries
>       perf report: Fix indentation of dynamic entries in hierarchy
>       perf report: Left align dynamic entries in hierarchy
>       perf hists: Fix dynamic entry display in hierarchy
>       perf report: Update column width of dynamic entries
> 
> Stephane Eranian (1):
>       perf jvmti: improve error message in Makefile
> 
> Taeung Song (2):
>       perf script: Exception handling when the print fmt is empty
>       perf script: Remove duplicated code and needless script_spec__findnew()
> 
> Wang Nan (4):
>       perf config: Bring perf_default_config to the very beginning at main()
>       perf tools: Only set filter for tracepoints events
>       perf trace: Call bpf__apply_obj_config in 'perf trace'
>       perf trace: Print content of bpf-output event
> 
>  tools/perf/builtin-diff.c                          |   2 -
>  tools/perf/builtin-help.c                          |   2 +-
>  tools/perf/builtin-kmem.c                          |   4 +-
>  tools/perf/builtin-report.c                        |   2 +-
>  tools/perf/builtin-script.c                        |  21 +---
>  tools/perf/builtin-top.c                           |   4 +-
>  tools/perf/builtin-trace.c                         |  46 +++++++-
>  tools/perf/jvmti/Makefile                          |  17 ++-
>  tools/perf/perf.c                                  |  16 ++-
>  tools/perf/tests/llvm.c                            |   8 --
>  tools/perf/ui/browsers/hists.c                     | 128 +++++++++++++++++++--
>  tools/perf/ui/gtk/hists.c                          |  11 ++
>  tools/perf/ui/hist.c                               |  22 ++++
>  tools/perf/ui/stdio/hist.c                         |  49 ++++++--
>  tools/perf/util/color.c                            |   5 +-
>  tools/perf/util/data-convert-bt.c                  |   2 +-
>  tools/perf/util/evlist.c                           |   3 +
>  tools/perf/util/help-unknown-cmd.c                 |   5 +-
>  tools/perf/util/hist.c                             |  48 +++++++-
>  tools/perf/util/hist.h                             |   4 +
>  tools/perf/util/parse-events.y                     |   6 +-
>  .../perf/util/scripting-engines/trace-event-perl.c |   3 +
>  .../util/scripting-engines/trace-event-python.c    |   3 +
>  tools/perf/util/sort.c                             |  30 ++++-
>  tools/perf/util/sort.h                             |   1 +
>  25 files changed, 363 insertions(+), 79 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2016-02-26 23:18 Arnaldo Carvalho de Melo
  2016-02-27  9:36 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-02-26 23:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Andi Kleen, David Ahern, Jiri Olsa,
	Kan Liang, Li Zefan, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, pi3orama, Stephane Eranian, Taeung Song,
	Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 06466212a69c0511c5dcff7363c207ffc8913731:

  Merge tag 'perf-core-for-mingo-20160224' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-02-25 08:20:56 +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-20160226

for you to fetch changes up to 1d6c9407d45dd622b277ca9f725da3cc9e95b5de:

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

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

User visible:

- Show extra line telling no entries below --percent-limit are
  at that --hierarchy level (Namhyung Kim)

- 'perf report/top --hierarchy' assorted alignment fixes (Namhyung Kim)

- Handle empty print fmts in 'perf script -s' i.e. when running
  python or perl scripts (Taeung Song)

- Improve support for bpf-output events in 'perf trace' (Wang Nan)

- Fix parsing of pmu events with empty list of modifiers, this
  cures a perf/core-only regression where '-e intel_pt//' got
  broken (Arnaldo Carvalho de Melo)

Infrastructure:

- Improve missing OpenJDK devel files error message in jvmti
  Makefile (Stephane Eranian)

- Remove duplicated code and needless script_spec__findnew() (Taeung Song)

- Bring perf_default_config to the very beginning at main(), removing
  the need for each subcommand to do this (Wang Nan)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf tools: Use asprintf() for simple string formatting/allocation
      perf tools: Fix parsing of pmu events with empty list of modifiers

Namhyung Kim (10):
      perf hists: Add more helper functions for the hierarchy mode
      perf report: Show message for percent limit on stdio
      perf hists browser: Cleanup hist_browser__update_percent_limit()
      perf hists browser: Show message for percent limit
      perf report: Show message for percent limit on gtk
      perf hists: Fix comparing of dynamic entries
      perf report: Fix indentation of dynamic entries in hierarchy
      perf report: Left align dynamic entries in hierarchy
      perf hists: Fix dynamic entry display in hierarchy
      perf report: Update column width of dynamic entries

Stephane Eranian (1):
      perf jvmti: improve error message in Makefile

Taeung Song (2):
      perf script: Exception handling when the print fmt is empty
      perf script: Remove duplicated code and needless script_spec__findnew()

Wang Nan (4):
      perf config: Bring perf_default_config to the very beginning at main()
      perf tools: Only set filter for tracepoints events
      perf trace: Call bpf__apply_obj_config in 'perf trace'
      perf trace: Print content of bpf-output event

 tools/perf/builtin-diff.c                          |   2 -
 tools/perf/builtin-help.c                          |   2 +-
 tools/perf/builtin-kmem.c                          |   4 +-
 tools/perf/builtin-report.c                        |   2 +-
 tools/perf/builtin-script.c                        |  21 +---
 tools/perf/builtin-top.c                           |   4 +-
 tools/perf/builtin-trace.c                         |  46 +++++++-
 tools/perf/jvmti/Makefile                          |  17 ++-
 tools/perf/perf.c                                  |  16 ++-
 tools/perf/tests/llvm.c                            |   8 --
 tools/perf/ui/browsers/hists.c                     | 128 +++++++++++++++++++--
 tools/perf/ui/gtk/hists.c                          |  11 ++
 tools/perf/ui/hist.c                               |  22 ++++
 tools/perf/ui/stdio/hist.c                         |  49 ++++++--
 tools/perf/util/color.c                            |   5 +-
 tools/perf/util/data-convert-bt.c                  |   2 +-
 tools/perf/util/evlist.c                           |   3 +
 tools/perf/util/help-unknown-cmd.c                 |   5 +-
 tools/perf/util/hist.c                             |  48 +++++++-
 tools/perf/util/hist.h                             |   4 +
 tools/perf/util/parse-events.y                     |   6 +-
 .../perf/util/scripting-engines/trace-event-perl.c |   3 +
 .../util/scripting-engines/trace-event-python.c    |   3 +
 tools/perf/util/sort.c                             |  30 ++++-
 tools/perf/util/sort.h                             |   1 +
 25 files changed, 363 insertions(+), 79 deletions(-)

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2016-02-05 16:25 Arnaldo Carvalho de Melo
@ 2016-02-09  9:40 ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2016-02-09  9:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Carl Love, David Ahern,
	Jiri Olsa, John McCutchan, Marcin Ślusarz, Namhyung Kim,
	Pawel Moll, Peter Zijlstra, Sonny Rao, Stephane Eranian,
	Sukadev Bhattiprolu, Taeung Song, 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 d3aaf09f889b31f3b424bf9603b163ec1204c361:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-02-04 08:58:01 +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 598b7c6919c7bbcc1243009721a01bc12275ff3e:
> 
>   perf jit: add source line info support (2016-02-05 12:33:09 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible fixes:
> 
> - Handle spaces in file names obtained from /proc/pid/maps (Marcin Ślusarz)
> 
> New features:
> 
> - Improved support for java, using the JVMTI agent library to do jitdumps
>   that then will be inserted in synthesized PERF_RECORD_MMAP2 events via
>   'perf inject' pointed to synthesized ELF files stored in ~/.debug and
>   keyed with build-ids, to allow symbol resolution and even annotation with
>   source line info, see the changeset comments to see how to use it (Stephane Eranian)
> 
> Documentation:
> 
> - Document mmore variables in the 'perf config' man page (Taeung Song)
> 
> Infrastructure:
> 
> - Improve a bit the 'make -C tools/perf build-test' output (Arnaldo Carvalho de Melo)
> 
> - Do 'build-test' in parallell, using 'make -j' (Arnaldo Carvalho de Melo)
> 
> - Fix handling of 'clean' in multi-target make invokations for parallell builds (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
>       perf build tests: Elide "-f Makefile" from make invokation
>       perf build tests: Move the feature related vars to the front of the make cmdline
>       perf build tests: Do parallell builds with 'build-test'
>       perf inject: Make sure mmap records are ordered when injecting build_ids
> 
> Jiri Olsa (1):
>       perf tools: Fix parallel build including 'clean' target
> 
> Marcin Ślusarz (1):
>       perf tools: handle spaces in file names obtained from /proc/pid/maps
> 
> Stephane Eranian (5):
>       perf symbols: add Java demangling support
>       perf build: Add libcrypto feature detection
>       perf inject: Add jitdump mmap injection support
>       perf tools: add JVMTI agent library
>       perf jit: add source line info support
> 
> Taeung Song (8):
>       perf config: Document 'ui.show-headers' variable in man page
>       perf config: Document variables for 'call-graph' section in man page
>       perf config: Document variables for 'report' section in man page
>       perf config: Document 'top.children' variable in man page
>       perf config: Document 'man.viewer' variable in man page
>       perf config: Document 'pager.<subcommand>' variables in man page
>       perf config: Document 'kmem.default' variable in man page
>       perf config: Document 'record.build-id' variable in man page
> 
>  tools/build/Makefile.feature             |   2 +
>  tools/build/feature/Makefile             |   4 +
>  tools/build/feature/test-all.c           |   5 +
>  tools/build/feature/test-libcrypto.c     |  17 +
>  tools/perf/Documentation/perf-config.txt | 143 +++++++
>  tools/perf/Documentation/perf-inject.txt |   7 +
>  tools/perf/Makefile                      |  16 +-
>  tools/perf/Makefile.perf                 |   3 +
>  tools/perf/builtin-inject.c              | 107 ++++-
>  tools/perf/config/Makefile               |  11 +
>  tools/perf/jvmti/Makefile                |  76 ++++
>  tools/perf/jvmti/jvmti_agent.c           | 465 +++++++++++++++++++++
>  tools/perf/jvmti/jvmti_agent.h           |  36 ++
>  tools/perf/jvmti/libjvmti.c              | 304 ++++++++++++++
>  tools/perf/tests/make                    |  11 +-
>  tools/perf/util/Build                    |   6 +
>  tools/perf/util/demangle-java.c          | 199 +++++++++
>  tools/perf/util/demangle-java.h          |  10 +
>  tools/perf/util/event.c                  |   2 +-
>  tools/perf/util/genelf.c                 | 449 +++++++++++++++++++++
>  tools/perf/util/genelf.h                 |  67 +++
>  tools/perf/util/genelf_debug.c           | 610 ++++++++++++++++++++++++++++
>  tools/perf/util/jit.h                    |  15 +
>  tools/perf/util/jitdump.c                | 672 +++++++++++++++++++++++++++++++
>  tools/perf/util/jitdump.h                | 124 ++++++
>  tools/perf/util/symbol-elf.c             |   3 +
>  26 files changed, 3357 insertions(+), 7 deletions(-)
>  create mode 100644 tools/build/feature/test-libcrypto.c
>  create mode 100644 tools/perf/jvmti/Makefile
>  create mode 100644 tools/perf/jvmti/jvmti_agent.c
>  create mode 100644 tools/perf/jvmti/jvmti_agent.h
>  create mode 100644 tools/perf/jvmti/libjvmti.c
>  create mode 100644 tools/perf/util/demangle-java.c
>  create mode 100644 tools/perf/util/demangle-java.h
>  create mode 100644 tools/perf/util/genelf.c
>  create mode 100644 tools/perf/util/genelf.h
>  create mode 100644 tools/perf/util/genelf_debug.c
>  create mode 100644 tools/perf/util/jit.h
>  create mode 100644 tools/perf/util/jitdump.c
>  create mode 100644 tools/perf/util/jitdump.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2016-02-05 16:25 Arnaldo Carvalho de Melo
  2016-02-09  9:40 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-02-05 16:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Carl Love, David Ahern, Jiri Olsa, John McCutchan,
	Marcin Ślusarz, Namhyung Kim, Pawel Moll, Peter Zijlstra,
	Sonny Rao, Stephane Eranian, Sukadev Bhattiprolu, Taeung Song,
	Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit d3aaf09f889b31f3b424bf9603b163ec1204c361:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-02-04 08:58:01 +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 598b7c6919c7bbcc1243009721a01bc12275ff3e:

  perf jit: add source line info support (2016-02-05 12:33:09 -0300)

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

User visible fixes:

- Handle spaces in file names obtained from /proc/pid/maps (Marcin Ślusarz)

New features:

- Improved support for java, using the JVMTI agent library to do jitdumps
  that then will be inserted in synthesized PERF_RECORD_MMAP2 events via
  'perf inject' pointed to synthesized ELF files stored in ~/.debug and
  keyed with build-ids, to allow symbol resolution and even annotation with
  source line info, see the changeset comments to see how to use it (Stephane Eranian)

Documentation:

- Document mmore variables in the 'perf config' man page (Taeung Song)

Infrastructure:

- Improve a bit the 'make -C tools/perf build-test' output (Arnaldo Carvalho de Melo)

- Do 'build-test' in parallell, using 'make -j' (Arnaldo Carvalho de Melo)

- Fix handling of 'clean' in multi-target make invokations for parallell builds (Jiri Olsa)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf build tests: Elide "-f Makefile" from make invokation
      perf build tests: Move the feature related vars to the front of the make cmdline
      perf build tests: Do parallell builds with 'build-test'
      perf inject: Make sure mmap records are ordered when injecting build_ids

Jiri Olsa (1):
      perf tools: Fix parallel build including 'clean' target

Marcin Ślusarz (1):
      perf tools: handle spaces in file names obtained from /proc/pid/maps

Stephane Eranian (5):
      perf symbols: add Java demangling support
      perf build: Add libcrypto feature detection
      perf inject: Add jitdump mmap injection support
      perf tools: add JVMTI agent library
      perf jit: add source line info support

Taeung Song (8):
      perf config: Document 'ui.show-headers' variable in man page
      perf config: Document variables for 'call-graph' section in man page
      perf config: Document variables for 'report' section in man page
      perf config: Document 'top.children' variable in man page
      perf config: Document 'man.viewer' variable in man page
      perf config: Document 'pager.<subcommand>' variables in man page
      perf config: Document 'kmem.default' variable in man page
      perf config: Document 'record.build-id' variable in man page

 tools/build/Makefile.feature             |   2 +
 tools/build/feature/Makefile             |   4 +
 tools/build/feature/test-all.c           |   5 +
 tools/build/feature/test-libcrypto.c     |  17 +
 tools/perf/Documentation/perf-config.txt | 143 +++++++
 tools/perf/Documentation/perf-inject.txt |   7 +
 tools/perf/Makefile                      |  16 +-
 tools/perf/Makefile.perf                 |   3 +
 tools/perf/builtin-inject.c              | 107 ++++-
 tools/perf/config/Makefile               |  11 +
 tools/perf/jvmti/Makefile                |  76 ++++
 tools/perf/jvmti/jvmti_agent.c           | 465 +++++++++++++++++++++
 tools/perf/jvmti/jvmti_agent.h           |  36 ++
 tools/perf/jvmti/libjvmti.c              | 304 ++++++++++++++
 tools/perf/tests/make                    |  11 +-
 tools/perf/util/Build                    |   6 +
 tools/perf/util/demangle-java.c          | 199 +++++++++
 tools/perf/util/demangle-java.h          |  10 +
 tools/perf/util/event.c                  |   2 +-
 tools/perf/util/genelf.c                 | 449 +++++++++++++++++++++
 tools/perf/util/genelf.h                 |  67 +++
 tools/perf/util/genelf_debug.c           | 610 ++++++++++++++++++++++++++++
 tools/perf/util/jit.h                    |  15 +
 tools/perf/util/jitdump.c                | 672 +++++++++++++++++++++++++++++++
 tools/perf/util/jitdump.h                | 124 ++++++
 tools/perf/util/symbol-elf.c             |   3 +
 26 files changed, 3357 insertions(+), 7 deletions(-)
 create mode 100644 tools/build/feature/test-libcrypto.c
 create mode 100644 tools/perf/jvmti/Makefile
 create mode 100644 tools/perf/jvmti/jvmti_agent.c
 create mode 100644 tools/perf/jvmti/jvmti_agent.h
 create mode 100644 tools/perf/jvmti/libjvmti.c
 create mode 100644 tools/perf/util/demangle-java.c
 create mode 100644 tools/perf/util/demangle-java.h
 create mode 100644 tools/perf/util/genelf.c
 create mode 100644 tools/perf/util/genelf.h
 create mode 100644 tools/perf/util/genelf_debug.c
 create mode 100644 tools/perf/util/jit.h
 create mode 100644 tools/perf/util/jitdump.c
 create mode 100644 tools/perf/util/jitdump.h

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2015-04-08 14:23 Arnaldo Carvalho de Melo
@ 2015-04-08 15:05 ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2015-04-08 15:05 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin, Andi Kleen,
	Andrew Morton, Borislav Petkov, David Ahern, Frederic Weisbecker,
	He Kuang, H. Peter Anvin, Jiri Olsa, John Stultz, Joonsoo Kim,
	Kaixu Xia, Kan Liang, Linus Torvalds, linux-mm, Markus T Metzger,
	Masami Hiramatsu, Mathieu Poirier, Mike Galbraith, Minchan Kim,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, pi3orama,
	Robert Richter, Stephane Eranian, Steven Rostedt,
	Thomas Gleixner, Wang Nan, William Cohen, Yunlong Song, Zefan Li,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
>         Please consider pulling, it is the pull req from yesterday, minus a patch
> that introduced a problem, plus a fex fixes.
> 
>         I am investigating a problem I noticed for another patch that is upstream
> and after that will get back to the removed patch from yesterday's batch,
> 
> - Arnaldo
> 
> The following changes since commit 6645f3187f5beb64f7a40515cfa18f3889264ece:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-04-03 07:00:02 +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 a1e12da4796a4ddd0e911687a290eb396d1c64bf:
> 
>   perf tools: Add 'I' event modifier for exclude_idle bit (2015-04-08 11:00:16 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Teach about perf_event_attr.clockid to 'perf record' (Peter Zijlstra)
> 
> - perf sched replay improvements for high CPU core count machines (Yunlong Song)
> 
> - Consider PERF_RECORD_ events with cpumode == 0 in 'perf top', removing one
>   cause of long term memory usage buildup, i.e. not processing PERF_RECORD_EXIT
>   events (Arnaldo Carvalho de Melo)
> 
> - Add 'I' event modifier for perf_event_attr.exclude_idle bit (Jiri Olsa)
> 
> - Respect -i option 'in perf kmem' (Jiri Olsa)
> 
> Infrastructure:
> 
> - Honor operator priority in libtraceevent (Namhyung Kim)
> 
> - Merge all perf_event_attr print functions (Peter Zijlstra)
> 
> - Check kmaps access to make code more robust (Wang Nan)
> 
> - Fix inverted logic in perf_mmap__empty() (He Kuang)
> 
> - Fix ARM 32 'perf probe' building error (Wang Nan)
> 
> - Fix perf_event_attr tests (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> He Kuang (1):
>       perf evlist: Fix inverted logic in perf_mmap__empty
> 
> Jiri Olsa (3):
>       perf kmem: Respect -i option
>       perf tests: Fix attr tests
>       perf tools: Add 'I' event modifier for exclude_idle bit
> 
> Namhyung Kim (1):
>       tools lib traceevent: Honor operator priority
> 
> Peter Zijlstra (2):
>       perf record: Add clockid parameter
>       perf tools: Merge all perf_event_attr print functions
> 
> Wang Nan (3):
>       perf kmaps: Check kmaps to make code more robust
>       perf probe: Fix ARM 32 building error
>       perf report: Don't call map__kmap if map is NULL.
> 
> Yunlong Song (9):
>       perf sched replay: Use struct task_desc instead of struct task_task for correct meaning
>       perf sched replay: Increase the MAX_PID value to fix assertion failure problem
>       perf sched replay: Alloc the memory of pid_to_task dynamically to adapt to the unexpected change of pid_max
>       perf sched replay: Realloc the memory of pid_to_task stepwise to adapt to the different pid_max configurations
>       perf sched replay: Fix the segmentation fault problem caused by pr_err in threads
>       perf sched replay: Handle the dead halt of sem_wait when create_tasks() fails for any task
>       perf sched replay: Fix the EMFILE error caused by the limitation of the maximum open files
>       perf sched replay: Support using -f to override perf.data file ownership
>       perf sched replay: Use replay_repeat to calculate the runavg of cpu usage instead of the default value 10
> 
>  tools/lib/traceevent/event-parse.c       |  17 +-
>  tools/perf/Documentation/perf-list.txt   |   1 +
>  tools/perf/Documentation/perf-record.txt |   7 +
>  tools/perf/builtin-kmem.c                |   3 +-
>  tools/perf/builtin-record.c              |  87 +++++++++
>  tools/perf/builtin-report.c              |   2 +-
>  tools/perf/builtin-sched.c               |  67 +++++--
>  tools/perf/perf.h                        |   2 +
>  tools/perf/tests/attr/base-record        |   2 +-
>  tools/perf/tests/attr/base-stat          |   2 +-
>  tools/perf/tests/parse-events.c          |  40 ++++
>  tools/perf/util/evlist.c                 |   2 +-
>  tools/perf/util/evsel.c                  | 325 ++++++++++++++++---------------
>  tools/perf/util/evsel.h                  |   6 +
>  tools/perf/util/header.c                 |  28 +--
>  tools/perf/util/machine.c                |   5 +-
>  tools/perf/util/map.c                    |  20 ++
>  tools/perf/util/map.h                    |   6 +-
>  tools/perf/util/parse-events.c           |   8 +-
>  tools/perf/util/parse-events.l           |   2 +-
>  tools/perf/util/probe-event.c            |   5 +-
>  tools/perf/util/session.c                |   3 +
>  tools/perf/util/symbol-elf.c             |  16 +-
>  tools/perf/util/symbol.c                 |  34 +++-
>  24 files changed, 477 insertions(+), 213 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo


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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2015-04-08 14:23 Arnaldo Carvalho de Melo
  2015-04-08 15:05 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-08 14:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Andrew Morton, Borislav Petkov,
	David Ahern, Frederic Weisbecker, He Kuang, H. Peter Anvin,
	Jiri Olsa, John Stultz, Joonsoo Kim, Kaixu Xia, Kan Liang,
	Linus Torvalds, linux-mm, Markus T Metzger, Masami Hiramatsu,
	Mathieu Poirier, Mike Galbraith, Minchan Kim, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, pi3orama, Robert Richter,
	Stephane Eranian, Steven Rostedt, Thomas Gleixner, Wang Nan,
	William Cohen, Yunlong Song, Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

        Please consider pulling, it is the pull req from yesterday, minus a patch
that introduced a problem, plus a fex fixes.

        I am investigating a problem I noticed for another patch that is upstream
and after that will get back to the removed patch from yesterday's batch,

- Arnaldo

The following changes since commit 6645f3187f5beb64f7a40515cfa18f3889264ece:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-04-03 07:00:02 +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 a1e12da4796a4ddd0e911687a290eb396d1c64bf:

  perf tools: Add 'I' event modifier for exclude_idle bit (2015-04-08 11:00:16 -0300)

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

- Teach about perf_event_attr.clockid to 'perf record' (Peter Zijlstra)

- perf sched replay improvements for high CPU core count machines (Yunlong Song)

- Consider PERF_RECORD_ events with cpumode == 0 in 'perf top', removing one
  cause of long term memory usage buildup, i.e. not processing PERF_RECORD_EXIT
  events (Arnaldo Carvalho de Melo)

- Add 'I' event modifier for perf_event_attr.exclude_idle bit (Jiri Olsa)

- Respect -i option 'in perf kmem' (Jiri Olsa)

Infrastructure:

- Honor operator priority in libtraceevent (Namhyung Kim)

- Merge all perf_event_attr print functions (Peter Zijlstra)

- Check kmaps access to make code more robust (Wang Nan)

- Fix inverted logic in perf_mmap__empty() (He Kuang)

- Fix ARM 32 'perf probe' building error (Wang Nan)

- Fix perf_event_attr tests (Jiri Olsa)

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

----------------------------------------------------------------
He Kuang (1):
      perf evlist: Fix inverted logic in perf_mmap__empty

Jiri Olsa (3):
      perf kmem: Respect -i option
      perf tests: Fix attr tests
      perf tools: Add 'I' event modifier for exclude_idle bit

Namhyung Kim (1):
      tools lib traceevent: Honor operator priority

Peter Zijlstra (2):
      perf record: Add clockid parameter
      perf tools: Merge all perf_event_attr print functions

Wang Nan (3):
      perf kmaps: Check kmaps to make code more robust
      perf probe: Fix ARM 32 building error
      perf report: Don't call map__kmap if map is NULL.

Yunlong Song (9):
      perf sched replay: Use struct task_desc instead of struct task_task for correct meaning
      perf sched replay: Increase the MAX_PID value to fix assertion failure problem
      perf sched replay: Alloc the memory of pid_to_task dynamically to adapt to the unexpected change of pid_max
      perf sched replay: Realloc the memory of pid_to_task stepwise to adapt to the different pid_max configurations
      perf sched replay: Fix the segmentation fault problem caused by pr_err in threads
      perf sched replay: Handle the dead halt of sem_wait when create_tasks() fails for any task
      perf sched replay: Fix the EMFILE error caused by the limitation of the maximum open files
      perf sched replay: Support using -f to override perf.data file ownership
      perf sched replay: Use replay_repeat to calculate the runavg of cpu usage instead of the default value 10

 tools/lib/traceevent/event-parse.c       |  17 +-
 tools/perf/Documentation/perf-list.txt   |   1 +
 tools/perf/Documentation/perf-record.txt |   7 +
 tools/perf/builtin-kmem.c                |   3 +-
 tools/perf/builtin-record.c              |  87 +++++++++
 tools/perf/builtin-report.c              |   2 +-
 tools/perf/builtin-sched.c               |  67 +++++--
 tools/perf/perf.h                        |   2 +
 tools/perf/tests/attr/base-record        |   2 +-
 tools/perf/tests/attr/base-stat          |   2 +-
 tools/perf/tests/parse-events.c          |  40 ++++
 tools/perf/util/evlist.c                 |   2 +-
 tools/perf/util/evsel.c                  | 325 ++++++++++++++++---------------
 tools/perf/util/evsel.h                  |   6 +
 tools/perf/util/header.c                 |  28 +--
 tools/perf/util/machine.c                |   5 +-
 tools/perf/util/map.c                    |  20 ++
 tools/perf/util/map.h                    |   6 +-
 tools/perf/util/parse-events.c           |   8 +-
 tools/perf/util/parse-events.l           |   2 +-
 tools/perf/util/probe-event.c            |   5 +-
 tools/perf/util/session.c                |   3 +
 tools/perf/util/symbol-elf.c             |  16 +-
 tools/perf/util/symbol.c                 |  34 +++-
 24 files changed, 477 insertions(+), 213 deletions(-)

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2015-03-21 18:54 Arnaldo Carvalho de Melo
@ 2015-03-22  9:58 ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2015-03-22  9:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, Corey Ashford,
	David Ahern, Don Zickus, Frederic Weisbecker, He Kuang,
	Jiri Olsa, Masami Hiramatsu, Mike Galbraith, Milos Vyletel,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, pi3orama,
	Stephane Eranian, Steven Rostedt, Wang Nan, Yunlong Song,
	Zefan Li, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling, this is on top of my previous pull request,
> 
> Thanks,
> 
> - Arnaldo
> 
> The following changes since commit 0c8c20779c5d56b93b8cb4cd30ba129a927ab437:
> 
>   perf report: Don't allow empty argument for '-t'. (2015-03-19 13:53:28 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2
> 
> for you to fetch changes up to ca33380adf74afb985bf7aab09ec46707a5d2d57:
> 
>   perf tools: Use kmod_path__parse for machine__new_dso (2015-03-21 14:58:07 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Handle legacy syscalls tracepoints (David Ahern, Arnaldo Carvalho de Melo)
> 
> - Indicate which callchain entries are annotated in the
>   TUI hists browser (report/top) (Arnaldo Carvalho de Melo)
> 
> - Fix failure to add multiple probes without debuginfo (He Kuang)
> 
> - Fix 'trace' summary_only option (David Ahern)
> 
> - Fix race in build_id_cache__add_s() in 'buildid-cache' (Milos Vyletel)
> 
> - Don't allow empty argument for field-separator, fixing segfault (Wang Nan)
> 
> Infrastructure:
> 
> - Add destructor for format_field in libtraceevent (David Ahern)
> 
> - Prep work for support lzma compressed kernel modules (Jiri Olsa)
> 
> - Update .gitignore with recently added/renamed feature detection files (Yunlong Song)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf trace: Handle legacy syscalls tracepoints
>       perf hists browser: Indicate which callchain entries are annotated
> 
> David Ahern (2):
>       perf trace: Fix summary_only option
>       tools lib traceevent: Add destructor for format_field
> 
> He Kuang (1):
>       perf probe: Fix failure to add multiple probes without debuginfo
> 
> Jiri Olsa (10):
>       perf build: Fix feature_check name clash
>       perf build: Separate feature make support into config/Makefile.feature
>       perf build: Make features checks directory configurable
>       perf build: Move feature checks code under tools/build
>       tools build: Add feature check for lzma library
>       perf tools: Add lzma decompression support for kernel module
>       perf tools: Add kmod_path__parse function
>       perf tools: Add dsos__addnew function
>       perf tools: Add machine__module_dso function
>       perf tools: Use kmod_path__parse for machine__new_dso
> 
> Milos Vyletel (1):
>       perf tools: Fix race in build_id_cache__add_s()
> 
> Wang Nan (1):
>       perf tools: Don't allow empty argument for field-separator
> 
> Yunlong Song (2):
>       perf build: Use FEATURE-DUMP instead of PERF-FEATURES in the .gitignore file
>       perf build: Add config/feature-checks/*.output to the .gitignore file
> 
>  tools/build/Makefile.feature                       | 171 ++++++++++++++++++++
>  .../feature-checks => build/feature}/.gitignore    |   1 +
>  .../feature-checks => build/feature}/Makefile      |   8 +-
>  .../feature-checks => build/feature}/test-all.c    |   5 +
>  .../feature}/test-backtrace.c                      |   0
>  .../feature-checks => build/feature}/test-bionic.c |   0
>  .../feature}/test-compile.c                        |   0
>  .../feature}/test-cplus-demangle.c                 |   0
>  .../feature-checks => build/feature}/test-dwarf.c  |   0
>  .../feature}/test-fortify-source.c                 |   0
>  .../feature-checks => build/feature}/test-glibc.c  |   0
>  .../feature}/test-gtk2-infobar.c                   |   0
>  .../feature-checks => build/feature}/test-gtk2.c   |   0
>  .../feature-checks => build/feature}/test-hello.c  |   0
>  .../feature}/test-libaudit.c                       |   0
>  .../feature}/test-libbabeltrace.c                  |   0
>  .../feature-checks => build/feature}/test-libbfd.c |   0
>  .../feature}/test-libdw-dwarf-unwind.c             |   0
>  .../feature}/test-libelf-getphdrnum.c              |   0
>  .../feature}/test-libelf-mmap.c                    |   0
>  .../feature-checks => build/feature}/test-libelf.c |   0
>  .../feature}/test-libnuma.c                        |   0
>  .../feature}/test-libperl.c                        |   0
>  .../feature}/test-libpython-version.c              |   0
>  .../feature}/test-libpython.c                      |   0
>  .../feature}/test-libslang.c                       |   0
>  .../feature}/test-libunwind-debug-frame.c          |   0
>  .../feature}/test-libunwind.c                      |   0
>  tools/build/feature/test-lzma.c                    |  10 ++
>  .../feature}/test-pthread-attr-setaffinity-np.c    |   0
>  .../feature}/test-stackprotector-all.c             |   0
>  .../feature}/test-sync-compare-and-swap.c          |   0
>  .../feature}/test-timerfd.c                        |   0
>  .../feature-checks => build/feature}/test-zlib.c   |   0
>  tools/lib/traceevent/event-parse.c                 |  11 +-
>  tools/lib/traceevent/event-parse.h                 |   1 +
>  tools/perf/.gitignore                              |   2 +-
>  tools/perf/Makefile.perf                           |   4 +-
>  tools/perf/builtin-diff.c                          |   2 +-
>  tools/perf/builtin-mem.c                           |   2 +-
>  tools/perf/builtin-trace.c                         |  21 ++-
>  tools/perf/config/Makefile                         | 176 ++-------------------
>  tools/perf/tests/Build                             |   1 +
>  tools/perf/tests/builtin-test.c                    |   4 +
>  tools/perf/tests/kmod-path.c                       |  73 +++++++++
>  tools/perf/tests/tests.h                           |   1 +
>  tools/perf/ui/browsers/hists.c                     |   4 +-
>  tools/perf/util/Build                              |   1 +
>  tools/perf/util/build-id.c                         |   3 +-
>  tools/perf/util/dso.c                              |  90 +++++++++--
>  tools/perf/util/dso.h                              |  15 ++
>  tools/perf/util/lzma.c                             |  95 +++++++++++
>  tools/perf/util/machine.c                          |  83 +++++-----
>  tools/perf/util/probe-event.c                      |   4 +-
>  tools/perf/util/util.h                             |   4 +
>  55 files changed, 557 insertions(+), 235 deletions(-)
>  create mode 100644 tools/build/Makefile.feature
>  rename tools/{perf/config/feature-checks => build/feature}/.gitignore (52%)
>  rename tools/{perf/config/feature-checks => build/feature}/Makefile (96%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-all.c (97%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-backtrace.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-bionic.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-compile.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-cplus-demangle.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-dwarf.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-fortify-source.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-glibc.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-gtk2-infobar.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-gtk2.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-hello.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libaudit.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libbabeltrace.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libbfd.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libdw-dwarf-unwind.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libelf-getphdrnum.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libelf-mmap.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libelf.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libnuma.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libperl.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libpython-version.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libpython.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libslang.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libunwind-debug-frame.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-libunwind.c (100%)
>  create mode 100644 tools/build/feature/test-lzma.c
>  rename tools/{perf/config/feature-checks => build/feature}/test-pthread-attr-setaffinity-np.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-stackprotector-all.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-sync-compare-and-swap.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-timerfd.c (100%)
>  rename tools/{perf/config/feature-checks => build/feature}/test-zlib.c (100%)
>  create mode 100644 tools/perf/tests/kmod-path.c
>  create mode 100644 tools/perf/util/lzma.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2015-03-21 18:54 Arnaldo Carvalho de Melo
  2015-03-22  9:58 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-21 18:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, Corey Ashford, David Ahern, Don Zickus,
	Frederic Weisbecker, He Kuang, Jiri Olsa, Masami Hiramatsu,
	Mike Galbraith, Milos Vyletel, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, pi3orama, Stephane Eranian, Steven Rostedt,
	Wang Nan, Yunlong Song, Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, this is on top of my previous pull request,

Thanks,

- Arnaldo

The following changes since commit 0c8c20779c5d56b93b8cb4cd30ba129a927ab437:

  perf report: Don't allow empty argument for '-t'. (2015-03-19 13:53:28 -0300)

are available in the git repository at:

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

for you to fetch changes up to ca33380adf74afb985bf7aab09ec46707a5d2d57:

  perf tools: Use kmod_path__parse for machine__new_dso (2015-03-21 14:58:07 -0300)

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

- Handle legacy syscalls tracepoints (David Ahern, Arnaldo Carvalho de Melo)

- Indicate which callchain entries are annotated in the
  TUI hists browser (report/top) (Arnaldo Carvalho de Melo)

- Fix failure to add multiple probes without debuginfo (He Kuang)

- Fix 'trace' summary_only option (David Ahern)

- Fix race in build_id_cache__add_s() in 'buildid-cache' (Milos Vyletel)

- Don't allow empty argument for field-separator, fixing segfault (Wang Nan)

Infrastructure:

- Add destructor for format_field in libtraceevent (David Ahern)

- Prep work for support lzma compressed kernel modules (Jiri Olsa)

- Update .gitignore with recently added/renamed feature detection files (Yunlong Song)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf trace: Handle legacy syscalls tracepoints
      perf hists browser: Indicate which callchain entries are annotated

David Ahern (2):
      perf trace: Fix summary_only option
      tools lib traceevent: Add destructor for format_field

He Kuang (1):
      perf probe: Fix failure to add multiple probes without debuginfo

Jiri Olsa (10):
      perf build: Fix feature_check name clash
      perf build: Separate feature make support into config/Makefile.feature
      perf build: Make features checks directory configurable
      perf build: Move feature checks code under tools/build
      tools build: Add feature check for lzma library
      perf tools: Add lzma decompression support for kernel module
      perf tools: Add kmod_path__parse function
      perf tools: Add dsos__addnew function
      perf tools: Add machine__module_dso function
      perf tools: Use kmod_path__parse for machine__new_dso

Milos Vyletel (1):
      perf tools: Fix race in build_id_cache__add_s()

Wang Nan (1):
      perf tools: Don't allow empty argument for field-separator

Yunlong Song (2):
      perf build: Use FEATURE-DUMP instead of PERF-FEATURES in the .gitignore file
      perf build: Add config/feature-checks/*.output to the .gitignore file

 tools/build/Makefile.feature                       | 171 ++++++++++++++++++++
 .../feature-checks => build/feature}/.gitignore    |   1 +
 .../feature-checks => build/feature}/Makefile      |   8 +-
 .../feature-checks => build/feature}/test-all.c    |   5 +
 .../feature}/test-backtrace.c                      |   0
 .../feature-checks => build/feature}/test-bionic.c |   0
 .../feature}/test-compile.c                        |   0
 .../feature}/test-cplus-demangle.c                 |   0
 .../feature-checks => build/feature}/test-dwarf.c  |   0
 .../feature}/test-fortify-source.c                 |   0
 .../feature-checks => build/feature}/test-glibc.c  |   0
 .../feature}/test-gtk2-infobar.c                   |   0
 .../feature-checks => build/feature}/test-gtk2.c   |   0
 .../feature-checks => build/feature}/test-hello.c  |   0
 .../feature}/test-libaudit.c                       |   0
 .../feature}/test-libbabeltrace.c                  |   0
 .../feature-checks => build/feature}/test-libbfd.c |   0
 .../feature}/test-libdw-dwarf-unwind.c             |   0
 .../feature}/test-libelf-getphdrnum.c              |   0
 .../feature}/test-libelf-mmap.c                    |   0
 .../feature-checks => build/feature}/test-libelf.c |   0
 .../feature}/test-libnuma.c                        |   0
 .../feature}/test-libperl.c                        |   0
 .../feature}/test-libpython-version.c              |   0
 .../feature}/test-libpython.c                      |   0
 .../feature}/test-libslang.c                       |   0
 .../feature}/test-libunwind-debug-frame.c          |   0
 .../feature}/test-libunwind.c                      |   0
 tools/build/feature/test-lzma.c                    |  10 ++
 .../feature}/test-pthread-attr-setaffinity-np.c    |   0
 .../feature}/test-stackprotector-all.c             |   0
 .../feature}/test-sync-compare-and-swap.c          |   0
 .../feature}/test-timerfd.c                        |   0
 .../feature-checks => build/feature}/test-zlib.c   |   0
 tools/lib/traceevent/event-parse.c                 |  11 +-
 tools/lib/traceevent/event-parse.h                 |   1 +
 tools/perf/.gitignore                              |   2 +-
 tools/perf/Makefile.perf                           |   4 +-
 tools/perf/builtin-diff.c                          |   2 +-
 tools/perf/builtin-mem.c                           |   2 +-
 tools/perf/builtin-trace.c                         |  21 ++-
 tools/perf/config/Makefile                         | 176 ++-------------------
 tools/perf/tests/Build                             |   1 +
 tools/perf/tests/builtin-test.c                    |   4 +
 tools/perf/tests/kmod-path.c                       |  73 +++++++++
 tools/perf/tests/tests.h                           |   1 +
 tools/perf/ui/browsers/hists.c                     |   4 +-
 tools/perf/util/Build                              |   1 +
 tools/perf/util/build-id.c                         |   3 +-
 tools/perf/util/dso.c                              |  90 +++++++++--
 tools/perf/util/dso.h                              |  15 ++
 tools/perf/util/lzma.c                             |  95 +++++++++++
 tools/perf/util/machine.c                          |  83 +++++-----
 tools/perf/util/probe-event.c                      |   4 +-
 tools/perf/util/util.h                             |   4 +
 55 files changed, 557 insertions(+), 235 deletions(-)
 create mode 100644 tools/build/Makefile.feature
 rename tools/{perf/config/feature-checks => build/feature}/.gitignore (52%)
 rename tools/{perf/config/feature-checks => build/feature}/Makefile (96%)
 rename tools/{perf/config/feature-checks => build/feature}/test-all.c (97%)
 rename tools/{perf/config/feature-checks => build/feature}/test-backtrace.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-bionic.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-compile.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-cplus-demangle.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-dwarf.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-fortify-source.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-glibc.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-gtk2-infobar.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-gtk2.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-hello.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libaudit.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libbabeltrace.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libbfd.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libdw-dwarf-unwind.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libelf-getphdrnum.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libelf-mmap.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libelf.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libnuma.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libperl.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libpython-version.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libpython.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libslang.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libunwind-debug-frame.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-libunwind.c (100%)
 create mode 100644 tools/build/feature/test-lzma.c
 rename tools/{perf/config/feature-checks => build/feature}/test-pthread-attr-setaffinity-np.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-stackprotector-all.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-sync-compare-and-swap.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-timerfd.c (100%)
 rename tools/{perf/config/feature-checks => build/feature}/test-zlib.c (100%)
 create mode 100644 tools/perf/tests/kmod-path.c
 create mode 100644 tools/perf/util/lzma.c

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2015-02-27 19:22 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-02-27 19:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, He Kuang, Hemant Kumar,
	Jiri Olsa, Kan Liang, Masami Hiramatsu, Namhyung Kim,
	Naohiro Aota, Paul Mackerras, Peter Zijlstra, Wang Nan,
	Yunlong Song, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 0afb1704010f60e7ae85aef0f93fc10f2d99761e:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-02-26 12:25:20 +0100)

are available in the git repository at:


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

for you to fetch changes up to fefd2d9619de3bf0bf02a8622e9f445c3d19cc3f:

  perf report: Fix branch stack mode cannot be set (2015-02-27 15:52:42 -0300)

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

User visible:

- Fix SIGBUS failures due to misaligned accesses in Sparc64 (David Ahern)

- Fix branch stack mode in 'perf report' (He Kuang)

- Fix a 'perf probe' operator precedence bug (He Kuang)

- Fix Support for different binaries with same name in 'perf diff' (Kan Liang)

- Check kprobes blacklist when adding new events via 'perf probe' (Masami Hiramatsu)

- Add --purge FILE to remove all caches of FILE in 'perf buildid-cache' (Masami Hiramatsu)

- Show usage with some incorrect params (Masami Hiramatsu)

- Add new buildid cache if update target is not cached in 'buildid-cache' (Masami Hiramatsu)

- Allow listing events with 'tracepoint' prefix in 'perf list' (Yunlong Song)

- Sort the output of 'perf list' (Yunlong Song)

- Fix bash completion of 'perf --' (Yunlong Song)

Developer Zone:

- Handle strdup() failure path in 'perf probe' (Arnaldo Carvalho de Melo)

- Fix get_real_path to free allocated memory in error path in 'perf probe' (Masami Hiramatsu)

- Use pr_debug instead of verbose && pr_info perf buildid-cache (Masami Hiramatsu)

- Fix building of 'perf data' with some gcc versions due to incorrect array struct
  entry (Yunlong Song)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (1):
      perf probe: Handle strdup() failure

David Ahern (1):
      perf trace: Fix SIGBUS failures due to misaligned accesses

He Kuang (2):
      perf probe: Fix a precedence bug
      perf report: Fix branch stack mode cannot be set

Kan Liang (1):
      perf diff: Support for different binaries

Masami Hiramatsu (6):
      perf probe: Check kprobes blacklist when adding new events
      perf probe: Fix get_real_path to free allocated memory in error path
      perf buildid-cache: Add new buildid cache if update target is not cached
      perf buildid-cache: Add --purge FILE to remove all caches of FILE
      perf buildid-cache: Use pr_debug instead of verbose && pr_info
      perf buildid-cache: Show usage with incorrect params

Yunlong Song (8):
      perf data: Fix sentinel setting for data_cmds array
      perf list: Sort the output of 'perf list' to view more clearly
      perf list: Allow listing events with 'tracepoint' prefix
      perf list: Avoid confusion of perf output and the next command prompt
      perf tools: Remove the '--(null)' long_name for --list-opts
      perf list: Clean up the printing functions of hardware/software events
      perf list: Extend raw-dump to certain kind of events
      perf tools: Fix the bash completion problem of 'perf --*'

 tools/perf/Documentation/perf-buildid-cache.txt |  24 ++-
 tools/perf/Documentation/perf-diff.txt          |   5 +
 tools/perf/Documentation/perf-list.txt          |   6 +
 tools/perf/builtin-buildid-cache.c              |  72 ++++++--
 tools/perf/builtin-data.c                       |   2 +-
 tools/perf/builtin-list.c                       |  27 ++-
 tools/perf/builtin-report.c                     |   2 +-
 tools/perf/builtin-trace.c                      |  36 +++-
 tools/perf/perf-completion.sh                   |   6 +-
 tools/perf/perf.c                               |  28 ++++
 tools/perf/util/build-id.c                      | 105 ++++++++++--
 tools/perf/util/build-id.h                      |   4 +
 tools/perf/util/parse-events.c                  | 210 +++++++++++++++++-------
 tools/perf/util/parse-events.h                  |  11 +-
 tools/perf/util/parse-options.c                 |   5 +-
 tools/perf/util/probe-event.c                   | 117 ++++++++++++-
 tools/perf/util/sort.c                          |   9 +
 17 files changed, 542 insertions(+), 127 deletions(-)

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2014-01-17 14:57 Arnaldo Carvalho de Melo
@ 2014-01-19 12:11 ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2014-01-19 12:11 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, David A. Long, Frederic Weisbecker, Jiri Olsa,
	Masami Hiramatsu, Namhyung Kim, Oleg Nesterov, Paul Mackerras,
	Peter Zijlstra, Srikar Dronamraju, Stephane Eranian,
	Steven Rostedt, yrl.pp-manager.tt, 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 3e7e09dbd1080de5dcf10092830e39bc2e2932ec:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-01-16 09:34:01 +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 2a29190c040c0b11e39197c67abf6f87e0a61f9a:
> 
>   perf tools: Remove unnecessary callchain cursor state restore on unmatch (2014-01-17 11:25:24 -0300)
> 
> ----------------------------------------------------------------
> Developer stuff:
> 
> . Improve callchain processing by removing unnecessary work. (Frederic Weisbecker)
> 
> . Fix comm override error handling (Frederic Weisbecker)
> 
> . Improve 'perf probe' exit path, release resources (Masami Hiramatsu)
> 
> . Improve libtraceevent plugins exit path, allowing the registering of
>   an unregister handler to be called at exit time (Namhyung Kim)
> 
> . Add an alias to the build test makefile (make -C tools/perf build-test)
>   (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Frederic Weisbecker (3):
>       perf tools: Do proper comm override error handling
>       perf callchain: Spare double comparison of callchain first entry
>       perf tools: Remove unnecessary callchain cursor state restore on unmatch
> 
> Masami Hiramatsu (3):
>       perf probe: Release allocated probe_trace_event if failed
>       perf probe: Release all dynamically allocated parameters
>       perf symbols: Export elf_section_by_name and reuse
> 
> Namhyung Kim (13):
>       tools lib traceevent: Add pevent_unregister_event_handler()
>       tools lib traceevent: Add pevent_unregister_print_function()
>       tools lib traceevent: Unregister handler when function plugin is unloaded
>       tools lib traceevent: Unregister handler when hrtimer plugin is unloaded
>       tools lib traceevent: Unregister handler when kmem plugin is unloaded
>       tools lib traceevent: Unregister handler when kvm plugin is unloaded
>       tools lib traceevent: Unregister handler when sched_switch plugin is unloaded
>       tools lib traceevent: Unregister handler when mac80211 plugin is unloaded
>       tools lib traceevent: Unregister handler when cfg80211 plugin is unloaded
>       tools lib traceevent: Unregister handler when jbd2 plugin is is unloaded
>       tools lib traceevent: Unregister handler when scsi plugin is unloaded
>       tools lib traceevent: Unregister handler when xen plugin is unloaded
>       perf tools: Add 'build-test' make target
> 
>  tools/lib/traceevent/event-parse.c         | 136 ++++++++++++++++++++++++++---
>  tools/lib/traceevent/event-parse.h         |   5 ++
>  tools/lib/traceevent/plugin_cfg80211.c     |   6 ++
>  tools/lib/traceevent/plugin_function.c     |   3 +
>  tools/lib/traceevent/plugin_hrtimer.c      |  10 +++
>  tools/lib/traceevent/plugin_jbd2.c         |   9 ++
>  tools/lib/traceevent/plugin_kmem.c         |  22 +++++
>  tools/lib/traceevent/plugin_kvm.c          |  29 ++++++
>  tools/lib/traceevent/plugin_mac80211.c     |   7 ++
>  tools/lib/traceevent/plugin_sched_switch.c |  12 +++
>  tools/lib/traceevent/plugin_scsi.c         |   6 ++
>  tools/lib/traceevent/plugin_xen.c          |   6 ++
>  tools/perf/Makefile                        |   6 ++
>  tools/perf/builtin-probe.c                 |  48 ++++++++--
>  tools/perf/util/callchain.c                |  23 +++--
>  tools/perf/util/comm.c                     |  19 ++--
>  tools/perf/util/comm.h                     |   2 +-
>  tools/perf/util/probe-event.c              | 111 +++++++++++++----------
>  tools/perf/util/probe-event.h              |   6 ++
>  tools/perf/util/symbol-elf.c               |   5 +-
>  tools/perf/util/symbol.h                   |   5 ++
>  tools/perf/util/thread.c                   |   5 +-
>  tools/perf/util/unwind.c                   |  20 +----
>  23 files changed, 389 insertions(+), 112 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2014-01-17 14:57 Arnaldo Carvalho de Melo
  2014-01-19 12:11 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-17 14:57 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, David A. Long, Frederic Weisbecker, Jiri Olsa,
	Masami Hiramatsu, Namhyung Kim, Oleg Nesterov, Paul Mackerras,
	Peter Zijlstra, Srikar Dronamraju, Stephane Eranian,
	Steven Rostedt, yrl.pp-manager.tt, Arnaldo Carvalho de Melo

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 3e7e09dbd1080de5dcf10092830e39bc2e2932ec:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-01-16 09:34:01 +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 2a29190c040c0b11e39197c67abf6f87e0a61f9a:

  perf tools: Remove unnecessary callchain cursor state restore on unmatch (2014-01-17 11:25:24 -0300)

----------------------------------------------------------------
Developer stuff:

. Improve callchain processing by removing unnecessary work. (Frederic Weisbecker)

. Fix comm override error handling (Frederic Weisbecker)

. Improve 'perf probe' exit path, release resources (Masami Hiramatsu)

. Improve libtraceevent plugins exit path, allowing the registering of
  an unregister handler to be called at exit time (Namhyung Kim)

. Add an alias to the build test makefile (make -C tools/perf build-test)
  (Namhyung Kim)

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

----------------------------------------------------------------
Frederic Weisbecker (3):
      perf tools: Do proper comm override error handling
      perf callchain: Spare double comparison of callchain first entry
      perf tools: Remove unnecessary callchain cursor state restore on unmatch

Masami Hiramatsu (3):
      perf probe: Release allocated probe_trace_event if failed
      perf probe: Release all dynamically allocated parameters
      perf symbols: Export elf_section_by_name and reuse

Namhyung Kim (13):
      tools lib traceevent: Add pevent_unregister_event_handler()
      tools lib traceevent: Add pevent_unregister_print_function()
      tools lib traceevent: Unregister handler when function plugin is unloaded
      tools lib traceevent: Unregister handler when hrtimer plugin is unloaded
      tools lib traceevent: Unregister handler when kmem plugin is unloaded
      tools lib traceevent: Unregister handler when kvm plugin is unloaded
      tools lib traceevent: Unregister handler when sched_switch plugin is unloaded
      tools lib traceevent: Unregister handler when mac80211 plugin is unloaded
      tools lib traceevent: Unregister handler when cfg80211 plugin is unloaded
      tools lib traceevent: Unregister handler when jbd2 plugin is is unloaded
      tools lib traceevent: Unregister handler when scsi plugin is unloaded
      tools lib traceevent: Unregister handler when xen plugin is unloaded
      perf tools: Add 'build-test' make target

 tools/lib/traceevent/event-parse.c         | 136 ++++++++++++++++++++++++++---
 tools/lib/traceevent/event-parse.h         |   5 ++
 tools/lib/traceevent/plugin_cfg80211.c     |   6 ++
 tools/lib/traceevent/plugin_function.c     |   3 +
 tools/lib/traceevent/plugin_hrtimer.c      |  10 +++
 tools/lib/traceevent/plugin_jbd2.c         |   9 ++
 tools/lib/traceevent/plugin_kmem.c         |  22 +++++
 tools/lib/traceevent/plugin_kvm.c          |  29 ++++++
 tools/lib/traceevent/plugin_mac80211.c     |   7 ++
 tools/lib/traceevent/plugin_sched_switch.c |  12 +++
 tools/lib/traceevent/plugin_scsi.c         |   6 ++
 tools/lib/traceevent/plugin_xen.c          |   6 ++
 tools/perf/Makefile                        |   6 ++
 tools/perf/builtin-probe.c                 |  48 ++++++++--
 tools/perf/util/callchain.c                |  23 +++--
 tools/perf/util/comm.c                     |  19 ++--
 tools/perf/util/comm.h                     |   2 +-
 tools/perf/util/probe-event.c              | 111 +++++++++++++----------
 tools/perf/util/probe-event.h              |   6 ++
 tools/perf/util/symbol-elf.c               |   5 +-
 tools/perf/util/symbol.h                   |   5 ++
 tools/perf/util/thread.c                   |   5 +-
 tools/perf/util/unwind.c                   |  20 +----
 23 files changed, 389 insertions(+), 112 deletions(-)

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

* Re: [GIT PULL 00/19] perf/core improvements and fixes
  2012-05-22 17:39 Arnaldo Carvalho de Melo
@ 2012-05-23 15:06 ` Ingo Molnar
  0 siblings, 0 replies; 53+ messages in thread
From: Ingo Molnar @ 2012-05-23 15:06 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Anshuman Khandual, Corey Ashford, David Ahern,
	Frederic Weisbecker, Frederic Weisbecker, Jiri Olsa,
	Mike Galbraith, Namhyung Kim, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Steven Rostedt, Tom Zanussi,
	arnaldo.melo, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 73787190d04a34e6da745da893b3ae8bedde418f:
> 
>   Merge branch 'perf/parse-events-4' of git://github.com/fweisbec/tracing into perf/core (2012-05-21 10:42:09 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf/core
> 
> for you to fetch changes up to 26252ea675663d1bc6747125fcaa2b7cc4ed8a03:
> 
>   perf evlist: Show event attribute details (2012-05-22 14:30:11 -0300)
> 
> ----------------------------------------------------------------
> Fixes and improvements for perf/core:
> 
> . Fix perf perl script build fallout from libtraceevent conversion,
>   from Frederic Weisbecker.
> 
> . Libtraceevent Makefile fixes, from Namhyung Kim
> 
> . Pipe mode fixes, from Stephane Eranian
> 
> . Event parsing improvements, from Jiri Olsa.
> 
> . Endianness fixes, from Jiri Olsa
> 
> . Bump the default sampling freq to 4 kHz, requested by Ingo Molnar.
> 
> . Show event attribute details, such as the sampling freq, in the
>   'perf evlist' command.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Anshuman Khandual (1):
>       perf record: Fix documentation for branch stack sampling
> 
> Arnaldo Carvalho de Melo (2):
>       perf tools: Bump default sample freq to 4 kHz
>       perf evlist: Show event attribute details
> 
> Frederic Weisbecker (2):
>       perf script: Explicitly handle known default print arg type
>       perf script: Rename struct event to struct event_format in perl engine
> 
> Jiri Olsa (7):
>       perf test: Move parse event automated tests to separated object
>       perf tools: Add support for displaying event parser debug info
>       perf tools: Use allocated list for each parsed event
>       perf tools: Separate 'mem:' event scanner bits
>       perf tools: Add hardcoded name term for pmu events
>       perf tools: Carry perf_event_attr bitfield throught different endians
>       perf tools: Add union u64_swap type for swapping u64 data
> 
> Namhyung Kim (3):
>       perf tools: Rename libparsevent to libtraceevent in Makefile
>       perf tools: Always try to build libtraceevent
>       perf target: Add cpu flag to sample_type if target has cpu
> 
> Stephane Eranian (4):
>       perf tools: rename HEADER_TRACE_INFO to HEADER_TRACING_DATA
>       perf inject: Fix broken perf inject -b
>       perf tools: Fix piped mode read code
>       perf buildid-list: Work better with pipe mode
> 
>  tools/perf/Documentation/perf-evlist.txt           |    8 +
>  tools/perf/Documentation/perf-record.txt           |    2 +-
>  tools/perf/Makefile                                |   37 +-
>  tools/perf/builtin-buildid-list.c                  |    6 +-
>  tools/perf/builtin-evlist.c                        |  103 +++-
>  tools/perf/builtin-inject.c                        |    5 +
>  tools/perf/builtin-record.c                        |    6 +-
>  tools/perf/builtin-test.c                          |  552 +----------------
>  tools/perf/builtin-top.c                           |    5 +-
>  tools/perf/util/build-id.c                         |    2 +
>  tools/perf/util/evsel.c                            |   12 +-
>  tools/perf/util/header.c                           |   10 +-
>  tools/perf/util/header.h                           |    2 +-
>  tools/perf/util/parse-events-test.c                |  625 ++++++++++++++++++++
>  tools/perf/util/parse-events.c                     |   69 ++-
>  tools/perf/util/parse-events.h                     |   20 +-
>  tools/perf/util/parse-events.l                     |   26 +-
>  tools/perf/util/parse-events.y                     |   77 ++-
>  tools/perf/util/pmu.c                              |    4 +-
>  .../perf/util/scripting-engines/trace-event-perl.c |   16 +-
>  tools/perf/util/session.c                          |   68 ++-
>  tools/perf/util/types.h                            |    5 +
>  22 files changed, 1002 insertions(+), 658 deletions(-)
>  create mode 100644 tools/perf/util/parse-events-test.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/19] perf/core improvements and fixes
@ 2012-05-22 17:39 Arnaldo Carvalho de Melo
  2012-05-23 15:06 ` Ingo Molnar
  0 siblings, 1 reply; 53+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-05-22 17:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Anshuman Khandual,
	Corey Ashford, David Ahern, Frederic Weisbecker,
	Frederic Weisbecker, Jiri Olsa, Mike Galbraith, Namhyung Kim,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Steven Rostedt, Tom Zanussi, arnaldo.melo,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 73787190d04a34e6da745da893b3ae8bedde418f:

  Merge branch 'perf/parse-events-4' of git://github.com/fweisbec/tracing into perf/core (2012-05-21 10:42:09 +0200)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf/core

for you to fetch changes up to 26252ea675663d1bc6747125fcaa2b7cc4ed8a03:

  perf evlist: Show event attribute details (2012-05-22 14:30:11 -0300)

----------------------------------------------------------------
Fixes and improvements for perf/core:

. Fix perf perl script build fallout from libtraceevent conversion,
  from Frederic Weisbecker.

. Libtraceevent Makefile fixes, from Namhyung Kim

. Pipe mode fixes, from Stephane Eranian

. Event parsing improvements, from Jiri Olsa.

. Endianness fixes, from Jiri Olsa

. Bump the default sampling freq to 4 kHz, requested by Ingo Molnar.

. Show event attribute details, such as the sampling freq, in the
  'perf evlist' command.

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

----------------------------------------------------------------
Anshuman Khandual (1):
      perf record: Fix documentation for branch stack sampling

Arnaldo Carvalho de Melo (2):
      perf tools: Bump default sample freq to 4 kHz
      perf evlist: Show event attribute details

Frederic Weisbecker (2):
      perf script: Explicitly handle known default print arg type
      perf script: Rename struct event to struct event_format in perl engine

Jiri Olsa (7):
      perf test: Move parse event automated tests to separated object
      perf tools: Add support for displaying event parser debug info
      perf tools: Use allocated list for each parsed event
      perf tools: Separate 'mem:' event scanner bits
      perf tools: Add hardcoded name term for pmu events
      perf tools: Carry perf_event_attr bitfield throught different endians
      perf tools: Add union u64_swap type for swapping u64 data

Namhyung Kim (3):
      perf tools: Rename libparsevent to libtraceevent in Makefile
      perf tools: Always try to build libtraceevent
      perf target: Add cpu flag to sample_type if target has cpu

Stephane Eranian (4):
      perf tools: rename HEADER_TRACE_INFO to HEADER_TRACING_DATA
      perf inject: Fix broken perf inject -b
      perf tools: Fix piped mode read code
      perf buildid-list: Work better with pipe mode

 tools/perf/Documentation/perf-evlist.txt           |    8 +
 tools/perf/Documentation/perf-record.txt           |    2 +-
 tools/perf/Makefile                                |   37 +-
 tools/perf/builtin-buildid-list.c                  |    6 +-
 tools/perf/builtin-evlist.c                        |  103 +++-
 tools/perf/builtin-inject.c                        |    5 +
 tools/perf/builtin-record.c                        |    6 +-
 tools/perf/builtin-test.c                          |  552 +----------------
 tools/perf/builtin-top.c                           |    5 +-
 tools/perf/util/build-id.c                         |    2 +
 tools/perf/util/evsel.c                            |   12 +-
 tools/perf/util/header.c                           |   10 +-
 tools/perf/util/header.h                           |    2 +-
 tools/perf/util/parse-events-test.c                |  625 ++++++++++++++++++++
 tools/perf/util/parse-events.c                     |   69 ++-
 tools/perf/util/parse-events.h                     |   20 +-
 tools/perf/util/parse-events.l                     |   26 +-
 tools/perf/util/parse-events.y                     |   77 ++-
 tools/perf/util/pmu.c                              |    4 +-
 .../perf/util/scripting-engines/trace-event-perl.c |   16 +-
 tools/perf/util/session.c                          |   68 ++-
 tools/perf/util/types.h                            |    5 +
 22 files changed, 1002 insertions(+), 658 deletions(-)
 create mode 100644 tools/perf/util/parse-events-test.c

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

end of thread, other threads:[~2017-11-03 13:55 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14  2:20 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 01/19] tools: Fix up BITS_PER_LONG setting Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 02/19] objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 03/19] objtool: Avoid checking code drift on busybox's diff Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 04/19] tools lib bpf: New API to adjust type of a BPF program Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 05/19] tools lib bpf: Report error when kernel doesn't support program type Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 06/19] perf event parser: Add const qualifier to evt_name and sys_name Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 07/19] perf bpf: Rename bpf__foreach_tev() to bpf__foreach_event() Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 08/19] perf bpf: Support BPF program attach to tracepoints Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 09/19] perf probe: Fix to show correct error message for $vars and $params Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 10/19] perf probe: Accept %sdt and %cached event name Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 11/19] perf probe: Make --list show only available cached events Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 12/19] perf probe-cache: Add for_each_probe_cache_entry() wrapper Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 13/19] perf probe: Allow wildcard for cached events Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 14/19] perf probe: Search SDT/cached event from all probe caches Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 15/19] perf list: Show SDT and pre-cached events Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 16/19] perf probe: Support @BUILDID or @FILE suffix for SDT events Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 17/19] perf probe: Support a special SDT probe format Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 18/19] perf build: Add sdt feature detection Arnaldo Carvalho de Melo
2016-07-14  2:20 ` [PATCH 19/19] perf test: Add a test case for SDT event Arnaldo Carvalho de Melo
2016-07-14  6:58 ` [GIT PULL 00/19] perf/core improvements and fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2017-11-03 13:54 Arnaldo Carvalho de Melo
2017-08-14 16:27 Arnaldo Carvalho de Melo
2017-08-14 17:39 ` Ingo Molnar
2017-08-14 17:52   ` Arnaldo Carvalho de Melo
2017-03-14 18:50 Arnaldo Carvalho de Melo
2017-03-15 18:29 ` Ingo Molnar
2016-12-01 18:02 Arnaldo Carvalho de Melo
2016-12-02  9:10 ` Ingo Molnar
2016-09-01 16:45 Arnaldo Carvalho de Melo
2016-09-05 13:16 ` Ingo Molnar
2016-06-15 18:13 Arnaldo Carvalho de Melo
2016-06-16  6:29 ` Jiri Olsa
2016-06-16 19:54   ` Arnaldo Carvalho de Melo
2016-06-16  8:29 ` Ingo Molnar
2016-04-07 20:58 Arnaldo Carvalho de Melo
2016-04-08 13:15 ` Arnaldo Carvalho de Melo
2016-04-13  6:58   ` Ingo Molnar
2016-03-10 21:04 Arnaldo Carvalho de Melo
2016-03-11  8:43 ` Ingo Molnar
2016-02-26 23:18 Arnaldo Carvalho de Melo
2016-02-27  9:36 ` Ingo Molnar
2016-02-05 16:25 Arnaldo Carvalho de Melo
2016-02-09  9:40 ` Ingo Molnar
2015-04-08 14:23 Arnaldo Carvalho de Melo
2015-04-08 15:05 ` Ingo Molnar
2015-03-21 18:54 Arnaldo Carvalho de Melo
2015-03-22  9:58 ` Ingo Molnar
2015-02-27 19:22 Arnaldo Carvalho de Melo
2014-01-17 14:57 Arnaldo Carvalho de Melo
2014-01-19 12:11 ` Ingo Molnar
2012-05-22 17:39 Arnaldo Carvalho de Melo
2012-05-23 15:06 ` 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).