All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 00/14] perf/core improvements and fixes
@ 2015-05-29 16:30 Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 01/14] perf annotate: Fix -i option, which is currently ignored Arnaldo Carvalho de Melo
                   ` (14 more replies)
  0 siblings, 15 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Martin Liska, Masami Hiramatsu, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, pi3orama, Rabin Vincent,
	Riku Voipio, Stephane Eranian, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider applying,

- Arnaldo

The following changes since commit f1942b96b4b44c1ab0e0b82fef93ba7e1fada7af:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-05-28 11:09:22 +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 ed426915900db3c58c410b8b38f6ff0e46bf6c96:

  perf tools: Make Ctrl-C stop processing on TUI (2015-05-29 12:49:00 -0300)

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

User visible:

- Make Ctrl-C stop processing on TUI, allowing interrupting the load of big
  perf.data files (Namhyung Kim)

- Fix 'perf annotate' -i option, which is currently ignored (Martin Liška)

- Add ARM64 perf_regs_load to support libunwind and enable testing (Wang Nan)

Infrastructure:

- Fix thread ref-counting in db-export (Adrian Hunter)

- Fix compiler warning about may be accessing uninitialized (Arnaldo Carvalho de Melo)

- No need to have two lists for user and kernel DSOs, unify them (Arnaldo Carvalho de Melo)

- Function namespace consistency fixups (Arnaldo Carvalho de Melo)

- Do not fail on missing Build file, fixing the build on MIPS (Jiri Olsa)

- Fix up syscall tests, making those tests pass on ARM64 (Riku Voipio)

- Fix 'function unused' warning in 'perf probe' (Wang Nan)

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

----------------------------------------------------------------
Adrian Hunter (1):
      perf db-export: Fix thread ref-counting

Arnaldo Carvalho de Melo (5):
      perf kmem: Fix compiler warning about may be accessing uninitialized variable
      perf machine: Adopt findnew_kernel method
      perf machine: No need to have two DSOs lists
      perf machine: Introduce machine__findnew_dso() method
      perf machine: Fix up vdso methods names

Jiri Olsa (1):
      perf build: Do not fail on missing Build file

Martin Liška (1):
      perf annotate: Fix -i option, which is currently ignored.

Namhyung Kim (1):
      perf tools: Make Ctrl-C stop processing on TUI

Riku Voipio (3):
      perf tests: Switch from open to openat
      perf tests: Aename open*.c to openat*.c
      perf tests: Remove getpgrp from mmap-basic

Wang Nan (2):
      perf probe: Fix 'function unused' warning
      perf tools: Add ARM64 perf_regs_load to support libunwind and enable testing

 tools/build/Makefile.build                         |  2 +-
 tools/build/tests/ex/Build                         |  1 +
 tools/build/tests/ex/empty2/README                 |  2 +
 tools/perf/arch/arm64/Build                        |  1 +
 tools/perf/arch/arm64/include/perf_regs.h          |  3 +
 tools/perf/arch/arm64/tests/Build                  |  2 +
 tools/perf/arch/arm64/tests/dwarf-unwind.c         | 61 ++++++++++++++++++++
 tools/perf/arch/arm64/tests/regs_load.S            | 46 +++++++++++++++
 tools/perf/builtin-annotate.c                      |  3 +-
 tools/perf/builtin-kmem.c                          |  2 +-
 tools/perf/tests/Build                             |  8 +--
 tools/perf/tests/builtin-test.c                    | 14 ++---
 tools/perf/tests/hists_common.c                    |  3 +-
 tools/perf/tests/mmap-basic.c                      |  6 +-
 ...yscall-all-cpus.c => openat-syscall-all-cpus.c} | 12 ++--
 ...call-tp-fields.c => openat-syscall-tp-fields.c} |  6 +-
 .../tests/{open-syscall.c => openat-syscall.c}     | 14 ++---
 tools/perf/tests/parse-events.c                    | 12 ++--
 tools/perf/tests/tests.h                           |  8 +--
 tools/perf/ui/browsers/annotate.c                  |  4 ++
 tools/perf/ui/browsers/hists.c                     |  4 ++
 tools/perf/ui/tui/setup.c                          |  2 +-
 tools/perf/util/build-id.c                         | 59 ++++++-------------
 tools/perf/util/db-export.c                        | 19 ++++---
 tools/perf/util/dso.c                              |  6 +-
 tools/perf/util/dso.h                              |  4 +-
 tools/perf/util/header.c                           |  6 +-
 tools/perf/util/machine.c                          | 46 ++++++++-------
 tools/perf/util/machine.h                          |  5 +-
 tools/perf/util/map.c                              |  4 +-
 tools/perf/util/probe-event.c                      | 66 +++++++++++-----------
 tools/perf/util/symbol-elf.c                       |  6 +-
 tools/perf/util/vdso.c                             | 24 ++++----
 tools/perf/util/vdso.h                             |  4 +-
 34 files changed, 277 insertions(+), 188 deletions(-)
 create mode 100644 tools/build/tests/ex/empty2/README
 create mode 100644 tools/perf/arch/arm64/tests/Build
 create mode 100644 tools/perf/arch/arm64/tests/dwarf-unwind.c
 create mode 100644 tools/perf/arch/arm64/tests/regs_load.S
 rename tools/perf/tests/{open-syscall-all-cpus.c => openat-syscall-all-cpus.c} (90%)
 rename tools/perf/tests/{open-syscall-tp-fields.c => openat-syscall-tp-fields.c} (94%)
 rename tools/perf/tests/{open-syscall.c => openat-syscall.c} (79%)

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

* [PATCH 01/14] perf annotate: Fix -i option, which is currently ignored.
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 02/14] perf probe: Fix 'function unused' warning Arnaldo Carvalho de Melo
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Martin Liška, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Martin Liška <mliska@suse.cz>

Assign input_name, received from program arguments, to file data
structure.

Signed-off-by: Martin Liska <mliska@suse.cz>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/55685654.2010209@suse.cz
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-annotate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index c434e1264087..4e08c2d2090e 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -289,7 +289,6 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
 		},
 	};
 	struct perf_data_file file = {
-		.path  = input_name,
 		.mode  = PERF_DATA_MODE_READ,
 	};
 	const struct option options[] = {
@@ -346,6 +345,8 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
 	else if (annotate.use_gtk)
 		use_browser = 2;
 
+	file.path  = input_name;
+
 	setup_browser(true);
 
 	annotate.session = perf_session__new(&file, false, &annotate.tool);
-- 
2.1.0


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

* [PATCH 02/14] perf probe: Fix 'function unused' warning
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 01/14] perf annotate: Fix -i option, which is currently ignored Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 03/14] perf db-export: Fix thread ref-counting Arnaldo Carvalho de Melo
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Wang Nan, Zefan Li, pi3orama, Arnaldo Carvalho de Melo

From: Wang Nan <wangnan0@huawei.com>

By 'make build-test' a warning is found in probe-event.c that, after
commit 419e873828 (perf probe: Show the error reason comes from
invalid DSO) the only user of kernel_get_module_dso() is
open_debuginfo(). Which is not compiled if HAVE_DWARF_SUPPORT not set.

'make build-test' found this problem when make_minimal.

This patch moves kernel_get_module_dso() to HAVE_DWARF_SUPPORT ifdef
section.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1432779905-206143-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 65 ++++++++++++++++++++++---------------------
 1 file changed, 33 insertions(+), 32 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index b0b8a8080009..e6a02b1ffd6d 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -200,38 +200,6 @@ static void put_target_map(struct map *map, bool user)
 }
 
 
-static int kernel_get_module_dso(const char *module, struct dso **pdso)
-{
-	struct dso *dso;
-	struct map *map;
-	const char *vmlinux_name;
-	int ret = 0;
-
-	if (module) {
-		list_for_each_entry(dso, &host_machine->kernel_dsos.head,
-				    node) {
-			if (strncmp(dso->short_name + 1, module,
-				    dso->short_name_len - 2) == 0)
-				goto found;
-		}
-		pr_debug("Failed to find module %s.\n", module);
-		return -ENOENT;
-	}
-
-	map = host_machine->vmlinux_maps[MAP__FUNCTION];
-	dso = map->dso;
-
-	vmlinux_name = symbol_conf.vmlinux_name;
-	dso->load_errno = 0;
-	if (vmlinux_name)
-		ret = dso__load_vmlinux(dso, map, vmlinux_name, false, NULL);
-	else
-		ret = dso__load_vmlinux_path(dso, map, NULL);
-found:
-	*pdso = dso;
-	return ret;
-}
-
 static int convert_exec_to_group(const char *exec, char **result)
 {
 	char *ptr1, *ptr2, *exec_copy;
@@ -279,6 +247,39 @@ static void clear_probe_trace_events(struct probe_trace_event *tevs, int ntevs)
 }
 
 #ifdef HAVE_DWARF_SUPPORT
+
+static int kernel_get_module_dso(const char *module, struct dso **pdso)
+{
+	struct dso *dso;
+	struct map *map;
+	const char *vmlinux_name;
+	int ret = 0;
+
+	if (module) {
+		list_for_each_entry(dso, &host_machine->kernel_dsos.head,
+				    node) {
+			if (strncmp(dso->short_name + 1, module,
+				    dso->short_name_len - 2) == 0)
+				goto found;
+		}
+		pr_debug("Failed to find module %s.\n", module);
+		return -ENOENT;
+	}
+
+	map = host_machine->vmlinux_maps[MAP__FUNCTION];
+	dso = map->dso;
+
+	vmlinux_name = symbol_conf.vmlinux_name;
+	dso->load_errno = 0;
+	if (vmlinux_name)
+		ret = dso__load_vmlinux(dso, map, vmlinux_name, false, NULL);
+	else
+		ret = dso__load_vmlinux_path(dso, map, NULL);
+found:
+	*pdso = dso;
+	return ret;
+}
+
 /*
  * Some binaries like glibc have special symbols which are on the symbol
  * table, but not in the debuginfo. If we can find the address of the
-- 
2.1.0


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

* [PATCH 03/14] perf db-export: Fix thread ref-counting
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 01/14] perf annotate: Fix -i option, which is currently ignored Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 02/14] perf probe: Fix 'function unused' warning Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 04/14] perf kmem: Fix compiler warning about may be accessing uninitialized variable Arnaldo Carvalho de Melo
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Jiri Olsa, Arnaldo Carvalho de Melo

From: Adrian Hunter <adrian.hunter@intel.com>

Thread ref-counting was not done for get_main_thread() meaning that
there was a thread__get() from machine__find_thread() that was not being
paired with thread__put(). Fix that.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1432906425-9911-2-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/db-export.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/tools/perf/util/db-export.c b/tools/perf/util/db-export.c
index eb7a2acb973b..1c9689e4cc17 100644
--- a/tools/perf/util/db-export.c
+++ b/tools/perf/util/db-export.c
@@ -234,7 +234,7 @@ int db_export__symbol(struct db_export *dbe, struct symbol *sym,
 static struct thread *get_main_thread(struct machine *machine, struct thread *thread)
 {
 	if (thread->pid_ == thread->tid)
-		return thread;
+		return thread__get(thread);
 
 	if (thread->pid_ == -1)
 		return NULL;
@@ -308,19 +308,18 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
 	if (err)
 		return err;
 
-	/* FIXME: check refcounting for get_main_thread, that calls machine__find_thread... */
 	main_thread = get_main_thread(al->machine, thread);
 	if (main_thread)
 		comm = machine__thread_exec_comm(al->machine, main_thread);
 
 	err = db_export__thread(dbe, thread, al->machine, comm);
 	if (err)
-		return err;
+		goto out_put;
 
 	if (comm) {
 		err = db_export__comm(dbe, comm, main_thread);
 		if (err)
-			return err;
+			goto out_put;
 		es.comm_db_id = comm->db_id;
 	}
 
@@ -328,7 +327,7 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
 
 	err = db_ids_from_al(dbe, al, &es.dso_db_id, &es.sym_db_id, &es.offset);
 	if (err)
-		return err;
+		goto out_put;
 
 	if ((evsel->attr.sample_type & PERF_SAMPLE_ADDR) &&
 	    sample_addr_correlates_sym(&evsel->attr)) {
@@ -338,20 +337,22 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
 		err = db_ids_from_al(dbe, &addr_al, &es.addr_dso_db_id,
 				     &es.addr_sym_db_id, &es.addr_offset);
 		if (err)
-			return err;
+			goto out_put;
 		if (dbe->crp) {
 			err = thread_stack__process(thread, comm, sample, al,
 						    &addr_al, es.db_id,
 						    dbe->crp);
 			if (err)
-				return err;
+				goto out_put;
 		}
 	}
 
 	if (dbe->export_sample)
-		return dbe->export_sample(dbe, &es);
+		err = dbe->export_sample(dbe, &es);
 
-	return 0;
+out_put:
+	thread__put(main_thread);
+	return err;
 }
 
 static struct {
-- 
2.1.0


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

* [PATCH 04/14] perf kmem: Fix compiler warning about may be accessing uninitialized variable
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 03/14] perf db-export: Fix thread ref-counting Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 05/14] perf tools: Add ARM64 perf_regs_load to support libunwind and enable testing Arnaldo Carvalho de Melo
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Namhyung Kim

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

The last argument to strtok_r doesn't need to be initialized, its just a
placeholder to make this routine reentrant, but gcc doesn't know about
that and complains, breaking the build, fix it by setting it to NULL.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-8e8rgbg3aom9uarsyqjrsctg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-kmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 254614b10c4a..950f296dfcf7 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -644,7 +644,7 @@ static char *compact_gfp_flags(char *gfp_flags)
 {
 	char *orig_flags = strdup(gfp_flags);
 	char *new_flags = NULL;
-	char *str, *pos;
+	char *str, *pos = NULL;
 	size_t len = 0;
 
 	if (orig_flags == NULL)
-- 
2.1.0


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

* [PATCH 05/14] perf tools: Add ARM64 perf_regs_load to support libunwind and enable testing
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 04/14] perf kmem: Fix compiler warning about may be accessing uninitialized variable Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 06/14] perf tests: Switch from open to openat Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Wang Nan, Namhyung Kim, Zefan Li, Arnaldo Carvalho de Melo

From: Wang Nan <wangnan0@huawei.com>

Newest libunwind does support ARM64, and perf is able to utilize it
also.

This patch enables the perf test dwarf unwind for arm64.

 Test result:
  # ./perf test unwind
  25: Test dwarf unwind                                      : Ok

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Link: http://lkml.kernel.org/r/1427461681-72971-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/arm64/Build                |  1 +
 tools/perf/arch/arm64/include/perf_regs.h  |  3 ++
 tools/perf/arch/arm64/tests/Build          |  2 +
 tools/perf/arch/arm64/tests/dwarf-unwind.c | 61 ++++++++++++++++++++++++++++++
 tools/perf/arch/arm64/tests/regs_load.S    | 46 ++++++++++++++++++++++
 tools/perf/tests/Build                     |  2 +-
 tools/perf/tests/builtin-test.c            |  2 +-
 tools/perf/tests/tests.h                   |  2 +-
 8 files changed, 116 insertions(+), 3 deletions(-)
 create mode 100644 tools/perf/arch/arm64/tests/Build
 create mode 100644 tools/perf/arch/arm64/tests/dwarf-unwind.c
 create mode 100644 tools/perf/arch/arm64/tests/regs_load.S

diff --git a/tools/perf/arch/arm64/Build b/tools/perf/arch/arm64/Build
index 54afe4a467e7..41bf61da476a 100644
--- a/tools/perf/arch/arm64/Build
+++ b/tools/perf/arch/arm64/Build
@@ -1 +1,2 @@
 libperf-y += util/
+libperf-$(CONFIG_DWARF_UNWIND) += tests/
diff --git a/tools/perf/arch/arm64/include/perf_regs.h b/tools/perf/arch/arm64/include/perf_regs.h
index 1d3f39c3aa56..4e5af27e3fbf 100644
--- a/tools/perf/arch/arm64/include/perf_regs.h
+++ b/tools/perf/arch/arm64/include/perf_regs.h
@@ -5,8 +5,11 @@
 #include <linux/types.h>
 #include <asm/perf_regs.h>
 
+void perf_regs_load(u64 *regs);
+
 #define PERF_REGS_MASK	((1ULL << PERF_REG_ARM64_MAX) - 1)
 #define PERF_REGS_MAX	PERF_REG_ARM64_MAX
+#define PERF_SAMPLE_REGS_ABI	PERF_SAMPLE_REGS_ABI_64
 
 #define PERF_REG_IP	PERF_REG_ARM64_PC
 #define PERF_REG_SP	PERF_REG_ARM64_SP
diff --git a/tools/perf/arch/arm64/tests/Build b/tools/perf/arch/arm64/tests/Build
new file mode 100644
index 000000000000..b30eff9bcc83
--- /dev/null
+++ b/tools/perf/arch/arm64/tests/Build
@@ -0,0 +1,2 @@
+libperf-y += regs_load.o
+libperf-y += dwarf-unwind.o
diff --git a/tools/perf/arch/arm64/tests/dwarf-unwind.c b/tools/perf/arch/arm64/tests/dwarf-unwind.c
new file mode 100644
index 000000000000..cf04a4c91c59
--- /dev/null
+++ b/tools/perf/arch/arm64/tests/dwarf-unwind.c
@@ -0,0 +1,61 @@
+#include <string.h>
+#include "perf_regs.h"
+#include "thread.h"
+#include "map.h"
+#include "event.h"
+#include "debug.h"
+#include "tests/tests.h"
+
+#define STACK_SIZE 8192
+
+static int sample_ustack(struct perf_sample *sample,
+		struct thread *thread, u64 *regs)
+{
+	struct stack_dump *stack = &sample->user_stack;
+	struct map *map;
+	unsigned long sp;
+	u64 stack_size, *buf;
+
+	buf = malloc(STACK_SIZE);
+	if (!buf) {
+		pr_debug("failed to allocate sample uregs data\n");
+		return -1;
+	}
+
+	sp = (unsigned long) regs[PERF_REG_ARM64_SP];
+
+	map = map_groups__find(thread->mg, MAP__VARIABLE, (u64) sp);
+	if (!map) {
+		pr_debug("failed to get stack map\n");
+		free(buf);
+		return -1;
+	}
+
+	stack_size = map->end - sp;
+	stack_size = stack_size > STACK_SIZE ? STACK_SIZE : stack_size;
+
+	memcpy(buf, (void *) sp, stack_size);
+	stack->data = (char *) buf;
+	stack->size = stack_size;
+	return 0;
+}
+
+int test__arch_unwind_sample(struct perf_sample *sample,
+		struct thread *thread)
+{
+	struct regs_dump *regs = &sample->user_regs;
+	u64 *buf;
+
+	buf = calloc(1, sizeof(u64) * PERF_REGS_MAX);
+	if (!buf) {
+		pr_debug("failed to allocate sample uregs data\n");
+		return -1;
+	}
+
+	perf_regs_load(buf);
+	regs->abi  = PERF_SAMPLE_REGS_ABI;
+	regs->regs = buf;
+	regs->mask = PERF_REGS_MASK;
+
+	return sample_ustack(sample, thread, buf);
+}
diff --git a/tools/perf/arch/arm64/tests/regs_load.S b/tools/perf/arch/arm64/tests/regs_load.S
new file mode 100644
index 000000000000..025b46e579a6
--- /dev/null
+++ b/tools/perf/arch/arm64/tests/regs_load.S
@@ -0,0 +1,46 @@
+#include <linux/linkage.h>
+
+.text
+.type perf_regs_load,%function
+#define STR_REG(r)	str x##r, [x0, 8 * r]
+#define LDR_REG(r)	ldr x##r, [x0, 8 * r]
+#define SP	(8 * 31)
+#define PC	(8 * 32)
+ENTRY(perf_regs_load)
+	STR_REG(0)
+	STR_REG(1)
+	STR_REG(2)
+	STR_REG(3)
+	STR_REG(4)
+	STR_REG(5)
+	STR_REG(6)
+	STR_REG(7)
+	STR_REG(8)
+	STR_REG(9)
+	STR_REG(10)
+	STR_REG(11)
+	STR_REG(12)
+	STR_REG(13)
+	STR_REG(14)
+	STR_REG(15)
+	STR_REG(16)
+	STR_REG(17)
+	STR_REG(18)
+	STR_REG(19)
+	STR_REG(20)
+	STR_REG(21)
+	STR_REG(22)
+	STR_REG(23)
+	STR_REG(24)
+	STR_REG(25)
+	STR_REG(26)
+	STR_REG(27)
+	STR_REG(28)
+	STR_REG(29)
+	STR_REG(30)
+	mov x1, sp
+	str x1, [x0, #SP]
+	str x30, [x0, #PC]
+	LDR_REG(1)
+	ret
+ENDPROC(perf_regs_load)
diff --git a/tools/perf/tests/Build b/tools/perf/tests/Build
index 6a8801b32017..67f48e6620e1 100644
--- a/tools/perf/tests/Build
+++ b/tools/perf/tests/Build
@@ -34,7 +34,7 @@ perf-y += kmod-path.o
 
 perf-$(CONFIG_X86) += perf-time-to-tsc.o
 
-ifeq ($(ARCH),$(filter $(ARCH),x86 arm))
+ifeq ($(ARCH),$(filter $(ARCH),x86 arm arm64))
 perf-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o
 endif
 
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index f42af98a5c16..b5b87a24a9e7 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -126,7 +126,7 @@ static struct test {
 		.desc = "Test parsing with no sample_id_all bit set",
 		.func = test__parse_no_sample_id_all,
 	},
-#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
+#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__)
 #ifdef HAVE_DWARF_UNWIND_SUPPORT
 	{
 		.desc = "Test dwarf unwind",
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
index a10eaf5c4767..87bcaf16ae99 100644
--- a/tools/perf/tests/tests.h
+++ b/tools/perf/tests/tests.h
@@ -62,7 +62,7 @@ int test__fdarray__filter(void);
 int test__fdarray__add(void);
 int test__kmod_path__parse(void);
 
-#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
+#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__)
 #ifdef HAVE_DWARF_UNWIND_SUPPORT
 struct thread;
 struct perf_sample;
-- 
2.1.0


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

* [PATCH 06/14] perf tests: Switch from open to openat
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 05/14] perf tools: Add ARM64 perf_regs_load to support libunwind and enable testing Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 07/14] perf tests: Aename open*.c to openat*.c Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Riku Voipio, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Riku Voipio <riku.voipio@linaro.org>

Multiple perf tests fail on arm64 due to missing open syscall:

 2: detect open syscall event                              : FAILED!

open(2) is a legacy syscall, replaced with openat(2) since 2.6.16.  Thus
new architectures in kernel, such as arm64, don't implement these legacy
syscalls.

The patch replaces all sys_enter_open events with sys_enter_openat,
renames the related tests and test output to avoid confusion.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429192375-13706-2-git-send-email-riku.voipio@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/builtin-test.c           | 12 ++++++------
 tools/perf/tests/open-syscall-all-cpus.c  | 12 ++++++------
 tools/perf/tests/open-syscall-tp-fields.c |  6 +++---
 tools/perf/tests/open-syscall.c           | 14 +++++++-------
 tools/perf/tests/parse-events.c           | 12 ++++++------
 tools/perf/tests/tests.h                  |  6 +++---
 6 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index b5b87a24a9e7..87b9961646e4 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -23,12 +23,12 @@ static struct test {
 		.func = test__vmlinux_matches_kallsyms,
 	},
 	{
-		.desc = "detect open syscall event",
-		.func = test__open_syscall_event,
+		.desc = "detect openat syscall event",
+		.func = test__openat_syscall_event,
 	},
 	{
-		.desc = "detect open syscall event on all cpus",
-		.func = test__open_syscall_event_on_all_cpus,
+		.desc = "detect openat syscall event on all cpus",
+		.func = test__openat_syscall_event_on_all_cpus,
 	},
 	{
 		.desc = "read samples using the mmap interface",
@@ -73,8 +73,8 @@ static struct test {
 		.func = test__perf_evsel__tp_sched_test,
 	},
 	{
-		.desc = "Generate and check syscalls:sys_enter_open event fields",
-		.func = test__syscall_open_tp_fields,
+		.desc = "Generate and check syscalls:sys_enter_openat event fields",
+		.func = test__syscall_openat_tp_fields,
 	},
 	{
 		.desc = "struct perf_event_attr setup",
diff --git a/tools/perf/tests/open-syscall-all-cpus.c b/tools/perf/tests/open-syscall-all-cpus.c
index 3ec885c48f8f..e34dfdf96b5a 100644
--- a/tools/perf/tests/open-syscall-all-cpus.c
+++ b/tools/perf/tests/open-syscall-all-cpus.c
@@ -4,12 +4,12 @@
 #include "cpumap.h"
 #include "debug.h"
 
-int test__open_syscall_event_on_all_cpus(void)
+int test__openat_syscall_event_on_all_cpus(void)
 {
 	int err = -1, fd, cpu;
 	struct cpu_map *cpus;
 	struct perf_evsel *evsel;
-	unsigned int nr_open_calls = 111, i;
+	unsigned int nr_openat_calls = 111, i;
 	cpu_set_t cpu_set;
 	struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
 	char sbuf[STRERR_BUFSIZE];
@@ -27,7 +27,7 @@ int test__open_syscall_event_on_all_cpus(void)
 
 	CPU_ZERO(&cpu_set);
 
-	evsel = perf_evsel__newtp("syscalls", "sys_enter_open");
+	evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
 	if (evsel == NULL) {
 		if (tracefs_configured())
 			pr_debug("is tracefs mounted on /sys/kernel/tracing?\n");
@@ -46,7 +46,7 @@ int test__open_syscall_event_on_all_cpus(void)
 	}
 
 	for (cpu = 0; cpu < cpus->nr; ++cpu) {
-		unsigned int ncalls = nr_open_calls + cpu;
+		unsigned int ncalls = nr_openat_calls + cpu;
 		/*
 		 * XXX eventually lift this restriction in a way that
 		 * keeps perf building on older glibc installations
@@ -66,7 +66,7 @@ int test__open_syscall_event_on_all_cpus(void)
 			goto out_close_fd;
 		}
 		for (i = 0; i < ncalls; ++i) {
-			fd = open("/etc/passwd", O_RDONLY);
+			fd = openat(0, "/etc/passwd", O_RDONLY);
 			close(fd);
 		}
 		CPU_CLR(cpus->map[cpu], &cpu_set);
@@ -96,7 +96,7 @@ int test__open_syscall_event_on_all_cpus(void)
 			break;
 		}
 
-		expected = nr_open_calls + cpu;
+		expected = nr_openat_calls + cpu;
 		if (evsel->counts->cpu[cpu].val != expected) {
 			pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls on cpu %d, got %" PRIu64 "\n",
 				 expected, cpus->map[cpu], evsel->counts->cpu[cpu].val);
diff --git a/tools/perf/tests/open-syscall-tp-fields.c b/tools/perf/tests/open-syscall-tp-fields.c
index 127dcae0b760..6245221479d7 100644
--- a/tools/perf/tests/open-syscall-tp-fields.c
+++ b/tools/perf/tests/open-syscall-tp-fields.c
@@ -5,7 +5,7 @@
 #include "tests.h"
 #include "debug.h"
 
-int test__syscall_open_tp_fields(void)
+int test__syscall_openat_tp_fields(void)
 {
 	struct record_opts opts = {
 		.target = {
@@ -29,7 +29,7 @@ int test__syscall_open_tp_fields(void)
 		goto out;
 	}
 
-	evsel = perf_evsel__newtp("syscalls", "sys_enter_open");
+	evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
 	if (evsel == NULL) {
 		pr_debug("%s: perf_evsel__newtp\n", __func__);
 		goto out_delete_evlist;
@@ -66,7 +66,7 @@ int test__syscall_open_tp_fields(void)
 	/*
 	 * Generate the event:
 	 */
-	open(filename, flags);
+	openat(AT_FDCWD, filename, flags);
 
 	while (1) {
 		int before = nr_events;
diff --git a/tools/perf/tests/open-syscall.c b/tools/perf/tests/open-syscall.c
index 07aa319bf334..9f9491bb8e48 100644
--- a/tools/perf/tests/open-syscall.c
+++ b/tools/perf/tests/open-syscall.c
@@ -3,11 +3,11 @@
 #include "debug.h"
 #include "tests.h"
 
-int test__open_syscall_event(void)
+int test__openat_syscall_event(void)
 {
 	int err = -1, fd;
 	struct perf_evsel *evsel;
-	unsigned int nr_open_calls = 111, i;
+	unsigned int nr_openat_calls = 111, i;
 	struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
 	char sbuf[STRERR_BUFSIZE];
 
@@ -16,7 +16,7 @@ int test__open_syscall_event(void)
 		return -1;
 	}
 
-	evsel = perf_evsel__newtp("syscalls", "sys_enter_open");
+	evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
 	if (evsel == NULL) {
 		if (tracefs_configured())
 			pr_debug("is tracefs mounted on /sys/kernel/tracing?\n");
@@ -34,8 +34,8 @@ int test__open_syscall_event(void)
 		goto out_evsel_delete;
 	}
 
-	for (i = 0; i < nr_open_calls; ++i) {
-		fd = open("/etc/passwd", O_RDONLY);
+	for (i = 0; i < nr_openat_calls; ++i) {
+		fd = openat(0, "/etc/passwd", O_RDONLY);
 		close(fd);
 	}
 
@@ -44,9 +44,9 @@ int test__open_syscall_event(void)
 		goto out_close_fd;
 	}
 
-	if (evsel->counts->cpu[0].val != nr_open_calls) {
+	if (evsel->counts->cpu[0].val != nr_openat_calls) {
 		pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls, got %" PRIu64 "\n",
-			 nr_open_calls, evsel->counts->cpu[0].val);
+			 nr_openat_calls, evsel->counts->cpu[0].val);
 		goto out_close_fd;
 	}
 
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 82d2a1636f7f..d76963f7ad3d 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -427,7 +427,7 @@ static int test__checkevent_list(struct perf_evlist *evlist)
 	TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv);
 	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
 
-	/* syscalls:sys_enter_open:k */
+	/* syscalls:sys_enter_openat:k */
 	evsel = perf_evsel__next(evsel);
 	TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->attr.type);
 	TEST_ASSERT_VAL("wrong sample_type",
@@ -665,7 +665,7 @@ static int test__group3(struct perf_evlist *evlist __maybe_unused)
 	TEST_ASSERT_VAL("wrong number of entries", 5 == evlist->nr_entries);
 	TEST_ASSERT_VAL("wrong number of groups", 2 == evlist->nr_groups);
 
-	/* group1 syscalls:sys_enter_open:H */
+	/* group1 syscalls:sys_enter_openat:H */
 	evsel = leader = perf_evlist__first(evlist);
 	TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->attr.type);
 	TEST_ASSERT_VAL("wrong sample_type",
@@ -1293,7 +1293,7 @@ struct evlist_test {
 
 static struct evlist_test test__events[] = {
 	{
-		.name  = "syscalls:sys_enter_open",
+		.name  = "syscalls:sys_enter_openat",
 		.check = test__checkevent_tracepoint,
 		.id    = 0,
 	},
@@ -1353,7 +1353,7 @@ static struct evlist_test test__events[] = {
 		.id    = 11,
 	},
 	{
-		.name  = "syscalls:sys_enter_open:k",
+		.name  = "syscalls:sys_enter_openat:k",
 		.check = test__checkevent_tracepoint_modifier,
 		.id    = 12,
 	},
@@ -1408,7 +1408,7 @@ static struct evlist_test test__events[] = {
 		.id    = 22,
 	},
 	{
-		.name  = "r1,syscalls:sys_enter_open:k,1:1:hp",
+		.name  = "r1,syscalls:sys_enter_openat:k,1:1:hp",
 		.check = test__checkevent_list,
 		.id    = 23,
 	},
@@ -1443,7 +1443,7 @@ static struct evlist_test test__events[] = {
 		.id    = 29,
 	},
 	{
-		.name  = "group1{syscalls:sys_enter_open:H,cycles:kppp},group2{cycles,1:3}:G,instructions:u",
+		.name  = "group1{syscalls:sys_enter_openat:H,cycles:kppp},group2{cycles,1:3}:G,instructions:u",
 		.check = test__group3,
 		.id    = 30,
 	},
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
index 87bcaf16ae99..8e5038b48ba8 100644
--- a/tools/perf/tests/tests.h
+++ b/tools/perf/tests/tests.h
@@ -26,14 +26,14 @@ enum {
 
 /* Tests */
 int test__vmlinux_matches_kallsyms(void);
-int test__open_syscall_event(void);
-int test__open_syscall_event_on_all_cpus(void);
+int test__openat_syscall_event(void);
+int test__openat_syscall_event_on_all_cpus(void);
 int test__basic_mmap(void);
 int test__PERF_RECORD(void);
 int test__rdpmc(void);
 int test__perf_evsel__roundtrip_name_test(void);
 int test__perf_evsel__tp_sched_test(void);
-int test__syscall_open_tp_fields(void);
+int test__syscall_openat_tp_fields(void);
 int test__pmu(void);
 int test__attr(void);
 int test__dso_data(void);
-- 
2.1.0


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

* [PATCH 07/14] perf tests: Aename open*.c to openat*.c
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 06/14] perf tests: Switch from open to openat Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 08/14] perf tests: Remove getpgrp from mmap-basic Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Riku Voipio, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Riku Voipio <riku.voipio@linaro.org>

Since the test being tested is now openat rather than open, rename the
files to make it explicit. The patch is separeted from the first to make
it simpler to deal with any potential conflicts in the Makefile

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429192375-13706-3-git-send-email-riku.voipio@linaro.org
[ Fixed it up wrt Build files ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/Build                      |   6 +-
 tools/perf/tests/open-syscall-all-cpus.c    | 115 --------------------------
 tools/perf/tests/open-syscall-tp-fields.c   | 121 ----------------------------
 tools/perf/tests/open-syscall.c             |  61 --------------
 tools/perf/tests/openat-syscall-all-cpus.c  | 115 ++++++++++++++++++++++++++
 tools/perf/tests/openat-syscall-tp-fields.c | 121 ++++++++++++++++++++++++++++
 tools/perf/tests/openat-syscall.c           |  61 ++++++++++++++
 7 files changed, 300 insertions(+), 300 deletions(-)
 delete mode 100644 tools/perf/tests/open-syscall-all-cpus.c
 delete mode 100644 tools/perf/tests/open-syscall-tp-fields.c
 delete mode 100644 tools/perf/tests/open-syscall.c
 create mode 100644 tools/perf/tests/openat-syscall-all-cpus.c
 create mode 100644 tools/perf/tests/openat-syscall-tp-fields.c
 create mode 100644 tools/perf/tests/openat-syscall.c

diff --git a/tools/perf/tests/Build b/tools/perf/tests/Build
index 67f48e6620e1..ee41e705b2eb 100644
--- a/tools/perf/tests/Build
+++ b/tools/perf/tests/Build
@@ -3,9 +3,9 @@ perf-y += parse-events.o
 perf-y += dso-data.o
 perf-y += attr.o
 perf-y += vmlinux-kallsyms.o
-perf-y += open-syscall.o
-perf-y += open-syscall-all-cpus.o
-perf-y += open-syscall-tp-fields.o
+perf-y += openat-syscall.o
+perf-y += openat-syscall-all-cpus.o
+perf-y += openat-syscall-tp-fields.o
 perf-y += mmap-basic.o
 perf-y += perf-record.o
 perf-y += rdpmc.o
diff --git a/tools/perf/tests/open-syscall-all-cpus.c b/tools/perf/tests/open-syscall-all-cpus.c
deleted file mode 100644
index e34dfdf96b5a..000000000000
--- a/tools/perf/tests/open-syscall-all-cpus.c
+++ /dev/null
@@ -1,115 +0,0 @@
-#include "evsel.h"
-#include "tests.h"
-#include "thread_map.h"
-#include "cpumap.h"
-#include "debug.h"
-
-int test__openat_syscall_event_on_all_cpus(void)
-{
-	int err = -1, fd, cpu;
-	struct cpu_map *cpus;
-	struct perf_evsel *evsel;
-	unsigned int nr_openat_calls = 111, i;
-	cpu_set_t cpu_set;
-	struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
-	char sbuf[STRERR_BUFSIZE];
-
-	if (threads == NULL) {
-		pr_debug("thread_map__new\n");
-		return -1;
-	}
-
-	cpus = cpu_map__new(NULL);
-	if (cpus == NULL) {
-		pr_debug("cpu_map__new\n");
-		goto out_thread_map_delete;
-	}
-
-	CPU_ZERO(&cpu_set);
-
-	evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
-	if (evsel == NULL) {
-		if (tracefs_configured())
-			pr_debug("is tracefs mounted on /sys/kernel/tracing?\n");
-		else if (debugfs_configured())
-			pr_debug("is debugfs mounted on /sys/kernel/debug?\n");
-		else
-			pr_debug("Neither tracefs or debugfs is enabled in this kernel\n");
-		goto out_thread_map_delete;
-	}
-
-	if (perf_evsel__open(evsel, cpus, threads) < 0) {
-		pr_debug("failed to open counter: %s, "
-			 "tweak /proc/sys/kernel/perf_event_paranoid?\n",
-			 strerror_r(errno, sbuf, sizeof(sbuf)));
-		goto out_evsel_delete;
-	}
-
-	for (cpu = 0; cpu < cpus->nr; ++cpu) {
-		unsigned int ncalls = nr_openat_calls + cpu;
-		/*
-		 * XXX eventually lift this restriction in a way that
-		 * keeps perf building on older glibc installations
-		 * without CPU_ALLOC. 1024 cpus in 2010 still seems
-		 * a reasonable upper limit tho :-)
-		 */
-		if (cpus->map[cpu] >= CPU_SETSIZE) {
-			pr_debug("Ignoring CPU %d\n", cpus->map[cpu]);
-			continue;
-		}
-
-		CPU_SET(cpus->map[cpu], &cpu_set);
-		if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set) < 0) {
-			pr_debug("sched_setaffinity() failed on CPU %d: %s ",
-				 cpus->map[cpu],
-				 strerror_r(errno, sbuf, sizeof(sbuf)));
-			goto out_close_fd;
-		}
-		for (i = 0; i < ncalls; ++i) {
-			fd = openat(0, "/etc/passwd", O_RDONLY);
-			close(fd);
-		}
-		CPU_CLR(cpus->map[cpu], &cpu_set);
-	}
-
-	/*
-	 * Here we need to explicitely preallocate the counts, as if
-	 * we use the auto allocation it will allocate just for 1 cpu,
-	 * as we start by cpu 0.
-	 */
-	if (perf_evsel__alloc_counts(evsel, cpus->nr) < 0) {
-		pr_debug("perf_evsel__alloc_counts(ncpus=%d)\n", cpus->nr);
-		goto out_close_fd;
-	}
-
-	err = 0;
-
-	for (cpu = 0; cpu < cpus->nr; ++cpu) {
-		unsigned int expected;
-
-		if (cpus->map[cpu] >= CPU_SETSIZE)
-			continue;
-
-		if (perf_evsel__read_on_cpu(evsel, cpu, 0) < 0) {
-			pr_debug("perf_evsel__read_on_cpu\n");
-			err = -1;
-			break;
-		}
-
-		expected = nr_openat_calls + cpu;
-		if (evsel->counts->cpu[cpu].val != expected) {
-			pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls on cpu %d, got %" PRIu64 "\n",
-				 expected, cpus->map[cpu], evsel->counts->cpu[cpu].val);
-			err = -1;
-		}
-	}
-
-	perf_evsel__free_counts(evsel);
-out_close_fd:
-	perf_evsel__close_fd(evsel, 1, threads->nr);
-out_evsel_delete:
-	perf_evsel__delete(evsel);
-out_thread_map_delete:
-	thread_map__delete(threads);
-	return err;
-}
diff --git a/tools/perf/tests/open-syscall-tp-fields.c b/tools/perf/tests/open-syscall-tp-fields.c
deleted file mode 100644
index 6245221479d7..000000000000
--- a/tools/perf/tests/open-syscall-tp-fields.c
+++ /dev/null
@@ -1,121 +0,0 @@
-#include "perf.h"
-#include "evlist.h"
-#include "evsel.h"
-#include "thread_map.h"
-#include "tests.h"
-#include "debug.h"
-
-int test__syscall_openat_tp_fields(void)
-{
-	struct record_opts opts = {
-		.target = {
-			.uid = UINT_MAX,
-			.uses_mmap = true,
-		},
-		.no_buffering = true,
-		.freq	      = 1,
-		.mmap_pages   = 256,
-		.raw_samples  = true,
-	};
-	const char *filename = "/etc/passwd";
-	int flags = O_RDONLY | O_DIRECTORY;
-	struct perf_evlist *evlist = perf_evlist__new();
-	struct perf_evsel *evsel;
-	int err = -1, i, nr_events = 0, nr_polls = 0;
-	char sbuf[STRERR_BUFSIZE];
-
-	if (evlist == NULL) {
-		pr_debug("%s: perf_evlist__new\n", __func__);
-		goto out;
-	}
-
-	evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
-	if (evsel == NULL) {
-		pr_debug("%s: perf_evsel__newtp\n", __func__);
-		goto out_delete_evlist;
-	}
-
-	perf_evlist__add(evlist, evsel);
-
-	err = perf_evlist__create_maps(evlist, &opts.target);
-	if (err < 0) {
-		pr_debug("%s: perf_evlist__create_maps\n", __func__);
-		goto out_delete_evlist;
-	}
-
-	perf_evsel__config(evsel, &opts);
-
-	evlist->threads->map[0] = getpid();
-
-	err = perf_evlist__open(evlist);
-	if (err < 0) {
-		pr_debug("perf_evlist__open: %s\n",
-			 strerror_r(errno, sbuf, sizeof(sbuf)));
-		goto out_delete_evlist;
-	}
-
-	err = perf_evlist__mmap(evlist, UINT_MAX, false);
-	if (err < 0) {
-		pr_debug("perf_evlist__mmap: %s\n",
-			 strerror_r(errno, sbuf, sizeof(sbuf)));
-		goto out_delete_evlist;
-	}
-
-	perf_evlist__enable(evlist);
-
-	/*
-	 * Generate the event:
-	 */
-	openat(AT_FDCWD, filename, flags);
-
-	while (1) {
-		int before = nr_events;
-
-		for (i = 0; i < evlist->nr_mmaps; i++) {
-			union perf_event *event;
-
-			while ((event = perf_evlist__mmap_read(evlist, i)) != NULL) {
-				const u32 type = event->header.type;
-				int tp_flags;
-				struct perf_sample sample;
-
-				++nr_events;
-
-				if (type != PERF_RECORD_SAMPLE) {
-					perf_evlist__mmap_consume(evlist, i);
-					continue;
-				}
-
-				err = perf_evsel__parse_sample(evsel, event, &sample);
-				if (err) {
-					pr_err("Can't parse sample, err = %d\n", err);
-					goto out_delete_evlist;
-				}
-
-				tp_flags = perf_evsel__intval(evsel, &sample, "flags");
-
-				if (flags != tp_flags) {
-					pr_debug("%s: Expected flags=%#x, got %#x\n",
-						 __func__, flags, tp_flags);
-					goto out_delete_evlist;
-				}
-
-				goto out_ok;
-			}
-		}
-
-		if (nr_events == before)
-			perf_evlist__poll(evlist, 10);
-
-		if (++nr_polls > 5) {
-			pr_debug("%s: no events!\n", __func__);
-			goto out_delete_evlist;
-		}
-	}
-out_ok:
-	err = 0;
-out_delete_evlist:
-	perf_evlist__delete(evlist);
-out:
-	return err;
-}
diff --git a/tools/perf/tests/open-syscall.c b/tools/perf/tests/open-syscall.c
deleted file mode 100644
index 9f9491bb8e48..000000000000
--- a/tools/perf/tests/open-syscall.c
+++ /dev/null
@@ -1,61 +0,0 @@
-#include "thread_map.h"
-#include "evsel.h"
-#include "debug.h"
-#include "tests.h"
-
-int test__openat_syscall_event(void)
-{
-	int err = -1, fd;
-	struct perf_evsel *evsel;
-	unsigned int nr_openat_calls = 111, i;
-	struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
-	char sbuf[STRERR_BUFSIZE];
-
-	if (threads == NULL) {
-		pr_debug("thread_map__new\n");
-		return -1;
-	}
-
-	evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
-	if (evsel == NULL) {
-		if (tracefs_configured())
-			pr_debug("is tracefs mounted on /sys/kernel/tracing?\n");
-		else if (debugfs_configured())
-			pr_debug("is debugfs mounted on /sys/kernel/debug?\n");
-		else
-			pr_debug("Neither tracefs or debugfs is enabled in this kernel\n");
-		goto out_thread_map_delete;
-	}
-
-	if (perf_evsel__open_per_thread(evsel, threads) < 0) {
-		pr_debug("failed to open counter: %s, "
-			 "tweak /proc/sys/kernel/perf_event_paranoid?\n",
-			 strerror_r(errno, sbuf, sizeof(sbuf)));
-		goto out_evsel_delete;
-	}
-
-	for (i = 0; i < nr_openat_calls; ++i) {
-		fd = openat(0, "/etc/passwd", O_RDONLY);
-		close(fd);
-	}
-
-	if (perf_evsel__read_on_cpu(evsel, 0, 0) < 0) {
-		pr_debug("perf_evsel__read_on_cpu\n");
-		goto out_close_fd;
-	}
-
-	if (evsel->counts->cpu[0].val != nr_openat_calls) {
-		pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls, got %" PRIu64 "\n",
-			 nr_openat_calls, evsel->counts->cpu[0].val);
-		goto out_close_fd;
-	}
-
-	err = 0;
-out_close_fd:
-	perf_evsel__close_fd(evsel, 1, threads->nr);
-out_evsel_delete:
-	perf_evsel__delete(evsel);
-out_thread_map_delete:
-	thread_map__delete(threads);
-	return err;
-}
diff --git a/tools/perf/tests/openat-syscall-all-cpus.c b/tools/perf/tests/openat-syscall-all-cpus.c
new file mode 100644
index 000000000000..e34dfdf96b5a
--- /dev/null
+++ b/tools/perf/tests/openat-syscall-all-cpus.c
@@ -0,0 +1,115 @@
+#include "evsel.h"
+#include "tests.h"
+#include "thread_map.h"
+#include "cpumap.h"
+#include "debug.h"
+
+int test__openat_syscall_event_on_all_cpus(void)
+{
+	int err = -1, fd, cpu;
+	struct cpu_map *cpus;
+	struct perf_evsel *evsel;
+	unsigned int nr_openat_calls = 111, i;
+	cpu_set_t cpu_set;
+	struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
+	char sbuf[STRERR_BUFSIZE];
+
+	if (threads == NULL) {
+		pr_debug("thread_map__new\n");
+		return -1;
+	}
+
+	cpus = cpu_map__new(NULL);
+	if (cpus == NULL) {
+		pr_debug("cpu_map__new\n");
+		goto out_thread_map_delete;
+	}
+
+	CPU_ZERO(&cpu_set);
+
+	evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
+	if (evsel == NULL) {
+		if (tracefs_configured())
+			pr_debug("is tracefs mounted on /sys/kernel/tracing?\n");
+		else if (debugfs_configured())
+			pr_debug("is debugfs mounted on /sys/kernel/debug?\n");
+		else
+			pr_debug("Neither tracefs or debugfs is enabled in this kernel\n");
+		goto out_thread_map_delete;
+	}
+
+	if (perf_evsel__open(evsel, cpus, threads) < 0) {
+		pr_debug("failed to open counter: %s, "
+			 "tweak /proc/sys/kernel/perf_event_paranoid?\n",
+			 strerror_r(errno, sbuf, sizeof(sbuf)));
+		goto out_evsel_delete;
+	}
+
+	for (cpu = 0; cpu < cpus->nr; ++cpu) {
+		unsigned int ncalls = nr_openat_calls + cpu;
+		/*
+		 * XXX eventually lift this restriction in a way that
+		 * keeps perf building on older glibc installations
+		 * without CPU_ALLOC. 1024 cpus in 2010 still seems
+		 * a reasonable upper limit tho :-)
+		 */
+		if (cpus->map[cpu] >= CPU_SETSIZE) {
+			pr_debug("Ignoring CPU %d\n", cpus->map[cpu]);
+			continue;
+		}
+
+		CPU_SET(cpus->map[cpu], &cpu_set);
+		if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set) < 0) {
+			pr_debug("sched_setaffinity() failed on CPU %d: %s ",
+				 cpus->map[cpu],
+				 strerror_r(errno, sbuf, sizeof(sbuf)));
+			goto out_close_fd;
+		}
+		for (i = 0; i < ncalls; ++i) {
+			fd = openat(0, "/etc/passwd", O_RDONLY);
+			close(fd);
+		}
+		CPU_CLR(cpus->map[cpu], &cpu_set);
+	}
+
+	/*
+	 * Here we need to explicitely preallocate the counts, as if
+	 * we use the auto allocation it will allocate just for 1 cpu,
+	 * as we start by cpu 0.
+	 */
+	if (perf_evsel__alloc_counts(evsel, cpus->nr) < 0) {
+		pr_debug("perf_evsel__alloc_counts(ncpus=%d)\n", cpus->nr);
+		goto out_close_fd;
+	}
+
+	err = 0;
+
+	for (cpu = 0; cpu < cpus->nr; ++cpu) {
+		unsigned int expected;
+
+		if (cpus->map[cpu] >= CPU_SETSIZE)
+			continue;
+
+		if (perf_evsel__read_on_cpu(evsel, cpu, 0) < 0) {
+			pr_debug("perf_evsel__read_on_cpu\n");
+			err = -1;
+			break;
+		}
+
+		expected = nr_openat_calls + cpu;
+		if (evsel->counts->cpu[cpu].val != expected) {
+			pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls on cpu %d, got %" PRIu64 "\n",
+				 expected, cpus->map[cpu], evsel->counts->cpu[cpu].val);
+			err = -1;
+		}
+	}
+
+	perf_evsel__free_counts(evsel);
+out_close_fd:
+	perf_evsel__close_fd(evsel, 1, threads->nr);
+out_evsel_delete:
+	perf_evsel__delete(evsel);
+out_thread_map_delete:
+	thread_map__delete(threads);
+	return err;
+}
diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c
new file mode 100644
index 000000000000..6245221479d7
--- /dev/null
+++ b/tools/perf/tests/openat-syscall-tp-fields.c
@@ -0,0 +1,121 @@
+#include "perf.h"
+#include "evlist.h"
+#include "evsel.h"
+#include "thread_map.h"
+#include "tests.h"
+#include "debug.h"
+
+int test__syscall_openat_tp_fields(void)
+{
+	struct record_opts opts = {
+		.target = {
+			.uid = UINT_MAX,
+			.uses_mmap = true,
+		},
+		.no_buffering = true,
+		.freq	      = 1,
+		.mmap_pages   = 256,
+		.raw_samples  = true,
+	};
+	const char *filename = "/etc/passwd";
+	int flags = O_RDONLY | O_DIRECTORY;
+	struct perf_evlist *evlist = perf_evlist__new();
+	struct perf_evsel *evsel;
+	int err = -1, i, nr_events = 0, nr_polls = 0;
+	char sbuf[STRERR_BUFSIZE];
+
+	if (evlist == NULL) {
+		pr_debug("%s: perf_evlist__new\n", __func__);
+		goto out;
+	}
+
+	evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
+	if (evsel == NULL) {
+		pr_debug("%s: perf_evsel__newtp\n", __func__);
+		goto out_delete_evlist;
+	}
+
+	perf_evlist__add(evlist, evsel);
+
+	err = perf_evlist__create_maps(evlist, &opts.target);
+	if (err < 0) {
+		pr_debug("%s: perf_evlist__create_maps\n", __func__);
+		goto out_delete_evlist;
+	}
+
+	perf_evsel__config(evsel, &opts);
+
+	evlist->threads->map[0] = getpid();
+
+	err = perf_evlist__open(evlist);
+	if (err < 0) {
+		pr_debug("perf_evlist__open: %s\n",
+			 strerror_r(errno, sbuf, sizeof(sbuf)));
+		goto out_delete_evlist;
+	}
+
+	err = perf_evlist__mmap(evlist, UINT_MAX, false);
+	if (err < 0) {
+		pr_debug("perf_evlist__mmap: %s\n",
+			 strerror_r(errno, sbuf, sizeof(sbuf)));
+		goto out_delete_evlist;
+	}
+
+	perf_evlist__enable(evlist);
+
+	/*
+	 * Generate the event:
+	 */
+	openat(AT_FDCWD, filename, flags);
+
+	while (1) {
+		int before = nr_events;
+
+		for (i = 0; i < evlist->nr_mmaps; i++) {
+			union perf_event *event;
+
+			while ((event = perf_evlist__mmap_read(evlist, i)) != NULL) {
+				const u32 type = event->header.type;
+				int tp_flags;
+				struct perf_sample sample;
+
+				++nr_events;
+
+				if (type != PERF_RECORD_SAMPLE) {
+					perf_evlist__mmap_consume(evlist, i);
+					continue;
+				}
+
+				err = perf_evsel__parse_sample(evsel, event, &sample);
+				if (err) {
+					pr_err("Can't parse sample, err = %d\n", err);
+					goto out_delete_evlist;
+				}
+
+				tp_flags = perf_evsel__intval(evsel, &sample, "flags");
+
+				if (flags != tp_flags) {
+					pr_debug("%s: Expected flags=%#x, got %#x\n",
+						 __func__, flags, tp_flags);
+					goto out_delete_evlist;
+				}
+
+				goto out_ok;
+			}
+		}
+
+		if (nr_events == before)
+			perf_evlist__poll(evlist, 10);
+
+		if (++nr_polls > 5) {
+			pr_debug("%s: no events!\n", __func__);
+			goto out_delete_evlist;
+		}
+	}
+out_ok:
+	err = 0;
+out_delete_evlist:
+	perf_evlist__delete(evlist);
+out:
+	return err;
+}
diff --git a/tools/perf/tests/openat-syscall.c b/tools/perf/tests/openat-syscall.c
new file mode 100644
index 000000000000..9f9491bb8e48
--- /dev/null
+++ b/tools/perf/tests/openat-syscall.c
@@ -0,0 +1,61 @@
+#include "thread_map.h"
+#include "evsel.h"
+#include "debug.h"
+#include "tests.h"
+
+int test__openat_syscall_event(void)
+{
+	int err = -1, fd;
+	struct perf_evsel *evsel;
+	unsigned int nr_openat_calls = 111, i;
+	struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
+	char sbuf[STRERR_BUFSIZE];
+
+	if (threads == NULL) {
+		pr_debug("thread_map__new\n");
+		return -1;
+	}
+
+	evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
+	if (evsel == NULL) {
+		if (tracefs_configured())
+			pr_debug("is tracefs mounted on /sys/kernel/tracing?\n");
+		else if (debugfs_configured())
+			pr_debug("is debugfs mounted on /sys/kernel/debug?\n");
+		else
+			pr_debug("Neither tracefs or debugfs is enabled in this kernel\n");
+		goto out_thread_map_delete;
+	}
+
+	if (perf_evsel__open_per_thread(evsel, threads) < 0) {
+		pr_debug("failed to open counter: %s, "
+			 "tweak /proc/sys/kernel/perf_event_paranoid?\n",
+			 strerror_r(errno, sbuf, sizeof(sbuf)));
+		goto out_evsel_delete;
+	}
+
+	for (i = 0; i < nr_openat_calls; ++i) {
+		fd = openat(0, "/etc/passwd", O_RDONLY);
+		close(fd);
+	}
+
+	if (perf_evsel__read_on_cpu(evsel, 0, 0) < 0) {
+		pr_debug("perf_evsel__read_on_cpu\n");
+		goto out_close_fd;
+	}
+
+	if (evsel->counts->cpu[0].val != nr_openat_calls) {
+		pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls, got %" PRIu64 "\n",
+			 nr_openat_calls, evsel->counts->cpu[0].val);
+		goto out_close_fd;
+	}
+
+	err = 0;
+out_close_fd:
+	perf_evsel__close_fd(evsel, 1, threads->nr);
+out_evsel_delete:
+	perf_evsel__delete(evsel);
+out_thread_map_delete:
+	thread_map__delete(threads);
+	return err;
+}
-- 
2.1.0


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

* [PATCH 08/14] perf tests: Remove getpgrp from mmap-basic
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 07/14] perf tests: Aename open*.c to openat*.c Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 09/14] perf machine: Adopt findnew_kernel method Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Riku Voipio, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Riku Voipio <riku.voipio@linaro.org>

mmap-basic fails on arm64.

 4: read samples using the mmap interface: read samples using the mmap interface: FAILED!

This is because arm64 doesn't come with getpgrp() syscall. The syscall
is a BSD compatibility wrapper, Archs that don't define
__ARCH_WANT_SYS_GETPGRP do not have this. Remove it, since getpgid is
already used in the testcase.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429192375-13706-4-git-send-email-riku.voipio@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/mmap-basic.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c
index 9b9622a33932..5855cf471210 100644
--- a/tools/perf/tests/mmap-basic.c
+++ b/tools/perf/tests/mmap-basic.c
@@ -23,10 +23,8 @@ int test__basic_mmap(void)
 	struct cpu_map *cpus;
 	struct perf_evlist *evlist;
 	cpu_set_t cpu_set;
-	const char *syscall_names[] = { "getsid", "getppid", "getpgrp",
-					"getpgid", };
-	pid_t (*syscalls[])(void) = { (void *)getsid, getppid, getpgrp,
-				      (void*)getpgid };
+	const char *syscall_names[] = { "getsid", "getppid", "getpgid", };
+	pid_t (*syscalls[])(void) = { (void *)getsid, getppid, (void*)getpgid };
 #define nsyscalls ARRAY_SIZE(syscall_names)
 	unsigned int nr_events[nsyscalls],
 		     expected_nr_events[nsyscalls], i, j;
-- 
2.1.0


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

* [PATCH 09/14] perf machine: Adopt findnew_kernel method
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 08/14] perf tests: Remove getpgrp from mmap-basic Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 10/14] perf machine: No need to have two DSOs lists Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

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

It never was a 'struct dso' method, so fix that by rename
dso__kernel_findnew() to machine__findnew_kernel().

At some point I'll move it all to the machine.[ch] files, for now
lets ease patch review by not moving too much stuff.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-zrxmblgsg5vx0iv4rhvq2f6l@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/dso.c     |  4 ++--
 tools/perf/util/dso.h     |  4 ++--
 tools/perf/util/machine.c | 11 +++++------
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 7e11a700303f..fe5236833164 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -827,8 +827,8 @@ struct map *dso__new_map(const char *name)
 	return map;
 }
 
-struct dso *dso__kernel_findnew(struct machine *machine, const char *name,
-		    const char *short_name, int dso_type)
+struct dso *machine__findnew_kernel(struct machine *machine, const char *name,
+				    const char *short_name, int dso_type)
 {
 	/*
 	 * The kernel dso could be created by build_id processing.
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index bcec06ad73a2..24a507a54147 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -294,8 +294,8 @@ ssize_t dso__data_read_addr(struct dso *dso, struct map *map,
 bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by);
 
 struct map *dso__new_map(const char *name);
-struct dso *dso__kernel_findnew(struct machine *machine, const char *name,
-				const char *short_name, int dso_type);
+struct dso *machine__findnew_kernel(struct machine *machine, const char *name,
+				    const char *short_name, int dso_type);
 
 void dsos__add(struct dsos *dsos, struct dso *dso);
 struct dso *dsos__addnew(struct dsos *dsos, const char *name);
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 0c0e61cce577..8934dc4345fe 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -640,9 +640,8 @@ static struct dso *machine__get_kernel(struct machine *machine)
 		if (!vmlinux_name)
 			vmlinux_name = "[kernel.kallsyms]";
 
-		kernel = dso__kernel_findnew(machine, vmlinux_name,
-					     "[kernel]",
-					     DSO_TYPE_KERNEL);
+		kernel = machine__findnew_kernel(machine, vmlinux_name,
+						 "[kernel]", DSO_TYPE_KERNEL);
 	} else {
 		char bf[PATH_MAX];
 
@@ -652,9 +651,9 @@ static struct dso *machine__get_kernel(struct machine *machine)
 			vmlinux_name = machine__mmap_name(machine, bf,
 							  sizeof(bf));
 
-		kernel = dso__kernel_findnew(machine, vmlinux_name,
-					     "[guest.kernel]",
-					     DSO_TYPE_GUEST_KERNEL);
+		kernel = machine__findnew_kernel(machine, vmlinux_name,
+						 "[guest.kernel]",
+						 DSO_TYPE_GUEST_KERNEL);
 	}
 
 	if (kernel != NULL && (!kernel->has_build_id))
-- 
2.1.0


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

* [PATCH 10/14] perf machine: No need to have two DSOs lists
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 09/14] perf machine: Adopt findnew_kernel method Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 11/14] perf machine: Introduce machine__findnew_dso() method Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

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

We can, given a DSO, figure out if it is a kernel, a kernel module or
a userlevel DSO, so stop having to process two lists in several
functions.

If searching becomes an issue at some point, we can have them in a
rbtree, etc.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-s4yb0onpdywu6dj2xl9lxi4t@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/hists_common.c |  2 +-
 tools/perf/util/build-id.c      | 59 +++++++++++------------------------------
 tools/perf/util/dso.c           |  2 +-
 tools/perf/util/header.c        |  6 +----
 tools/perf/util/machine.c       | 28 ++++++++-----------
 tools/perf/util/machine.h       |  3 +--
 tools/perf/util/map.c           |  2 +-
 tools/perf/util/probe-event.c   |  5 ++--
 tools/perf/util/symbol-elf.c    |  6 +----
 tools/perf/util/vdso.c          |  6 ++---
 10 files changed, 39 insertions(+), 80 deletions(-)

diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c
index 456f884eb27b..bcde1d27919c 100644
--- a/tools/perf/tests/hists_common.c
+++ b/tools/perf/tests/hists_common.c
@@ -121,7 +121,7 @@ struct machine *setup_fake_machine(struct machines *machines)
 		size_t k;
 		struct dso *dso;
 
-		dso = __dsos__findnew(&machine->user_dsos,
+		dso = __dsos__findnew(&machine->dsos,
 				      fake_symbols[i].dso_name);
 		if (dso == NULL)
 			goto out;
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index ad8cfcbaa25d..1f6fc2323ef9 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -162,15 +162,20 @@ static int write_buildid(const char *name, size_t name_len, u8 *build_id,
 	return write_padded(fd, name, name_len + 1, len);
 }
 
-static int __dsos__write_buildid_table(struct list_head *head,
-				       struct machine *machine,
-				       pid_t pid, u16 misc, int fd)
+static int machine__write_buildid_table(struct machine *machine, int fd)
 {
+	int err = 0;
 	char nm[PATH_MAX];
 	struct dso *pos;
+	u16 kmisc = PERF_RECORD_MISC_KERNEL,
+	    umisc = PERF_RECORD_MISC_USER;
+
+	if (!machine__is_host(machine)) {
+		kmisc = PERF_RECORD_MISC_GUEST_KERNEL;
+		umisc = PERF_RECORD_MISC_GUEST_USER;
+	}
 
-	dsos__for_each_with_build_id(pos, head) {
-		int err;
+	dsos__for_each_with_build_id(pos, &machine->dsos.head) {
 		const char *name;
 		size_t name_len;
 
@@ -189,32 +194,12 @@ static int __dsos__write_buildid_table(struct list_head *head,
 			name_len = pos->long_name_len + 1;
 		}
 
-		err = write_buildid(name, name_len, pos->build_id,
-				    pid, misc, fd);
+		err = write_buildid(name, name_len, pos->build_id, machine->pid,
+				    pos->kernel ? kmisc : umisc, fd);
 		if (err)
-			return err;
-	}
-
-	return 0;
-}
-
-static int machine__write_buildid_table(struct machine *machine, int fd)
-{
-	int err;
-	u16 kmisc = PERF_RECORD_MISC_KERNEL,
-	    umisc = PERF_RECORD_MISC_USER;
-
-	if (!machine__is_host(machine)) {
-		kmisc = PERF_RECORD_MISC_GUEST_KERNEL;
-		umisc = PERF_RECORD_MISC_GUEST_USER;
+			break;
 	}
 
-	err = __dsos__write_buildid_table(&machine->kernel_dsos.head, machine,
-					  machine->pid, kmisc, fd);
-	if (err == 0)
-		err = __dsos__write_buildid_table(&machine->user_dsos.head,
-						  machine, machine->pid, umisc,
-						  fd);
 	return err;
 }
 
@@ -247,13 +232,7 @@ static int __dsos__hit_all(struct list_head *head)
 
 static int machine__hit_all_dsos(struct machine *machine)
 {
-	int err;
-
-	err = __dsos__hit_all(&machine->kernel_dsos.head);
-	if (err)
-		return err;
-
-	return __dsos__hit_all(&machine->user_dsos.head);
+	return __dsos__hit_all(&machine->dsos.head);
 }
 
 int dsos__hit_all(struct perf_session *session)
@@ -493,9 +472,7 @@ static int __dsos__cache_build_ids(struct list_head *head,
 
 static int machine__cache_build_ids(struct machine *machine)
 {
-	int ret = __dsos__cache_build_ids(&machine->kernel_dsos.head, machine);
-	ret |= __dsos__cache_build_ids(&machine->user_dsos.head, machine);
-	return ret;
+	return __dsos__cache_build_ids(&machine->dsos.head, machine);
 }
 
 int perf_session__cache_build_ids(struct perf_session *session)
@@ -520,11 +497,7 @@ int perf_session__cache_build_ids(struct perf_session *session)
 
 static bool machine__read_build_ids(struct machine *machine, bool with_hits)
 {
-	bool ret;
-
-	ret  = __dsos__read_build_ids(&machine->kernel_dsos.head, with_hits);
-	ret |= __dsos__read_build_ids(&machine->user_dsos.head, with_hits);
-	return ret;
+	return __dsos__read_build_ids(&machine->dsos.head, with_hits);
 }
 
 bool perf_session__read_build_ids(struct perf_session *session, bool with_hits)
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index fe5236833164..ff040b0569d6 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -833,7 +833,7 @@ struct dso *machine__findnew_kernel(struct machine *machine, const char *name,
 	/*
 	 * The kernel dso could be created by build_id processing.
 	 */
-	struct dso *dso = __dsos__findnew(&machine->kernel_dsos, name);
+	struct dso *dso = __dsos__findnew(&machine->dsos, name);
 
 	/*
 	 * We need to run this in all cases, since during the build_id
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 3f0d809d853a..a900e9441fb5 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1238,7 +1238,6 @@ static int __event_process_build_id(struct build_id_event *bev,
 				    struct perf_session *session)
 {
 	int err = -1;
-	struct dsos *dsos;
 	struct machine *machine;
 	u16 misc;
 	struct dso *dso;
@@ -1253,22 +1252,19 @@ static int __event_process_build_id(struct build_id_event *bev,
 	switch (misc) {
 	case PERF_RECORD_MISC_KERNEL:
 		dso_type = DSO_TYPE_KERNEL;
-		dsos = &machine->kernel_dsos;
 		break;
 	case PERF_RECORD_MISC_GUEST_KERNEL:
 		dso_type = DSO_TYPE_GUEST_KERNEL;
-		dsos = &machine->kernel_dsos;
 		break;
 	case PERF_RECORD_MISC_USER:
 	case PERF_RECORD_MISC_GUEST_USER:
 		dso_type = DSO_TYPE_USER;
-		dsos = &machine->user_dsos;
 		break;
 	default:
 		goto out;
 	}
 
-	dso = __dsos__findnew(dsos, filename);
+	dso = __dsos__findnew(&machine->dsos, filename);
 	if (dso != NULL) {
 		char sbuild_id[BUILD_ID_SIZE * 2 + 1];
 
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 8934dc4345fe..ffd31079d447 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -26,8 +26,7 @@ int machine__init(struct machine *machine, const char *root_dir, pid_t pid)
 {
 	map_groups__init(&machine->kmaps, machine);
 	RB_CLEAR_NODE(&machine->rb_node);
-	dsos__init(&machine->user_dsos);
-	dsos__init(&machine->kernel_dsos);
+	dsos__init(&machine->dsos);
 
 	machine->threads = RB_ROOT;
 	pthread_rwlock_init(&machine->threads_lock, NULL);
@@ -111,8 +110,7 @@ void machine__delete_threads(struct machine *machine)
 void machine__exit(struct machine *machine)
 {
 	map_groups__exit(&machine->kmaps);
-	dsos__delete(&machine->user_dsos);
-	dsos__delete(&machine->kernel_dsos);
+	dsos__delete(&machine->dsos);
 	vdso__exit(machine);
 	zfree(&machine->root_dir);
 	zfree(&machine->current_tid);
@@ -490,9 +488,9 @@ machine__module_dso(struct machine *machine, struct kmod_path *m,
 {
 	struct dso *dso;
 
-	dso = dsos__find(&machine->kernel_dsos, m->name, true);
+	dso = dsos__find(&machine->dsos, m->name, true);
 	if (!dso) {
-		dso = dsos__addnew(&machine->kernel_dsos, m->name);
+		dso = dsos__addnew(&machine->dsos, m->name);
 		if (dso == NULL)
 			return NULL;
 
@@ -561,13 +559,11 @@ out:
 size_t machines__fprintf_dsos(struct machines *machines, FILE *fp)
 {
 	struct rb_node *nd;
-	size_t ret = __dsos__fprintf(&machines->host.kernel_dsos.head, fp) +
-		     __dsos__fprintf(&machines->host.user_dsos.head, fp);
+	size_t ret = __dsos__fprintf(&machines->host.dsos.head, fp);
 
 	for (nd = rb_first(&machines->guests); nd; nd = rb_next(nd)) {
 		struct machine *pos = rb_entry(nd, struct machine, rb_node);
-		ret += __dsos__fprintf(&pos->kernel_dsos.head, fp);
-		ret += __dsos__fprintf(&pos->user_dsos.head, fp);
+		ret += __dsos__fprintf(&pos->dsos.head, fp);
 	}
 
 	return ret;
@@ -576,8 +572,7 @@ size_t machines__fprintf_dsos(struct machines *machines, FILE *fp)
 size_t machine__fprintf_dsos_buildid(struct machine *m, FILE *fp,
 				     bool (skip)(struct dso *dso, int parm), int parm)
 {
-	return __dsos__fprintf_buildid(&m->kernel_dsos.head, fp, skip, parm) +
-	       __dsos__fprintf_buildid(&m->user_dsos.head, fp, skip, parm);
+	return __dsos__fprintf_buildid(&m->dsos.head, fp, skip, parm);
 }
 
 size_t machines__fprintf_dsos_buildid(struct machines *machines, FILE *fp,
@@ -1106,7 +1101,7 @@ static bool machine__uses_kcore(struct machine *machine)
 {
 	struct dso *dso;
 
-	list_for_each_entry(dso, &machine->kernel_dsos.head, node) {
+	list_for_each_entry(dso, &machine->dsos.head, node) {
 		if (dso__is_kcore(dso))
 			return true;
 	}
@@ -1153,8 +1148,8 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
 		struct dso *kernel = NULL;
 		struct dso *dso;
 
-		list_for_each_entry(dso, &machine->kernel_dsos.head, node) {
-			if (is_kernel_module(dso->long_name))
+		list_for_each_entry(dso, &machine->dsos.head, node) {
+			if (dso->kernel && is_kernel_module(dso->long_name))
 				continue;
 
 			kernel = dso;
@@ -1162,8 +1157,7 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
 		}
 
 		if (kernel == NULL)
-			kernel = __dsos__findnew(&machine->kernel_dsos,
-						 kmmap_prefix);
+			kernel = __dsos__findnew(&machine->dsos, kmmap_prefix);
 		if (kernel == NULL)
 			goto out_problem;
 
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index c7963c63c474..aabca583e655 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -34,8 +34,7 @@ struct machine {
 	struct list_head  dead_threads;
 	struct thread	  *last_match;
 	struct vdso_info  *vdso_info;
-	struct dsos	  user_dsos;
-	struct dsos	  kernel_dsos;
+	struct dsos	  dsos;
 	struct map_groups kmaps;
 	struct map	  *vmlinux_maps[MAP__NR_TYPES];
 	u64		  kernel_start;
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index af572322586d..57ff0256c22c 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -180,7 +180,7 @@ struct map *map__new(struct machine *machine, u64 start, u64 len,
 			pgoff = 0;
 			dso = vdso__dso_findnew(machine, thread);
 		} else
-			dso = __dsos__findnew(&machine->user_dsos, filename);
+			dso = __dsos__findnew(&machine->dsos, filename);
 
 		if (dso == NULL)
 			goto out_delete;
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index e6a02b1ffd6d..d27edef5eb5b 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -256,8 +256,9 @@ static int kernel_get_module_dso(const char *module, struct dso **pdso)
 	int ret = 0;
 
 	if (module) {
-		list_for_each_entry(dso, &host_machine->kernel_dsos.head,
-				    node) {
+		list_for_each_entry(dso, &host_machine->dsos.head, node) {
+			if (!dso->kernel)
+				continue;
 			if (strncmp(dso->short_name + 1, module,
 				    dso->short_name_len - 2) == 0)
 				goto found;
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index fa10116a12ab..a93ba85509b2 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -1031,11 +1031,7 @@ int dso__load_sym(struct dso *dso, struct map *map,
 				}
 				curr_dso->symtab_type = dso->symtab_type;
 				map_groups__insert(kmaps, curr_map);
-				/*
-				 * The new DSO should go to the kernel DSOS
-				 */
-				dsos__add(&map->groups->machine->kernel_dsos,
-					  curr_dso);
+				dsos__add(&map->groups->machine->dsos, curr_dso);
 				dso__set_loaded(curr_dso, map->type);
 			} else
 				curr_dso = curr_map->dso;
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index 5c7dd796979d..d3651b43e945 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -127,7 +127,7 @@ static struct dso *vdso__new(struct machine *machine, const char *short_name,
 
 	dso = dso__new(short_name);
 	if (dso != NULL) {
-		dsos__add(&machine->user_dsos, dso);
+		dsos__add(&machine->dsos, dso);
 		dso__set_long_name(dso, long_name, false);
 	}
 
@@ -236,7 +236,7 @@ static struct dso *vdso__findnew_compat(struct machine *machine,
 	const char *file_name;
 	struct dso *dso;
 
-	dso = dsos__find(&machine->user_dsos, vdso_file->dso_name, true);
+	dso = dsos__find(&machine->dsos, vdso_file->dso_name, true);
 	if (dso)
 		return dso;
 
@@ -299,7 +299,7 @@ struct dso *vdso__dso_findnew(struct machine *machine,
 		return dso;
 #endif
 
-	dso = dsos__find(&machine->user_dsos, DSO__NAME_VDSO, true);
+	dso = dsos__find(&machine->dsos, DSO__NAME_VDSO, true);
 	if (!dso) {
 		char *file;
 
-- 
2.1.0


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

* [PATCH 11/14] perf machine: Introduce machine__findnew_dso() method
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 10/14] perf machine: No need to have two DSOs lists Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 12/14] perf machine: Fix up vdso methods names Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Namhyung Kim

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

Similar to machine__findnew_thread(), also prepping for refcounting and
locking, this time for struct dso instances.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-fv3tshv5o1413coh147lszjc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/hists_common.c | 3 +--
 tools/perf/util/dso.c           | 2 +-
 tools/perf/util/header.c        | 2 +-
 tools/perf/util/machine.c       | 7 ++++++-
 tools/perf/util/machine.h       | 2 ++
 tools/perf/util/map.c           | 2 +-
 6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c
index bcde1d27919c..915f60af6a0e 100644
--- a/tools/perf/tests/hists_common.c
+++ b/tools/perf/tests/hists_common.c
@@ -121,8 +121,7 @@ struct machine *setup_fake_machine(struct machines *machines)
 		size_t k;
 		struct dso *dso;
 
-		dso = __dsos__findnew(&machine->dsos,
-				      fake_symbols[i].dso_name);
+		dso = machine__findnew_dso(machine, fake_symbols[i].dso_name);
 		if (dso == NULL)
 			goto out;
 
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index ff040b0569d6..b335db3532a2 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -833,7 +833,7 @@ struct dso *machine__findnew_kernel(struct machine *machine, const char *name,
 	/*
 	 * The kernel dso could be created by build_id processing.
 	 */
-	struct dso *dso = __dsos__findnew(&machine->dsos, name);
+	struct dso *dso = machine__findnew_dso(machine, name);
 
 	/*
 	 * We need to run this in all cases, since during the build_id
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index a900e9441fb5..851143a7988d 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1264,7 +1264,7 @@ static int __event_process_build_id(struct build_id_event *bev,
 		goto out;
 	}
 
-	dso = __dsos__findnew(&machine->dsos, filename);
+	dso = machine__findnew_dso(machine, filename);
 	if (dso != NULL) {
 		char sbuild_id[BUILD_ID_SIZE * 2 + 1];
 
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index ffd31079d447..698da1da5168 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1157,7 +1157,7 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
 		}
 
 		if (kernel == NULL)
-			kernel = __dsos__findnew(&machine->dsos, kmmap_prefix);
+			kernel = machine__findnew_dso(machine, kmmap_prefix);
 		if (kernel == NULL)
 			goto out_problem;
 
@@ -1915,3 +1915,8 @@ int machine__get_kernel_start(struct machine *machine)
 	}
 	return err;
 }
+
+struct dso *machine__findnew_dso(struct machine *machine, const char *filename)
+{
+	return __dsos__findnew(&machine->dsos, filename);
+}
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index aabca583e655..39a0ca06cbd8 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -154,6 +154,8 @@ static inline bool machine__is_host(struct machine *machine)
 struct thread *__machine__findnew_thread(struct machine *machine, pid_t pid, pid_t tid);
 struct thread *machine__findnew_thread(struct machine *machine, pid_t pid, pid_t tid);
 
+struct dso *machine__findnew_dso(struct machine *machine, const char *filename);
+
 size_t machine__fprintf(struct machine *machine, FILE *fp);
 
 static inline
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 57ff0256c22c..d15e1e9dd2ae 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -180,7 +180,7 @@ struct map *map__new(struct machine *machine, u64 start, u64 len,
 			pgoff = 0;
 			dso = vdso__dso_findnew(machine, thread);
 		} else
-			dso = __dsos__findnew(&machine->dsos, filename);
+			dso = machine__findnew_dso(machine, filename);
 
 		if (dso == NULL)
 			goto out_delete;
-- 
2.1.0


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

* [PATCH 12/14] perf machine: Fix up vdso methods names
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (10 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 11/14] perf machine: Introduce machine__findnew_dso() method Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 13/14] perf build: Do not fail on missing Build file Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Namhyung Kim

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

To make it consistent with the other dso lifetime routines.

For instance:

 struct dso *vdso__new(struct machine *machine, const char *short_name,
		        const char *long_name)

Becomes:

 struct dso *machine__addnew_vdso(struct machine *machine, const
				  char *short_name, const char *long_name)

Because:

1) There is no 'struct vdso' for us to have vdso__ prefixed routines.

2) Because it will not really just create a new instance of 'struct
   dso', it'll call dso__new() but it will also insert it into the
   DSO's list/rbtree, and we have a method name for that: 'addnew',
   just like we have dsos__addnew().

3) So it is really a 'struct machine' operation, it is the first
   argument, etc.

This way the place where this is used gets consistent:

                if (vdso) {
                        pgoff = 0;
-                       dso = vdso__dso_findnew(machine, thread);
+                       dso = machine__findnew_vdso(machine, thread);
                } else
                        dso = machine__findnew_dso(machine, filename);

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-r3w3tvh8exm9xfz3p4tz9qbz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/machine.c |  2 +-
 tools/perf/util/map.c     |  2 +-
 tools/perf/util/vdso.c    | 18 +++++++++---------
 tools/perf/util/vdso.h    |  4 ++--
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 698da1da5168..2ed61f59d415 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -111,7 +111,7 @@ void machine__exit(struct machine *machine)
 {
 	map_groups__exit(&machine->kmaps);
 	dsos__delete(&machine->dsos);
-	vdso__exit(machine);
+	machine__exit_vdso(machine);
 	zfree(&machine->root_dir);
 	zfree(&machine->current_tid);
 	pthread_rwlock_destroy(&machine->threads_lock);
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index d15e1e9dd2ae..365011c233a6 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -178,7 +178,7 @@ struct map *map__new(struct machine *machine, u64 start, u64 len,
 
 		if (vdso) {
 			pgoff = 0;
-			dso = vdso__dso_findnew(machine, thread);
+			dso = machine__findnew_vdso(machine, thread);
 		} else
 			dso = machine__findnew_dso(machine, filename);
 
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index d3651b43e945..2e8f6886ca72 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -101,7 +101,7 @@ static char *get_file(struct vdso_file *vdso_file)
 	return vdso;
 }
 
-void vdso__exit(struct machine *machine)
+void machine__exit_vdso(struct machine *machine)
 {
 	struct vdso_info *vdso_info = machine->vdso_info;
 
@@ -120,8 +120,8 @@ void vdso__exit(struct machine *machine)
 	zfree(&machine->vdso_info);
 }
 
-static struct dso *vdso__new(struct machine *machine, const char *short_name,
-			     const char *long_name)
+static struct dso *machine__addnew_vdso(struct machine *machine, const char *short_name,
+					const char *long_name)
 {
 	struct dso *dso;
 
@@ -244,10 +244,10 @@ static struct dso *vdso__findnew_compat(struct machine *machine,
 	if (!file_name)
 		return NULL;
 
-	return vdso__new(machine, vdso_file->dso_name, file_name);
+	return machine__addnew_vdso(machine, vdso_file->dso_name, file_name);
 }
 
-static int vdso__dso_findnew_compat(struct machine *machine,
+static int machine__findnew_vdso_compat(struct machine *machine,
 				    struct thread *thread,
 				    struct vdso_info *vdso_info,
 				    struct dso **dso)
@@ -281,8 +281,8 @@ static int vdso__dso_findnew_compat(struct machine *machine,
 
 #endif
 
-struct dso *vdso__dso_findnew(struct machine *machine,
-			      struct thread *thread __maybe_unused)
+struct dso *machine__findnew_vdso(struct machine *machine,
+				  struct thread *thread __maybe_unused)
 {
 	struct vdso_info *vdso_info;
 	struct dso *dso;
@@ -295,7 +295,7 @@ struct dso *vdso__dso_findnew(struct machine *machine,
 		return NULL;
 
 #if BITS_PER_LONG == 64
-	if (vdso__dso_findnew_compat(machine, thread, vdso_info, &dso))
+	if (machine__findnew_vdso_compat(machine, thread, vdso_info, &dso))
 		return dso;
 #endif
 
@@ -307,7 +307,7 @@ struct dso *vdso__dso_findnew(struct machine *machine,
 		if (!file)
 			return NULL;
 
-		dso = vdso__new(machine, DSO__NAME_VDSO, file);
+		dso = machine__addnew_vdso(machine, DSO__NAME_VDSO, file);
 	}
 
 	return dso;
diff --git a/tools/perf/util/vdso.h b/tools/perf/util/vdso.h
index d97da1616f0c..cdc4fabfc212 100644
--- a/tools/perf/util/vdso.h
+++ b/tools/perf/util/vdso.h
@@ -23,7 +23,7 @@ bool dso__is_vdso(struct dso *dso);
 struct machine;
 struct thread;
 
-struct dso *vdso__dso_findnew(struct machine *machine, struct thread *thread);
-void vdso__exit(struct machine *machine);
+struct dso *machine__findnew_vdso(struct machine *machine, struct thread *thread);
+void machine__exit_vdso(struct machine *machine);
 
 #endif /* __PERF_VDSO__ */
-- 
2.1.0


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

* [PATCH 13/14] perf build: Do not fail on missing Build file
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (11 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 12/14] perf machine: Fix up vdso methods names Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 16:30 ` [PATCH 14/14] perf tools: Make Ctrl-C stop processing on TUI Arnaldo Carvalho de Melo
  2015-05-29 18:20 ` [GIT PULL 00/14] perf/core improvements and fixes Ingo Molnar
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, David Ahern, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Rabin Vincent,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

Allow nesting into directories without Build file. Currently we force
include of the Build file, which fails the build when the Build file is
missing.

We already support empty *-in.o' objects if there's nothing in the
directory to be compiled, so we can just use it for missing Build file
cases.

Also adding this case under tests.

Reported-by: Rabin Vincent <rabin.vincent@axis.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rabin Vincent <rabin.vincent@axis.com>
Link: http://lkml.kernel.org/r/1432914178-24086-1-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/build/Makefile.build         | 2 +-
 tools/build/tests/ex/Build         | 1 +
 tools/build/tests/ex/empty2/README | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 tools/build/tests/ex/empty2/README

diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
index 10df57237a66..69c35cf09cad 100644
--- a/tools/build/Makefile.build
+++ b/tools/build/Makefile.build
@@ -37,7 +37,7 @@ subdir-obj-y :=
 
 # Build definitions
 build-file := $(dir)/Build
-include $(build-file)
+-include $(build-file)
 
 quiet_cmd_flex  = FLEX     $@
 quiet_cmd_bison = BISON    $@
diff --git a/tools/build/tests/ex/Build b/tools/build/tests/ex/Build
index 0e6c3e6767e6..70d876237c57 100644
--- a/tools/build/tests/ex/Build
+++ b/tools/build/tests/ex/Build
@@ -2,6 +2,7 @@ ex-y += ex.o
 ex-y += a.o
 ex-y += b.o
 ex-y += empty/
+ex-y += empty2/
 
 libex-y += c.o
 libex-y += d.o
diff --git a/tools/build/tests/ex/empty2/README b/tools/build/tests/ex/empty2/README
new file mode 100644
index 000000000000..2107cc5bf5a9
--- /dev/null
+++ b/tools/build/tests/ex/empty2/README
@@ -0,0 +1,2 @@
+This directory is left intentionally without Build file
+to test proper nesting into Build-less directories.
-- 
2.1.0


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

* [PATCH 14/14] perf tools: Make Ctrl-C stop processing on TUI
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (12 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 13/14] perf build: Do not fail on missing Build file Arnaldo Carvalho de Melo
@ 2015-05-29 16:30 ` Arnaldo Carvalho de Melo
  2015-05-29 18:20 ` [GIT PULL 00/14] perf/core improvements and fixes Ingo Molnar
  14 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-29 16:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, David Ahern, Jiri Olsa,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

It was inconvenient that perf cannot be quit with SIGINT during
processing samples on TUI especially for large data files.

This was because the first argument of SLang_init_tty(), abort_char,
being 0.  The manual says it's the ascii value of the control character
that will be used to generate the interrupt signal [1].  Passing -1
means to use the default value (Ctrl-C).

However, after processing samples, Ctrl-C was used to in other cases as
well - like stepping back from annotate.  So recover the original
behavior after processing.

[1] http://jedsoft.org/slang/doc/html/cslang-6.html#ss6.1

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1432904024-13170-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/browsers/annotate.c | 4 ++++
 tools/perf/ui/browsers/hists.c    | 4 ++++
 tools/perf/ui/tui/setup.c         | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index e5250eb2dd57..acb0e23b138e 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -838,6 +838,10 @@ int map_symbol__tui_annotate(struct map_symbol *ms, struct perf_evsel *evsel,
 int hist_entry__tui_annotate(struct hist_entry *he, struct perf_evsel *evsel,
 			     struct hist_browser_timer *hbt)
 {
+	/* reset abort key so that it can get Ctrl-C as a key */
+	SLang_reset_tty();
+	SLang_init_tty(0, 0, 0);
+
 	return map_symbol__tui_annotate(&he->ms, evsel, hbt);
 }
 
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index f981cb8f0158..e64893f2fd7f 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1741,6 +1741,10 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 	if (browser == NULL)
 		return -1;
 
+	/* reset abort key so that it can get Ctrl-C as a key */
+	SLang_reset_tty();
+	SLang_init_tty(0, 0, 0);
+
 	if (min_pcnt) {
 		browser->min_pcnt = min_pcnt;
 		hist_browser__update_nr_entries(browser);
diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c
index b77e1d771363..60d1f29b4b50 100644
--- a/tools/perf/ui/tui/setup.c
+++ b/tools/perf/ui/tui/setup.c
@@ -129,7 +129,7 @@ int ui__init(void)
 	err = SLsmg_init_smg();
 	if (err < 0)
 		goto out;
-	err = SLang_init_tty(0, 0, 0);
+	err = SLang_init_tty(-1, 0, 0);
 	if (err < 0)
 		goto out;
 
-- 
2.1.0


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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
  2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (13 preceding siblings ...)
  2015-05-29 16:30 ` [PATCH 14/14] perf tools: Make Ctrl-C stop processing on TUI Arnaldo Carvalho de Melo
@ 2015-05-29 18:20 ` Ingo Molnar
  14 siblings, 0 replies; 38+ messages in thread
From: Ingo Molnar @ 2015-05-29 18:20 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, David Ahern,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Martin Liska,
	Masami Hiramatsu, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	pi3orama, Rabin Vincent, Riku Voipio, Stephane Eranian, Wang Nan,
	Zefan Li, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider applying,
> 
> - Arnaldo
> 
> The following changes since commit f1942b96b4b44c1ab0e0b82fef93ba7e1fada7af:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-05-28 11:09:22 +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 ed426915900db3c58c410b8b38f6ff0e46bf6c96:
> 
>   perf tools: Make Ctrl-C stop processing on TUI (2015-05-29 12:49:00 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Make Ctrl-C stop processing on TUI, allowing interrupting the load of big
>   perf.data files (Namhyung Kim)
> 
> - Fix 'perf annotate' -i option, which is currently ignored (Martin Liška)
> 
> - Add ARM64 perf_regs_load to support libunwind and enable testing (Wang Nan)
> 
> Infrastructure:
> 
> - Fix thread ref-counting in db-export (Adrian Hunter)
> 
> - Fix compiler warning about may be accessing uninitialized (Arnaldo Carvalho de Melo)
> 
> - No need to have two lists for user and kernel DSOs, unify them (Arnaldo Carvalho de Melo)
> 
> - Function namespace consistency fixups (Arnaldo Carvalho de Melo)
> 
> - Do not fail on missing Build file, fixing the build on MIPS (Jiri Olsa)
> 
> - Fix up syscall tests, making those tests pass on ARM64 (Riku Voipio)
> 
> - Fix 'function unused' warning in 'perf probe' (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf db-export: Fix thread ref-counting
> 
> Arnaldo Carvalho de Melo (5):
>       perf kmem: Fix compiler warning about may be accessing uninitialized variable
>       perf machine: Adopt findnew_kernel method
>       perf machine: No need to have two DSOs lists
>       perf machine: Introduce machine__findnew_dso() method
>       perf machine: Fix up vdso methods names
> 
> Jiri Olsa (1):
>       perf build: Do not fail on missing Build file
> 
> Martin Liška (1):
>       perf annotate: Fix -i option, which is currently ignored.
> 
> Namhyung Kim (1):
>       perf tools: Make Ctrl-C stop processing on TUI
> 
> Riku Voipio (3):
>       perf tests: Switch from open to openat
>       perf tests: Aename open*.c to openat*.c
>       perf tests: Remove getpgrp from mmap-basic
> 
> Wang Nan (2):
>       perf probe: Fix 'function unused' warning
>       perf tools: Add ARM64 perf_regs_load to support libunwind and enable testing
> 
>  tools/build/Makefile.build                         |  2 +-
>  tools/build/tests/ex/Build                         |  1 +
>  tools/build/tests/ex/empty2/README                 |  2 +
>  tools/perf/arch/arm64/Build                        |  1 +
>  tools/perf/arch/arm64/include/perf_regs.h          |  3 +
>  tools/perf/arch/arm64/tests/Build                  |  2 +
>  tools/perf/arch/arm64/tests/dwarf-unwind.c         | 61 ++++++++++++++++++++
>  tools/perf/arch/arm64/tests/regs_load.S            | 46 +++++++++++++++
>  tools/perf/builtin-annotate.c                      |  3 +-
>  tools/perf/builtin-kmem.c                          |  2 +-
>  tools/perf/tests/Build                             |  8 +--
>  tools/perf/tests/builtin-test.c                    | 14 ++---
>  tools/perf/tests/hists_common.c                    |  3 +-
>  tools/perf/tests/mmap-basic.c                      |  6 +-
>  ...yscall-all-cpus.c => openat-syscall-all-cpus.c} | 12 ++--
>  ...call-tp-fields.c => openat-syscall-tp-fields.c} |  6 +-
>  .../tests/{open-syscall.c => openat-syscall.c}     | 14 ++---
>  tools/perf/tests/parse-events.c                    | 12 ++--
>  tools/perf/tests/tests.h                           |  8 +--
>  tools/perf/ui/browsers/annotate.c                  |  4 ++
>  tools/perf/ui/browsers/hists.c                     |  4 ++
>  tools/perf/ui/tui/setup.c                          |  2 +-
>  tools/perf/util/build-id.c                         | 59 ++++++-------------
>  tools/perf/util/db-export.c                        | 19 ++++---
>  tools/perf/util/dso.c                              |  6 +-
>  tools/perf/util/dso.h                              |  4 +-
>  tools/perf/util/header.c                           |  6 +-
>  tools/perf/util/machine.c                          | 46 ++++++++-------
>  tools/perf/util/machine.h                          |  5 +-
>  tools/perf/util/map.c                              |  4 +-
>  tools/perf/util/probe-event.c                      | 66 +++++++++++-----------
>  tools/perf/util/symbol-elf.c                       |  6 +-
>  tools/perf/util/vdso.c                             | 24 ++++----
>  tools/perf/util/vdso.h                             |  4 +-
>  34 files changed, 277 insertions(+), 188 deletions(-)
>  create mode 100644 tools/build/tests/ex/empty2/README
>  create mode 100644 tools/perf/arch/arm64/tests/Build
>  create mode 100644 tools/perf/arch/arm64/tests/dwarf-unwind.c
>  create mode 100644 tools/perf/arch/arm64/tests/regs_load.S
>  rename tools/perf/tests/{open-syscall-all-cpus.c => openat-syscall-all-cpus.c} (90%)
>  rename tools/perf/tests/{open-syscall-tp-fields.c => openat-syscall-tp-fields.c} (94%)
>  rename tools/perf/tests/{open-syscall.c => openat-syscall.c} (79%)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
  2018-03-19 19:01 ` Arnaldo Carvalho de Melo
                     ` (2 preceding siblings ...)
  (?)
@ 2018-03-19 19:39   ` Ingo Molnar
  -1 siblings, 0 replies; 38+ messages in thread
From: Ingo Molnar @ 2018-03-19 19:39 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Colin King, David Ahern, Jin Yao,
	Jiri Olsa, Josh Poimboeuf, Kan Liang, kernel-janitors,
	Laura Abbott, linux-kselftest, linuxppc-dev, linux-trace-users,
	Masami Hiramatsu, Namhyung Kim, Peter Zijlstra, Ravi Bangoria,
	Sergey Senozhatsky, Shuah Khan, Stephane Eranian, Steven Rostedt,
	Sukadev Bhattiprolu, Tom Zanussi, Wang Nan, Willy Tarreau,
	Yisheng Xie, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling, this has those 31 patches that were
> blocked due to some problems (author not being the fist S-o-B, build
> broken on ppc), those issues should all be fixed and then we have 14
> patches more, described in the signed tag.
> 
> Regards,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd:
> 
>   perf test: Fix exit code for record+probe_libc_inet_pton.sh (2018-03-16 13:56:31 -0300)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.17-20180319
> 
> for you to fetch changes up to 1cd618838b9703eabe4a75badf433382b12f6bef:
> 
>   perf tests bp_account: Fix build with clang-6 (2018-03-19 13:51:54 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Fixes for problems experienced with new gcc 8 warnings, that treated
>   as errors, broke the build, related to snprintf and casting issues.
>   (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf)
> 
> - Fix build of new breakpoint 'perf test' entry with clang < 6, noticed
>   on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo)
> 
> - Workaround problem with symbol resolution in 'perf annotate', using
>   the symbol name already present in the objdump output (Arnaldo Carvalho de Melo)
> 
> - Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo)
> 
> - Fix out of bounds access on array fd when cnt is 100 in one of the
>   'perf test' entries, detected using 'cpptest' (Colin Ian King)
> 
> - Add support for the forced leader feature, i.e. 'perf report --group'
>   for a group of events not really grouped when scheduled (without using
>   {} to enclose the list of events in the command line) in pipe mode,
>   e.g.:
> 
>   $ perf record -e cycles,instructions -o - kill | perf report --group -i -
> 
> - Use right type to access array elements in 'perf probe' (Masami Hiramatsu)
> 
> - Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu)
> 
> - Discard head in overwrite_rb_find_range() (Yisheng Xie)
> 
> - Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
>       perf annotate: Use asprintf when formatting objdump command line
>       perf top: Document --ignore-vmlinux
>       perf annotate: Use ops->target.name when available for unresolved call targets
>       perf tests bp_account: Fix build with clang-6
> 
> Colin Ian King (1):
>       perf tests: Fix out of bounds access on array fd when cnt is 100
> 
> Jiri Olsa (4):
>       perf record: Synthesize features before events in pipe mode
>       perf report: Support forced leader feature in pipe mode
>       perf tools: Fix snprint warnings for gcc 8
>       perf tools: Fix python extension build for gcc 8
> 
> Josh Poimboeuf (1):
>       objtool, perf: Fix GCC 8 -Wrestrict error
> 
> Masami Hiramatsu (1):
>       perf probe: Use right type to access array elements
> 
> Sukadev Bhattiprolu (1):
>       perf vendor events: Update POWER9 events
> 
> Yisheng Xie (2):
>       perf mmap: Discard head in overwrite_rb_find_range()
>       perf debug: Avoid setting 'quiet' to 'true' unnecessarily
> 
>  tools/lib/str_error_r.c                            |   2 +-
>  tools/perf/Documentation/perf-top.txt              |   3 +
>  tools/perf/builtin-record.c                        |  18 +-
>  tools/perf/builtin-report.c                        |  57 +++--
>  tools/perf/builtin-script.c                        |  22 +-
>  .../perf/pmu-events/arch/powerpc/power9/cache.json |  25 ---
>  .../pmu-events/arch/powerpc/power9/frontend.json   |  10 -
>  .../pmu-events/arch/powerpc/power9/marked.json     |   5 -
>  .../pmu-events/arch/powerpc/power9/memory.json     |   5 -
>  .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++-------
>  .../pmu-events/arch/powerpc/power9/pipeline.json   |  50 ++---
>  tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   5 -
>  .../arch/powerpc/power9/translation.json           |  10 +-
>  tools/perf/tests/attr.c                            |   4 +-
>  tools/perf/tests/bp_account.c                      |  10 +-
>  tools/perf/tests/mem.c                             |   2 +-
>  tools/perf/tests/pmu.c                             |   2 +-
>  tools/perf/util/annotate.c                         |  20 +-
>  tools/perf/util/cgroup.c                           |   2 +-
>  tools/perf/util/debug.c                            |   1 -
>  tools/perf/util/header.c                           |  11 +-
>  tools/perf/util/mmap.c                             |  15 +-
>  tools/perf/util/parse-events.c                     |   4 +-
>  tools/perf/util/pmu.c                              |   2 +-
>  tools/perf/util/probe-finder.c                     |  13 +-
>  tools/perf/util/setup.py                           |   2 +
>  26 files changed, 298 insertions(+), 243 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
@ 2018-03-19 19:39   ` Ingo Molnar
  0 siblings, 0 replies; 38+ messages in thread
From: Ingo Molnar @ 2018-03-19 19:39 UTC (permalink / raw)
  To: kernel-janitors


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

> Hi Ingo,
> 
> 	Please consider pulling, this has those 31 patches that were
> blocked due to some problems (author not being the fist S-o-B, build
> broken on ppc), those issues should all be fixed and then we have 14
> patches more, described in the signed tag.
> 
> Regards,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd:
> 
>   perf test: Fix exit code for record+probe_libc_inet_pton.sh (2018-03-16 13:56:31 -0300)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.17-20180319
> 
> for you to fetch changes up to 1cd618838b9703eabe4a75badf433382b12f6bef:
> 
>   perf tests bp_account: Fix build with clang-6 (2018-03-19 13:51:54 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Fixes for problems experienced with new gcc 8 warnings, that treated
>   as errors, broke the build, related to snprintf and casting issues.
>   (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf)
> 
> - Fix build of new breakpoint 'perf test' entry with clang < 6, noticed
>   on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo)
> 
> - Workaround problem with symbol resolution in 'perf annotate', using
>   the symbol name already present in the objdump output (Arnaldo Carvalho de Melo)
> 
> - Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo)
> 
> - Fix out of bounds access on array fd when cnt is 100 in one of the
>   'perf test' entries, detected using 'cpptest' (Colin Ian King)
> 
> - Add support for the forced leader feature, i.e. 'perf report --group'
>   for a group of events not really grouped when scheduled (without using
>   {} to enclose the list of events in the command line) in pipe mode,
>   e.g.:
> 
>   $ perf record -e cycles,instructions -o - kill | perf report --group -i -
> 
> - Use right type to access array elements in 'perf probe' (Masami Hiramatsu)
> 
> - Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu)
> 
> - Discard head in overwrite_rb_find_range() (Yisheng Xie)
> 
> - Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
>       perf annotate: Use asprintf when formatting objdump command line
>       perf top: Document --ignore-vmlinux
>       perf annotate: Use ops->target.name when available for unresolved call targets
>       perf tests bp_account: Fix build with clang-6
> 
> Colin Ian King (1):
>       perf tests: Fix out of bounds access on array fd when cnt is 100
> 
> Jiri Olsa (4):
>       perf record: Synthesize features before events in pipe mode
>       perf report: Support forced leader feature in pipe mode
>       perf tools: Fix snprint warnings for gcc 8
>       perf tools: Fix python extension build for gcc 8
> 
> Josh Poimboeuf (1):
>       objtool, perf: Fix GCC 8 -Wrestrict error
> 
> Masami Hiramatsu (1):
>       perf probe: Use right type to access array elements
> 
> Sukadev Bhattiprolu (1):
>       perf vendor events: Update POWER9 events
> 
> Yisheng Xie (2):
>       perf mmap: Discard head in overwrite_rb_find_range()
>       perf debug: Avoid setting 'quiet' to 'true' unnecessarily
> 
>  tools/lib/str_error_r.c                            |   2 +-
>  tools/perf/Documentation/perf-top.txt              |   3 +
>  tools/perf/builtin-record.c                        |  18 +-
>  tools/perf/builtin-report.c                        |  57 +++--
>  tools/perf/builtin-script.c                        |  22 +-
>  .../perf/pmu-events/arch/powerpc/power9/cache.json |  25 ---
>  .../pmu-events/arch/powerpc/power9/frontend.json   |  10 -
>  .../pmu-events/arch/powerpc/power9/marked.json     |   5 -
>  .../pmu-events/arch/powerpc/power9/memory.json     |   5 -
>  .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++-------
>  .../pmu-events/arch/powerpc/power9/pipeline.json   |  50 ++---
>  tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   5 -
>  .../arch/powerpc/power9/translation.json           |  10 +-
>  tools/perf/tests/attr.c                            |   4 +-
>  tools/perf/tests/bp_account.c                      |  10 +-
>  tools/perf/tests/mem.c                             |   2 +-
>  tools/perf/tests/pmu.c                             |   2 +-
>  tools/perf/util/annotate.c                         |  20 +-
>  tools/perf/util/cgroup.c                           |   2 +-
>  tools/perf/util/debug.c                            |   1 -
>  tools/perf/util/header.c                           |  11 +-
>  tools/perf/util/mmap.c                             |  15 +-
>  tools/perf/util/parse-events.c                     |   4 +-
>  tools/perf/util/pmu.c                              |   2 +-
>  tools/perf/util/probe-finder.c                     |  13 +-
>  tools/perf/util/setup.py                           |   2 +
>  26 files changed, 298 insertions(+), 243 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2018-03-19 19:39   ` Ingo Molnar
  0 siblings, 0 replies; 38+ messages in thread
From: mingo @ 2018-03-19 19:39 UTC (permalink / raw)



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

> Hi Ingo,
> 
> 	Please consider pulling, this has those 31 patches that were
> blocked due to some problems (author not being the fist S-o-B, build
> broken on ppc), those issues should all be fixed and then we have 14
> patches more, described in the signed tag.
> 
> Regards,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd:
> 
>   perf test: Fix exit code for record+probe_libc_inet_pton.sh (2018-03-16 13:56:31 -0300)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.17-20180319
> 
> for you to fetch changes up to 1cd618838b9703eabe4a75badf433382b12f6bef:
> 
>   perf tests bp_account: Fix build with clang-6 (2018-03-19 13:51:54 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Fixes for problems experienced with new gcc 8 warnings, that treated
>   as errors, broke the build, related to snprintf and casting issues.
>   (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf)
> 
> - Fix build of new breakpoint 'perf test' entry with clang < 6, noticed
>   on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo)
> 
> - Workaround problem with symbol resolution in 'perf annotate', using
>   the symbol name already present in the objdump output (Arnaldo Carvalho de Melo)
> 
> - Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo)
> 
> - Fix out of bounds access on array fd when cnt is 100 in one of the
>   'perf test' entries, detected using 'cpptest' (Colin Ian King)
> 
> - Add support for the forced leader feature, i.e. 'perf report --group'
>   for a group of events not really grouped when scheduled (without using
>   {} to enclose the list of events in the command line) in pipe mode,
>   e.g.:
> 
>   $ perf record -e cycles,instructions -o - kill | perf report --group -i -
> 
> - Use right type to access array elements in 'perf probe' (Masami Hiramatsu)
> 
> - Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu)
> 
> - Discard head in overwrite_rb_find_range() (Yisheng Xie)
> 
> - Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme at redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
>       perf annotate: Use asprintf when formatting objdump command line
>       perf top: Document --ignore-vmlinux
>       perf annotate: Use ops->target.name when available for unresolved call targets
>       perf tests bp_account: Fix build with clang-6
> 
> Colin Ian King (1):
>       perf tests: Fix out of bounds access on array fd when cnt is 100
> 
> Jiri Olsa (4):
>       perf record: Synthesize features before events in pipe mode
>       perf report: Support forced leader feature in pipe mode
>       perf tools: Fix snprint warnings for gcc 8
>       perf tools: Fix python extension build for gcc 8
> 
> Josh Poimboeuf (1):
>       objtool, perf: Fix GCC 8 -Wrestrict error
> 
> Masami Hiramatsu (1):
>       perf probe: Use right type to access array elements
> 
> Sukadev Bhattiprolu (1):
>       perf vendor events: Update POWER9 events
> 
> Yisheng Xie (2):
>       perf mmap: Discard head in overwrite_rb_find_range()
>       perf debug: Avoid setting 'quiet' to 'true' unnecessarily
> 
>  tools/lib/str_error_r.c                            |   2 +-
>  tools/perf/Documentation/perf-top.txt              |   3 +
>  tools/perf/builtin-record.c                        |  18 +-
>  tools/perf/builtin-report.c                        |  57 +++--
>  tools/perf/builtin-script.c                        |  22 +-
>  .../perf/pmu-events/arch/powerpc/power9/cache.json |  25 ---
>  .../pmu-events/arch/powerpc/power9/frontend.json   |  10 -
>  .../pmu-events/arch/powerpc/power9/marked.json     |   5 -
>  .../pmu-events/arch/powerpc/power9/memory.json     |   5 -
>  .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++-------
>  .../pmu-events/arch/powerpc/power9/pipeline.json   |  50 ++---
>  tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   5 -
>  .../arch/powerpc/power9/translation.json           |  10 +-
>  tools/perf/tests/attr.c                            |   4 +-
>  tools/perf/tests/bp_account.c                      |  10 +-
>  tools/perf/tests/mem.c                             |   2 +-
>  tools/perf/tests/pmu.c                             |   2 +-
>  tools/perf/util/annotate.c                         |  20 +-
>  tools/perf/util/cgroup.c                           |   2 +-
>  tools/perf/util/debug.c                            |   1 -
>  tools/perf/util/header.c                           |  11 +-
>  tools/perf/util/mmap.c                             |  15 +-
>  tools/perf/util/parse-events.c                     |   4 +-
>  tools/perf/util/pmu.c                              |   2 +-
>  tools/perf/util/probe-finder.c                     |  13 +-
>  tools/perf/util/setup.py                           |   2 +
>  26 files changed, 298 insertions(+), 243 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2018-03-19 19:39   ` Ingo Molnar
  0 siblings, 0 replies; 38+ messages in thread
From: Ingo Molnar @ 2018-03-19 19:39 UTC (permalink / raw)



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

> Hi Ingo,
> 
> 	Please consider pulling, this has those 31 patches that were
> blocked due to some problems (author not being the fist S-o-B, build
> broken on ppc), those issues should all be fixed and then we have 14
> patches more, described in the signed tag.
> 
> Regards,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd:
> 
>   perf test: Fix exit code for record+probe_libc_inet_pton.sh (2018-03-16 13:56:31 -0300)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.17-20180319
> 
> for you to fetch changes up to 1cd618838b9703eabe4a75badf433382b12f6bef:
> 
>   perf tests bp_account: Fix build with clang-6 (2018-03-19 13:51:54 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Fixes for problems experienced with new gcc 8 warnings, that treated
>   as errors, broke the build, related to snprintf and casting issues.
>   (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf)
> 
> - Fix build of new breakpoint 'perf test' entry with clang < 6, noticed
>   on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo)
> 
> - Workaround problem with symbol resolution in 'perf annotate', using
>   the symbol name already present in the objdump output (Arnaldo Carvalho de Melo)
> 
> - Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo)
> 
> - Fix out of bounds access on array fd when cnt is 100 in one of the
>   'perf test' entries, detected using 'cpptest' (Colin Ian King)
> 
> - Add support for the forced leader feature, i.e. 'perf report --group'
>   for a group of events not really grouped when scheduled (without using
>   {} to enclose the list of events in the command line) in pipe mode,
>   e.g.:
> 
>   $ perf record -e cycles,instructions -o - kill | perf report --group -i -
> 
> - Use right type to access array elements in 'perf probe' (Masami Hiramatsu)
> 
> - Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu)
> 
> - Discard head in overwrite_rb_find_range() (Yisheng Xie)
> 
> - Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme at redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
>       perf annotate: Use asprintf when formatting objdump command line
>       perf top: Document --ignore-vmlinux
>       perf annotate: Use ops->target.name when available for unresolved call targets
>       perf tests bp_account: Fix build with clang-6
> 
> Colin Ian King (1):
>       perf tests: Fix out of bounds access on array fd when cnt is 100
> 
> Jiri Olsa (4):
>       perf record: Synthesize features before events in pipe mode
>       perf report: Support forced leader feature in pipe mode
>       perf tools: Fix snprint warnings for gcc 8
>       perf tools: Fix python extension build for gcc 8
> 
> Josh Poimboeuf (1):
>       objtool, perf: Fix GCC 8 -Wrestrict error
> 
> Masami Hiramatsu (1):
>       perf probe: Use right type to access array elements
> 
> Sukadev Bhattiprolu (1):
>       perf vendor events: Update POWER9 events
> 
> Yisheng Xie (2):
>       perf mmap: Discard head in overwrite_rb_find_range()
>       perf debug: Avoid setting 'quiet' to 'true' unnecessarily
> 
>  tools/lib/str_error_r.c                            |   2 +-
>  tools/perf/Documentation/perf-top.txt              |   3 +
>  tools/perf/builtin-record.c                        |  18 +-
>  tools/perf/builtin-report.c                        |  57 +++--
>  tools/perf/builtin-script.c                        |  22 +-
>  .../perf/pmu-events/arch/powerpc/power9/cache.json |  25 ---
>  .../pmu-events/arch/powerpc/power9/frontend.json   |  10 -
>  .../pmu-events/arch/powerpc/power9/marked.json     |   5 -
>  .../pmu-events/arch/powerpc/power9/memory.json     |   5 -
>  .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++-------
>  .../pmu-events/arch/powerpc/power9/pipeline.json   |  50 ++---
>  tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   5 -
>  .../arch/powerpc/power9/translation.json           |  10 +-
>  tools/perf/tests/attr.c                            |   4 +-
>  tools/perf/tests/bp_account.c                      |  10 +-
>  tools/perf/tests/mem.c                             |   2 +-
>  tools/perf/tests/pmu.c                             |   2 +-
>  tools/perf/util/annotate.c                         |  20 +-
>  tools/perf/util/cgroup.c                           |   2 +-
>  tools/perf/util/debug.c                            |   1 -
>  tools/perf/util/header.c                           |  11 +-
>  tools/perf/util/mmap.c                             |  15 +-
>  tools/perf/util/parse-events.c                     |   4 +-
>  tools/perf/util/pmu.c                              |   2 +-
>  tools/perf/util/probe-finder.c                     |  13 +-
>  tools/perf/util/setup.py                           |   2 +
>  26 files changed, 298 insertions(+), 243 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
@ 2018-03-19 19:39   ` Ingo Molnar
  0 siblings, 0 replies; 38+ messages in thread
From: Ingo Molnar @ 2018-03-19 19:39 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Colin King, David Ahern, Jin Yao,
	Jiri Olsa, Josh Poimboeuf, Kan Liang, kernel-janitors,
	Laura Abbott, linux-kselftest, linuxppc-dev, linux-trace-users,
	Masami Hiramatsu, Namhyung Kim, Peter Zijlstra, Ravi Bangoria,
	Sergey


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

> Hi Ingo,
> 
> 	Please consider pulling, this has those 31 patches that were
> blocked due to some problems (author not being the fist S-o-B, build
> broken on ppc), those issues should all be fixed and then we have 14
> patches more, described in the signed tag.
> 
> Regards,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd:
> 
>   perf test: Fix exit code for record+probe_libc_inet_pton.sh (2018-03-16 13:56:31 -0300)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.17-20180319
> 
> for you to fetch changes up to 1cd618838b9703eabe4a75badf433382b12f6bef:
> 
>   perf tests bp_account: Fix build with clang-6 (2018-03-19 13:51:54 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Fixes for problems experienced with new gcc 8 warnings, that treated
>   as errors, broke the build, related to snprintf and casting issues.
>   (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf)
> 
> - Fix build of new breakpoint 'perf test' entry with clang < 6, noticed
>   on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo)
> 
> - Workaround problem with symbol resolution in 'perf annotate', using
>   the symbol name already present in the objdump output (Arnaldo Carvalho de Melo)
> 
> - Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo)
> 
> - Fix out of bounds access on array fd when cnt is 100 in one of the
>   'perf test' entries, detected using 'cpptest' (Colin Ian King)
> 
> - Add support for the forced leader feature, i.e. 'perf report --group'
>   for a group of events not really grouped when scheduled (without using
>   {} to enclose the list of events in the command line) in pipe mode,
>   e.g.:
> 
>   $ perf record -e cycles,instructions -o - kill | perf report --group -i -
> 
> - Use right type to access array elements in 'perf probe' (Masami Hiramatsu)
> 
> - Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu)
> 
> - Discard head in overwrite_rb_find_range() (Yisheng Xie)
> 
> - Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
>       perf annotate: Use asprintf when formatting objdump command line
>       perf top: Document --ignore-vmlinux
>       perf annotate: Use ops->target.name when available for unresolved call targets
>       perf tests bp_account: Fix build with clang-6
> 
> Colin Ian King (1):
>       perf tests: Fix out of bounds access on array fd when cnt is 100
> 
> Jiri Olsa (4):
>       perf record: Synthesize features before events in pipe mode
>       perf report: Support forced leader feature in pipe mode
>       perf tools: Fix snprint warnings for gcc 8
>       perf tools: Fix python extension build for gcc 8
> 
> Josh Poimboeuf (1):
>       objtool, perf: Fix GCC 8 -Wrestrict error
> 
> Masami Hiramatsu (1):
>       perf probe: Use right type to access array elements
> 
> Sukadev Bhattiprolu (1):
>       perf vendor events: Update POWER9 events
> 
> Yisheng Xie (2):
>       perf mmap: Discard head in overwrite_rb_find_range()
>       perf debug: Avoid setting 'quiet' to 'true' unnecessarily
> 
>  tools/lib/str_error_r.c                            |   2 +-
>  tools/perf/Documentation/perf-top.txt              |   3 +
>  tools/perf/builtin-record.c                        |  18 +-
>  tools/perf/builtin-report.c                        |  57 +++--
>  tools/perf/builtin-script.c                        |  22 +-
>  .../perf/pmu-events/arch/powerpc/power9/cache.json |  25 ---
>  .../pmu-events/arch/powerpc/power9/frontend.json   |  10 -
>  .../pmu-events/arch/powerpc/power9/marked.json     |   5 -
>  .../pmu-events/arch/powerpc/power9/memory.json     |   5 -
>  .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++-------
>  .../pmu-events/arch/powerpc/power9/pipeline.json   |  50 ++---
>  tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   5 -
>  .../arch/powerpc/power9/translation.json           |  10 +-
>  tools/perf/tests/attr.c                            |   4 +-
>  tools/perf/tests/bp_account.c                      |  10 +-
>  tools/perf/tests/mem.c                             |   2 +-
>  tools/perf/tests/pmu.c                             |   2 +-
>  tools/perf/util/annotate.c                         |  20 +-
>  tools/perf/util/cgroup.c                           |   2 +-
>  tools/perf/util/debug.c                            |   1 -
>  tools/perf/util/header.c                           |  11 +-
>  tools/perf/util/mmap.c                             |  15 +-
>  tools/perf/util/parse-events.c                     |   4 +-
>  tools/perf/util/pmu.c                              |   2 +-
>  tools/perf/util/probe-finder.c                     |  13 +-
>  tools/perf/util/setup.py                           |   2 +
>  26 files changed, 298 insertions(+), 243 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2018-03-19 19:01 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-03-19 19:01 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Andi Kleen, Colin King,
	David Ahern, Jin Yao, Jiri Olsa, Josh Poimboeuf, Kan Liang,
	kernel-janitors, Laura Abbott, linux-kselftest, linuxppc-dev,
	linux-trace-users, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, Ravi Bangoria, Sergey Senozhatsky, Shuah Khan,
	Stephane Eranian, Steven Rostedt, Sukadev Bhattiprolu,
	Tom Zanussi, Wang Nan, Willy Tarreau, Yisheng Xie,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, this has those 31 patches that were
blocked due to some problems (author not being the fist S-o-B, build
broken on ppc), those issues should all be fixed and then we have 14
patches more, described in the signed tag.

Regards,

- Arnaldo

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

The following changes since commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd:

  perf test: Fix exit code for record+probe_libc_inet_pton.sh (2018-03-16 13:56:31 -0300)

are available in the Git repository at:

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

for you to fetch changes up to 1cd618838b9703eabe4a75badf433382b12f6bef:

  perf tests bp_account: Fix build with clang-6 (2018-03-19 13:51:54 -0300)

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

- Fixes for problems experienced with new gcc 8 warnings, that treated
  as errors, broke the build, related to snprintf and casting issues.
  (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf)

- Fix build of new breakpoint 'perf test' entry with clang < 6, noticed
  on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo)

- Workaround problem with symbol resolution in 'perf annotate', using
  the symbol name already present in the objdump output (Arnaldo Carvalho de Melo)

- Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo)

- Fix out of bounds access on array fd when cnt is 100 in one of the
  'perf test' entries, detected using 'cpptest' (Colin Ian King)

- Add support for the forced leader feature, i.e. 'perf report --group'
  for a group of events not really grouped when scheduled (without using
  {} to enclose the list of events in the command line) in pipe mode,
  e.g.:

  $ perf record -e cycles,instructions -o - kill | perf report --group -i -

- Use right type to access array elements in 'perf probe' (Masami Hiramatsu)

- Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu)

- Discard head in overwrite_rb_find_range() (Yisheng Xie)

- Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf annotate: Use asprintf when formatting objdump command line
      perf top: Document --ignore-vmlinux
      perf annotate: Use ops->target.name when available for unresolved call targets
      perf tests bp_account: Fix build with clang-6

Colin Ian King (1):
      perf tests: Fix out of bounds access on array fd when cnt is 100

Jiri Olsa (4):
      perf record: Synthesize features before events in pipe mode
      perf report: Support forced leader feature in pipe mode
      perf tools: Fix snprint warnings for gcc 8
      perf tools: Fix python extension build for gcc 8

Josh Poimboeuf (1):
      objtool, perf: Fix GCC 8 -Wrestrict error

Masami Hiramatsu (1):
      perf probe: Use right type to access array elements

Sukadev Bhattiprolu (1):
      perf vendor events: Update POWER9 events

Yisheng Xie (2):
      perf mmap: Discard head in overwrite_rb_find_range()
      perf debug: Avoid setting 'quiet' to 'true' unnecessarily

 tools/lib/str_error_r.c                            |   2 +-
 tools/perf/Documentation/perf-top.txt              |   3 +
 tools/perf/builtin-record.c                        |  18 +-
 tools/perf/builtin-report.c                        |  57 +++--
 tools/perf/builtin-script.c                        |  22 +-
 .../perf/pmu-events/arch/powerpc/power9/cache.json |  25 ---
 .../pmu-events/arch/powerpc/power9/frontend.json   |  10 -
 .../pmu-events/arch/powerpc/power9/marked.json     |   5 -
 .../pmu-events/arch/powerpc/power9/memory.json     |   5 -
 .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++-------
 .../pmu-events/arch/powerpc/power9/pipeline.json   |  50 ++---
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   5 -
 .../arch/powerpc/power9/translation.json           |  10 +-
 tools/perf/tests/attr.c                            |   4 +-
 tools/perf/tests/bp_account.c                      |  10 +-
 tools/perf/tests/mem.c                             |   2 +-
 tools/perf/tests/pmu.c                             |   2 +-
 tools/perf/util/annotate.c                         |  20 +-
 tools/perf/util/cgroup.c                           |   2 +-
 tools/perf/util/debug.c                            |   1 -
 tools/perf/util/header.c                           |  11 +-
 tools/perf/util/mmap.c                             |  15 +-
 tools/perf/util/parse-events.c                     |   4 +-
 tools/perf/util/pmu.c                              |   2 +-
 tools/perf/util/probe-finder.c                     |  13 +-
 tools/perf/util/setup.py                           |   2 +
 26 files changed, 298 insertions(+), 243 deletions(-)

Test results:

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

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

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

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

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

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

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

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

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2018-03-19 19:01 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-03-19 19:01 UTC (permalink / raw)
  To: kernel-janitors

Hi Ingo,

	Please consider pulling, this has those 31 patches that were
blocked due to some problems (author not being the fist S-o-B, build
broken on ppc), those issues should all be fixed and then we have 14
patches more, described in the signed tag.

Regards,

- Arnaldo

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

The following changes since commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd:

  perf test: Fix exit code for record+probe_libc_inet_pton.sh (2018-03-16 13:56:31 -0300)

are available in the Git repository at:

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

for you to fetch changes up to 1cd618838b9703eabe4a75badf433382b12f6bef:

  perf tests bp_account: Fix build with clang-6 (2018-03-19 13:51:54 -0300)

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

- Fixes for problems experienced with new gcc 8 warnings, that treated
  as errors, broke the build, related to snprintf and casting issues.
  (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf)

- Fix build of new breakpoint 'perf test' entry with clang < 6, noticed
  on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo)

- Workaround problem with symbol resolution in 'perf annotate', using
  the symbol name already present in the objdump output (Arnaldo Carvalho de Melo)

- Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo)

- Fix out of bounds access on array fd when cnt is 100 in one of the
  'perf test' entries, detected using 'cpptest' (Colin Ian King)

- Add support for the forced leader feature, i.e. 'perf report --group'
  for a group of events not really grouped when scheduled (without using
  {} to enclose the list of events in the command line) in pipe mode,
  e.g.:

  $ perf record -e cycles,instructions -o - kill | perf report --group -i -

- Use right type to access array elements in 'perf probe' (Masami Hiramatsu)

- Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu)

- Discard head in overwrite_rb_find_range() (Yisheng Xie)

- Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf annotate: Use asprintf when formatting objdump command line
      perf top: Document --ignore-vmlinux
      perf annotate: Use ops->target.name when available for unresolved call targets
      perf tests bp_account: Fix build with clang-6

Colin Ian King (1):
      perf tests: Fix out of bounds access on array fd when cnt is 100

Jiri Olsa (4):
      perf record: Synthesize features before events in pipe mode
      perf report: Support forced leader feature in pipe mode
      perf tools: Fix snprint warnings for gcc 8
      perf tools: Fix python extension build for gcc 8

Josh Poimboeuf (1):
      objtool, perf: Fix GCC 8 -Wrestrict error

Masami Hiramatsu (1):
      perf probe: Use right type to access array elements

Sukadev Bhattiprolu (1):
      perf vendor events: Update POWER9 events

Yisheng Xie (2):
      perf mmap: Discard head in overwrite_rb_find_range()
      perf debug: Avoid setting 'quiet' to 'true' unnecessarily

 tools/lib/str_error_r.c                            |   2 +-
 tools/perf/Documentation/perf-top.txt              |   3 +
 tools/perf/builtin-record.c                        |  18 +-
 tools/perf/builtin-report.c                        |  57 +++--
 tools/perf/builtin-script.c                        |  22 +-
 .../perf/pmu-events/arch/powerpc/power9/cache.json |  25 ---
 .../pmu-events/arch/powerpc/power9/frontend.json   |  10 -
 .../pmu-events/arch/powerpc/power9/marked.json     |   5 -
 .../pmu-events/arch/powerpc/power9/memory.json     |   5 -
 .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++-------
 .../pmu-events/arch/powerpc/power9/pipeline.json   |  50 ++---
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   5 -
 .../arch/powerpc/power9/translation.json           |  10 +-
 tools/perf/tests/attr.c                            |   4 +-
 tools/perf/tests/bp_account.c                      |  10 +-
 tools/perf/tests/mem.c                             |   2 +-
 tools/perf/tests/pmu.c                             |   2 +-
 tools/perf/util/annotate.c                         |  20 +-
 tools/perf/util/cgroup.c                           |   2 +-
 tools/perf/util/debug.c                            |   1 -
 tools/perf/util/header.c                           |  11 +-
 tools/perf/util/mmap.c                             |  15 +-
 tools/perf/util/parse-events.c                     |   4 +-
 tools/perf/util/pmu.c                              |   2 +-
 tools/perf/util/probe-finder.c                     |  13 +-
 tools/perf/util/setup.py                           |   2 +
 26 files changed, 298 insertions(+), 243 deletions(-)

Test results:

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

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

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

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

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

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

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

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

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2018-03-19 19:01 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 38+ messages in thread
From: acme @ 2018-03-19 19:01 UTC (permalink / raw)


Hi Ingo,

	Please consider pulling, this has those 31 patches that were
blocked due to some problems (author not being the fist S-o-B, build
broken on ppc), those issues should all be fixed and then we have 14
patches more, described in the signed tag.

Regards,

- Arnaldo

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

The following changes since commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd:

  perf test: Fix exit code for record+probe_libc_inet_pton.sh (2018-03-16 13:56:31 -0300)

are available in the Git repository at:

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

for you to fetch changes up to 1cd618838b9703eabe4a75badf433382b12f6bef:

  perf tests bp_account: Fix build with clang-6 (2018-03-19 13:51:54 -0300)

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

- Fixes for problems experienced with new gcc 8 warnings, that treated
  as errors, broke the build, related to snprintf and casting issues.
  (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf)

- Fix build of new breakpoint 'perf test' entry with clang < 6, noticed
  on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo)

- Workaround problem with symbol resolution in 'perf annotate', using
  the symbol name already present in the objdump output (Arnaldo Carvalho de Melo)

- Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo)

- Fix out of bounds access on array fd when cnt is 100 in one of the
  'perf test' entries, detected using 'cpptest' (Colin Ian King)

- Add support for the forced leader feature, i.e. 'perf report --group'
  for a group of events not really grouped when scheduled (without using
  {} to enclose the list of events in the command line) in pipe mode,
  e.g.:

  $ perf record -e cycles,instructions -o - kill | perf report --group -i -

- Use right type to access array elements in 'perf probe' (Masami Hiramatsu)

- Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu)

- Discard head in overwrite_rb_find_range() (Yisheng Xie)

- Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf annotate: Use asprintf when formatting objdump command line
      perf top: Document --ignore-vmlinux
      perf annotate: Use ops->target.name when available for unresolved call targets
      perf tests bp_account: Fix build with clang-6

Colin Ian King (1):
      perf tests: Fix out of bounds access on array fd when cnt is 100

Jiri Olsa (4):
      perf record: Synthesize features before events in pipe mode
      perf report: Support forced leader feature in pipe mode
      perf tools: Fix snprint warnings for gcc 8
      perf tools: Fix python extension build for gcc 8

Josh Poimboeuf (1):
      objtool, perf: Fix GCC 8 -Wrestrict error

Masami Hiramatsu (1):
      perf probe: Use right type to access array elements

Sukadev Bhattiprolu (1):
      perf vendor events: Update POWER9 events

Yisheng Xie (2):
      perf mmap: Discard head in overwrite_rb_find_range()
      perf debug: Avoid setting 'quiet' to 'true' unnecessarily

 tools/lib/str_error_r.c                            |   2 +-
 tools/perf/Documentation/perf-top.txt              |   3 +
 tools/perf/builtin-record.c                        |  18 +-
 tools/perf/builtin-report.c                        |  57 +++--
 tools/perf/builtin-script.c                        |  22 +-
 .../perf/pmu-events/arch/powerpc/power9/cache.json |  25 ---
 .../pmu-events/arch/powerpc/power9/frontend.json   |  10 -
 .../pmu-events/arch/powerpc/power9/marked.json     |   5 -
 .../pmu-events/arch/powerpc/power9/memory.json     |   5 -
 .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++-------
 .../pmu-events/arch/powerpc/power9/pipeline.json   |  50 ++---
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   5 -
 .../arch/powerpc/power9/translation.json           |  10 +-
 tools/perf/tests/attr.c                            |   4 +-
 tools/perf/tests/bp_account.c                      |  10 +-
 tools/perf/tests/mem.c                             |   2 +-
 tools/perf/tests/pmu.c                             |   2 +-
 tools/perf/util/annotate.c                         |  20 +-
 tools/perf/util/cgroup.c                           |   2 +-
 tools/perf/util/debug.c                            |   1 -
 tools/perf/util/header.c                           |  11 +-
 tools/perf/util/mmap.c                             |  15 +-
 tools/perf/util/parse-events.c                     |   4 +-
 tools/perf/util/pmu.c                              |   2 +-
 tools/perf/util/probe-finder.c                     |  13 +-
 tools/perf/util/setup.py                           |   2 +
 26 files changed, 298 insertions(+), 243 deletions(-)

Test results:

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

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

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

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

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

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

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

  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/perf/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
           make_no_libbionic_O: make NO_LIBBIONIC=1
              make_no_libelf_O: make NO_LIBELF=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
              make_no_libbpf_O: make NO_LIBBPF=1
           make_no_backtrace_O: make NO_BACKTRACE=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_slang_O: make NO_SLANG=1
             make_no_libnuma_O: make NO_LIBNUMA=1
              make_clean_all_O: make clean all
             make_util_map_o_O: make util/map.o
            make_no_demangle_O: make NO_DEMANGLE=1
            make_no_auxtrace_O: make NO_AUXTRACE=1
                   make_pure_O: make
            make_install_bin_O: make install-bin
                make_install_O: make install
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
                   make_tags_O: make tags
         make_install_prefix_O: make install prefix=/tmp/krava
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
             make_no_libperl_O: make NO_LIBPERL=1
                make_no_gtk2_O: make NO_GTK2=1
                 make_static_O: make LDFLAGS=-static
                   make_help_O: make help
                make_no_newt_O: make NO_NEWT=1
                  make_debug_O: make DEBUG=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
                 make_perf_o_O: make perf.o
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
           make_no_libpython_O: make NO_LIBPYTHON=1
                    make_doc_O: make doc
  OK
  make: Leaving directory '/home/acme/git/perf/tools/perf'
  $
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2018-03-19 19:01 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-03-19 19:01 UTC (permalink / raw)


Hi Ingo,

	Please consider pulling, this has those 31 patches that were
blocked due to some problems (author not being the fist S-o-B, build
broken on ppc), those issues should all be fixed and then we have 14
patches more, described in the signed tag.

Regards,

- Arnaldo

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

The following changes since commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd:

  perf test: Fix exit code for record+probe_libc_inet_pton.sh (2018-03-16 13:56:31 -0300)

are available in the Git repository at:

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

for you to fetch changes up to 1cd618838b9703eabe4a75badf433382b12f6bef:

  perf tests bp_account: Fix build with clang-6 (2018-03-19 13:51:54 -0300)

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

- Fixes for problems experienced with new gcc 8 warnings, that treated
  as errors, broke the build, related to snprintf and casting issues.
  (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf)

- Fix build of new breakpoint 'perf test' entry with clang < 6, noticed
  on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo)

- Workaround problem with symbol resolution in 'perf annotate', using
  the symbol name already present in the objdump output (Arnaldo Carvalho de Melo)

- Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo)

- Fix out of bounds access on array fd when cnt is 100 in one of the
  'perf test' entries, detected using 'cpptest' (Colin Ian King)

- Add support for the forced leader feature, i.e. 'perf report --group'
  for a group of events not really grouped when scheduled (without using
  {} to enclose the list of events in the command line) in pipe mode,
  e.g.:

  $ perf record -e cycles,instructions -o - kill | perf report --group -i -

- Use right type to access array elements in 'perf probe' (Masami Hiramatsu)

- Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu)

- Discard head in overwrite_rb_find_range() (Yisheng Xie)

- Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf annotate: Use asprintf when formatting objdump command line
      perf top: Document --ignore-vmlinux
      perf annotate: Use ops->target.name when available for unresolved call targets
      perf tests bp_account: Fix build with clang-6

Colin Ian King (1):
      perf tests: Fix out of bounds access on array fd when cnt is 100

Jiri Olsa (4):
      perf record: Synthesize features before events in pipe mode
      perf report: Support forced leader feature in pipe mode
      perf tools: Fix snprint warnings for gcc 8
      perf tools: Fix python extension build for gcc 8

Josh Poimboeuf (1):
      objtool, perf: Fix GCC 8 -Wrestrict error

Masami Hiramatsu (1):
      perf probe: Use right type to access array elements

Sukadev Bhattiprolu (1):
      perf vendor events: Update POWER9 events

Yisheng Xie (2):
      perf mmap: Discard head in overwrite_rb_find_range()
      perf debug: Avoid setting 'quiet' to 'true' unnecessarily

 tools/lib/str_error_r.c                            |   2 +-
 tools/perf/Documentation/perf-top.txt              |   3 +
 tools/perf/builtin-record.c                        |  18 +-
 tools/perf/builtin-report.c                        |  57 +++--
 tools/perf/builtin-script.c                        |  22 +-
 .../perf/pmu-events/arch/powerpc/power9/cache.json |  25 ---
 .../pmu-events/arch/powerpc/power9/frontend.json   |  10 -
 .../pmu-events/arch/powerpc/power9/marked.json     |   5 -
 .../pmu-events/arch/powerpc/power9/memory.json     |   5 -
 .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++-------
 .../pmu-events/arch/powerpc/power9/pipeline.json   |  50 ++---
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   5 -
 .../arch/powerpc/power9/translation.json           |  10 +-
 tools/perf/tests/attr.c                            |   4 +-
 tools/perf/tests/bp_account.c                      |  10 +-
 tools/perf/tests/mem.c                             |   2 +-
 tools/perf/tests/pmu.c                             |   2 +-
 tools/perf/util/annotate.c                         |  20 +-
 tools/perf/util/cgroup.c                           |   2 +-
 tools/perf/util/debug.c                            |   1 -
 tools/perf/util/header.c                           |  11 +-
 tools/perf/util/mmap.c                             |  15 +-
 tools/perf/util/parse-events.c                     |   4 +-
 tools/perf/util/pmu.c                              |   2 +-
 tools/perf/util/probe-finder.c                     |  13 +-
 tools/perf/util/setup.py                           |   2 +
 26 files changed, 298 insertions(+), 243 deletions(-)

Test results:

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

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

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

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

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

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

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

  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/perf/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
           make_no_libbionic_O: make NO_LIBBIONIC=1
              make_no_libelf_O: make NO_LIBELF=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
              make_no_libbpf_O: make NO_LIBBPF=1
           make_no_backtrace_O: make NO_BACKTRACE=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_slang_O: make NO_SLANG=1
             make_no_libnuma_O: make NO_LIBNUMA=1
              make_clean_all_O: make clean all
             make_util_map_o_O: make util/map.o
            make_no_demangle_O: make NO_DEMANGLE=1
            make_no_auxtrace_O: make NO_AUXTRACE=1
                   make_pure_O: make
            make_install_bin_O: make install-bin
                make_install_O: make install
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
                   make_tags_O: make tags
         make_install_prefix_O: make install prefix=/tmp/krava
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
             make_no_libperl_O: make NO_LIBPERL=1
                make_no_gtk2_O: make NO_GTK2=1
                 make_static_O: make LDFLAGS=-static
                   make_help_O: make help
                make_no_newt_O: make NO_NEWT=1
                  make_debug_O: make DEBUG=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
                 make_perf_o_O: make perf.o
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
           make_no_libpython_O: make NO_LIBPYTHON=1
                    make_doc_O: make doc
  OK
  make: Leaving directory '/home/acme/git/perf/tools/perf'
  $
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2018-03-19 19:01 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-03-19 19:01 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Andi Kleen, Colin King,
	David Ahern, Jin Yao, Jiri Olsa, Josh Poimboeuf, Kan Liang,
	kernel-janitors, Laura Abbott, linux-kselftest, linuxppc-dev,
	linux-trace-users, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, Ravi Bangoria

Hi Ingo,

	Please consider pulling, this has those 31 patches that were
blocked due to some problems (author not being the fist S-o-B, build
broken on ppc), those issues should all be fixed and then we have 14
patches more, described in the signed tag.

Regards,

- Arnaldo

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

The following changes since commit 10f354a36f9a9aa1b8bffe0abc1cd43822a85bcd:

  perf test: Fix exit code for record+probe_libc_inet_pton.sh (2018-03-16 13:56:31 -0300)

are available in the Git repository at:

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

for you to fetch changes up to 1cd618838b9703eabe4a75badf433382b12f6bef:

  perf tests bp_account: Fix build with clang-6 (2018-03-19 13:51:54 -0300)

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

- Fixes for problems experienced with new gcc 8 warnings, that treated
  as errors, broke the build, related to snprintf and casting issues.
  (Arnaldo Carvalho de Melo, Jiri Olsa, Josh Poinboeuf)

- Fix build of new breakpoint 'perf test' entry with clang < 6, noticed
  on fedora 25, 26 and 27 (Arnaldo Carvalho de Melo)

- Workaround problem with symbol resolution in 'perf annotate', using
  the symbol name already present in the objdump output (Arnaldo Carvalho de Melo)

- Document 'perf top --ignore-vmlinux' (Arnaldo Carvalho de Melo)

- Fix out of bounds access on array fd when cnt is 100 in one of the
  'perf test' entries, detected using 'cpptest' (Colin Ian King)

- Add support for the forced leader feature, i.e. 'perf report --group'
  for a group of events not really grouped when scheduled (without using
  {} to enclose the list of events in the command line) in pipe mode,
  e.g.:

  $ perf record -e cycles,instructions -o - kill | perf report --group -i -

- Use right type to access array elements in 'perf probe' (Masami Hiramatsu)

- Update POWER9 vendor events (those described in JSON format) (Sukadev Bhattiprolu)

- Discard head in overwrite_rb_find_range() (Yisheng Xie)

- Avoid setting 'quiet' to 'true' unnecessarily (Yisheng Xie)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf annotate: Use asprintf when formatting objdump command line
      perf top: Document --ignore-vmlinux
      perf annotate: Use ops->target.name when available for unresolved call targets
      perf tests bp_account: Fix build with clang-6

Colin Ian King (1):
      perf tests: Fix out of bounds access on array fd when cnt is 100

Jiri Olsa (4):
      perf record: Synthesize features before events in pipe mode
      perf report: Support forced leader feature in pipe mode
      perf tools: Fix snprint warnings for gcc 8
      perf tools: Fix python extension build for gcc 8

Josh Poimboeuf (1):
      objtool, perf: Fix GCC 8 -Wrestrict error

Masami Hiramatsu (1):
      perf probe: Use right type to access array elements

Sukadev Bhattiprolu (1):
      perf vendor events: Update POWER9 events

Yisheng Xie (2):
      perf mmap: Discard head in overwrite_rb_find_range()
      perf debug: Avoid setting 'quiet' to 'true' unnecessarily

 tools/lib/str_error_r.c                            |   2 +-
 tools/perf/Documentation/perf-top.txt              |   3 +
 tools/perf/builtin-record.c                        |  18 +-
 tools/perf/builtin-report.c                        |  57 +++--
 tools/perf/builtin-script.c                        |  22 +-
 .../perf/pmu-events/arch/powerpc/power9/cache.json |  25 ---
 .../pmu-events/arch/powerpc/power9/frontend.json   |  10 -
 .../pmu-events/arch/powerpc/power9/marked.json     |   5 -
 .../pmu-events/arch/powerpc/power9/memory.json     |   5 -
 .../perf/pmu-events/arch/powerpc/power9/other.json | 241 ++++++++++++++-------
 .../pmu-events/arch/powerpc/power9/pipeline.json   |  50 ++---
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   5 -
 .../arch/powerpc/power9/translation.json           |  10 +-
 tools/perf/tests/attr.c                            |   4 +-
 tools/perf/tests/bp_account.c                      |  10 +-
 tools/perf/tests/mem.c                             |   2 +-
 tools/perf/tests/pmu.c                             |   2 +-
 tools/perf/util/annotate.c                         |  20 +-
 tools/perf/util/cgroup.c                           |   2 +-
 tools/perf/util/debug.c                            |   1 -
 tools/perf/util/header.c                           |  11 +-
 tools/perf/util/mmap.c                             |  15 +-
 tools/perf/util/parse-events.c                     |   4 +-
 tools/perf/util/pmu.c                              |   2 +-
 tools/perf/util/probe-finder.c                     |  13 +-
 tools/perf/util/setup.py                           |   2 +
 26 files changed, 298 insertions(+), 243 deletions(-)

Test results:

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

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

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

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

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

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

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

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

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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
  2017-02-01 12:24 Arnaldo Carvalho de Melo
@ 2017-02-01 14:35 ` Ingo Molnar
  0 siblings, 0 replies; 38+ messages in thread
From: Ingo Molnar @ 2017-02-01 14:35 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Daniel Borkmann,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Joe Stringer,
	Josh Poimboeuf, Krister Johansen, Masami Hiramatsu, Michal Marek,
	Namhyung Kim, Peter Zijlstra, Steven Rostedt, Taeung Song,
	Wang Nan, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit e2cf00c257f5bbc071b489b1dfbeaa30b6f12da6:
> 
>   Merge tag 'perf-core-for-mingo-4.11-20170126' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-01-26 16:20:59 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.11-20170201
> 
> for you to fetch changes up to b05d1093987a78695766b71a2d723aa65b5c25c5:
> 
>   perf ftrace: Add ftrace.tracer config option (2017-01-31 16:20:09 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> . Allow configuring a 'perf ftrace' default --tracer (Taeung Song)
> 
> Infrastructure:
> 
> . Sync tools/arch/{powerpc,arm}/include/uapi/asm/kvm.h and
>        tools/arch/x86/include/asm/cpufeatures.h (Ingo Molnar)
> 
> . Add BPF program file system pinning APIs and respective
>   'perf test' entry (Joe Stringer)
> 
> . Make tools tree support 'make -s' (Josh Poimboeuf)
> 
> . Reference count maps in callchains, fixing SEGFAULT when
>   referencing maps after it is freed (Krister Johansen)
> 
> . Create for_each_event trace points iterator (Taeung Song)
> 
> . Do not consider an error not to have any perfconfig file
>   (Arnaldo Carvalho de Melo
> 
> . Propagate perf_config() errors (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf config: Do not consider an error not to have any perfconfig file
>       perf tools: Propagate perf_config() errors
> 
> Ingo Molnar (1):
>       tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h, {tools/,}arch/x86/include/asm/cpufeatures.h and {tools/,}arch/arm/include/uapi/asm/kvm.h
> 
> Joe Stringer (6):
>       tools lib bpf: Add BPF program pinning APIs
>       tools lib bpf: Add bpf_map__pin()
>       tools lib bpf: Add bpf_object__pin()
>       tools perf util: Make rm_rf(path) argument const
>       tools lib api fs: Add bpf_fs filesystem detector
>       perf test: Add libbpf pinning test
> 
> Josh Poimboeuf (1):
>       tools build: Add tools tree support for 'make -s'
> 
> Krister Johansen (1):
>       perf callchain: Reference count maps
> 
> Taeung Song (3):
>       perf ftrace: Remove needless code setting default tracer
>       perf tools: Create for_each_event macro for tracepoints iteration
>       perf ftrace: Add ftrace.tracer config option
> 
>  Makefile                                  |   6 +-
>  tools/arch/arm/include/uapi/asm/kvm.h     |   9 ++
>  tools/arch/powerpc/include/uapi/asm/kvm.h |   5 +
>  tools/arch/x86/include/asm/cpufeatures.h  |  11 ++
>  tools/build/Makefile.build                |  10 ++
>  tools/lib/api/fs/fs.c                     |  16 +++
>  tools/lib/api/fs/fs.h                     |   1 +
>  tools/lib/bpf/libbpf.c                    | 195 ++++++++++++++++++++++++++++++
>  tools/lib/bpf/libbpf.h                    |   5 +
>  tools/perf/builtin-ftrace.c               |  30 ++++-
>  tools/perf/builtin-help.c                 |   6 +-
>  tools/perf/builtin-kmem.c                 |   8 +-
>  tools/perf/builtin-record.c               |   4 +-
>  tools/perf/builtin-report.c               |   4 +-
>  tools/perf/builtin-top.c                  |   4 +-
>  tools/perf/perf.c                         |  15 ++-
>  tools/perf/tests/bpf.c                    |  42 ++++++-
>  tools/perf/util/callchain.c               |  27 ++++-
>  tools/perf/util/callchain.h               |   6 +
>  tools/perf/util/config.c                  |  23 ++--
>  tools/perf/util/data-convert-bt.c         |   7 +-
>  tools/perf/util/hist.c                    |  11 +-
>  tools/perf/util/intel-pt.c                |   4 +-
>  tools/perf/util/llvm-utils.c              |   4 +-
>  tools/perf/util/trace-event-info.c        |  38 +++---
>  tools/perf/util/util.c                    |   2 +-
>  tools/perf/util/util.h                    |   2 +-
>  tools/scripts/Makefile.include            |  12 +-
>  28 files changed, 446 insertions(+), 61 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2017-02-01 12:24 Arnaldo Carvalho de Melo
  2017-02-01 14:35 ` Ingo Molnar
  0 siblings, 1 reply; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-02-01 12:24 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Daniel Borkmann, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Joe Stringer, Josh Poimboeuf,
	Krister Johansen, Masami Hiramatsu, Michal Marek, Namhyung Kim,
	Peter Zijlstra, Steven Rostedt, Taeung Song, Wang Nan,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit e2cf00c257f5bbc071b489b1dfbeaa30b6f12da6:

  Merge tag 'perf-core-for-mingo-4.11-20170126' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-01-26 16:20:59 +0100)

are available in the git repository at:

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

for you to fetch changes up to b05d1093987a78695766b71a2d723aa65b5c25c5:

  perf ftrace: Add ftrace.tracer config option (2017-01-31 16:20:09 -0300)

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

New features:

. Allow configuring a 'perf ftrace' default --tracer (Taeung Song)

Infrastructure:

. Sync tools/arch/{powerpc,arm}/include/uapi/asm/kvm.h and
       tools/arch/x86/include/asm/cpufeatures.h (Ingo Molnar)

. Add BPF program file system pinning APIs and respective
  'perf test' entry (Joe Stringer)

. Make tools tree support 'make -s' (Josh Poimboeuf)

. Reference count maps in callchains, fixing SEGFAULT when
  referencing maps after it is freed (Krister Johansen)

. Create for_each_event trace points iterator (Taeung Song)

. Do not consider an error not to have any perfconfig file
  (Arnaldo Carvalho de Melo

. Propagate perf_config() errors (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf config: Do not consider an error not to have any perfconfig file
      perf tools: Propagate perf_config() errors

Ingo Molnar (1):
      tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h, {tools/,}arch/x86/include/asm/cpufeatures.h and {tools/,}arch/arm/include/uapi/asm/kvm.h

Joe Stringer (6):
      tools lib bpf: Add BPF program pinning APIs
      tools lib bpf: Add bpf_map__pin()
      tools lib bpf: Add bpf_object__pin()
      tools perf util: Make rm_rf(path) argument const
      tools lib api fs: Add bpf_fs filesystem detector
      perf test: Add libbpf pinning test

Josh Poimboeuf (1):
      tools build: Add tools tree support for 'make -s'

Krister Johansen (1):
      perf callchain: Reference count maps

Taeung Song (3):
      perf ftrace: Remove needless code setting default tracer
      perf tools: Create for_each_event macro for tracepoints iteration
      perf ftrace: Add ftrace.tracer config option

 Makefile                                  |   6 +-
 tools/arch/arm/include/uapi/asm/kvm.h     |   9 ++
 tools/arch/powerpc/include/uapi/asm/kvm.h |   5 +
 tools/arch/x86/include/asm/cpufeatures.h  |  11 ++
 tools/build/Makefile.build                |  10 ++
 tools/lib/api/fs/fs.c                     |  16 +++
 tools/lib/api/fs/fs.h                     |   1 +
 tools/lib/bpf/libbpf.c                    | 195 ++++++++++++++++++++++++++++++
 tools/lib/bpf/libbpf.h                    |   5 +
 tools/perf/builtin-ftrace.c               |  30 ++++-
 tools/perf/builtin-help.c                 |   6 +-
 tools/perf/builtin-kmem.c                 |   8 +-
 tools/perf/builtin-record.c               |   4 +-
 tools/perf/builtin-report.c               |   4 +-
 tools/perf/builtin-top.c                  |   4 +-
 tools/perf/perf.c                         |  15 ++-
 tools/perf/tests/bpf.c                    |  42 ++++++-
 tools/perf/util/callchain.c               |  27 ++++-
 tools/perf/util/callchain.h               |   6 +
 tools/perf/util/config.c                  |  23 ++--
 tools/perf/util/data-convert-bt.c         |   7 +-
 tools/perf/util/hist.c                    |  11 +-
 tools/perf/util/intel-pt.c                |   4 +-
 tools/perf/util/llvm-utils.c              |   4 +-
 tools/perf/util/trace-event-info.c        |  38 +++---
 tools/perf/util/util.c                    |   2 +-
 tools/perf/util/util.h                    |   2 +-
 tools/scripts/Makefile.include            |  12 +-
 28 files changed, 446 insertions(+), 61 deletions(-)

Test results:

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

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

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

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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
  2016-04-19 15:50 Arnaldo Carvalho de Melo
@ 2016-04-19 19:00 ` Ingo Molnar
  0 siblings, 0 replies; 38+ messages in thread
From: Ingo Molnar @ 2016-04-19 19:00 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin, Chris Phlipot,
	Colin Ian King, David Ahern, H. Peter Anvin, Jiri Olsa,
	Milian Wolff, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
	Stephen Rothwell, 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 9243ae5b28d02dc7d71a4f00c981ef6feaede3f1:
> 
>   Merge tag 'perf-core-for-mingo-20160415' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-04-16 11:09:57 +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-20160419
> 
> for you to fetch changes up to 6566feafb4dba4eef30a9c0b25e6f49f996178b6:
> 
>   perf test: Add missing verbose output explaining the reason for failure (2016-04-19 12:39:36 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> Build fixes:
> 
> - Fix 'perf trace' build when DWARF unwind isn't available (Arnaldo Carvalho de Melo)
> 
> - Remove x86 references from arch-neutral Build, fixing it in !x86 arches,
>   reported as breaking the build for powerpc64le in linux-next (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Do memset() variable 'st' using the correct size in the jit code (Colin Ian King)
> 
> - Fix postgresql ubuntu 'perf script' install instructions (Chris Phlipot)
> 
> - Use callchain_param more thoroughly when checking how callchains were
>   configured, eventually will be the only way to look for callchain parameters
>   (Arnaldo Carvalho de Melo)
> 
> - Fix some issues in the 'perf test kallsyms' entry (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (12):
>       perf trace: Fix build when DWARF unwind isn't available
>       perf evsel: Add missign class prefix to has_branch_stack method
>       perf script: Check sample->callchain before using it
>       perf callchain: Set callchain_param.enabled when parsing --call-graph
>       perf report: Use callchain_param.enabled instead of tool specific knob
>       perf tools: Ditch record_opts.callgraph_set
>       perf hists browser: Fold two consecutive symbol_conf.use_callchain ifs
>       perf top: Use callchain_param.enabled instead of symbol_conf.use_callchain
>       perf build: Remove x86 references from arch-neutral Build
>       perf symbols: Allow loading kallsyms without considering kcore files
>       perf test: Ignore kcore files in the "vmlinux matches kallsyms" test
>       perf test: Add missing verbose output explaining the reason for failure
> 
> Chris Phlipot (1):
>       perf script: Fix postgresql ubuntu install instructions
> 
> Colin Ian King (1):
>       perf jit: memset() variable 'st' using the correct size
> 
>  tools/perf/builtin-record.c                       | 14 ++++++-------
>  tools/perf/builtin-report.c                       | 11 +++++-----
>  tools/perf/builtin-script.c                       |  2 +-
>  tools/perf/builtin-top.c                          | 25 +++++++++++------------
>  tools/perf/builtin-trace.c                        | 10 ++++-----
>  tools/perf/perf.h                                 |  1 -
>  tools/perf/scripts/python/export-to-postgresql.py |  5 ++---
>  tools/perf/tests/vmlinux-kallsyms.c               | 11 +++++++++-
>  tools/perf/ui/browsers/hists.c                    |  5 ++---
>  tools/perf/util/Build                             |  4 ----
>  tools/perf/util/callchain.c                       |  2 ++
>  tools/perf/util/evsel.h                           |  2 +-
>  tools/perf/util/jitdump.c                         |  4 ++--
>  tools/perf/util/machine.c                         | 14 +++++++++----
>  tools/perf/util/machine.h                         |  2 ++
>  tools/perf/util/session.c                         |  4 ++--
>  tools/perf/util/symbol.c                          | 12 ++++++++---
>  tools/perf/util/symbol.h                          |  2 ++
>  18 files changed, 74 insertions(+), 56 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2016-04-19 15:50 Arnaldo Carvalho de Melo
  2016-04-19 19:00 ` Ingo Molnar
  0 siblings, 1 reply; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-04-19 15:50 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Chris Phlipot, Colin Ian King, David Ahern,
	H. Peter Anvin, Jiri Olsa, Milian Wolff, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian, Stephen Rothwell,
	Thomas Gleixner, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo


The following changes since commit 9243ae5b28d02dc7d71a4f00c981ef6feaede3f1:

  Merge tag 'perf-core-for-mingo-20160415' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-04-16 11:09:57 +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-20160419

for you to fetch changes up to 6566feafb4dba4eef30a9c0b25e6f49f996178b6:

  perf test: Add missing verbose output explaining the reason for failure (2016-04-19 12:39:36 -0300)

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

Build fixes:

- Fix 'perf trace' build when DWARF unwind isn't available (Arnaldo Carvalho de Melo)

- Remove x86 references from arch-neutral Build, fixing it in !x86 arches,
  reported as breaking the build for powerpc64le in linux-next (Arnaldo Carvalho de Melo)

Infrastructure:

- Do memset() variable 'st' using the correct size in the jit code (Colin Ian King)

- Fix postgresql ubuntu 'perf script' install instructions (Chris Phlipot)

- Use callchain_param more thoroughly when checking how callchains were
  configured, eventually will be the only way to look for callchain parameters
  (Arnaldo Carvalho de Melo)

- Fix some issues in the 'perf test kallsyms' entry (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (12):
      perf trace: Fix build when DWARF unwind isn't available
      perf evsel: Add missign class prefix to has_branch_stack method
      perf script: Check sample->callchain before using it
      perf callchain: Set callchain_param.enabled when parsing --call-graph
      perf report: Use callchain_param.enabled instead of tool specific knob
      perf tools: Ditch record_opts.callgraph_set
      perf hists browser: Fold two consecutive symbol_conf.use_callchain ifs
      perf top: Use callchain_param.enabled instead of symbol_conf.use_callchain
      perf build: Remove x86 references from arch-neutral Build
      perf symbols: Allow loading kallsyms without considering kcore files
      perf test: Ignore kcore files in the "vmlinux matches kallsyms" test
      perf test: Add missing verbose output explaining the reason for failure

Chris Phlipot (1):
      perf script: Fix postgresql ubuntu install instructions

Colin Ian King (1):
      perf jit: memset() variable 'st' using the correct size

 tools/perf/builtin-record.c                       | 14 ++++++-------
 tools/perf/builtin-report.c                       | 11 +++++-----
 tools/perf/builtin-script.c                       |  2 +-
 tools/perf/builtin-top.c                          | 25 +++++++++++------------
 tools/perf/builtin-trace.c                        | 10 ++++-----
 tools/perf/perf.h                                 |  1 -
 tools/perf/scripts/python/export-to-postgresql.py |  5 ++---
 tools/perf/tests/vmlinux-kallsyms.c               | 11 +++++++++-
 tools/perf/ui/browsers/hists.c                    |  5 ++---
 tools/perf/util/Build                             |  4 ----
 tools/perf/util/callchain.c                       |  2 ++
 tools/perf/util/evsel.h                           |  2 +-
 tools/perf/util/jitdump.c                         |  4 ++--
 tools/perf/util/machine.c                         | 14 +++++++++----
 tools/perf/util/machine.h                         |  2 ++
 tools/perf/util/session.c                         |  4 ++--
 tools/perf/util/symbol.c                          | 12 ++++++++---
 tools/perf/util/symbol.h                          |  2 ++
 18 files changed, 74 insertions(+), 56 deletions(-)

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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
  2015-12-07 22:17 Arnaldo Carvalho de Melo
@ 2015-12-08  4:24 ` Ingo Molnar
  0 siblings, 0 replies; 38+ messages in thread
From: Ingo Molnar @ 2015-12-08  4:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, pi3orama, Russell King, Wang Nan, Will Deacon,
	Zefan Li


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

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling, will continue processing the backlog tomorrow,
> 
> Thanks,
> 
> - Arnaldo
> 
> The following changes since commit f1ad44884a4c421ceaa9a4a8242aeeee6f686670:
> 
>   perf/x86: Remove old MSR perf tracing code (2015-12-06 12:56: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
> 
> for you to fetch changes up to cfef25b8daf7e4b49c84e174a904af9d89dc7c46:
> 
>   perf annotate: ARM support (2015-12-07 18:13:00 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Fixes and improvements for supporting annotating ARM binaries, support ARM
>   call and jump instructions, more work needed to have arch specific stuff
>   separated into tools/perf/arch/*/annotate/ (Russell King)
> 
> - Fix several 'perf test' entries broken by recent perf/core changes (Jiri Olsa)
> 
> Infrastructure:
> 
> - Consolidate perf_ev{list,sel}__{enable,disable}() calls (Jiri Olsa)
> 
> - Pass correct string to dso__adjust_kmod_long_name (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Jiri Olsa (12):
>       perf test: Use machine__new_host in dwarf unwind test
>       perf test: Use machine__new_host in mmap thread lookup test
>       perf test: Use machine__new_host in mmap thread code reading test
>       perf test: Fix cpus and thread maps reference in error path
>       perf test: Prevent using bpf-output event in round trip name test
>       perf test: Create kernel maps properly for hist entries test
>       perf evsel: Use event maps directly in perf_evsel__enable
>       perf evsel: Introduce disable() method
>       perf evlist: Factor perf_evlist__(enable|disable) functions
>       perf stat: Use perf_evlist__enable in handle_initial_delay
>       perf stat: Create events as disabled
>       perf stat: Move enable_on_exec setup under earlier code
> 
> Russell King (1):
>       perf annotate: ARM support
> 
> Wang Nan (1):
>       perf machine: Pass correct string to dso__adjust_kmod_long_name
> 
>  tools/perf/builtin-stat.c               | 44 ++++++++++++++++++++-------------
>  tools/perf/tests/code-reading.c         | 14 +++++++----
>  tools/perf/tests/dwarf-unwind.c         |  8 ++----
>  tools/perf/tests/evsel-roundtrip-name.c |  3 ++-
>  tools/perf/tests/hists_common.c         |  5 ++++
>  tools/perf/tests/mmap-thread-lookup.c   |  6 ++---
>  tools/perf/util/annotate.c              | 23 +++++++++++++++++
>  tools/perf/util/evlist.c                | 32 ++++++------------------
>  tools/perf/util/evsel.c                 | 15 ++++++++++-
>  tools/perf/util/evsel.h                 |  3 ++-
>  tools/perf/util/machine.c               |  2 +-
>  11 files changed, 95 insertions(+), 60 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2015-12-07 22:17 Arnaldo Carvalho de Melo
  2015-12-08  4:24 ` Ingo Molnar
  0 siblings, 1 reply; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-12-07 22:17 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, pi3orama, Russell King, Wang Nan, Will Deacon,
	Zefan Li

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

Hi Ingo,

	Please consider pulling, will continue processing the backlog tomorrow,

Thanks,

- Arnaldo

The following changes since commit f1ad44884a4c421ceaa9a4a8242aeeee6f686670:

  perf/x86: Remove old MSR perf tracing code (2015-12-06 12:56: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

for you to fetch changes up to cfef25b8daf7e4b49c84e174a904af9d89dc7c46:

  perf annotate: ARM support (2015-12-07 18:13:00 -0300)

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

User visible:

- Fixes and improvements for supporting annotating ARM binaries, support ARM
  call and jump instructions, more work needed to have arch specific stuff
  separated into tools/perf/arch/*/annotate/ (Russell King)

- Fix several 'perf test' entries broken by recent perf/core changes (Jiri Olsa)

Infrastructure:

- Consolidate perf_ev{list,sel}__{enable,disable}() calls (Jiri Olsa)

- Pass correct string to dso__adjust_kmod_long_name (Wang Nan)

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

----------------------------------------------------------------
Jiri Olsa (12):
      perf test: Use machine__new_host in dwarf unwind test
      perf test: Use machine__new_host in mmap thread lookup test
      perf test: Use machine__new_host in mmap thread code reading test
      perf test: Fix cpus and thread maps reference in error path
      perf test: Prevent using bpf-output event in round trip name test
      perf test: Create kernel maps properly for hist entries test
      perf evsel: Use event maps directly in perf_evsel__enable
      perf evsel: Introduce disable() method
      perf evlist: Factor perf_evlist__(enable|disable) functions
      perf stat: Use perf_evlist__enable in handle_initial_delay
      perf stat: Create events as disabled
      perf stat: Move enable_on_exec setup under earlier code

Russell King (1):
      perf annotate: ARM support

Wang Nan (1):
      perf machine: Pass correct string to dso__adjust_kmod_long_name

 tools/perf/builtin-stat.c               | 44 ++++++++++++++++++++-------------
 tools/perf/tests/code-reading.c         | 14 +++++++----
 tools/perf/tests/dwarf-unwind.c         |  8 ++----
 tools/perf/tests/evsel-roundtrip-name.c |  3 ++-
 tools/perf/tests/hists_common.c         |  5 ++++
 tools/perf/tests/mmap-thread-lookup.c   |  6 ++---
 tools/perf/util/annotate.c              | 23 +++++++++++++++++
 tools/perf/util/evlist.c                | 32 ++++++------------------
 tools/perf/util/evsel.c                 | 15 ++++++++++-
 tools/perf/util/evsel.h                 |  3 ++-
 tools/perf/util/machine.c               |  2 +-
 11 files changed, 95 insertions(+), 60 deletions(-)

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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
  2015-08-17 19:11 Arnaldo Carvalho de Melo
@ 2015-08-20  9:50 ` Ingo Molnar
  0 siblings, 0 replies; 38+ messages in thread
From: Ingo Molnar @ 2015-08-20  9:50 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Masami Hiramatsu, Milian Wolff, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian, Will Deacon


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

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	This comes with part of Adrian's latest pull req to support Intel PT
> on tools/perf, with enough to testing it, see the example in the latest
> patch in this series.
> 
> 	More wore patches for BTS and further Intel PT goodies will come soon,
> after some issues with resolving symbols get fixed. This was something that
> wasn't present last time I tested the BTS bits, so I think we should resolve
> it soon, but while we do it, these patches should move things forward wrt
> being able to test the stuff already in the kernel and to have access to this
> hardware feature using perf.
> 
> 	Please consider applying,
> 
> - Arnaldo
> 
> The following changes since commit a897b5f0393a8a05d230c9248dc5324fb30720a0:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-13 09:23:53 +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 5efb1d5489520ce72232bbc28e9156f0ebddc44e:
> 
>   perf tools: Take Intel PT into use (2015-08-17 11:11:37 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Support Intel PT in several tools, enabling the use of the processor trace
>   feature introduced in Intel Broadwell processors: (Adrian Hunter)
> 
>  # dmesg | grep Performance
>  # [0.188477] Performance Events: PEBS fmt2+, 16-deep LBR, Broadwell events, full-width counters, Intel PMU driver.
>  # perf record -e intel_pt//u -a sleep 1
>  [ perf record: Woken up 1 times to write data ]
>  [ perf record: Captured and wrote 0.216 MB perf.data ]
>  # perf script # then navigate in the tool output to some area, like this one:
>  184 1030 dl_main (/usr/lib64/ld-2.17.so) => 7f21ba661440 dl_main (/usr/lib64/ld-2.17.so)
>  185 1457 dl_main (/usr/lib64/ld-2.17.so) => 7f21ba669f10 _dl_new_object (/usr/lib64/ld-2.17.so)
>  186 9f37 _dl_new_object (/usr/lib64/ld-2.17.so) => 7f21ba677b90 strlen (/usr/lib64/ld-2.17.so)
>  187 7ba3 strlen (/usr/lib64/ld-2.17.so) => 7f21ba677c75 strlen (/usr/lib64/ld-2.17.so)
>  188 7c78 strlen (/usr/lib64/ld-2.17.so) => 7f21ba669f3c _dl_new_object (/usr/lib64/ld-2.17.so)
>  189 9f8a _dl_new_object (/usr/lib64/ld-2.17.so) => 7f21ba65fab0 calloc@plt (/usr/lib64/ld-2.17.so)
>  190 fab0 calloc@plt (/usr/lib64/ld-2.17.so) => 7f21ba675e70 calloc (/usr/lib64/ld-2.17.so)
>  191 5e87 calloc (/usr/lib64/ld-2.17.so) => 7f21ba65fa90 malloc@plt (/usr/lib64/ld-2.17.so)
>  192 fa90 malloc@plt (/usr/lib64/ld-2.17.so) => 7f21ba675e60 malloc (/usr/lib64/ld-2.17.so)
>  193 5e68 malloc (/usr/lib64/ld-2.17.so) => 7f21ba65fa80 __libc_memalign@plt (/usr/lib64/ld-2.17.so)
>  194 fa80 __libc_memalign@plt (/usr/lib64/ld-2.17.so) => 7f21ba675d50 __libc_memalign (/usr/lib64/ld-2.17.so)
>  195 5d63 __libc_memalign (/usr/lib64/ld-2.17.so) => 7f21ba675e20 __libc_memalign (/usr/lib64/ld-2.17.so)
>  196 5e40 __libc_memalign (/usr/lib64/ld-2.17.so) => 7f21ba675d73 __libc_memalign (/usr/lib64/ld-2.17.so)
>  197 5d97 __libc_memalign (/usr/lib64/ld-2.17.so) => 7f21ba675e18 __libc_memalign (/usr/lib64/ld-2.17.so)
>  198 5e1e __libc_memalign (/usr/lib64/ld-2.17.so) => 7f21ba675df9 __libc_memalign (/usr/lib64/ld-2.17.so)
>  199 5e10 __libc_memalign (/usr/lib64/ld-2.17.so) => 7f21ba669f8f _dl_new_object (/usr/lib64/ld-2.17.so)
>  200 9fc2 _dl_new_object (/usr/lib64/ld-2.17.so) =>  7f21ba678e70 memcpy (/usr/lib64/ld-2.17.so)
>  201 8e8c memcpy (/usr/lib64/ld-2.17.so) => 7f21ba678ea0 memcpy (/usr/lib64/ld-2.17.so)
> 
> - Fix annotation of vdso (Adrian Hunter)
> 
> - Fix DWARF callchains in 'perf script' (Jiri Olsa)
> 
> - Fix adding probes in kernel syscalls and listing which variables can be
>   collected at kernel syscall function lines (Masami Hiramatsu)
> 
> Build Fixes:
> 
> - Fix 32-bit compilation error in util/annotate.c (Adrian Hunter)
> 
> - Support static linking with libdw on Fedora 22 (Andi Kleen)
> 
> Infrastructure:
> 
> - Add a helper function to probe whether cpu-wide tracing is possible (Adrian Hunter)
> 
> - Move vfs_getname storage to per thread area in 'perf trace' (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (10):
>       perf annotate: Fix 32-bit compilation error in util/annotate.c
>       perf symbols: Fix annotation of vdso
>       perf tools: Add a helper function to probe whether cpu-wide tracing is possible
>       perf auxtrace: Add Intel PT as an AUX area tracing type
>       perf tools: Add Intel PT packet decoder
>       perf tools: Add Intel PT instruction decoder
>       perf tools: Add Intel PT log
>       perf tools: Add Intel PT decoder
>       perf tools: Add Intel PT support
>       perf tools: Take Intel PT into use
> 
> Andi Kleen (1):
>       perf tools: Support static linking with libdw
> 
> Arnaldo Carvalho de Melo (1):
>       perf trace: Move vfs_getname storage to per thread area
> 
> Jiri Olsa (1):
>       perf script: Initialize callchain_param.record_mode
> 
> Masami Hiramatsu (1):
>       perf probe: Fix to add missed brace around if block
> 
>  tools/build/Makefile.build                         |    2 +
>  tools/build/feature/Makefile                       |    7 +-
>  tools/perf/.gitignore                              |    1 +
>  tools/perf/Documentation/intel-pt.txt              |  588 ++++++
>  tools/perf/Makefile.perf                           |   12 +-
>  tools/perf/arch/x86/util/Build                     |    4 +
>  tools/perf/arch/x86/util/auxtrace.c                |   38 +
>  tools/perf/arch/x86/util/intel-pt.c                |  752 ++++++++
>  tools/perf/arch/x86/util/pmu.c                     |   15 +
>  tools/perf/builtin-script.c                        |   17 +
>  tools/perf/builtin-trace.c                         |   38 +-
>  tools/perf/config/Makefile                         |    6 +-
>  tools/perf/util/Build                              |    2 +
>  tools/perf/util/annotate.c                         |    4 +-
>  tools/perf/util/auxtrace.c                         |    6 +-
>  tools/perf/util/auxtrace.h                         |    1 +
>  tools/perf/util/dwarf-aux.c                        |    3 +-
>  tools/perf/util/evlist.h                           |    1 +
>  tools/perf/util/intel-pt-decoder/Build             |   11 +
>  .../util/intel-pt-decoder/gen-insn-attr-x86.awk    |  386 ++++
>  tools/perf/util/intel-pt-decoder/inat.c            |   96 +
>  tools/perf/util/intel-pt-decoder/inat.h            |  221 +++
>  tools/perf/util/intel-pt-decoder/insn.c            |  594 ++++++
>  tools/perf/util/intel-pt-decoder/insn.h            |  201 ++
>  .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 1816 +++++++++++++++++++
>  .../perf/util/intel-pt-decoder/intel-pt-decoder.h  |  104 ++
>  .../util/intel-pt-decoder/intel-pt-insn-decoder.c  |  246 +++
>  .../util/intel-pt-decoder/intel-pt-insn-decoder.h  |   65 +
>  tools/perf/util/intel-pt-decoder/intel-pt-log.c    |  155 ++
>  tools/perf/util/intel-pt-decoder/intel-pt-log.h    |   52 +
>  .../util/intel-pt-decoder/intel-pt-pkt-decoder.c   |  400 ++++
>  .../util/intel-pt-decoder/intel-pt-pkt-decoder.h   |   64 +
>  .../perf/util/intel-pt-decoder/x86-opcode-map.txt  |  970 ++++++++++
>  tools/perf/util/intel-pt.c                         | 1911 ++++++++++++++++++++
>  tools/perf/util/intel-pt.h                         |   51 +
>  tools/perf/util/pmu.c                              |    4 +-
>  tools/perf/util/record.c                           |   24 +
>  tools/perf/util/symbol-elf.c                       |   11 +
>  38 files changed, 8858 insertions(+), 21 deletions(-)
>  create mode 100644 tools/perf/Documentation/intel-pt.txt
>  create mode 100644 tools/perf/arch/x86/util/auxtrace.c
>  create mode 100644 tools/perf/arch/x86/util/intel-pt.c
>  create mode 100644 tools/perf/arch/x86/util/pmu.c
>  create mode 100644 tools/perf/util/intel-pt-decoder/Build
>  create mode 100644 tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk
>  create mode 100644 tools/perf/util/intel-pt-decoder/inat.c
>  create mode 100644 tools/perf/util/intel-pt-decoder/inat.h
>  create mode 100644 tools/perf/util/intel-pt-decoder/insn.c
>  create mode 100644 tools/perf/util/intel-pt-decoder/insn.h
>  create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
>  create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-decoder.h
>  create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c
>  create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.h
>  create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-log.c
>  create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-log.h
>  create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
>  create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.h
>  create mode 100644 tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
>  create mode 100644 tools/perf/util/intel-pt.c
>  create mode 100644 tools/perf/util/intel-pt.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2015-08-17 19:11 Arnaldo Carvalho de Melo
  2015-08-20  9:50 ` Ingo Molnar
  0 siblings, 1 reply; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-08-17 19:11 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Masami Hiramatsu, Milian Wolff, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian, Will Deacon

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

Hi Ingo,

	This comes with part of Adrian's latest pull req to support Intel PT
on tools/perf, with enough to testing it, see the example in the latest
patch in this series.

	More wore patches for BTS and further Intel PT goodies will come soon,
after some issues with resolving symbols get fixed. This was something that
wasn't present last time I tested the BTS bits, so I think we should resolve
it soon, but while we do it, these patches should move things forward wrt
being able to test the stuff already in the kernel and to have access to this
hardware feature using perf.

	Please consider applying,

- Arnaldo

The following changes since commit a897b5f0393a8a05d230c9248dc5324fb30720a0:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-13 09:23:53 +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 5efb1d5489520ce72232bbc28e9156f0ebddc44e:

  perf tools: Take Intel PT into use (2015-08-17 11:11:37 -0300)

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

- Support Intel PT in several tools, enabling the use of the processor trace
  feature introduced in Intel Broadwell processors: (Adrian Hunter)

 # dmesg | grep Performance
 # [0.188477] Performance Events: PEBS fmt2+, 16-deep LBR, Broadwell events, full-width counters, Intel PMU driver.
 # perf record -e intel_pt//u -a sleep 1
 [ perf record: Woken up 1 times to write data ]
 [ perf record: Captured and wrote 0.216 MB perf.data ]
 # perf script # then navigate in the tool output to some area, like this one:
 184 1030 dl_main (/usr/lib64/ld-2.17.so) => 7f21ba661440 dl_main (/usr/lib64/ld-2.17.so)
 185 1457 dl_main (/usr/lib64/ld-2.17.so) => 7f21ba669f10 _dl_new_object (/usr/lib64/ld-2.17.so)
 186 9f37 _dl_new_object (/usr/lib64/ld-2.17.so) => 7f21ba677b90 strlen (/usr/lib64/ld-2.17.so)
 187 7ba3 strlen (/usr/lib64/ld-2.17.so) => 7f21ba677c75 strlen (/usr/lib64/ld-2.17.so)
 188 7c78 strlen (/usr/lib64/ld-2.17.so) => 7f21ba669f3c _dl_new_object (/usr/lib64/ld-2.17.so)
 189 9f8a _dl_new_object (/usr/lib64/ld-2.17.so) => 7f21ba65fab0 calloc@plt (/usr/lib64/ld-2.17.so)
 190 fab0 calloc@plt (/usr/lib64/ld-2.17.so) => 7f21ba675e70 calloc (/usr/lib64/ld-2.17.so)
 191 5e87 calloc (/usr/lib64/ld-2.17.so) => 7f21ba65fa90 malloc@plt (/usr/lib64/ld-2.17.so)
 192 fa90 malloc@plt (/usr/lib64/ld-2.17.so) => 7f21ba675e60 malloc (/usr/lib64/ld-2.17.so)
 193 5e68 malloc (/usr/lib64/ld-2.17.so) => 7f21ba65fa80 __libc_memalign@plt (/usr/lib64/ld-2.17.so)
 194 fa80 __libc_memalign@plt (/usr/lib64/ld-2.17.so) => 7f21ba675d50 __libc_memalign (/usr/lib64/ld-2.17.so)
 195 5d63 __libc_memalign (/usr/lib64/ld-2.17.so) => 7f21ba675e20 __libc_memalign (/usr/lib64/ld-2.17.so)
 196 5e40 __libc_memalign (/usr/lib64/ld-2.17.so) => 7f21ba675d73 __libc_memalign (/usr/lib64/ld-2.17.so)
 197 5d97 __libc_memalign (/usr/lib64/ld-2.17.so) => 7f21ba675e18 __libc_memalign (/usr/lib64/ld-2.17.so)
 198 5e1e __libc_memalign (/usr/lib64/ld-2.17.so) => 7f21ba675df9 __libc_memalign (/usr/lib64/ld-2.17.so)
 199 5e10 __libc_memalign (/usr/lib64/ld-2.17.so) => 7f21ba669f8f _dl_new_object (/usr/lib64/ld-2.17.so)
 200 9fc2 _dl_new_object (/usr/lib64/ld-2.17.so) =>  7f21ba678e70 memcpy (/usr/lib64/ld-2.17.so)
 201 8e8c memcpy (/usr/lib64/ld-2.17.so) => 7f21ba678ea0 memcpy (/usr/lib64/ld-2.17.so)

- Fix annotation of vdso (Adrian Hunter)

- Fix DWARF callchains in 'perf script' (Jiri Olsa)

- Fix adding probes in kernel syscalls and listing which variables can be
  collected at kernel syscall function lines (Masami Hiramatsu)

Build Fixes:

- Fix 32-bit compilation error in util/annotate.c (Adrian Hunter)

- Support static linking with libdw on Fedora 22 (Andi Kleen)

Infrastructure:

- Add a helper function to probe whether cpu-wide tracing is possible (Adrian Hunter)

- Move vfs_getname storage to per thread area in 'perf trace' (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Adrian Hunter (10):
      perf annotate: Fix 32-bit compilation error in util/annotate.c
      perf symbols: Fix annotation of vdso
      perf tools: Add a helper function to probe whether cpu-wide tracing is possible
      perf auxtrace: Add Intel PT as an AUX area tracing type
      perf tools: Add Intel PT packet decoder
      perf tools: Add Intel PT instruction decoder
      perf tools: Add Intel PT log
      perf tools: Add Intel PT decoder
      perf tools: Add Intel PT support
      perf tools: Take Intel PT into use

Andi Kleen (1):
      perf tools: Support static linking with libdw

Arnaldo Carvalho de Melo (1):
      perf trace: Move vfs_getname storage to per thread area

Jiri Olsa (1):
      perf script: Initialize callchain_param.record_mode

Masami Hiramatsu (1):
      perf probe: Fix to add missed brace around if block

 tools/build/Makefile.build                         |    2 +
 tools/build/feature/Makefile                       |    7 +-
 tools/perf/.gitignore                              |    1 +
 tools/perf/Documentation/intel-pt.txt              |  588 ++++++
 tools/perf/Makefile.perf                           |   12 +-
 tools/perf/arch/x86/util/Build                     |    4 +
 tools/perf/arch/x86/util/auxtrace.c                |   38 +
 tools/perf/arch/x86/util/intel-pt.c                |  752 ++++++++
 tools/perf/arch/x86/util/pmu.c                     |   15 +
 tools/perf/builtin-script.c                        |   17 +
 tools/perf/builtin-trace.c                         |   38 +-
 tools/perf/config/Makefile                         |    6 +-
 tools/perf/util/Build                              |    2 +
 tools/perf/util/annotate.c                         |    4 +-
 tools/perf/util/auxtrace.c                         |    6 +-
 tools/perf/util/auxtrace.h                         |    1 +
 tools/perf/util/dwarf-aux.c                        |    3 +-
 tools/perf/util/evlist.h                           |    1 +
 tools/perf/util/intel-pt-decoder/Build             |   11 +
 .../util/intel-pt-decoder/gen-insn-attr-x86.awk    |  386 ++++
 tools/perf/util/intel-pt-decoder/inat.c            |   96 +
 tools/perf/util/intel-pt-decoder/inat.h            |  221 +++
 tools/perf/util/intel-pt-decoder/insn.c            |  594 ++++++
 tools/perf/util/intel-pt-decoder/insn.h            |  201 ++
 .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 1816 +++++++++++++++++++
 .../perf/util/intel-pt-decoder/intel-pt-decoder.h  |  104 ++
 .../util/intel-pt-decoder/intel-pt-insn-decoder.c  |  246 +++
 .../util/intel-pt-decoder/intel-pt-insn-decoder.h  |   65 +
 tools/perf/util/intel-pt-decoder/intel-pt-log.c    |  155 ++
 tools/perf/util/intel-pt-decoder/intel-pt-log.h    |   52 +
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.c   |  400 ++++
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.h   |   64 +
 .../perf/util/intel-pt-decoder/x86-opcode-map.txt  |  970 ++++++++++
 tools/perf/util/intel-pt.c                         | 1911 ++++++++++++++++++++
 tools/perf/util/intel-pt.h                         |   51 +
 tools/perf/util/pmu.c                              |    4 +-
 tools/perf/util/record.c                           |   24 +
 tools/perf/util/symbol-elf.c                       |   11 +
 38 files changed, 8858 insertions(+), 21 deletions(-)
 create mode 100644 tools/perf/Documentation/intel-pt.txt
 create mode 100644 tools/perf/arch/x86/util/auxtrace.c
 create mode 100644 tools/perf/arch/x86/util/intel-pt.c
 create mode 100644 tools/perf/arch/x86/util/pmu.c
 create mode 100644 tools/perf/util/intel-pt-decoder/Build
 create mode 100644 tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk
 create mode 100644 tools/perf/util/intel-pt-decoder/inat.c
 create mode 100644 tools/perf/util/intel-pt-decoder/inat.h
 create mode 100644 tools/perf/util/intel-pt-decoder/insn.c
 create mode 100644 tools/perf/util/intel-pt-decoder/insn.h
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-decoder.h
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.h
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-log.c
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-log.h
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.h
 create mode 100644 tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
 create mode 100644 tools/perf/util/intel-pt.c
 create mode 100644 tools/perf/util/intel-pt.h

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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
  2014-06-12 20:55 ` Jean Pihet
@ 2014-06-13  9:03   ` Jiri Olsa
  0 siblings, 0 replies; 38+ messages in thread
From: Jiri Olsa @ 2014-06-13  9:03 UTC (permalink / raw)
  To: Jean Pihet
  Cc: Jiri Olsa, Ingo Molnar, linux-kernel, Andi Kleen,
	Arnaldo Carvalho de Melo, Corey Ashford, David Ahern,
	Frederic Weisbecker, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra

On Thu, Jun 12, 2014 at 10:55:55PM +0200, Jean Pihet wrote:
> Hi Jiri,
> 
> 
> On 12 June 2014 17:30, Jiri Olsa <jolsa@kernel.org> wrote:
> > hi Ingo,
> > please consider pulling
> >
> > thanks,
> > jirka
> >
> > The following changes since commit 7184062b94b4bfac08715fb786fd2df399c5d6ee:
> >
> >   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-06-12 13:54:42 +0200)
> >
> > are available in the git repository at:
> >
> >
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
> >
> > for you to fetch changes up to 45dc1bb5c1d47f9519e2101f6b073bb4bb1d1f99:
> >
> >   perf tests: Add test for closing dso objects on EMFILE error (2014-06-12 16:53:23 +0200)
> >
> > ----------------------------------------------------------------
> > perf/core improvements and fixes:
> >
> > . Honor user freq/interval properly in record command (Namhyung Kim)
> >
> > . Speedup DWARF unwind (Jiri Olsa)
> Here are the results of the performance assessment on ARMv7, FWIW:
> 
> The results for unwind_speedup (v4) on ARMv7 are:
> - libunwind: between -17% in execution time for light load (i.e. using
> not-so-deep backtraces from the stress app.) and -25% for deep
> backtrace (the stress_bt app.),
> - libdw: no significant improvement (0-3% improvement).
> 
> The results for unwind_speedup (v3) on ARMv7 are:
> - libunwind: between -29% in execution time for light load (i.e. using
> not-so-deep backtraces from the stress app.) and -49% for deep
> backtrace (the stress_bt app.),
> - libdw: no significant improvement (0-2% improvement).
> 
> Note: v3 is faster than v4 by 13-25%, with and without the speed-up
> patches. The real cause has been investigated, yet.

hi,
yep, I also found the v4 to be slower, because of the
caching code in each open.. I believe the first version
you meassured was the original, that kept all dso objects
open.. now the caching code spends more cycles

also we are not mmapping dso so far.. there's the cached
read in place

please let me know if you think it's something else

thanks for testing,
jirka

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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
  2014-06-12 15:30 Jiri Olsa
  2014-06-12 20:55 ` Jean Pihet
@ 2014-06-13  6:20 ` Ingo Molnar
  1 sibling, 0 replies; 38+ messages in thread
From: Ingo Molnar @ 2014-06-13  6:20 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra


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

> hi Ingo,
> please consider pulling
> 
> thanks,
> jirka
> 
> The following changes since commit 7184062b94b4bfac08715fb786fd2df399c5d6ee:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-06-12 13:54:42 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to 45dc1bb5c1d47f9519e2101f6b073bb4bb1d1f99:
> 
>   perf tests: Add test for closing dso objects on EMFILE error (2014-06-12 16:53:23 +0200)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Honor user freq/interval properly in record command (Namhyung Kim)
> 
> . Speedup DWARF unwind (Jiri Olsa)
> 
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> 
> ----------------------------------------------------------------
> Jiri Olsa (13):
>       perf tools: Cache register accesses for unwind processing
>       perf tools: Separate dso data related variables
>       perf tools: Add data_fd into dso object
>       perf tools: Add global list of opened dso objects
>       perf tools: Add global count of opened dso objects
>       perf tools: Cache dso data file descriptor
>       perf tools: Add file size check and factor dso__data_read_offset
>       perf tools: Allow to close dso fd in case of open failure
>       perf tools: Add dso__data_* interface descriptons
>       perf tests: Spawn child for each test
>       perf tests: Allow reuse of test_file function
>       perf tests: Add test for caching dso file descriptors
>       perf tests: Add test for closing dso objects on EMFILE error
> 
> Namhyung Kim (1):
>       perf record: Fix to honor user freq/interval properly
> 
>  tools/perf/tests/builtin-test.c    |  42 +++++-
>  tools/perf/tests/dso-data.c        | 214 +++++++++++++++++++++++++++-
>  tools/perf/tests/tests.h           |   2 +
>  tools/perf/util/dso.c              | 279 +++++++++++++++++++++++++++++++++----
>  tools/perf/util/dso.h              |  50 ++++++-
>  tools/perf/util/event.h            |   5 +
>  tools/perf/util/evsel.c            |   4 +-
>  tools/perf/util/perf_regs.c        |  10 +-
>  tools/perf/util/perf_regs.h        |   4 +-
>  tools/perf/util/unwind-libunwind.c |   2 -
>  10 files changed, 574 insertions(+), 38 deletions(-)

Pulled, thanks a lot Jiri!

	Ingo

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

* Re: [GIT PULL 00/14] perf/core improvements and fixes
  2014-06-12 15:30 Jiri Olsa
@ 2014-06-12 20:55 ` Jean Pihet
  2014-06-13  9:03   ` Jiri Olsa
  2014-06-13  6:20 ` Ingo Molnar
  1 sibling, 1 reply; 38+ messages in thread
From: Jean Pihet @ 2014-06-12 20:55 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Ingo Molnar, linux-kernel, Andi Kleen, Arnaldo Carvalho de Melo,
	Corey Ashford, David Ahern, Frederic Weisbecker, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra

Hi Jiri,


On 12 June 2014 17:30, Jiri Olsa <jolsa@kernel.org> wrote:
> hi Ingo,
> please consider pulling
>
> thanks,
> jirka
>
> The following changes since commit 7184062b94b4bfac08715fb786fd2df399c5d6ee:
>
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-06-12 13:54:42 +0200)
>
> are available in the git repository at:
>
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
>
> for you to fetch changes up to 45dc1bb5c1d47f9519e2101f6b073bb4bb1d1f99:
>
>   perf tests: Add test for closing dso objects on EMFILE error (2014-06-12 16:53:23 +0200)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes:
>
> . Honor user freq/interval properly in record command (Namhyung Kim)
>
> . Speedup DWARF unwind (Jiri Olsa)
Here are the results of the performance assessment on ARMv7, FWIW:

The results for unwind_speedup (v4) on ARMv7 are:
- libunwind: between -17% in execution time for light load (i.e. using
not-so-deep backtraces from the stress app.) and -25% for deep
backtrace (the stress_bt app.),
- libdw: no significant improvement (0-3% improvement).

The results for unwind_speedup (v3) on ARMv7 are:
- libunwind: between -29% in execution time for light load (i.e. using
not-so-deep backtraces from the stress app.) and -49% for deep
backtrace (the stress_bt app.),
- libdw: no significant improvement (0-2% improvement).

Note: v3 is faster than v4 by 13-25%, with and without the speed-up
patches. The real cause has been investigated, yet.

Cf. https://wiki.linaro.org/LEG/Engineering/TOOLS/perf-callstack-unwinding#Speed_improvement
for the details.

Regards,
Jean

>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
>
> ----------------------------------------------------------------
> Jiri Olsa (13):
>       perf tools: Cache register accesses for unwind processing
>       perf tools: Separate dso data related variables
>       perf tools: Add data_fd into dso object
>       perf tools: Add global list of opened dso objects
>       perf tools: Add global count of opened dso objects
>       perf tools: Cache dso data file descriptor
>       perf tools: Add file size check and factor dso__data_read_offset
>       perf tools: Allow to close dso fd in case of open failure
>       perf tools: Add dso__data_* interface descriptons
>       perf tests: Spawn child for each test
>       perf tests: Allow reuse of test_file function
>       perf tests: Add test for caching dso file descriptors
>       perf tests: Add test for closing dso objects on EMFILE error
>
> Namhyung Kim (1):
>       perf record: Fix to honor user freq/interval properly
>
>  tools/perf/tests/builtin-test.c    |  42 +++++-
>  tools/perf/tests/dso-data.c        | 214 +++++++++++++++++++++++++++-
>  tools/perf/tests/tests.h           |   2 +
>  tools/perf/util/dso.c              | 279 +++++++++++++++++++++++++++++++++----
>  tools/perf/util/dso.h              |  50 ++++++-
>  tools/perf/util/event.h            |   5 +
>  tools/perf/util/evsel.c            |   4 +-
>  tools/perf/util/perf_regs.c        |  10 +-
>  tools/perf/util/perf_regs.h        |   4 +-
>  tools/perf/util/unwind-libunwind.c |   2 -
>  10 files changed, 574 insertions(+), 38 deletions(-)

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

* [GIT PULL 00/14] perf/core improvements and fixes
@ 2014-06-12 15:30 Jiri Olsa
  2014-06-12 20:55 ` Jean Pihet
  2014-06-13  6:20 ` Ingo Molnar
  0 siblings, 2 replies; 38+ messages in thread
From: Jiri Olsa @ 2014-06-12 15:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Andi Kleen, Arnaldo Carvalho de Melo,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jean Pihet,
	Jiri Olsa, Namhyung Kim, Paul Mackerras, Peter Zijlstra

hi Ingo,
please consider pulling

thanks,
jirka

The following changes since commit 7184062b94b4bfac08715fb786fd2df399c5d6ee:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-06-12 13:54:42 +0200)

are available in the git repository at:


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

for you to fetch changes up to 45dc1bb5c1d47f9519e2101f6b073bb4bb1d1f99:

  perf tests: Add test for closing dso objects on EMFILE error (2014-06-12 16:53:23 +0200)

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

. Honor user freq/interval properly in record command (Namhyung Kim)

. Speedup DWARF unwind (Jiri Olsa)

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

----------------------------------------------------------------
Jiri Olsa (13):
      perf tools: Cache register accesses for unwind processing
      perf tools: Separate dso data related variables
      perf tools: Add data_fd into dso object
      perf tools: Add global list of opened dso objects
      perf tools: Add global count of opened dso objects
      perf tools: Cache dso data file descriptor
      perf tools: Add file size check and factor dso__data_read_offset
      perf tools: Allow to close dso fd in case of open failure
      perf tools: Add dso__data_* interface descriptons
      perf tests: Spawn child for each test
      perf tests: Allow reuse of test_file function
      perf tests: Add test for caching dso file descriptors
      perf tests: Add test for closing dso objects on EMFILE error

Namhyung Kim (1):
      perf record: Fix to honor user freq/interval properly

 tools/perf/tests/builtin-test.c    |  42 +++++-
 tools/perf/tests/dso-data.c        | 214 +++++++++++++++++++++++++++-
 tools/perf/tests/tests.h           |   2 +
 tools/perf/util/dso.c              | 279 +++++++++++++++++++++++++++++++++----
 tools/perf/util/dso.h              |  50 ++++++-
 tools/perf/util/event.h            |   5 +
 tools/perf/util/evsel.c            |   4 +-
 tools/perf/util/perf_regs.c        |  10 +-
 tools/perf/util/perf_regs.h        |   4 +-
 tools/perf/util/unwind-libunwind.c |   2 -
 10 files changed, 574 insertions(+), 38 deletions(-)

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

end of thread, other threads:[~2018-03-19 19:39 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-29 16:30 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 01/14] perf annotate: Fix -i option, which is currently ignored Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 02/14] perf probe: Fix 'function unused' warning Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 03/14] perf db-export: Fix thread ref-counting Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 04/14] perf kmem: Fix compiler warning about may be accessing uninitialized variable Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 05/14] perf tools: Add ARM64 perf_regs_load to support libunwind and enable testing Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 06/14] perf tests: Switch from open to openat Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 07/14] perf tests: Aename open*.c to openat*.c Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 08/14] perf tests: Remove getpgrp from mmap-basic Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 09/14] perf machine: Adopt findnew_kernel method Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 10/14] perf machine: No need to have two DSOs lists Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 11/14] perf machine: Introduce machine__findnew_dso() method Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 12/14] perf machine: Fix up vdso methods names Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 13/14] perf build: Do not fail on missing Build file Arnaldo Carvalho de Melo
2015-05-29 16:30 ` [PATCH 14/14] perf tools: Make Ctrl-C stop processing on TUI Arnaldo Carvalho de Melo
2015-05-29 18:20 ` [GIT PULL 00/14] perf/core improvements and fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2018-03-19 19:01 Arnaldo Carvalho de Melo
2018-03-19 19:01 ` Arnaldo Carvalho de Melo
2018-03-19 19:01 ` Arnaldo Carvalho de Melo
2018-03-19 19:01 ` acme
2018-03-19 19:01 ` Arnaldo Carvalho de Melo
2018-03-19 19:39 ` Ingo Molnar
2018-03-19 19:39   ` Ingo Molnar
2018-03-19 19:39   ` Ingo Molnar
2018-03-19 19:39   ` mingo
2018-03-19 19:39   ` Ingo Molnar
2017-02-01 12:24 Arnaldo Carvalho de Melo
2017-02-01 14:35 ` Ingo Molnar
2016-04-19 15:50 Arnaldo Carvalho de Melo
2016-04-19 19:00 ` Ingo Molnar
2015-12-07 22:17 Arnaldo Carvalho de Melo
2015-12-08  4:24 ` Ingo Molnar
2015-08-17 19:11 Arnaldo Carvalho de Melo
2015-08-20  9:50 ` Ingo Molnar
2014-06-12 15:30 Jiri Olsa
2014-06-12 20:55 ` Jean Pihet
2014-06-13  9:03   ` Jiri Olsa
2014-06-13  6:20 ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.