All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 00/10] perf/core improvements and fixes
@ 2013-11-11 20:22 Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 01/10] perf ui tui progress: Don't force a refresh during progress update Arnaldo Carvalho de Melo
                   ` (9 more replies)
  0 siblings, 10 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter, Bill Gray,
	David Ahern, Don Zickus, Frederic Weisbecker, Jiri Olsa,
	Joe Mario, Mike Galbraith, Namhyung Kim, Patrick Palka,
	Paul Mackerras, Peter Zijlstra, Richard Fowles, Stephane Eranian,
	Arnaldo Carvalho de Melo

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit caea6cf52139116e43e615d87fcbf9823e197fdf:

  Merge branch 'uprobes/core' of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc into perf/core (2013-11-11 09:44:16 +0100)

are available in the git repository at:


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

for you to fetch changes up to 67c1e4a53b17894e6a24f95057cc374c4be051cb:

  perf tests: Use lower sample_freq in sw clock event period test (2013-11-11 16:43:34 -0300)

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

. Prevent condition that all sort keys are elided, fix from Namhyung Kim.

. Synthesize non-exec MMAP records when --data used, allowing the resolution of
  data addresses to symbols (global variables, etc).

. Don't force a refresh during progress update in the TUI, greatly reducing
  startup costs, fix from Patrick Palka.

. Fix sw clock event period test wrt not checking if using > max_sample_freq.

. Code cleanups by David Ahern and Adrian Hunter.

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

----------------------------------------------------------------
Adrian Hunter (1):
      perf record: Use correct return type for write()

Arnaldo Carvalho de Melo (6):
      perf evsel: Remove idx parm from constructor
      perf record: Synthesize non-exec MMAP records when --data used
      perf machine: Introduce synthesize_threads method out of open coded equivalent
      perf machine: Simplify synthesize_threads method
      perf tests: Check return of perf_evlist__open sw clock event period test
      perf tests: Use lower sample_freq in sw clock event period test

David Ahern (1):
      perf record: Move existing write_output into helper function

Namhyung Kim (1):
      perf tools: Prevent condition that all sort keys are elided

Patrick Palka (1):
      perf ui tui progress: Don't force a refresh during progress update

 tools/perf/builtin-kvm.c                  | 14 ++-------
 tools/perf/builtin-record.c               | 21 ++++++-------
 tools/perf/builtin-top.c                  | 10 ++-----
 tools/perf/builtin-trace.c                | 24 +++++----------
 tools/perf/tests/code-reading.c           |  2 +-
 tools/perf/tests/evsel-tp-sched.c         |  4 +--
 tools/perf/tests/mmap-basic.c             |  2 +-
 tools/perf/tests/open-syscall-all-cpus.c  |  2 +-
 tools/perf/tests/open-syscall-tp-fields.c |  2 +-
 tools/perf/tests/open-syscall.c           |  2 +-
 tools/perf/tests/sw-clock.c               | 13 ++++++--
 tools/perf/ui/tui/progress.c              |  3 +-
 tools/perf/util/event.c                   | 50 ++++++++++++++++++-------------
 tools/perf/util/event.h                   |  4 +--
 tools/perf/util/evlist.c                  |  9 +++---
 tools/perf/util/evsel.c                   |  4 +--
 tools/perf/util/evsel.h                   | 15 ++++++++--
 tools/perf/util/header.c                  |  4 +--
 tools/perf/util/machine.c                 | 12 ++++++++
 tools/perf/util/machine.h                 | 12 ++++++++
 tools/perf/util/parse-events.c            |  6 ++--
 tools/perf/util/sort.c                    | 13 ++++++++
 22 files changed, 133 insertions(+), 95 deletions(-)

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

* [PATCH 01/10] perf ui tui progress: Don't force a refresh during progress update
  2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2013-11-11 20:22 ` Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 02/10] perf evsel: Remove idx parm from constructor Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Patrick Palka, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Patrick Palka <patrick@parcs.ath.cx>

Each call to tui_progress__update() would forcibly refresh the entire
screen.  This is somewhat inefficient and causes noticable flickering
during the startup of perf-report, especially on large/slow terminals.

It looks like the force-refresh in tui_progress__update() serves no
purpose other than to clear the screen so that the progress bar of a
previous operation does not subsume that of a subsequent operation.  But
we can do just that in a much more efficient manner by clearing only the
region that a previous progress bar may have occupied before repainting
the new progress bar.  Then the force-refresh could be removed with no
change in visuals.

This patch disables the slow force-refresh in tui_progress__update() and
instead calls SLsmg_fill_region() on the entire area that the progress
bar may occupy before repainting it.  This change makes the startup of
perf-report much faster and appear much "smoother".

It turns out that this was a big bottleneck in the startup speed of
perf-report -- with this patch, perf-report starts up ~2x faster (1.1s
vs 0.55s) on my machines.  (These numbers were measured by running "time
perf report" on an 8MB perf.data and pressing 'q' immediately.)

Signed-off-by: Patrick Palka <patrick@parcs.ath.cx>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1382747149-9716-1-git-send-email-patrick@parcs.ath.cx
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/tui/progress.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/ui/tui/progress.c b/tools/perf/ui/tui/progress.c
index 3e2d936d7443..c61d14b101e0 100644
--- a/tools/perf/ui/tui/progress.c
+++ b/tools/perf/ui/tui/progress.c
@@ -18,13 +18,14 @@ static void tui_progress__update(struct ui_progress *p)
 	if (p->total == 0)
 		return;
 
-	ui__refresh_dimensions(true);
+	ui__refresh_dimensions(false);
 	pthread_mutex_lock(&ui__lock);
 	y = SLtt_Screen_Rows / 2 - 2;
 	SLsmg_set_color(0);
 	SLsmg_draw_box(y, 0, 3, SLtt_Screen_Cols);
 	SLsmg_gotorc(y++, 1);
 	SLsmg_write_string((char *)p->title);
+	SLsmg_fill_region(y, 1, 1, SLtt_Screen_Cols - 2, ' ');
 	SLsmg_set_color(HE_COLORSET_SELECTED);
 	bar = ((SLtt_Screen_Cols - 2) * p->curr) / p->total;
 	SLsmg_fill_region(y, 1, 1, bar, ' ');
-- 
1.8.1.4


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

* [PATCH 02/10] perf evsel: Remove idx parm from constructor
  2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 01/10] perf ui tui progress: Don't force a refresh during progress update Arnaldo Carvalho de Melo
@ 2013-11-11 20:22 ` Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 03/10] perf record: Synthesize non-exec MMAP records when --data used Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian

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

Most uses of the evsel constructor are followed by a call to
perf_evlist__add with an idex of evlist->nr_entries, so make rename
the current constructor to perf_evsel__new_idx and remove the need
for passing the constructor for the common case.

We still need the new_idx variant because the way groups are handled,
with evsel->nr_members holding the number of entries in an evlist,
partitioning the evlist into sublists inside a single linked list.

This asks for a clarifying refactoring, but for now simplify the non
parser cases, so that tool writers don't have to bother with evsel idx
setting.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-zy9tskx6jqm2rmw7468zze2a@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-trace.c                | 13 +++++--------
 tools/perf/tests/evsel-tp-sched.c         |  4 ++--
 tools/perf/tests/mmap-basic.c             |  2 +-
 tools/perf/tests/open-syscall-all-cpus.c  |  2 +-
 tools/perf/tests/open-syscall-tp-fields.c |  2 +-
 tools/perf/tests/open-syscall.c           |  2 +-
 tools/perf/tests/sw-clock.c               |  2 +-
 tools/perf/util/evlist.c                  |  9 +++++----
 tools/perf/util/evsel.c                   |  4 ++--
 tools/perf/util/evsel.h                   | 15 +++++++++++++--
 tools/perf/util/header.c                  |  4 ++--
 tools/perf/util/parse-events.c            |  6 +++---
 12 files changed, 37 insertions(+), 28 deletions(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 329b7832b5da..68943cad70d4 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -149,10 +149,9 @@ static void perf_evsel__delete_priv(struct perf_evsel *evsel)
 	perf_evsel__delete(evsel);
 }
 
-static struct perf_evsel *perf_evsel__syscall_newtp(const char *direction,
-						    void *handler, int idx)
+static struct perf_evsel *perf_evsel__syscall_newtp(const char *direction, void *handler)
 {
-	struct perf_evsel *evsel = perf_evsel__newtp("raw_syscalls", direction, idx);
+	struct perf_evsel *evsel = perf_evsel__newtp("raw_syscalls", direction);
 
 	if (evsel) {
 		evsel->priv = malloc(sizeof(struct syscall_tp));
@@ -186,17 +185,16 @@ static int perf_evlist__add_syscall_newtp(struct perf_evlist *evlist,
 					  void *sys_exit_handler)
 {
 	int ret = -1;
-	int idx = evlist->nr_entries;
 	struct perf_evsel *sys_enter, *sys_exit;
 
-	sys_enter = perf_evsel__syscall_newtp("sys_enter", sys_enter_handler, idx++);
+	sys_enter = perf_evsel__syscall_newtp("sys_enter", sys_enter_handler);
 	if (sys_enter == NULL)
 		goto out;
 
 	if (perf_evsel__init_sc_tp_ptr_field(sys_enter, args))
 		goto out_delete_sys_enter;
 
-	sys_exit = perf_evsel__syscall_newtp("sys_exit", sys_exit_handler, idx++);
+	sys_exit = perf_evsel__syscall_newtp("sys_exit", sys_exit_handler);
 	if (sys_exit == NULL)
 		goto out_delete_sys_enter;
 
@@ -1824,8 +1822,7 @@ static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp);
 
 static void perf_evlist__add_vfs_getname(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evsel__newtp("probe", "vfs_getname",
-						     evlist->nr_entries);
+	struct perf_evsel *evsel = perf_evsel__newtp("probe", "vfs_getname");
 	if (evsel == NULL)
 		return;
 
diff --git a/tools/perf/tests/evsel-tp-sched.c b/tools/perf/tests/evsel-tp-sched.c
index 9b98c1554833..4774f7fbb758 100644
--- a/tools/perf/tests/evsel-tp-sched.c
+++ b/tools/perf/tests/evsel-tp-sched.c
@@ -32,7 +32,7 @@ static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name,
 
 int test__perf_evsel__tp_sched_test(void)
 {
-	struct perf_evsel *evsel = perf_evsel__newtp("sched", "sched_switch", 0);
+	struct perf_evsel *evsel = perf_evsel__newtp("sched", "sched_switch");
 	int ret = 0;
 
 	if (evsel == NULL) {
@@ -63,7 +63,7 @@ int test__perf_evsel__tp_sched_test(void)
 
 	perf_evsel__delete(evsel);
 
-	evsel = perf_evsel__newtp("sched", "sched_wakeup", 0);
+	evsel = perf_evsel__newtp("sched", "sched_wakeup");
 
 	if (perf_evsel__test_field(evsel, "comm", 16, true))
 		ret = -1;
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c
index a7232c204eb9..d64ab79c6d35 100644
--- a/tools/perf/tests/mmap-basic.c
+++ b/tools/perf/tests/mmap-basic.c
@@ -65,7 +65,7 @@ int test__basic_mmap(void)
 		char name[64];
 
 		snprintf(name, sizeof(name), "sys_enter_%s", syscall_names[i]);
-		evsels[i] = perf_evsel__newtp("syscalls", name, i);
+		evsels[i] = perf_evsel__newtp("syscalls", name);
 		if (evsels[i] == NULL) {
 			pr_debug("perf_evsel__new\n");
 			goto out_free_evlist;
diff --git a/tools/perf/tests/open-syscall-all-cpus.c b/tools/perf/tests/open-syscall-all-cpus.c
index b0657a9ccda6..5fecdbd2f5f7 100644
--- a/tools/perf/tests/open-syscall-all-cpus.c
+++ b/tools/perf/tests/open-syscall-all-cpus.c
@@ -26,7 +26,7 @@ int test__open_syscall_event_on_all_cpus(void)
 
 	CPU_ZERO(&cpu_set);
 
-	evsel = perf_evsel__newtp("syscalls", "sys_enter_open", 0);
+	evsel = perf_evsel__newtp("syscalls", "sys_enter_open");
 	if (evsel == NULL) {
 		pr_debug("is debugfs mounted on /sys/kernel/debug?\n");
 		goto out_thread_map_delete;
diff --git a/tools/perf/tests/open-syscall-tp-fields.c b/tools/perf/tests/open-syscall-tp-fields.c
index 524b221b829b..41cc0badb74b 100644
--- a/tools/perf/tests/open-syscall-tp-fields.c
+++ b/tools/perf/tests/open-syscall-tp-fields.c
@@ -27,7 +27,7 @@ int test__syscall_open_tp_fields(void)
 		goto out;
 	}
 
-	evsel = perf_evsel__newtp("syscalls", "sys_enter_open", 0);
+	evsel = perf_evsel__newtp("syscalls", "sys_enter_open");
 	if (evsel == NULL) {
 		pr_debug("%s: perf_evsel__newtp\n", __func__);
 		goto out_delete_evlist;
diff --git a/tools/perf/tests/open-syscall.c b/tools/perf/tests/open-syscall.c
index befc0671f95d..c1dc7d25f38c 100644
--- a/tools/perf/tests/open-syscall.c
+++ b/tools/perf/tests/open-syscall.c
@@ -15,7 +15,7 @@ int test__open_syscall_event(void)
 		return -1;
 	}
 
-	evsel = perf_evsel__newtp("syscalls", "sys_enter_open", 0);
+	evsel = perf_evsel__newtp("syscalls", "sys_enter_open");
 	if (evsel == NULL) {
 		pr_debug("is debugfs mounted on /sys/kernel/debug?\n");
 		goto out_thread_map_delete;
diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
index 6e2b44ec0749..73c5c37cb27b 100644
--- a/tools/perf/tests/sw-clock.c
+++ b/tools/perf/tests/sw-clock.c
@@ -42,7 +42,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 		return -1;
 	}
 
-	evsel = perf_evsel__new(&attr, 0);
+	evsel = perf_evsel__new(&attr);
 	if (evsel == NULL) {
 		pr_debug("perf_evsel__new\n");
 		goto out_free_evlist;
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index b939221efd8d..99dc58e5dcc3 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -117,6 +117,8 @@ void perf_evlist__delete(struct perf_evlist *evlist)
 void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry)
 {
 	list_add_tail(&entry->node, &evlist->entries);
+	entry->idx = evlist->nr_entries;
+
 	if (!evlist->nr_entries++)
 		perf_evlist__set_id_pos(evlist);
 }
@@ -165,7 +167,7 @@ int perf_evlist__add_default(struct perf_evlist *evlist)
 
 	event_attr_init(&attr);
 
-	evsel = perf_evsel__new(&attr, 0);
+	evsel = perf_evsel__new(&attr);
 	if (evsel == NULL)
 		goto error;
 
@@ -190,7 +192,7 @@ static int perf_evlist__add_attrs(struct perf_evlist *evlist,
 	size_t i;
 
 	for (i = 0; i < nr_attrs; i++) {
-		evsel = perf_evsel__new(attrs + i, evlist->nr_entries + i);
+		evsel = perf_evsel__new_idx(attrs + i, evlist->nr_entries + i);
 		if (evsel == NULL)
 			goto out_delete_partial_list;
 		list_add_tail(&evsel->node, &head);
@@ -249,9 +251,8 @@ perf_evlist__find_tracepoint_by_name(struct perf_evlist *evlist,
 int perf_evlist__add_newtp(struct perf_evlist *evlist,
 			   const char *sys, const char *name, void *handler)
 {
-	struct perf_evsel *evsel;
+	struct perf_evsel *evsel = perf_evsel__newtp(sys, name);
 
-	evsel = perf_evsel__newtp(sys, name, evlist->nr_entries);
 	if (evsel == NULL)
 		return -1;
 
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 5280820ed389..f95653a639a6 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -168,7 +168,7 @@ void perf_evsel__init(struct perf_evsel *evsel,
 	perf_evsel__calc_id_pos(evsel);
 }
 
-struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx)
+struct perf_evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx)
 {
 	struct perf_evsel *evsel = zalloc(sizeof(*evsel));
 
@@ -219,7 +219,7 @@ out:
 	return format;
 }
 
-struct perf_evsel *perf_evsel__newtp(const char *sys, const char *name, int idx)
+struct perf_evsel *perf_evsel__newtp_idx(const char *sys, const char *name, int idx)
 {
 	struct perf_evsel *evsel = zalloc(sizeof(*evsel));
 
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 64ec8e1a7a28..0178233abd64 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -96,8 +96,19 @@ struct thread_map;
 struct perf_evlist;
 struct perf_record_opts;
 
-struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx);
-struct perf_evsel *perf_evsel__newtp(const char *sys, const char *name, int idx);
+struct perf_evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx);
+
+static inline struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr)
+{
+	return perf_evsel__new_idx(attr, 0);
+}
+
+struct perf_evsel *perf_evsel__newtp_idx(const char *sys, const char *name, int idx);
+
+static inline struct perf_evsel *perf_evsel__newtp(const char *sys, const char *name)
+{
+	return perf_evsel__newtp_idx(sys, name, 0);
+}
 
 struct event_format *event_format__new(const char *sys, const char *name);
 
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 26d9520a0c1b..369c03648f88 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2797,7 +2797,7 @@ int perf_session__read_header(struct perf_session *session)
 			perf_event__attr_swap(&f_attr.attr);
 
 		tmp = lseek(fd, 0, SEEK_CUR);
-		evsel = perf_evsel__new(&f_attr.attr, i);
+		evsel = perf_evsel__new(&f_attr.attr);
 
 		if (evsel == NULL)
 			goto out_delete_evlist;
@@ -2916,7 +2916,7 @@ int perf_event__process_attr(struct perf_tool *tool __maybe_unused,
 			return -ENOMEM;
 	}
 
-	evsel = perf_evsel__new(&event->attr.attr, evlist->nr_entries);
+	evsel = perf_evsel__new(&event->attr.attr);
 	if (evsel == NULL)
 		return -ENOMEM;
 
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index c90e55cf7e82..6de6f89c2a61 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -277,7 +277,7 @@ static int __add_event(struct list_head *list, int *idx,
 
 	event_attr_init(attr);
 
-	evsel = perf_evsel__new(attr, (*idx)++);
+	evsel = perf_evsel__new_idx(attr, (*idx)++);
 	if (!evsel)
 		return -ENOMEM;
 
@@ -378,7 +378,7 @@ static int add_tracepoint(struct list_head *list, int *idx,
 {
 	struct perf_evsel *evsel;
 
-	evsel = perf_evsel__newtp(sys_name, evt_name, (*idx)++);
+	evsel = perf_evsel__newtp_idx(sys_name, evt_name, (*idx)++);
 	if (!evsel)
 		return -ENOMEM;
 
@@ -1097,7 +1097,7 @@ static bool is_event_supported(u8 type, unsigned config)
 		.threads = { 0 },
 	};
 
-	evsel = perf_evsel__new(&attr, 0);
+	evsel = perf_evsel__new(&attr);
 	if (evsel) {
 		ret = perf_evsel__open(evsel, NULL, &tmap.map) >= 0;
 		perf_evsel__delete(evsel);
-- 
1.8.1.4


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

* [PATCH 03/10] perf record: Synthesize non-exec MMAP records when --data used
  2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 01/10] perf ui tui progress: Don't force a refresh during progress update Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 02/10] perf evsel: Remove idx parm from constructor Arnaldo Carvalho de Melo
@ 2013-11-11 20:22 ` Arnaldo Carvalho de Melo
  2013-11-11 20:38   ` David Ahern
  2013-11-11 20:22 ` [PATCH 04/10] perf machine: Introduce synthesize_threads method out of open coded equivalent Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter, Bill Gray,
	David Ahern, Don Zickus, Frederic Weisbecker, Jiri Olsa,
	Joe Mario, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
	Richard Fowles, Stephane Eranian

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

When perf_event_attr.mmap_data is set the kernel will generate
PERF_RECORD_MMAP events when non-exec (data, SysV mem) mmaps are
created, so we need to synthesize from /proc/pid/maps for existing
threads, as we do for exec mmaps.

Right now just 'perf record' does it, but any other tool that uses
perf_event__synthesize_thread(s|map) can request it.

Reported-by: Don Zickus <dzickus@redhat.com>
Tested-by: Don Zickus <dzickus@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Bill Gray <bgray@redhat.com>
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: Joe Mario <jmario@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Richard Fowles <rfowles@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ihwzraikx23ian9txinogvv2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-kvm.c        |  4 ++--
 tools/perf/builtin-record.c     |  6 ++---
 tools/perf/builtin-top.c        |  4 ++--
 tools/perf/builtin-trace.c      |  4 ++--
 tools/perf/tests/code-reading.c |  2 +-
 tools/perf/util/event.c         | 50 ++++++++++++++++++++++++-----------------
 tools/perf/util/event.h         |  4 ++--
 7 files changed, 42 insertions(+), 32 deletions(-)

diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index cd9f92078aba..f36e8209c300 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -1550,10 +1550,10 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
 		perf_event__synthesize_thread_map(&kvm->tool,
 						  kvm->evlist->threads,
 						  perf_event__process,
-						  &kvm->session->machines.host);
+						  &kvm->session->machines.host, false);
 	else
 		perf_event__synthesize_threads(&kvm->tool, perf_event__process,
-					       &kvm->session->machines.host);
+					       &kvm->session->machines.host, false);
 
 
 	err = kvm_live_open_events(kvm);
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 15280b5e5574..afb252cf6eca 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -482,11 +482,11 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 
 	if (perf_target__has_task(&opts->target))
 		err = perf_event__synthesize_thread_map(tool, evsel_list->threads,
-						  process_synthesized_event,
-						  machine);
+							process_synthesized_event,
+							machine, opts->sample_address);
 	else if (perf_target__has_cpu(&opts->target))
 		err = perf_event__synthesize_threads(tool, process_synthesized_event,
-					       machine);
+						     machine, opts->sample_address);
 	else /* command specified */
 		err = 0;
 
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 9acca8856ccb..cc96d753db96 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -953,10 +953,10 @@ static int __cmd_top(struct perf_top *top)
 	if (perf_target__has_task(&opts->target))
 		perf_event__synthesize_thread_map(&top->tool, top->evlist->threads,
 						  perf_event__process,
-						  &top->session->machines.host);
+						  &top->session->machines.host, false);
 	else
 		perf_event__synthesize_threads(&top->tool, perf_event__process,
-					       &top->session->machines.host);
+					       &top->session->machines.host, false);
 
 	ret = perf_top__start_counters(top);
 	if (ret)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 68943cad70d4..277c2367e0cf 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1343,10 +1343,10 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
 	if (perf_target__has_task(&trace->opts.target)) {
 		err = perf_event__synthesize_thread_map(&trace->tool, evlist->threads,
 							trace__tool_process,
-							trace->host);
+							trace->host, false);
 	} else {
 		err = perf_event__synthesize_threads(&trace->tool, trace__tool_process,
-						     trace->host);
+						     trace->host, false);
 	}
 
 	if (err)
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 49ccc3b2995e..6d9dc198a200 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -441,7 +441,7 @@ static int do_test_code_reading(bool try_kcore)
 	}
 
 	ret = perf_event__synthesize_thread_map(NULL, threads,
-						perf_event__process, machine);
+						perf_event__process, machine, false);
 	if (ret < 0) {
 		pr_debug("perf_event__synthesize_thread_map failed\n");
 		goto out_err;
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index ec9ae1114ed4..6e3a846aed0e 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -170,7 +170,8 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
 					      union perf_event *event,
 					      pid_t pid, pid_t tgid,
 					      perf_event__handler_t process,
-					      struct machine *machine)
+					      struct machine *machine,
+					      bool mmap_data)
 {
 	char filename[PATH_MAX];
 	FILE *fp;
@@ -188,10 +189,6 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
 	}
 
 	event->header.type = PERF_RECORD_MMAP;
-	/*
-	 * Just like the kernel, see __perf_event_mmap in kernel/perf_event.c
-	 */
-	event->header.misc = PERF_RECORD_MISC_USER;
 
 	while (1) {
 		char bf[BUFSIZ];
@@ -215,9 +212,17 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
 
 		if (n != 5)
 			continue;
+		/*
+		 * Just like the kernel, see __perf_event_mmap in kernel/perf_event.c
+		 */
+		event->header.misc = PERF_RECORD_MISC_USER;
 
-		if (prot[2] != 'x')
-			continue;
+		if (prot[2] != 'x') {
+			if (!mmap_data || prot[0] != 'r')
+				continue;
+
+			event->header.misc |= PERF_RECORD_MISC_MMAP_DATA;
+		}
 
 		if (!strcmp(execname, ""))
 			strcpy(execname, anonstr);
@@ -304,20 +309,21 @@ static int __event__synthesize_thread(union perf_event *comm_event,
 				      pid_t pid, int full,
 					  perf_event__handler_t process,
 				      struct perf_tool *tool,
-				      struct machine *machine)
+				      struct machine *machine, bool mmap_data)
 {
 	pid_t tgid = perf_event__synthesize_comm(tool, comm_event, pid, full,
 						 process, machine);
 	if (tgid == -1)
 		return -1;
 	return perf_event__synthesize_mmap_events(tool, mmap_event, pid, tgid,
-						  process, machine);
+						  process, machine, mmap_data);
 }
 
 int perf_event__synthesize_thread_map(struct perf_tool *tool,
 				      struct thread_map *threads,
 				      perf_event__handler_t process,
-				      struct machine *machine)
+				      struct machine *machine,
+				      bool mmap_data)
 {
 	union perf_event *comm_event, *mmap_event;
 	int err = -1, thread, j;
@@ -334,7 +340,8 @@ int perf_event__synthesize_thread_map(struct perf_tool *tool,
 	for (thread = 0; thread < threads->nr; ++thread) {
 		if (__event__synthesize_thread(comm_event, mmap_event,
 					       threads->map[thread], 0,
-					       process, tool, machine)) {
+					       process, tool, machine,
+					       mmap_data)) {
 			err = -1;
 			break;
 		}
@@ -356,10 +363,10 @@ int perf_event__synthesize_thread_map(struct perf_tool *tool,
 
 			/* if not, generate events for it */
 			if (need_leader &&
-			    __event__synthesize_thread(comm_event,
-						      mmap_event,
-						      comm_event->comm.pid, 0,
-						      process, tool, machine)) {
+			    __event__synthesize_thread(comm_event, mmap_event,
+						       comm_event->comm.pid, 0,
+						       process, tool, machine,
+						       mmap_data)) {
 				err = -1;
 				break;
 			}
@@ -374,7 +381,7 @@ out:
 
 int perf_event__synthesize_threads(struct perf_tool *tool,
 				   perf_event__handler_t process,
-				   struct machine *machine)
+				   struct machine *machine, bool mmap_data)
 {
 	DIR *proc;
 	struct dirent dirent, *next;
@@ -404,7 +411,7 @@ int perf_event__synthesize_threads(struct perf_tool *tool,
  		 * one thread couldn't be synthesized.
  		 */
 		__event__synthesize_thread(comm_event, mmap_event, pid, 1,
-					   process, tool, machine);
+					   process, tool, machine, mmap_data);
 	}
 
 	err = 0;
@@ -528,19 +535,22 @@ int perf_event__process_lost(struct perf_tool *tool __maybe_unused,
 
 size_t perf_event__fprintf_mmap(union perf_event *event, FILE *fp)
 {
-	return fprintf(fp, " %d/%d: [%#" PRIx64 "(%#" PRIx64 ") @ %#" PRIx64 "]: %s\n",
+	return fprintf(fp, " %d/%d: [%#" PRIx64 "(%#" PRIx64 ") @ %#" PRIx64 "]: %c %s\n",
 		       event->mmap.pid, event->mmap.tid, event->mmap.start,
-		       event->mmap.len, event->mmap.pgoff, event->mmap.filename);
+		       event->mmap.len, event->mmap.pgoff,
+		       (event->header.misc & PERF_RECORD_MISC_MMAP_DATA) ? 'r' : 'x',
+		       event->mmap.filename);
 }
 
 size_t perf_event__fprintf_mmap2(union perf_event *event, FILE *fp)
 {
 	return fprintf(fp, " %d/%d: [%#" PRIx64 "(%#" PRIx64 ") @ %#" PRIx64
-			   " %02x:%02x %"PRIu64" %"PRIu64"]: %s\n",
+			   " %02x:%02x %"PRIu64" %"PRIu64"]: %c %s\n",
 		       event->mmap2.pid, event->mmap2.tid, event->mmap2.start,
 		       event->mmap2.len, event->mmap2.pgoff, event->mmap2.maj,
 		       event->mmap2.min, event->mmap2.ino,
 		       event->mmap2.ino_generation,
+		       (event->header.misc & PERF_RECORD_MISC_MMAP_DATA) ? 'r' : 'x',
 		       event->mmap2.filename);
 }
 
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index f8d70f3003ab..30fec9901e44 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -208,10 +208,10 @@ typedef int (*perf_event__handler_t)(struct perf_tool *tool,
 int perf_event__synthesize_thread_map(struct perf_tool *tool,
 				      struct thread_map *threads,
 				      perf_event__handler_t process,
-				      struct machine *machine);
+				      struct machine *machine, bool mmap_data);
 int perf_event__synthesize_threads(struct perf_tool *tool,
 				   perf_event__handler_t process,
-				   struct machine *machine);
+				   struct machine *machine, bool mmap_data);
 int perf_event__synthesize_kernel_mmap(struct perf_tool *tool,
 				       perf_event__handler_t process,
 				       struct machine *machine,
-- 
1.8.1.4


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

* [PATCH 04/10] perf machine: Introduce synthesize_threads method out of open coded equivalent
  2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2013-11-11 20:22 ` [PATCH 03/10] perf record: Synthesize non-exec MMAP records when --data used Arnaldo Carvalho de Melo
@ 2013-11-11 20:22 ` Arnaldo Carvalho de Melo
  2013-11-11 20:40   ` David Ahern
  2013-11-11 20:22 ` [PATCH 05/10] perf machine: Simplify synthesize_threads method Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian

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

Further simplifications to be done on following patch, as most tools
don't use the callback, using instead just the canned
machine__process_event one.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-r1m0vuuj3cat4bampno9yc8d@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-kvm.c    | 15 +++------------
 tools/perf/builtin-record.c | 12 ++----------
 tools/perf/builtin-top.c    | 11 +++--------
 tools/perf/builtin-trace.c  | 11 ++---------
 tools/perf/util/machine.c   | 12 ++++++++++++
 tools/perf/util/machine.h   |  4 ++++
 6 files changed, 26 insertions(+), 39 deletions(-)

diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index f36e8209c300..f5d2c4bccbec 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -1544,18 +1544,9 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
 	}
 	kvm->session->evlist = kvm->evlist;
 	perf_session__set_id_hdr_size(kvm->session);
-
-
-	if (perf_target__has_task(&kvm->opts.target))
-		perf_event__synthesize_thread_map(&kvm->tool,
-						  kvm->evlist->threads,
-						  perf_event__process,
-						  &kvm->session->machines.host, false);
-	else
-		perf_event__synthesize_threads(&kvm->tool, perf_event__process,
-					       &kvm->session->machines.host, false);
-
-
+	machine__synthesize_threads(&kvm->session->machines.host, &kvm->tool,
+				    &kvm->opts.target, kvm->evlist->threads,
+				    perf_event__process, false);
 	err = kvm_live_open_events(kvm);
 	if (err)
 		goto out;
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index afb252cf6eca..41d1f37f5348 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -480,16 +480,8 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 					 perf_event__synthesize_guest_os, tool);
 	}
 
-	if (perf_target__has_task(&opts->target))
-		err = perf_event__synthesize_thread_map(tool, evsel_list->threads,
-							process_synthesized_event,
-							machine, opts->sample_address);
-	else if (perf_target__has_cpu(&opts->target))
-		err = perf_event__synthesize_threads(tool, process_synthesized_event,
-						     machine, opts->sample_address);
-	else /* command specified */
-		err = 0;
-
+	err = machine__synthesize_threads(machine, tool, &opts->target, evsel_list->threads,
+					  process_synthesized_event, opts->sample_address);
 	if (err != 0)
 		goto out_delete_session;
 
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index cc96d753db96..c3a936ef7688 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -950,14 +950,9 @@ static int __cmd_top(struct perf_top *top)
 	if (ret)
 		goto out_delete;
 
-	if (perf_target__has_task(&opts->target))
-		perf_event__synthesize_thread_map(&top->tool, top->evlist->threads,
-						  perf_event__process,
-						  &top->session->machines.host, false);
-	else
-		perf_event__synthesize_threads(&top->tool, perf_event__process,
-					       &top->session->machines.host, false);
-
+	machine__synthesize_threads(&top->session->machines.host, &top->tool,
+				    &opts->target, top->evlist->threads,
+				    perf_event__process, false);
 	ret = perf_top__start_counters(top);
 	if (ret)
 		goto out_delete;
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 277c2367e0cf..7690324824db 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1340,15 +1340,8 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
 	if (trace->host == NULL)
 		return -ENOMEM;
 
-	if (perf_target__has_task(&trace->opts.target)) {
-		err = perf_event__synthesize_thread_map(&trace->tool, evlist->threads,
-							trace__tool_process,
-							trace->host, false);
-	} else {
-		err = perf_event__synthesize_threads(&trace->tool, trace__tool_process,
-						     trace->host, false);
-	}
-
+	err = machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target,
+					  evlist->threads, trace__tool_process, false);
 	if (err)
 		symbol__exit();
 
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index ce034c183a7e..9f2c61d5a9ed 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1394,3 +1394,15 @@ int machine__for_each_thread(struct machine *machine,
 	}
 	return rc;
 }
+
+int machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
+				struct perf_target *target, struct thread_map *threads,
+				perf_event__handler_t process, bool data_mmap)
+{
+	if (perf_target__has_task(target))
+		return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
+	else if (perf_target__has_cpu(target))
+		return perf_event__synthesize_threads(tool, process, machine, data_mmap);
+	/* command specified */
+	return 0;
+}
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index 2389ba81fafe..14a89d2aecaf 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -4,6 +4,7 @@
 #include <sys/types.h>
 #include <linux/rbtree.h>
 #include "map.h"
+#include "event.h"
 
 struct addr_location;
 struct branch_stack;
@@ -178,4 +179,7 @@ int machine__for_each_thread(struct machine *machine,
 			     int (*fn)(struct thread *thread, void *p),
 			     void *priv);
 
+int machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
+				struct perf_target *target, struct thread_map *threads,
+				perf_event__handler_t process, bool data_mmap);
 #endif /* __PERF_MACHINE_H */
-- 
1.8.1.4


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

* [PATCH 05/10] perf machine: Simplify synthesize_threads method
  2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2013-11-11 20:22 ` [PATCH 04/10] perf machine: Introduce synthesize_threads method out of open coded equivalent Arnaldo Carvalho de Melo
@ 2013-11-11 20:22 ` Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 06/10] perf tools: Prevent condition that all sort keys are elided Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian

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

Several tools (top, kvm) don't need to be called back to process each of
the syntheiszed records, instead relying on the machine__process_event
function to change the per machine data structures that represent
threads and mmaps, so provide a way to ask for this common idiom.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-pusqibp8n3c4ynegd1frn4zd@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-kvm.c    |  5 ++---
 tools/perf/builtin-record.c |  4 ++--
 tools/perf/builtin-top.c    |  5 ++---
 tools/perf/builtin-trace.c  |  4 ++--
 tools/perf/util/machine.c   |  6 +++---
 tools/perf/util/machine.h   | 14 +++++++++++---
 6 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index f5d2c4bccbec..346bb5909e3d 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -1544,9 +1544,8 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
 	}
 	kvm->session->evlist = kvm->evlist;
 	perf_session__set_id_hdr_size(kvm->session);
-	machine__synthesize_threads(&kvm->session->machines.host, &kvm->tool,
-				    &kvm->opts.target, kvm->evlist->threads,
-				    perf_event__process, false);
+	machine__synthesize_threads(&kvm->session->machines.host, &kvm->opts.target,
+				    kvm->evlist->threads, false);
 	err = kvm_live_open_events(kvm);
 	if (err)
 		goto out;
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 41d1f37f5348..fc68b26d58f9 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -480,8 +480,8 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 					 perf_event__synthesize_guest_os, tool);
 	}
 
-	err = machine__synthesize_threads(machine, tool, &opts->target, evsel_list->threads,
-					  process_synthesized_event, opts->sample_address);
+	err = __machine__synthesize_threads(machine, tool, &opts->target, evsel_list->threads,
+					    process_synthesized_event, opts->sample_address);
 	if (err != 0)
 		goto out_delete_session;
 
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index c3a936ef7688..8c520d9fecfc 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -950,9 +950,8 @@ static int __cmd_top(struct perf_top *top)
 	if (ret)
 		goto out_delete;
 
-	machine__synthesize_threads(&top->session->machines.host, &top->tool,
-				    &opts->target, top->evlist->threads,
-				    perf_event__process, false);
+	machine__synthesize_threads(&top->session->machines.host, &opts->target,
+				    top->evlist->threads, false);
 	ret = perf_top__start_counters(top);
 	if (ret)
 		goto out_delete;
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 7690324824db..c3008b1c369c 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1340,8 +1340,8 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
 	if (trace->host == NULL)
 		return -ENOMEM;
 
-	err = machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target,
-					  evlist->threads, trace__tool_process, false);
+	err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target,
+					    evlist->threads, trace__tool_process, false);
 	if (err)
 		symbol__exit();
 
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 9f2c61d5a9ed..680700b6d779 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1395,9 +1395,9 @@ int machine__for_each_thread(struct machine *machine,
 	return rc;
 }
 
-int machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
-				struct perf_target *target, struct thread_map *threads,
-				perf_event__handler_t process, bool data_mmap)
+int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
+				  struct perf_target *target, struct thread_map *threads,
+				  perf_event__handler_t process, bool data_mmap)
 {
 	if (perf_target__has_task(target))
 		return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index 14a89d2aecaf..fedd1dfaf715 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -179,7 +179,15 @@ int machine__for_each_thread(struct machine *machine,
 			     int (*fn)(struct thread *thread, void *p),
 			     void *priv);
 
-int machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
-				struct perf_target *target, struct thread_map *threads,
-				perf_event__handler_t process, bool data_mmap);
+int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
+				  struct perf_target *target, struct thread_map *threads,
+				  perf_event__handler_t process, bool data_mmap);
+static inline
+int machine__synthesize_threads(struct machine *machine, struct perf_target *target,
+				struct thread_map *threads, bool data_mmap)
+{
+	return __machine__synthesize_threads(machine, NULL, target, threads,
+					     perf_event__process, data_mmap);
+}
+
 #endif /* __PERF_MACHINE_H */
-- 
1.8.1.4


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

* [PATCH 06/10] perf tools: Prevent condition that all sort keys are elided
  2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2013-11-11 20:22 ` [PATCH 05/10] perf machine: Simplify synthesize_threads method Arnaldo Carvalho de Melo
@ 2013-11-11 20:22 ` Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 07/10] perf record: Use correct return type for write() Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung.kim@lge.com>

If given sort keys are all elided there'll be no output except for the
overhead column - actually the TUI shows a noisy output.  In this case
it'd be better to show up the sort keys rather than elide.

Before:

  $ perf report -s comm -c perf
  (...)
  # Overhead
  # ........
  #
     100.00%

After:

  $ perf report -s comm -c perf
  (...)
  # Overhead  Command
  # ........  .......
  #
     100.00%     perf

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1383900822-14609-1-git-send-email-namhyung@kernel.org
[ Us curly braces around multi-line statements, as requested by Ingo Molnar ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 3c1b75c8b9a6..8b0bb1f4494a 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -1137,6 +1137,8 @@ static void sort_entry__setup_elide(struct sort_entry *se,
 
 void sort__setup_elide(FILE *output)
 {
+	struct sort_entry *se;
+
 	sort_entry__setup_elide(&sort_dso, symbol_conf.dso_list,
 				"dso", output);
 	sort_entry__setup_elide(&sort_comm, symbol_conf.comm_list,
@@ -1172,4 +1174,15 @@ void sort__setup_elide(FILE *output)
 					"snoop", output);
 	}
 
+	/*
+	 * It makes no sense to elide all of sort entries.
+	 * Just revert them to show up again.
+	 */
+	list_for_each_entry(se, &hist_entry__sort_list, list) {
+		if (!se->elide)
+			return;
+	}
+
+	list_for_each_entry(se, &hist_entry__sort_list, list)
+		se->elide = false;
 }
-- 
1.8.1.4


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

* [PATCH 07/10] perf record: Use correct return type for write()
  2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2013-11-11 20:22 ` [PATCH 06/10] perf tools: Prevent condition that all sort keys are elided Arnaldo Carvalho de Melo
@ 2013-11-11 20:22 ` Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 08/10] perf record: Move existing write_output into helper function Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, David Ahern, Frederic Weisbecker,
	Ingo Molnar, Jiri Olsa, Mike Galbraith, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

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

write() returns a 'ssize_t' not an 'int'.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1383906470-21002-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-record.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index fc68b26d58f9..8f5af32d6451 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -81,7 +81,7 @@ static int write_output(struct perf_record *rec, void *buf, size_t size)
 	struct perf_data_file *file = &rec->file;
 
 	while (size) {
-		int ret = write(file->fd, buf, size);
+		ssize_t ret = write(file->fd, buf, size);
 
 		if (ret < 0) {
 			pr_err("failed to write perf data, error: %m\n");
-- 
1.8.1.4


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

* [PATCH 08/10] perf record: Move existing write_output into helper function
  2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2013-11-11 20:22 ` [PATCH 07/10] perf record: Use correct return type for write() Arnaldo Carvalho de Melo
@ 2013-11-11 20:22 ` Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 09/10] perf tests: Check return of perf_evlist__open sw clock event period test Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 10/10] perf tests: Use lower sample_freq in " Arnaldo Carvalho de Melo
  9 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Mike Galbraith, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

From: David Ahern <dsahern@gmail.com>

Code move only; no logic changes. In preparation for the mmap based
output option in the next patch.

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1383884605-30968-2-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-record.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 8f5af32d6451..880227eae20f 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -76,7 +76,7 @@ struct perf_record {
 	long			samples;
 };
 
-static int write_output(struct perf_record *rec, void *buf, size_t size)
+static int do_write_output(struct perf_record *rec, void *buf, size_t size)
 {
 	struct perf_data_file *file = &rec->file;
 
@@ -97,6 +97,11 @@ static int write_output(struct perf_record *rec, void *buf, size_t size)
 	return 0;
 }
 
+static int write_output(struct perf_record *rec, void *buf, size_t size)
+{
+	return do_write_output(rec, buf, size);
+}
+
 static int process_synthesized_event(struct perf_tool *tool,
 				     union perf_event *event,
 				     struct perf_sample *sample __maybe_unused,
-- 
1.8.1.4


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

* [PATCH 09/10] perf tests: Check return of perf_evlist__open sw clock event period test
  2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2013-11-11 20:22 ` [PATCH 08/10] perf record: Move existing write_output into helper function Arnaldo Carvalho de Melo
@ 2013-11-11 20:22 ` Arnaldo Carvalho de Melo
  2013-11-11 20:22 ` [PATCH 10/10] perf tests: Use lower sample_freq in " Arnaldo Carvalho de Melo
  9 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian

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

We were not checking if we successfully opened the counters, i.e. if
sys_perf_event_open worked, when it doesn't in this test, we were
continuing anyway and then segfaulting when trying to access the file
descriptor array, that at that point had been freed in perf_evlist__open
error path:

[root@ssdandy ~]# perf test -v 19
19: Test software clock events have valid period values    :
--- start ---
Segmentation fault (core dumped)
[root@ssdandy ~]#

Do the check and bail out instead.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-6qy8ljkn0e9hm7bh7keo5z68@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/sw-clock.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
index 73c5c37cb27b..ed777728dfe7 100644
--- a/tools/perf/tests/sw-clock.c
+++ b/tools/perf/tests/sw-clock.c
@@ -57,7 +57,11 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 		goto out_delete_maps;
 	}
 
-	perf_evlist__open(evlist);
+	if (perf_evlist__open(evlist)) {
+		err = -errno;
+		pr_debug("Couldn't open evlist: %s\n", strerror(errno));
+		goto out_delete_maps;
+	}
 
 	err = perf_evlist__mmap(evlist, 128, true);
 	if (err < 0) {
-- 
1.8.1.4


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

* [PATCH 10/10] perf tests: Use lower sample_freq in sw clock event period test
  2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2013-11-11 20:22 ` [PATCH 09/10] perf tests: Check return of perf_evlist__open sw clock event period test Arnaldo Carvalho de Melo
@ 2013-11-11 20:22 ` Arnaldo Carvalho de Melo
  2013-11-11 20:45   ` David Ahern
  2013-11-12  7:07   ` Adrian Hunter
  9 siblings, 2 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 20:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian

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

We were using it at 10 kHz, which doesn't work in machines where somehow
the max freq was auto reduced by the kernel:

[root@ssdandy ~]# perf test 19
19: Test software clock events have valid period values    : FAILED!
[root@ssdandy ~]# perf test -v 19
19: Test software clock events have valid period values    :
--- start ---
Couldn't open evlist: Invalid argument
---- end ----
Test software clock events have valid period values: FAILED!
[root@ssdandy ~]#

[root@ssdandy ~]# cat /proc/sys/kernel/perf_event_max_sample_rate
7000

Reducing it to 500 Hz should be good enough for this test and also
shouldn't affect what it is testing.

But warn the user if it fails, informing the knob and the freq tried.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-548rhj1uo6xbwnxa95kw3hqe@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/sw-clock.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
index ed777728dfe7..93a7139ff5f7 100644
--- a/tools/perf/tests/sw-clock.c
+++ b/tools/perf/tests/sw-clock.c
@@ -34,7 +34,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 		.freq = 1,
 	};
 
-	attr.sample_freq = 10000;
+	attr.sample_freq = 500;
 
 	evlist = perf_evlist__new();
 	if (evlist == NULL) {
@@ -58,8 +58,11 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 	}
 
 	if (perf_evlist__open(evlist)) {
+		const char *knob = "/proc/sys/kernel/perf_event_max_sample_rate";
+
 		err = -errno;
-		pr_debug("Couldn't open evlist: %s\n", strerror(errno));
+		pr_debug("Couldn't open evlist: %s\nHint: check %s, using %" PRIu64 " in this test.\n",
+			 strerror(errno), knob, (u64)attr.sample_freq);
 		goto out_delete_maps;
 	}
 
-- 
1.8.1.4


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

* Re: [PATCH 03/10] perf record: Synthesize non-exec MMAP records when --data used
  2013-11-11 20:22 ` [PATCH 03/10] perf record: Synthesize non-exec MMAP records when --data used Arnaldo Carvalho de Melo
@ 2013-11-11 20:38   ` David Ahern
  2013-11-11 21:02     ` Vince Weaver
  0 siblings, 1 reply; 73+ messages in thread
From: David Ahern @ 2013-11-11 20:38 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter, Bill Gray,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Joe Mario,
	Mike Galbraith, Paul Mackerras, Peter Zijlstra, Richard Fowles,
	Stephane Eranian, vincent.weaver

[Added Vince]

On 11/11/13, 1:22 PM, Arnaldo Carvalho de Melo wrote:
> When perf_event_attr.mmap_data is set the kernel will generate
> PERF_RECORD_MMAP events when non-exec (data, SysV mem) mmaps are
> created, so we need to synthesize from /proc/pid/maps for existing
> threads

Seems like that should be documented in the man pages:

[dsa@MacBook perf]$ egrep -r mmap_data Documentation/
[dsa@MacBook perf]$

Vince: where are you keeping the man page you are putting together?

David

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

* Re: [PATCH 04/10] perf machine: Introduce synthesize_threads method out of open coded equivalent
  2013-11-11 20:22 ` [PATCH 04/10] perf machine: Introduce synthesize_threads method out of open coded equivalent Arnaldo Carvalho de Melo
@ 2013-11-11 20:40   ` David Ahern
  2013-11-11 20:50     ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: David Ahern @ 2013-11-11 20:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Frederic Weisbecker, Jiri Olsa, Mike Galbraith, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian

On 11/11/13, 1:22 PM, Arnaldo Carvalho de Melo wrote:
> +	if (perf_target__has_task(target))
> +		return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
> +	else if (perf_target__has_cpu(target))
> +		return perf_event__synthesize_threads(tool, process, machine, data_mmap);


Getting kind of long on the line lengths...

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

* Re: [PATCH 10/10] perf tests: Use lower sample_freq in sw clock event period test
  2013-11-11 20:22 ` [PATCH 10/10] perf tests: Use lower sample_freq in " Arnaldo Carvalho de Melo
@ 2013-11-11 20:45   ` David Ahern
  2013-11-12  7:07   ` Adrian Hunter
  1 sibling, 0 replies; 73+ messages in thread
From: David Ahern @ 2013-11-11 20:45 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Frederic Weisbecker, Jiri Olsa, Mike Galbraith, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian

On 11/11/13, 1:22 PM, Arnaldo Carvalho de Melo wrote:

> @@ -58,8 +58,11 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
>   	}
>
>   	if (perf_evlist__open(evlist)) {
> +		const char *knob = "/proc/sys/kernel/perf_event_max_sample_rate";
> +
>   		err = -errno;
> -		pr_debug("Couldn't open evlist: %s\n", strerror(errno));
> +		pr_debug("Couldn't open evlist: %s\nHint: check %s, using %" PRIu64 " in this test.\n",
> +			 strerror(errno), knob, (u64)attr.sample_freq);
>   		goto out_delete_maps;
>   	}

Jiri had a patch to drop the sample rate to max. Perhaps re-use that here?



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

* Re: [PATCH 04/10] perf machine: Introduce synthesize_threads method out of open coded equivalent
  2013-11-11 20:40   ` David Ahern
@ 2013-11-11 20:50     ` Ingo Molnar
  2013-11-12 11:34       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 73+ messages in thread
From: Ingo Molnar @ 2013-11-11 20:50 UTC (permalink / raw)
  To: David Ahern
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Arnaldo Carvalho de Melo,
	Adrian Hunter, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian


* David Ahern <dsahern@gmail.com> wrote:

> On 11/11/13, 1:22 PM, Arnaldo Carvalho de Melo wrote:
> >+	if (perf_target__has_task(target))
> >+		return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
> >+	else if (perf_target__has_cpu(target))
> >+		return perf_event__synthesize_threads(tool, process, machine, data_mmap);
> 
> 
> Getting kind of long on the line lengths...

Maybe we could start losing most of the perf_ prefixes - it's all about 
perf here, so it does not really add much information, does it?

that would turn it into:

	if (target__has_task(target))
		return event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
	else if (target__has_cpu(target))
		return event__synthesize_threads(tool, process, machine, data_mmap);

Another trick would be to combine (tool, machine) into a single helper 
struct (struct context *ctx?), if that is mostly a constant combination 
describing tool environment, which gets passed deep inside the guts of 
functions.

Thanks,

	Ingo

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

* Re: [PATCH 03/10] perf record: Synthesize non-exec MMAP records when --data used
  2013-11-11 20:38   ` David Ahern
@ 2013-11-11 21:02     ` Vince Weaver
  0 siblings, 0 replies; 73+ messages in thread
From: Vince Weaver @ 2013-11-11 21:02 UTC (permalink / raw)
  To: David Ahern
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel,
	Arnaldo Carvalho de Melo, Adrian Hunter, Bill Gray, Don Zickus,
	Frederic Weisbecker, Jiri Olsa, Joe Mario, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Richard Fowles, Stephane Eranian,
	vincent.weaver

On Mon, 11 Nov 2013, David Ahern wrote:

> [Added Vince]
> 
> On 11/11/13, 1:22 PM, Arnaldo Carvalho de Melo wrote:
> > When perf_event_attr.mmap_data is set the kernel will generate
> > PERF_RECORD_MMAP events when non-exec (data, SysV mem) mmaps are
> > created, so we need to synthesize from /proc/pid/maps for existing
> > threads
> 
> Seems like that should be documented in the man pages:
> 
> [dsa@MacBook perf]$ egrep -r mmap_data Documentation/
> [dsa@MacBook perf]$
> 
> Vince: where are you keeping the man page you are putting together?

It's in the official linux manpage git tree (perf_event_open.2) and
has been included in the last few manpage releases.  

There is a blurb on PERF_RECORD_MMAP, though it definitely could use a 
bit more elaboration.

Vince

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

* Re: [PATCH 10/10] perf tests: Use lower sample_freq in sw clock event period test
  2013-11-11 20:22 ` [PATCH 10/10] perf tests: Use lower sample_freq in " Arnaldo Carvalho de Melo
  2013-11-11 20:45   ` David Ahern
@ 2013-11-12  7:07   ` Adrian Hunter
  2013-11-12  8:40     ` Namhyung Kim
                       ` (2 more replies)
  1 sibling, 3 replies; 73+ messages in thread
From: Adrian Hunter @ 2013-11-12  7:07 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian

On 11/11/13 22:22, Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> We were using it at 10 kHz, which doesn't work in machines where somehow
> the max freq was auto reduced by the kernel:
>
> [root@ssdandy ~]# perf test 19
> 19: Test software clock events have valid period values    : FAILED!
> [root@ssdandy ~]# perf test -v 19
> 19: Test software clock events have valid period values    :
> --- start ---
> Couldn't open evlist: Invalid argument
> ---- end ----
> Test software clock events have valid period values: FAILED!
> [root@ssdandy ~]#
>
> [root@ssdandy ~]# cat /proc/sys/kernel/perf_event_max_sample_rate
> 7000
>
> Reducing it to 500 Hz should be good enough for this test and also
> shouldn't affect what it is testing.
>
> But warn the user if it fails, informing the knob and the freq tried.

Doesn't work for me:

./perf test -v 19
19: Test software clock events have valid period values    :
--- start ---
mmap size 528384B
mmap size 528384B
All (0) samples have period value of 1!
---- end ----
Test software clock events have valid period values: FAILED!

But this fixes it:

diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
index 93a7139..6664a7c 100644
--- a/tools/perf/tests/sw-clock.c
+++ b/tools/perf/tests/sw-clock.c
@@ -9,7 +9,7 @@
 #include "util/cpumap.h"
 #include "util/thread_map.h"
 
-#define NR_LOOPS  1000000
+#define NR_LOOPS  10000000
 
 /*
  * This test will open software clock events (cpu-clock, task-clock)


>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Mike Galbraith <efault@gmx.de>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Stephane Eranian <eranian@google.com>
> Link: http://lkml.kernel.org/n/tip-548rhj1uo6xbwnxa95kw3hqe@git.kernel.org
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/tests/sw-clock.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
> index ed777728dfe7..93a7139ff5f7 100644
> --- a/tools/perf/tests/sw-clock.c
> +++ b/tools/perf/tests/sw-clock.c
> @@ -34,7 +34,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
>  		.freq = 1,
>  	};
>  
> -	attr.sample_freq = 10000;
> +	attr.sample_freq = 500;
>  
>  	evlist = perf_evlist__new();
>  	if (evlist == NULL) {
> @@ -58,8 +58,11 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
>  	}
>  
>  	if (perf_evlist__open(evlist)) {
> +		const char *knob = "/proc/sys/kernel/perf_event_max_sample_rate";
> +
>  		err = -errno;
> -		pr_debug("Couldn't open evlist: %s\n", strerror(errno));
> +		pr_debug("Couldn't open evlist: %s\nHint: check %s, using %" PRIu64 " in this test.\n",
> +			 strerror(errno), knob, (u64)attr.sample_freq);
>  		goto out_delete_maps;
>  	}
>  


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

* Re: [PATCH 10/10] perf tests: Use lower sample_freq in sw clock event period test
  2013-11-12  7:07   ` Adrian Hunter
@ 2013-11-12  8:40     ` Namhyung Kim
  2013-11-12 11:59       ` Arnaldo Carvalho de Melo
  2013-11-12 14:41     ` Arnaldo Carvalho de Melo
  2013-11-12 21:56     ` [tip:perf/urgent] perf tests: Compensate lower sample freq with longer test loop tip-bot for Adrian Hunter
  2 siblings, 1 reply; 73+ messages in thread
From: Namhyung Kim @ 2013-11-12  8:40 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Mike Galbraith, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian

Hi Adrian,

On Tue, 12 Nov 2013 09:07:36 +0200, Adrian Hunter wrote:
> On 11/11/13 22:22, Arnaldo Carvalho de Melo wrote:
>> From: Arnaldo Carvalho de Melo <acme@redhat.com>
>>
>> We were using it at 10 kHz, which doesn't work in machines where somehow
>> the max freq was auto reduced by the kernel:
>>
>> [root@ssdandy ~]# perf test 19
>> 19: Test software clock events have valid period values    : FAILED!
>> [root@ssdandy ~]# perf test -v 19
>> 19: Test software clock events have valid period values    :
>> --- start ---
>> Couldn't open evlist: Invalid argument
>> ---- end ----
>> Test software clock events have valid period values: FAILED!
>> [root@ssdandy ~]#
>>
>> [root@ssdandy ~]# cat /proc/sys/kernel/perf_event_max_sample_rate
>> 7000
>>
>> Reducing it to 500 Hz should be good enough for this test and also
>> shouldn't affect what it is testing.
>>
>> But warn the user if it fails, informing the knob and the freq tried.
>
> Doesn't work for me:
>
> ./perf test -v 19
> 19: Test software clock events have valid period values    :
> --- start ---
> mmap size 528384B
> mmap size 528384B
> All (0) samples have period value of 1!
> ---- end ----
> Test software clock events have valid period values: FAILED!
>
> But this fixes it:
>
> diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
> index 93a7139..6664a7c 100644
> --- a/tools/perf/tests/sw-clock.c
> +++ b/tools/perf/tests/sw-clock.c
> @@ -9,7 +9,7 @@
>  #include "util/cpumap.h"
>  #include "util/thread_map.h"
>  
> -#define NR_LOOPS  1000000
> +#define NR_LOOPS  10000000

Or else, why not using the max_sample_rate as the freq value?

Thanks,
Namhyung

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

* Re: [PATCH 04/10] perf machine: Introduce synthesize_threads method out of open coded equivalent
  2013-11-11 20:50     ` Ingo Molnar
@ 2013-11-12 11:34       ` Arnaldo Carvalho de Melo
  2013-11-12 12:44         ` Ingo Molnar
                           ` (3 more replies)
  0 siblings, 4 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-12 11:34 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: David Ahern, linux-kernel, Adrian Hunter, Frederic Weisbecker,
	Jiri Olsa, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian

Em Mon, Nov 11, 2013 at 09:50:45PM +0100, Ingo Molnar escreveu:
> * David Ahern <dsahern@gmail.com> wrote:

> > On 11/11/13, 1:22 PM, Arnaldo Carvalho de Melo wrote:
> > >+	if (perf_target__has_task(target))
> > >+		return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
> > >+	else if (perf_target__has_cpu(target))
> > >+		return perf_event__synthesize_threads(tool, process, machine, data_mmap);

> > Getting kind of long on the line lengths...

> Maybe we could start losing most of the perf_ prefixes - it's all about 
> perf here, so it does not really add much information, does it?

In some cases that is ok, that is why I didn't call it 'perf_machine',
just 'machine', in others, like 'perf_event', I thought 'event' would be
too general when somebody tries to use this code together with other
libraries.

In some cases, like 'perf_target', probably its ok to move to
'target', perhaps this is ok for this problem domain, i.e.
monitoring/profiling/etc.
 
> that would turn it into:
> 
> 	if (target__has_task(target))
> 		return event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
> 	else if (target__has_cpu(target))
> 		return event__synthesize_threads(tool, process, machine, data_mmap);
> 
> Another trick would be to combine (tool, machine) into a single helper 
> struct (struct context *ctx?), if that is mostly a constant combination 
> describing tool environment, which gets passed deep inside the guts of 
> functions.


Reducing the function signature is something that may help as well, and
was done in this series with machine__synthesize_threads, that avoids
passing the tool and process arguments, since they were constanty
anyway.

What you propose is used in some cases, like with symbol_conf, will try
to work in that direction as time goes by, i.e. doing some refactoring
work of this kind every once in a while, not to disrupt too much the
patch flow.
 
- Arnaldo

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

* Re: [PATCH 10/10] perf tests: Use lower sample_freq in sw clock event period test
  2013-11-12  8:40     ` Namhyung Kim
@ 2013-11-12 11:59       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-12 11:59 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Adrian Hunter, Ingo Molnar, linux-kernel, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Mike Galbraith, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian

Em Tue, Nov 12, 2013 at 05:40:39PM +0900, Namhyung Kim escreveu:
> Hi Adrian,
> 
> On Tue, 12 Nov 2013 09:07:36 +0200, Adrian Hunter wrote:
> > On 11/11/13 22:22, Arnaldo Carvalho de Melo wrote:
> >> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> >>
> >> We were using it at 10 kHz, which doesn't work in machines where somehow
> >> the max freq was auto reduced by the kernel:
> >>
> >> [root@ssdandy ~]# perf test 19
> >> 19: Test software clock events have valid period values    : FAILED!
> >> [root@ssdandy ~]# perf test -v 19
> >> 19: Test software clock events have valid period values    :
> >> --- start ---
> >> Couldn't open evlist: Invalid argument
> >> ---- end ----
> >> Test software clock events have valid period values: FAILED!
> >> [root@ssdandy ~]#
> >>
> >> [root@ssdandy ~]# cat /proc/sys/kernel/perf_event_max_sample_rate
> >> 7000
> >>
> >> Reducing it to 500 Hz should be good enough for this test and also
> >> shouldn't affect what it is testing.
> >>
> >> But warn the user if it fails, informing the knob and the freq tried.
> >
> > Doesn't work for me:
> >
> > ./perf test -v 19
> > 19: Test software clock events have valid period values    :
> > --- start ---
> > mmap size 528384B
> > mmap size 528384B
> > All (0) samples have period value of 1!
> > ---- end ----
> > Test software clock events have valid period values: FAILED!
> >
> > But this fixes it:
> >
> > diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
> > index 93a7139..6664a7c 100644
> > --- a/tools/perf/tests/sw-clock.c
> > +++ b/tools/perf/tests/sw-clock.c
> > @@ -9,7 +9,7 @@
> >  #include "util/cpumap.h"
> >  #include "util/thread_map.h"
> >  
> > -#define NR_LOOPS  1000000
> > +#define NR_LOOPS  10000000
> 
> Or else, why not using the max_sample_rate as the freq value?

Sure, that probably is better, I was just trying the lazy way, as doing
what you suggest entails reworking what Jiri did, since the routine that
reads that max_sample_rate is not exported, needs some massaging, etc.

Using a low enough max_sample_rate and warning the user that anyway
would be better knowing that the sample rate lowered so dramatically
looked quicker/lazy enough ;-)

- Arnaldo

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

* Re: [PATCH 04/10] perf machine: Introduce synthesize_threads method out of open coded equivalent
  2013-11-12 11:34       ` Arnaldo Carvalho de Melo
@ 2013-11-12 12:44         ` Ingo Molnar
  2013-11-12 21:57         ` [tip:perf/urgent] perf target: Shorten perf_target__ to target__ tip-bot for Arnaldo Carvalho de Melo
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2013-11-12 12:44 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: David Ahern, linux-kernel, Adrian Hunter, Frederic Weisbecker,
	Jiri Olsa, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian


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

> Em Mon, Nov 11, 2013 at 09:50:45PM +0100, Ingo Molnar escreveu:
> > * David Ahern <dsahern@gmail.com> wrote:
> 
> > > On 11/11/13, 1:22 PM, Arnaldo Carvalho de Melo wrote:
> > > >+	if (perf_target__has_task(target))
> > > >+		return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
> > > >+	else if (perf_target__has_cpu(target))
> > > >+		return perf_event__synthesize_threads(tool, process, machine, data_mmap);
> 
> > > Getting kind of long on the line lengths...
> 
> > Maybe we could start losing most of the perf_ prefixes - it's all about 
> > perf here, so it does not really add much information, does it?
> 
> In some cases that is ok, that is why I didn't call it 'perf_machine', 
> just 'machine', in others, like 'perf_event', I thought 'event' would be 
> too general when somebody tries to use this code together with other 
> libraries.

I think 'event' as a variable name is generally unused by libraries, 
exactly because so much random code uses it.

The only unfortunate C library land grabs I've run into are 'time' [by 
glibc] and 'y0' [by libm].

What I was suggesting here was more like an event__*() namespace - there 
shouldn't be any collision with public functions from libraries, public 
functions are generally either well established, or prefixed with a 
library name.

These are perf-internal function names, so using event__*() should be fine 
- assuming there are no counter arguments.

Thanks,

	Ingo

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

* Re: [PATCH 10/10] perf tests: Use lower sample_freq in sw clock event period test
  2013-11-12  7:07   ` Adrian Hunter
  2013-11-12  8:40     ` Namhyung Kim
@ 2013-11-12 14:41     ` Arnaldo Carvalho de Melo
  2013-11-15  6:03       ` Namhyung Kim
  2013-11-12 21:56     ` [tip:perf/urgent] perf tests: Compensate lower sample freq with longer test loop tip-bot for Adrian Hunter
  2 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-12 14:41 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Ingo Molnar, linux-kernel, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian

Em Tue, Nov 12, 2013 at 09:07:36AM +0200, Adrian Hunter escreveu:
> On 11/11/13 22:22, Arnaldo Carvalho de Melo wrote:
> > We were using it at 10 kHz, which doesn't work in machines where somehow
> > the max freq was auto reduced by the kernel:
> >
> > [root@ssdandy ~]# perf test 19
> > 19: Test software clock events have valid period values    : FAILED!
> > [root@ssdandy ~]# perf test -v 19
> > 19: Test software clock events have valid period values    :
> > --- start ---
> > Couldn't open evlist: Invalid argument
> > ---- end ----
> > Test software clock events have valid period values: FAILED!
> > [root@ssdandy ~]#
> >
> > [root@ssdandy ~]# cat /proc/sys/kernel/perf_event_max_sample_rate
> > 7000
> >
> > Reducing it to 500 Hz should be good enough for this test and also
> > shouldn't affect what it is testing.
> >
> > But warn the user if it fails, informing the knob and the freq tried.
> 
> Doesn't work for me:
> 
> ./perf test -v 19
> 19: Test software clock events have valid period values    :
> --- start ---
> mmap size 528384B
> mmap size 528384B
> All (0) samples have period value of 1!
> ---- end ----
> Test software clock events have valid period values: FAILED!
> 
> But this fixes it:
> 
> diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
> index 93a7139..6664a7c 100644
> --- a/tools/perf/tests/sw-clock.c
> +++ b/tools/perf/tests/sw-clock.c
> @@ -9,7 +9,7 @@
>  #include "util/cpumap.h"
>  #include "util/thread_map.h"
>  
> -#define NR_LOOPS  1000000
> +#define NR_LOOPS  10000000

Lower frequency, need to generate more noise, ugh. Adding that, but I
think this test needs to be reworked, Namhyung?

- Arnaldo

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

* [tip:perf/urgent] perf tests: Compensate lower sample freq with longer test loop
  2013-11-12  7:07   ` Adrian Hunter
  2013-11-12  8:40     ` Namhyung Kim
  2013-11-12 14:41     ` Arnaldo Carvalho de Melo
@ 2013-11-12 21:56     ` tip-bot for Adrian Hunter
  2 siblings, 0 replies; 73+ messages in thread
From: tip-bot for Adrian Hunter @ 2013-11-12 21:56 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, eranian, paulus, hpa, mingo, peterz, efault,
	namhyung, jolsa, fweisbec, adrian.hunter, dsahern, tglx

Commit-ID:  3fe2130523b2e098085eb4d38cd5b737a97cbee6
Gitweb:     http://git.kernel.org/tip/3fe2130523b2e098085eb4d38cd5b737a97cbee6
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Tue, 12 Nov 2013 11:45:21 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 12 Nov 2013 13:00:37 -0300

perf tests: Compensate lower sample freq with longer test loop

Doesn't work for me:

./perf test -v 19
19: Test software clock events have valid period values    :
--- start ---
mmap size 528384B
mmap size 528384B
All (0) samples have period value of 1!
---- end ----
Test software clock events have valid period values: FAILED!

Compensate the lower freq introduced in 67c1e4a53b17 with a longer loop,

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/5281D3B8.2030104@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/sw-clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
index 93a7139..6664a7c 100644
--- a/tools/perf/tests/sw-clock.c
+++ b/tools/perf/tests/sw-clock.c
@@ -9,7 +9,7 @@
 #include "util/cpumap.h"
 #include "util/thread_map.h"
 
-#define NR_LOOPS  1000000
+#define NR_LOOPS  10000000
 
 /*
  * This test will open software clock events (cpu-clock, task-clock)

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

* [tip:perf/urgent] perf target: Shorten perf_target__ to target__
  2013-11-12 11:34       ` Arnaldo Carvalho de Melo
  2013-11-12 12:44         ` Ingo Molnar
@ 2013-11-12 21:57         ` tip-bot for Arnaldo Carvalho de Melo
  2014-01-12 18:33         ` [tip:perf/core] perf tools: Rename 'perf_record_opts' to ' record_opts tip-bot for Arnaldo Carvalho de Melo
  2014-01-12 18:35         ` [tip:perf/core] perf report: Rename 'perf_report' to 'report' tip-bot for Arnaldo Carvalho de Melo
  3 siblings, 0 replies; 73+ messages in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2013-11-12 21:57 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, eranian, paulus, acme, hpa, mingo, peterz, efault,
	namhyung, jolsa, fweisbec, dsahern, adrian.hunter, tglx

Commit-ID:  602ad878d41ef097cc9aa2def7830d5bb27a15d8
Gitweb:     http://git.kernel.org/tip/602ad878d41ef097cc9aa2def7830d5bb27a15d8
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Tue, 12 Nov 2013 16:46:16 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 12 Nov 2013 16:51:03 -0300

perf target: Shorten perf_target__ to target__

Getting unwieldly long, for this app domain should be descriptive enough
and the use of __ to separate the class from the method names should
help with avoiding clashes with other code bases.

Reported-by: David Ahern <dsahern@gmail.com>
Suggested-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20131112113427.GA4053@ghostprotocols.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-kvm.c     |  6 ++---
 tools/perf/builtin-record.c  | 14 ++++++------
 tools/perf/builtin-stat.c    | 21 ++++++++---------
 tools/perf/builtin-top.c     | 14 ++++++------
 tools/perf/builtin-trace.c   | 10 ++++----
 tools/perf/perf.h            |  2 +-
 tools/perf/tests/task-exit.c |  2 +-
 tools/perf/util/evlist.c     | 12 ++++------
 tools/perf/util/evlist.h     |  5 ++--
 tools/perf/util/evsel.c      |  9 ++++----
 tools/perf/util/evsel.h      |  3 +--
 tools/perf/util/machine.c    |  6 ++---
 tools/perf/util/machine.h    |  4 ++--
 tools/perf/util/target.c     | 54 +++++++++++++++++++++-----------------------
 tools/perf/util/target.h     | 44 +++++++++++++++++-------------------
 tools/perf/util/top.c        |  2 +-
 16 files changed, 99 insertions(+), 109 deletions(-)

diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 346bb59..f8bf5f2 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -1510,13 +1510,13 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
 	/*
 	 * target related setups
 	 */
-	err = perf_target__validate(&kvm->opts.target);
+	err = target__validate(&kvm->opts.target);
 	if (err) {
-		perf_target__strerror(&kvm->opts.target, err, errbuf, BUFSIZ);
+		target__strerror(&kvm->opts.target, err, errbuf, BUFSIZ);
 		ui__warning("%s", errbuf);
 	}
 
-	if (perf_target__none(&kvm->opts.target))
+	if (target__none(&kvm->opts.target))
 		kvm->opts.target.system_wide = true;
 
 
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 880227e..4d644fe 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -506,7 +506,7 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 	 * (apart from group members) have enable_on_exec=1 set,
 	 * so don't spoil it by prematurely enabling them.
 	 */
-	if (!perf_target__none(&opts->target))
+	if (!target__none(&opts->target))
 		perf_evlist__enable(evsel_list);
 
 	/*
@@ -535,7 +535,7 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 		 * die with the process and we wait for that. Thus no need to
 		 * disable events in this case.
 		 */
-		if (done && !disabled && !perf_target__none(&opts->target)) {
+		if (done && !disabled && !target__none(&opts->target)) {
 			perf_evlist__disable(evsel_list);
 			disabled = true;
 		}
@@ -906,7 +906,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
 
 	argc = parse_options(argc, argv, record_options, record_usage,
 			    PARSE_OPT_STOP_AT_NON_OPTION);
-	if (!argc && perf_target__none(&rec->opts.target))
+	if (!argc && target__none(&rec->opts.target))
 		usage_with_options(record_usage, record_options);
 
 	if (nr_cgroups && !rec->opts.target.system_wide) {
@@ -936,17 +936,17 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
 		goto out_symbol_exit;
 	}
 
-	err = perf_target__validate(&rec->opts.target);
+	err = target__validate(&rec->opts.target);
 	if (err) {
-		perf_target__strerror(&rec->opts.target, err, errbuf, BUFSIZ);
+		target__strerror(&rec->opts.target, err, errbuf, BUFSIZ);
 		ui__warning("%s", errbuf);
 	}
 
-	err = perf_target__parse_uid(&rec->opts.target);
+	err = target__parse_uid(&rec->opts.target);
 	if (err) {
 		int saved_errno = errno;
 
-		perf_target__strerror(&rec->opts.target, err, errbuf, BUFSIZ);
+		target__strerror(&rec->opts.target, err, errbuf, BUFSIZ);
 		ui__error("%s", errbuf);
 
 		err = -saved_errno;
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 0fc1c94..ee0d565 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -108,7 +108,7 @@ enum {
 
 static struct perf_evlist	*evsel_list;
 
-static struct perf_target	target = {
+static struct target target = {
 	.uid	= UINT_MAX,
 };
 
@@ -294,11 +294,10 @@ static int create_perf_stat_counter(struct perf_evsel *evsel)
 
 	attr->inherit = !no_inherit;
 
-	if (perf_target__has_cpu(&target))
+	if (target__has_cpu(&target))
 		return perf_evsel__open_per_cpu(evsel, perf_evsel__cpus(evsel));
 
-	if (!perf_target__has_task(&target) &&
-	    perf_evsel__is_group_leader(evsel)) {
+	if (!target__has_task(&target) && perf_evsel__is_group_leader(evsel)) {
 		attr->disabled = 1;
 		if (!initial_delay)
 			attr->enable_on_exec = 1;
@@ -1236,7 +1235,7 @@ static void print_stat(int argc, const char **argv)
 			fprintf(output, "\'system wide");
 		else if (target.cpu_list)
 			fprintf(output, "\'CPU(s) %s", target.cpu_list);
-		else if (!perf_target__has_task(&target)) {
+		else if (!target__has_task(&target)) {
 			fprintf(output, "\'%s", argv[0]);
 			for (i = 1; i < argc; i++)
 				fprintf(output, " %s", argv[i]);
@@ -1667,7 +1666,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 	} else if (big_num_opt == 0) /* User passed --no-big-num */
 		big_num = false;
 
-	if (!argc && perf_target__none(&target))
+	if (!argc && target__none(&target))
 		usage_with_options(stat_usage, options);
 
 	if (run_count < 0) {
@@ -1680,8 +1679,8 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 	}
 
 	/* no_aggr, cgroup are for system-wide only */
-	if ((aggr_mode != AGGR_GLOBAL || nr_cgroups)
-	     && !perf_target__has_cpu(&target)) {
+	if ((aggr_mode != AGGR_GLOBAL || nr_cgroups) &&
+	    !target__has_cpu(&target)) {
 		fprintf(stderr, "both cgroup and no-aggregation "
 			"modes only available in system-wide mode\n");
 
@@ -1694,14 +1693,14 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (add_default_attributes())
 		goto out;
 
-	perf_target__validate(&target);
+	target__validate(&target);
 
 	if (perf_evlist__create_maps(evsel_list, &target) < 0) {
-		if (perf_target__has_task(&target)) {
+		if (target__has_task(&target)) {
 			pr_err("Problems finding threads of monitor\n");
 			parse_options_usage(stat_usage, options, "p", 1);
 			parse_options_usage(NULL, options, "t", 1);
-		} else if (perf_target__has_cpu(&target)) {
+		} else if (target__has_cpu(&target)) {
 			perror("failed to parse CPUs map");
 			parse_options_usage(stat_usage, options, "C", 1);
 			parse_options_usage(NULL, options, "a", 1);
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 8c520d9..b8f8e29 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -967,7 +967,7 @@ static int __cmd_top(struct perf_top *top)
 	 * XXX 'top' still doesn't start workloads like record, trace, but should,
 	 * so leave the check here.
 	 */
-        if (!perf_target__none(&opts->target))
+        if (!target__none(&opts->target))
                 perf_evlist__enable(top->evlist);
 
 	/* Wait for a minimal set of events before starting the snapshot */
@@ -1053,7 +1053,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
 		.sym_pcnt_filter     = 5,
 	};
 	struct perf_record_opts *opts = &top.record_opts;
-	struct perf_target *target = &opts->target;
+	struct target *target = &opts->target;
 	const struct option options[] = {
 	OPT_CALLBACK('e', "event", &top.evlist, "event",
 		     "event selector. use 'perf list' to list available events",
@@ -1169,24 +1169,24 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
 
 	setup_browser(false);
 
-	status = perf_target__validate(target);
+	status = target__validate(target);
 	if (status) {
-		perf_target__strerror(target, status, errbuf, BUFSIZ);
+		target__strerror(target, status, errbuf, BUFSIZ);
 		ui__warning("%s", errbuf);
 	}
 
-	status = perf_target__parse_uid(target);
+	status = target__parse_uid(target);
 	if (status) {
 		int saved_errno = errno;
 
-		perf_target__strerror(target, status, errbuf, BUFSIZ);
+		target__strerror(target, status, errbuf, BUFSIZ);
 		ui__error("%s", errbuf);
 
 		status = -saved_errno;
 		goto out_delete_evlist;
 	}
 
-	if (perf_target__none(target))
+	if (target__none(target))
 		target->system_wide = true;
 
 	if (perf_evlist__create_maps(top.evlist, target) < 0)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index aa5702f..6b230af 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2327,21 +2327,21 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
 		}
 	}
 
-	err = perf_target__validate(&trace.opts.target);
+	err = target__validate(&trace.opts.target);
 	if (err) {
-		perf_target__strerror(&trace.opts.target, err, bf, sizeof(bf));
+		target__strerror(&trace.opts.target, err, bf, sizeof(bf));
 		fprintf(trace.output, "%s", bf);
 		goto out_close;
 	}
 
-	err = perf_target__parse_uid(&trace.opts.target);
+	err = target__parse_uid(&trace.opts.target);
 	if (err) {
-		perf_target__strerror(&trace.opts.target, err, bf, sizeof(bf));
+		target__strerror(&trace.opts.target, err, bf, sizeof(bf));
 		fprintf(trace.output, "%s", bf);
 		goto out_close;
 	}
 
-	if (!argc && perf_target__none(&trace.opts.target))
+	if (!argc && target__none(&trace.opts.target))
 		trace.opts.target.system_wide = true;
 
 	if (input_name)
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 6a587e84..b079304 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -248,7 +248,7 @@ enum perf_call_graph_mode {
 };
 
 struct perf_record_opts {
-	struct perf_target target;
+	struct target target;
 	int	     call_graph;
 	bool	     group;
 	bool	     inherit_stat;
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c
index c33d95f..d09ab57 100644
--- a/tools/perf/tests/task-exit.c
+++ b/tools/perf/tests/task-exit.c
@@ -28,7 +28,7 @@ int test__task_exit(void)
 	union perf_event *event;
 	struct perf_evsel *evsel;
 	struct perf_evlist *evlist;
-	struct perf_target target = {
+	struct target target = {
 		.uid		= UINT_MAX,
 		.uses_mmap	= true,
 	};
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index cb19044..dc6fa3f 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -811,8 +811,7 @@ int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages,
 	return perf_evlist__mmap_per_cpu(evlist, prot, mask);
 }
 
-int perf_evlist__create_maps(struct perf_evlist *evlist,
-			     struct perf_target *target)
+int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
 {
 	evlist->threads = thread_map__new_str(target->pid, target->tid,
 					      target->uid);
@@ -820,9 +819,9 @@ int perf_evlist__create_maps(struct perf_evlist *evlist,
 	if (evlist->threads == NULL)
 		return -1;
 
-	if (perf_target__has_task(target))
+	if (target__has_task(target))
 		evlist->cpus = cpu_map__dummy_new();
-	else if (!perf_target__has_cpu(target) && !target->uses_mmap)
+	else if (!target__has_cpu(target) && !target->uses_mmap)
 		evlist->cpus = cpu_map__dummy_new();
 	else
 		evlist->cpus = cpu_map__new(target->cpu_list);
@@ -1031,8 +1030,7 @@ out_err:
 	return err;
 }
 
-int perf_evlist__prepare_workload(struct perf_evlist *evlist,
-				  struct perf_target *target,
+int perf_evlist__prepare_workload(struct perf_evlist *evlist, struct target *target,
 				  const char *argv[], bool pipe_output,
 				  bool want_signal)
 {
@@ -1084,7 +1082,7 @@ int perf_evlist__prepare_workload(struct perf_evlist *evlist,
 		exit(-1);
 	}
 
-	if (perf_target__none(target))
+	if (target__none(target))
 		evlist->threads->map[0] = evlist->workload.pid;
 
 	close(child_ready_pipe[1]);
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index ecaa582..649d6ea 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -102,7 +102,7 @@ void perf_evlist__config(struct perf_evlist *evlist,
 int perf_record_opts__config(struct perf_record_opts *opts);
 
 int perf_evlist__prepare_workload(struct perf_evlist *evlist,
-				  struct perf_target *target,
+				  struct target *target,
 				  const char *argv[], bool pipe_output,
 				  bool want_signal);
 int perf_evlist__start_workload(struct perf_evlist *evlist);
@@ -134,8 +134,7 @@ static inline void perf_evlist__set_maps(struct perf_evlist *evlist,
 	evlist->threads	= threads;
 }
 
-int perf_evlist__create_maps(struct perf_evlist *evlist,
-			     struct perf_target *target);
+int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target);
 void perf_evlist__delete_maps(struct perf_evlist *evlist);
 int perf_evlist__apply_filters(struct perf_evlist *evlist);
 
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index f95653a..18f7c18 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -645,7 +645,7 @@ void perf_evsel__config(struct perf_evsel *evsel,
 		}
 	}
 
-	if (perf_target__has_cpu(&opts->target))
+	if (target__has_cpu(&opts->target))
 		perf_evsel__set_sample_bit(evsel, CPU);
 
 	if (opts->period)
@@ -653,7 +653,7 @@ void perf_evsel__config(struct perf_evsel *evsel,
 
 	if (!perf_missing_features.sample_id_all &&
 	    (opts->sample_time || !opts->no_inherit ||
-	     perf_target__has_cpu(&opts->target)))
+	     target__has_cpu(&opts->target)))
 		perf_evsel__set_sample_bit(evsel, TIME);
 
 	if (opts->raw_samples) {
@@ -696,7 +696,7 @@ void perf_evsel__config(struct perf_evsel *evsel,
 	 * Setting enable_on_exec for independent events and
 	 * group leaders for traced executed by perf.
 	 */
-	if (perf_target__none(&opts->target) && perf_evsel__is_group_leader(evsel))
+	if (target__none(&opts->target) && perf_evsel__is_group_leader(evsel))
 		attr->enable_on_exec = 1;
 }
 
@@ -2006,8 +2006,7 @@ bool perf_evsel__fallback(struct perf_evsel *evsel, int err,
 	return false;
 }
 
-int perf_evsel__open_strerror(struct perf_evsel *evsel,
-			      struct perf_target *target,
+int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
 			      int err, char *msg, size_t size)
 {
 	switch (err) {
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 0178233..f502965 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -318,8 +318,7 @@ int perf_evsel__fprintf(struct perf_evsel *evsel,
 
 bool perf_evsel__fallback(struct perf_evsel *evsel, int err,
 			  char *msg, size_t msgsize);
-int perf_evsel__open_strerror(struct perf_evsel *evsel,
-			      struct perf_target *target,
+int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
 			      int err, char *msg, size_t size);
 
 static inline int perf_evsel__group_idx(struct perf_evsel *evsel)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 680700b6..0393912 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1396,12 +1396,12 @@ int machine__for_each_thread(struct machine *machine,
 }
 
 int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
-				  struct perf_target *target, struct thread_map *threads,
+				  struct target *target, struct thread_map *threads,
 				  perf_event__handler_t process, bool data_mmap)
 {
-	if (perf_target__has_task(target))
+	if (target__has_task(target))
 		return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
-	else if (perf_target__has_cpu(target))
+	else if (target__has_cpu(target))
 		return perf_event__synthesize_threads(tool, process, machine, data_mmap);
 	/* command specified */
 	return 0;
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index fedd1df..4771330 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -180,10 +180,10 @@ int machine__for_each_thread(struct machine *machine,
 			     void *priv);
 
 int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
-				  struct perf_target *target, struct thread_map *threads,
+				  struct target *target, struct thread_map *threads,
 				  perf_event__handler_t process, bool data_mmap);
 static inline
-int machine__synthesize_threads(struct machine *machine, struct perf_target *target,
+int machine__synthesize_threads(struct machine *machine, struct target *target,
 				struct thread_map *threads, bool data_mmap)
 {
 	return __machine__synthesize_threads(machine, NULL, target, threads,
diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
index 065528b..3c778a0 100644
--- a/tools/perf/util/target.c
+++ b/tools/perf/util/target.c
@@ -13,9 +13,9 @@
 #include <string.h>
 
 
-enum perf_target_errno perf_target__validate(struct perf_target *target)
+enum target_errno target__validate(struct target *target)
 {
-	enum perf_target_errno ret = PERF_ERRNO_TARGET__SUCCESS;
+	enum target_errno ret = TARGET_ERRNO__SUCCESS;
 
 	if (target->pid)
 		target->tid = target->pid;
@@ -23,42 +23,42 @@ enum perf_target_errno perf_target__validate(struct perf_target *target)
 	/* CPU and PID are mutually exclusive */
 	if (target->tid && target->cpu_list) {
 		target->cpu_list = NULL;
-		if (ret == PERF_ERRNO_TARGET__SUCCESS)
-			ret = PERF_ERRNO_TARGET__PID_OVERRIDE_CPU;
+		if (ret == TARGET_ERRNO__SUCCESS)
+			ret = TARGET_ERRNO__PID_OVERRIDE_CPU;
 	}
 
 	/* UID and PID are mutually exclusive */
 	if (target->tid && target->uid_str) {
 		target->uid_str = NULL;
-		if (ret == PERF_ERRNO_TARGET__SUCCESS)
-			ret = PERF_ERRNO_TARGET__PID_OVERRIDE_UID;
+		if (ret == TARGET_ERRNO__SUCCESS)
+			ret = TARGET_ERRNO__PID_OVERRIDE_UID;
 	}
 
 	/* UID and CPU are mutually exclusive */
 	if (target->uid_str && target->cpu_list) {
 		target->cpu_list = NULL;
-		if (ret == PERF_ERRNO_TARGET__SUCCESS)
-			ret = PERF_ERRNO_TARGET__UID_OVERRIDE_CPU;
+		if (ret == TARGET_ERRNO__SUCCESS)
+			ret = TARGET_ERRNO__UID_OVERRIDE_CPU;
 	}
 
 	/* PID and SYSTEM are mutually exclusive */
 	if (target->tid && target->system_wide) {
 		target->system_wide = false;
-		if (ret == PERF_ERRNO_TARGET__SUCCESS)
-			ret = PERF_ERRNO_TARGET__PID_OVERRIDE_SYSTEM;
+		if (ret == TARGET_ERRNO__SUCCESS)
+			ret = TARGET_ERRNO__PID_OVERRIDE_SYSTEM;
 	}
 
 	/* UID and SYSTEM are mutually exclusive */
 	if (target->uid_str && target->system_wide) {
 		target->system_wide = false;
-		if (ret == PERF_ERRNO_TARGET__SUCCESS)
-			ret = PERF_ERRNO_TARGET__UID_OVERRIDE_SYSTEM;
+		if (ret == TARGET_ERRNO__SUCCESS)
+			ret = TARGET_ERRNO__UID_OVERRIDE_SYSTEM;
 	}
 
 	return ret;
 }
 
-enum perf_target_errno perf_target__parse_uid(struct perf_target *target)
+enum target_errno target__parse_uid(struct target *target)
 {
 	struct passwd pwd, *result;
 	char buf[1024];
@@ -66,7 +66,7 @@ enum perf_target_errno perf_target__parse_uid(struct perf_target *target)
 
 	target->uid = UINT_MAX;
 	if (str == NULL)
-		return PERF_ERRNO_TARGET__SUCCESS;
+		return TARGET_ERRNO__SUCCESS;
 
 	/* Try user name first */
 	getpwnam_r(str, &pwd, buf, sizeof(buf), &result);
@@ -79,22 +79,22 @@ enum perf_target_errno perf_target__parse_uid(struct perf_target *target)
 		int uid = strtol(str, &endptr, 10);
 
 		if (*endptr != '\0')
-			return PERF_ERRNO_TARGET__INVALID_UID;
+			return TARGET_ERRNO__INVALID_UID;
 
 		getpwuid_r(uid, &pwd, buf, sizeof(buf), &result);
 
 		if (result == NULL)
-			return PERF_ERRNO_TARGET__USER_NOT_FOUND;
+			return TARGET_ERRNO__USER_NOT_FOUND;
 	}
 
 	target->uid = result->pw_uid;
-	return PERF_ERRNO_TARGET__SUCCESS;
+	return TARGET_ERRNO__SUCCESS;
 }
 
 /*
- * This must have a same ordering as the enum perf_target_errno.
+ * This must have a same ordering as the enum target_errno.
  */
-static const char *perf_target__error_str[] = {
+static const char *target__error_str[] = {
 	"PID/TID switch overriding CPU",
 	"PID/TID switch overriding UID",
 	"UID switch overriding CPU",
@@ -104,7 +104,7 @@ static const char *perf_target__error_str[] = {
 	"Problems obtaining information for user %s",
 };
 
-int perf_target__strerror(struct perf_target *target, int errnum,
+int target__strerror(struct target *target, int errnum,
 			  char *buf, size_t buflen)
 {
 	int idx;
@@ -124,21 +124,19 @@ int perf_target__strerror(struct perf_target *target, int errnum,
 		return 0;
 	}
 
-	if (errnum <  __PERF_ERRNO_TARGET__START ||
-	    errnum >= __PERF_ERRNO_TARGET__END)
+	if (errnum <  __TARGET_ERRNO__START || errnum >= __TARGET_ERRNO__END)
 		return -1;
 
-	idx = errnum - __PERF_ERRNO_TARGET__START;
-	msg = perf_target__error_str[idx];
+	idx = errnum - __TARGET_ERRNO__START;
+	msg = target__error_str[idx];
 
 	switch (errnum) {
-	case PERF_ERRNO_TARGET__PID_OVERRIDE_CPU
-	 ... PERF_ERRNO_TARGET__UID_OVERRIDE_SYSTEM:
+	case TARGET_ERRNO__PID_OVERRIDE_CPU ... TARGET_ERRNO__UID_OVERRIDE_SYSTEM:
 		snprintf(buf, buflen, "%s", msg);
 		break;
 
-	case PERF_ERRNO_TARGET__INVALID_UID:
-	case PERF_ERRNO_TARGET__USER_NOT_FOUND:
+	case TARGET_ERRNO__INVALID_UID:
+	case TARGET_ERRNO__USER_NOT_FOUND:
 		snprintf(buf, buflen, msg, target->uid_str);
 		break;
 
diff --git a/tools/perf/util/target.h b/tools/perf/util/target.h
index a4be857..89bab71 100644
--- a/tools/perf/util/target.h
+++ b/tools/perf/util/target.h
@@ -4,7 +4,7 @@
 #include <stdbool.h>
 #include <sys/types.h>
 
-struct perf_target {
+struct target {
 	const char   *pid;
 	const char   *tid;
 	const char   *cpu_list;
@@ -14,8 +14,8 @@ struct perf_target {
 	bool	     uses_mmap;
 };
 
-enum perf_target_errno {
-	PERF_ERRNO_TARGET__SUCCESS		= 0,
+enum target_errno {
+	TARGET_ERRNO__SUCCESS		= 0,
 
 	/*
 	 * Choose an arbitrary negative big number not to clash with standard
@@ -24,42 +24,40 @@ enum perf_target_errno {
 	 *
 	 * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
 	 */
-	__PERF_ERRNO_TARGET__START		= -10000,
+	__TARGET_ERRNO__START		= -10000,
 
+	/* for target__validate() */
+	TARGET_ERRNO__PID_OVERRIDE_CPU	= __TARGET_ERRNO__START,
+	TARGET_ERRNO__PID_OVERRIDE_UID,
+	TARGET_ERRNO__UID_OVERRIDE_CPU,
+	TARGET_ERRNO__PID_OVERRIDE_SYSTEM,
+	TARGET_ERRNO__UID_OVERRIDE_SYSTEM,
 
-	/* for perf_target__validate() */
-	PERF_ERRNO_TARGET__PID_OVERRIDE_CPU	= __PERF_ERRNO_TARGET__START,
-	PERF_ERRNO_TARGET__PID_OVERRIDE_UID,
-	PERF_ERRNO_TARGET__UID_OVERRIDE_CPU,
-	PERF_ERRNO_TARGET__PID_OVERRIDE_SYSTEM,
-	PERF_ERRNO_TARGET__UID_OVERRIDE_SYSTEM,
+	/* for target__parse_uid() */
+	TARGET_ERRNO__INVALID_UID,
+	TARGET_ERRNO__USER_NOT_FOUND,
 
-	/* for perf_target__parse_uid() */
-	PERF_ERRNO_TARGET__INVALID_UID,
-	PERF_ERRNO_TARGET__USER_NOT_FOUND,
-
-	__PERF_ERRNO_TARGET__END,
+	__TARGET_ERRNO__END,
 };
 
-enum perf_target_errno perf_target__validate(struct perf_target *target);
-enum perf_target_errno perf_target__parse_uid(struct perf_target *target);
+enum target_errno target__validate(struct target *target);
+enum target_errno target__parse_uid(struct target *target);
 
-int perf_target__strerror(struct perf_target *target, int errnum, char *buf,
-			  size_t buflen);
+int target__strerror(struct target *target, int errnum, char *buf, size_t buflen);
 
-static inline bool perf_target__has_task(struct perf_target *target)
+static inline bool target__has_task(struct target *target)
 {
 	return target->tid || target->pid || target->uid_str;
 }
 
-static inline bool perf_target__has_cpu(struct perf_target *target)
+static inline bool target__has_cpu(struct target *target)
 {
 	return target->system_wide || target->cpu_list;
 }
 
-static inline bool perf_target__none(struct perf_target *target)
+static inline bool target__none(struct target *target)
 {
-	return !perf_target__has_task(target) && !perf_target__has_cpu(target);
+	return !target__has_task(target) && !target__has_cpu(target);
 }
 
 #endif /* _PERF_TARGET_H */
diff --git a/tools/perf/util/top.c b/tools/perf/util/top.c
index f857b51..ce793c7 100644
--- a/tools/perf/util/top.c
+++ b/tools/perf/util/top.c
@@ -27,7 +27,7 @@ size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size)
 	float ksamples_per_sec;
 	float esamples_percent;
 	struct perf_record_opts *opts = &top->record_opts;
-	struct perf_target *target = &opts->target;
+	struct target *target = &opts->target;
 	size_t ret = 0;
 
 	if (top->samples) {

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

* Re: [PATCH 10/10] perf tests: Use lower sample_freq in sw clock event period test
  2013-11-12 14:41     ` Arnaldo Carvalho de Melo
@ 2013-11-15  6:03       ` Namhyung Kim
  0 siblings, 0 replies; 73+ messages in thread
From: Namhyung Kim @ 2013-11-15  6:03 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Adrian Hunter, Ingo Molnar, linux-kernel, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Mike Galbraith, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian

Hi Arnaldo,

On Tue, 12 Nov 2013 11:41:01 -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Nov 12, 2013 at 09:07:36AM +0200, Adrian Hunter escreveu:
>> -#define NR_LOOPS  1000000
>> +#define NR_LOOPS  10000000
>
> Lower frequency, need to generate more noise, ugh. Adding that, but I
> think this test needs to be reworked, Namhyung?

Hmm.. We might go back to use the default frequency of 4000 (or 1000)
and make the loop based on time like using alarm or setitimer.

Or we can add an outer loop which doubles the inner loop counter if no
samples are collected.

What do you think?

Thanks,
Namhyung

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

* [tip:perf/core] perf tools: Rename 'perf_record_opts' to ' record_opts
  2013-11-12 11:34       ` Arnaldo Carvalho de Melo
  2013-11-12 12:44         ` Ingo Molnar
  2013-11-12 21:57         ` [tip:perf/urgent] perf target: Shorten perf_target__ to target__ tip-bot for Arnaldo Carvalho de Melo
@ 2014-01-12 18:33         ` tip-bot for Arnaldo Carvalho de Melo
  2014-01-12 18:35         ` [tip:perf/core] perf report: Rename 'perf_report' to 'report' tip-bot for Arnaldo Carvalho de Melo
  3 siblings, 0 replies; 73+ messages in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2014-01-12 18:33 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, eranian, paulus, acme, hpa, mingo, peterz, efault,
	namhyung, jolsa, fweisbec, adrian.hunter, dsahern, tglx

Commit-ID:  b40067964f09a5b4d9e133dec225007ee0a13050
Gitweb:     http://git.kernel.org/tip/b40067964f09a5b4d9e133dec225007ee0a13050
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Thu, 19 Dec 2013 14:43:45 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 19 Dec 2013 14:43:45 -0300

perf tools: Rename 'perf_record_opts' to 'record_opts

Reduce typing, functions use class__method convention, so unlikely to
clash with other libraries.

This actually was discussed in the "Link:" referenced message below.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20131112113427.GA4053@ghostprotocols.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-kvm.c                  |  2 +-
 tools/perf/builtin-record.c               | 18 +++++++++---------
 tools/perf/builtin-top.c                  |  8 ++++----
 tools/perf/builtin-trace.c                |  2 +-
 tools/perf/perf.h                         |  2 +-
 tools/perf/tests/code-reading.c           |  2 +-
 tools/perf/tests/keep-tracking.c          |  2 +-
 tools/perf/tests/open-syscall-tp-fields.c |  2 +-
 tools/perf/tests/perf-record.c            |  2 +-
 tools/perf/tests/perf-time-to-tsc.c       |  2 +-
 tools/perf/util/callchain.h               |  2 +-
 tools/perf/util/evlist.h                  |  7 +++----
 tools/perf/util/evsel.c                   |  3 +--
 tools/perf/util/evsel.h                   |  4 ++--
 tools/perf/util/record.c                  |  9 ++++-----
 tools/perf/util/top.c                     |  2 +-
 tools/perf/util/top.h                     |  2 +-
 17 files changed, 34 insertions(+), 37 deletions(-)

diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 154b397..5a80da6 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -89,7 +89,7 @@ struct exit_reasons_table {
 
 struct perf_kvm_stat {
 	struct perf_tool    tool;
-	struct perf_record_opts opts;
+	struct record_opts  opts;
 	struct perf_evlist  *evlist;
 	struct perf_session *session;
 
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index f2624d4..6ec0cbc 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -64,7 +64,7 @@ static void __handle_on_exit_funcs(void)
 
 struct record {
 	struct perf_tool	tool;
-	struct perf_record_opts	opts;
+	struct record_opts	opts;
 	u64			bytes_written;
 	struct perf_data_file	file;
 	struct perf_evlist	*evlist;
@@ -178,7 +178,7 @@ static int record__open(struct record *rec)
 	struct perf_evsel *pos;
 	struct perf_evlist *evlist = rec->evlist;
 	struct perf_session *session = rec->session;
-	struct perf_record_opts *opts = &rec->opts;
+	struct record_opts *opts = &rec->opts;
 	int rc = 0;
 
 	perf_evlist__config(evlist, opts);
@@ -348,7 +348,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
 	const bool forks = argc > 0;
 	struct machine *machine;
 	struct perf_tool *tool = &rec->tool;
-	struct perf_record_opts *opts = &rec->opts;
+	struct record_opts *opts = &rec->opts;
 	struct perf_evlist *evsel_list = rec->evlist;
 	struct perf_data_file *file = &rec->file;
 	struct perf_session *session;
@@ -657,7 +657,7 @@ static int get_stack_size(char *str, unsigned long *_size)
 }
 #endif /* HAVE_LIBUNWIND_SUPPORT */
 
-int record_parse_callchain(const char *arg, struct perf_record_opts *opts)
+int record_parse_callchain(const char *arg, struct record_opts *opts)
 {
 	char *tok, *name, *saveptr = NULL;
 	char *buf;
@@ -713,7 +713,7 @@ int record_parse_callchain(const char *arg, struct perf_record_opts *opts)
 	return ret;
 }
 
-static void callchain_debug(struct perf_record_opts *opts)
+static void callchain_debug(struct record_opts *opts)
 {
 	pr_debug("callchain: type %d\n", opts->call_graph);
 
@@ -726,7 +726,7 @@ int record_parse_callchain_opt(const struct option *opt,
 			       const char *arg,
 			       int unset)
 {
-	struct perf_record_opts *opts = opt->value;
+	struct record_opts *opts = opt->value;
 	int ret;
 
 	/* --no-call-graph */
@@ -747,7 +747,7 @@ int record_callchain_opt(const struct option *opt,
 			 const char *arg __maybe_unused,
 			 int unset __maybe_unused)
 {
-	struct perf_record_opts *opts = opt->value;
+	struct record_opts *opts = opt->value;
 
 	if (opts->call_graph == CALLCHAIN_NONE)
 		opts->call_graph = CALLCHAIN_FP;
@@ -796,7 +796,7 @@ const char record_callchain_help[] = CALLCHAIN_HELP "fp";
 /*
  * XXX Will stay a global variable till we fix builtin-script.c to stop messing
  * with it and switch to use the library functions in perf_evlist that came
- * from builtin-record.c, i.e. use perf_record_opts,
+ * from builtin-record.c, i.e. use record_opts,
  * perf_evlist__prepare_workload, etc instead of fork+exec'in 'perf record',
  * using pipes, etc.
  */
@@ -944,7 +944,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (perf_evlist__create_maps(evsel_list, &rec->opts.target) < 0)
 		usage_with_options(record_usage, record_options);
 
-	if (perf_record_opts__config(&rec->opts)) {
+	if (record_opts__config(&rec->opts)) {
 		err = -EINVAL;
 		goto out_free_fd;
 	}
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 2c6cb66..172e91a 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -854,7 +854,7 @@ static int perf_top__start_counters(struct perf_top *top)
 	char msg[512];
 	struct perf_evsel *counter;
 	struct perf_evlist *evlist = top->evlist;
-	struct perf_record_opts *opts = &top->record_opts;
+	struct record_opts *opts = &top->record_opts;
 
 	perf_evlist__config(evlist, opts);
 
@@ -906,7 +906,7 @@ static int perf_top__setup_sample_type(struct perf_top *top __maybe_unused)
 
 static int __cmd_top(struct perf_top *top)
 {
-	struct perf_record_opts *opts = &top->record_opts;
+	struct record_opts *opts = &top->record_opts;
 	pthread_t thread;
 	int ret;
 
@@ -1028,7 +1028,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
 		.max_stack	     = PERF_MAX_STACK_DEPTH,
 		.sym_pcnt_filter     = 5,
 	};
-	struct perf_record_opts *opts = &top.record_opts;
+	struct record_opts *opts = &top.record_opts;
 	struct target *target = &opts->target;
 	const struct option options[] = {
 	OPT_CALLBACK('e', "event", &top.evlist, "event",
@@ -1179,7 +1179,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (top.delay_secs < 1)
 		top.delay_secs = 1;
 
-	if (perf_record_opts__config(opts)) {
+	if (record_opts__config(opts)) {
 		status = -EINVAL;
 		goto out_delete_maps;
 	}
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 56bbca5..f64b5b0 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1159,7 +1159,7 @@ struct trace {
 		int		max;
 		struct syscall  *table;
 	} syscalls;
-	struct perf_record_opts opts;
+	struct record_opts	opts;
 	struct machine		*host;
 	u64			base_time;
 	bool			full_time;
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index b23fed5..b1cc84b 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -247,7 +247,7 @@ enum perf_call_graph_mode {
 	CALLCHAIN_DWARF
 };
 
-struct perf_record_opts {
+struct record_opts {
 	struct target target;
 	int	     call_graph;
 	bool	     group;
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 85d4919..4248d1e 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -391,7 +391,7 @@ static int do_test_code_reading(bool try_kcore)
 	struct machines machines;
 	struct machine *machine;
 	struct thread *thread;
-	struct perf_record_opts opts = {
+	struct record_opts opts = {
 		.mmap_pages	     = UINT_MAX,
 		.user_freq	     = UINT_MAX,
 		.user_interval	     = ULLONG_MAX,
diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c
index 376c356..27eb751 100644
--- a/tools/perf/tests/keep-tracking.c
+++ b/tools/perf/tests/keep-tracking.c
@@ -51,7 +51,7 @@ static int find_comm(struct perf_evlist *evlist, const char *comm)
  */
 int test__keep_tracking(void)
 {
-	struct perf_record_opts opts = {
+	struct record_opts opts = {
 		.mmap_pages	     = UINT_MAX,
 		.user_freq	     = UINT_MAX,
 		.user_interval	     = ULLONG_MAX,
diff --git a/tools/perf/tests/open-syscall-tp-fields.c b/tools/perf/tests/open-syscall-tp-fields.c
index 41cc0ba..774620a 100644
--- a/tools/perf/tests/open-syscall-tp-fields.c
+++ b/tools/perf/tests/open-syscall-tp-fields.c
@@ -6,7 +6,7 @@
 
 int test__syscall_open_tp_fields(void)
 {
-	struct perf_record_opts opts = {
+	struct record_opts opts = {
 		.target = {
 			.uid = UINT_MAX,
 			.uses_mmap = true,
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c
index 93a62b0..eeba562 100644
--- a/tools/perf/tests/perf-record.c
+++ b/tools/perf/tests/perf-record.c
@@ -34,7 +34,7 @@ realloc:
 
 int test__PERF_RECORD(void)
 {
-	struct perf_record_opts opts = {
+	struct record_opts opts = {
 		.target = {
 			.uid = UINT_MAX,
 			.uses_mmap = true,
diff --git a/tools/perf/tests/perf-time-to-tsc.c b/tools/perf/tests/perf-time-to-tsc.c
index 4ca1b93..c6398b9 100644
--- a/tools/perf/tests/perf-time-to-tsc.c
+++ b/tools/perf/tests/perf-time-to-tsc.c
@@ -46,7 +46,7 @@ static u64 rdtsc(void)
  */
 int test__perf_time_to_tsc(void)
 {
-	struct perf_record_opts opts = {
+	struct record_opts opts = {
 		.mmap_pages	     = UINT_MAX,
 		.user_freq	     = UINT_MAX,
 		.user_interval	     = ULLONG_MAX,
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index 4f7f989..08b25af 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -146,7 +146,7 @@ static inline void callchain_cursor_advance(struct callchain_cursor *cursor)
 
 struct option;
 
-int record_parse_callchain(const char *arg, struct perf_record_opts *opts);
+int record_parse_callchain(const char *arg, struct record_opts *opts);
 int record_parse_callchain_opt(const struct option *opt, const char *arg, int unset);
 int record_callchain_opt(const struct option *opt, const char *arg, int unset);
 
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index 9f64ede..2fe5195 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -12,7 +12,7 @@
 struct pollfd;
 struct thread_map;
 struct cpu_map;
-struct perf_record_opts;
+struct record_opts;
 
 #define PERF_EVLIST__HLIST_BITS 8
 #define PERF_EVLIST__HLIST_SIZE (1 << PERF_EVLIST__HLIST_BITS)
@@ -97,9 +97,8 @@ void perf_evlist__close(struct perf_evlist *evlist);
 
 void perf_evlist__set_id_pos(struct perf_evlist *evlist);
 bool perf_can_sample_identifier(void);
-void perf_evlist__config(struct perf_evlist *evlist,
-			 struct perf_record_opts *opts);
-int perf_record_opts__config(struct perf_record_opts *opts);
+void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts);
+int record_opts__config(struct record_opts *opts);
 
 int perf_evlist__prepare_workload(struct perf_evlist *evlist,
 				  struct target *target,
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 01ff4cf..6874e04 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -528,8 +528,7 @@ int perf_evsel__group_desc(struct perf_evsel *evsel, char *buf, size_t size)
  *     enable/disable events specifically, as there's no
  *     initial traced exec call.
  */
-void perf_evsel__config(struct perf_evsel *evsel,
-			struct perf_record_opts *opts)
+void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts)
 {
 	struct perf_evsel *leader = evsel->leader;
 	struct perf_event_attr *attr = &evsel->attr;
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 8120eeb..f1b3256 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -96,7 +96,7 @@ struct perf_evsel {
 struct cpu_map;
 struct thread_map;
 struct perf_evlist;
-struct perf_record_opts;
+struct record_opts;
 
 struct perf_evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx);
 
@@ -120,7 +120,7 @@ void perf_evsel__exit(struct perf_evsel *evsel);
 void perf_evsel__delete(struct perf_evsel *evsel);
 
 void perf_evsel__config(struct perf_evsel *evsel,
-			struct perf_record_opts *opts);
+			struct record_opts *opts);
 
 int __perf_evsel__sample_size(u64 sample_type);
 void perf_evsel__calc_id_pos(struct perf_evsel *evsel);
diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c
index e510453..104a475 100644
--- a/tools/perf/util/record.c
+++ b/tools/perf/util/record.c
@@ -74,8 +74,7 @@ bool perf_can_sample_identifier(void)
 	return perf_probe_api(perf_probe_sample_identifier);
 }
 
-void perf_evlist__config(struct perf_evlist *evlist,
-			struct perf_record_opts *opts)
+void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts)
 {
 	struct perf_evsel *evsel;
 	bool use_sample_identifier = false;
@@ -123,7 +122,7 @@ static int get_max_rate(unsigned int *rate)
 	return filename__read_int(path, (int *) rate);
 }
 
-static int perf_record_opts__config_freq(struct perf_record_opts *opts)
+static int record_opts__config_freq(struct record_opts *opts)
 {
 	bool user_freq = opts->user_freq != UINT_MAX;
 	unsigned int max_rate;
@@ -173,9 +172,9 @@ static int perf_record_opts__config_freq(struct perf_record_opts *opts)
 	return 0;
 }
 
-int perf_record_opts__config(struct perf_record_opts *opts)
+int record_opts__config(struct record_opts *opts)
 {
-	return perf_record_opts__config_freq(opts);
+	return record_opts__config_freq(opts);
 }
 
 bool perf_evlist__can_select_event(struct perf_evlist *evlist, const char *str)
diff --git a/tools/perf/util/top.c b/tools/perf/util/top.c
index ce793c7..8e517de 100644
--- a/tools/perf/util/top.c
+++ b/tools/perf/util/top.c
@@ -26,7 +26,7 @@ size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size)
 	float samples_per_sec;
 	float ksamples_per_sec;
 	float esamples_percent;
-	struct perf_record_opts *opts = &top->record_opts;
+	struct record_opts *opts = &top->record_opts;
 	struct target *target = &opts->target;
 	size_t ret = 0;
 
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h
index 88cfeaf..dab14d0 100644
--- a/tools/perf/util/top.h
+++ b/tools/perf/util/top.h
@@ -14,7 +14,7 @@ struct perf_session;
 struct perf_top {
 	struct perf_tool   tool;
 	struct perf_evlist *evlist;
-	struct perf_record_opts record_opts;
+	struct record_opts record_opts;
 	/*
 	 * Symbols will be added here in perf_event__process_sample and will
 	 * get out after decayed.

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

* [tip:perf/core] perf report: Rename 'perf_report' to 'report'
  2013-11-12 11:34       ` Arnaldo Carvalho de Melo
                           ` (2 preceding siblings ...)
  2014-01-12 18:33         ` [tip:perf/core] perf tools: Rename 'perf_record_opts' to ' record_opts tip-bot for Arnaldo Carvalho de Melo
@ 2014-01-12 18:35         ` tip-bot for Arnaldo Carvalho de Melo
  3 siblings, 0 replies; 73+ messages in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2014-01-12 18:35 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, eranian, paulus, acme, hpa, mingo, peterz, efault,
	namhyung, jolsa, fweisbec, adrian.hunter, dsahern, tglx

Commit-ID:  28b21393fa0472501b5a2a85a0b008b4e3dc154c
Gitweb:     http://git.kernel.org/tip/28b21393fa0472501b5a2a85a0b008b4e3dc154c
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Thu, 19 Dec 2013 14:53:53 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 19 Dec 2013 16:19:01 -0300

perf report: Rename 'perf_report' to 'report'

Reduce typing, functions use class__method convention, so unlikely to
clash with other libraries.

This actually was discussed in the "Link:" referenced message below.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20131112113427.GA4053@ghostprotocols.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-report.c | 73 +++++++++++++++++++--------------------------
 1 file changed, 31 insertions(+), 42 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 8424053..da156a4 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -39,7 +39,7 @@
 #include <dlfcn.h>
 #include <linux/bitmap.h>
 
-struct perf_report {
+struct report {
 	struct perf_tool	tool;
 	struct perf_session	*session;
 	bool			force, use_tui, use_gtk, use_stdio;
@@ -60,14 +60,14 @@ struct perf_report {
 	DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS);
 };
 
-static int perf_report_config(const char *var, const char *value, void *cb)
+static int report__config(const char *var, const char *value, void *cb)
 {
 	if (!strcmp(var, "report.group")) {
 		symbol_conf.event_group = perf_config_bool(var, value);
 		return 0;
 	}
 	if (!strcmp(var, "report.percent-limit")) {
-		struct perf_report *rep = cb;
+		struct report *rep = cb;
 		rep->min_percent = strtof(value, NULL);
 		return 0;
 	}
@@ -75,7 +75,7 @@ static int perf_report_config(const char *var, const char *value, void *cb)
 	return perf_default_config(var, value, cb);
 }
 
-static int report__resolve_callchain(struct perf_report *rep, struct symbol **parent,
+static int report__resolve_callchain(struct report *rep, struct symbol **parent,
 				     struct perf_evsel *evsel, struct addr_location *al,
 				     struct perf_sample *sample, struct machine *machine)
 {
@@ -93,14 +93,11 @@ static int hist_entry__append_callchain(struct hist_entry *he, struct perf_sampl
 	return callchain_append(he->callchain, &callchain_cursor, sample->period);
 }
 
-static int perf_report__add_mem_hist_entry(struct perf_tool *tool,
-					   struct addr_location *al,
-					   struct perf_sample *sample,
-					   struct perf_evsel *evsel,
-					   struct machine *machine,
-					   union perf_event *event)
+static int report__add_mem_hist_entry(struct perf_tool *tool, struct addr_location *al,
+				      struct perf_sample *sample, struct perf_evsel *evsel,
+				      struct machine *machine, union perf_event *event)
 {
-	struct perf_report *rep = container_of(tool, struct perf_report, tool);
+	struct report *rep = container_of(tool, struct report, tool);
 	struct symbol *parent = NULL;
 	u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
 	struct hist_entry *he;
@@ -150,13 +147,11 @@ out:
 	return err;
 }
 
-static int perf_report__add_branch_hist_entry(struct perf_tool *tool,
-					struct addr_location *al,
-					struct perf_sample *sample,
-					struct perf_evsel *evsel,
-				      struct machine *machine)
+static int report__add_branch_hist_entry(struct perf_tool *tool, struct addr_location *al,
+					 struct perf_sample *sample, struct perf_evsel *evsel,
+					 struct machine *machine)
 {
-	struct perf_report *rep = container_of(tool, struct perf_report, tool);
+	struct report *rep = container_of(tool, struct report, tool);
 	struct symbol *parent = NULL;
 	unsigned i;
 	struct hist_entry *he;
@@ -208,13 +203,11 @@ out:
 	return err;
 }
 
-static int perf_evsel__add_hist_entry(struct perf_tool *tool,
-				      struct perf_evsel *evsel,
-				      struct addr_location *al,
-				      struct perf_sample *sample,
-				      struct machine *machine)
+static int report__add_hist_entry(struct perf_tool *tool, struct perf_evsel *evsel,
+				  struct addr_location *al, struct perf_sample *sample,
+				  struct machine *machine)
 {
-	struct perf_report *rep = container_of(tool, struct perf_report, tool);
+	struct report *rep = container_of(tool, struct report, tool);
 	struct symbol *parent = NULL;
 	struct hist_entry *he;
 	int err = report__resolve_callchain(rep, &parent, evsel, al, sample, machine);
@@ -246,7 +239,7 @@ static int process_sample_event(struct perf_tool *tool,
 				struct perf_evsel *evsel,
 				struct machine *machine)
 {
-	struct perf_report *rep = container_of(tool, struct perf_report, tool);
+	struct report *rep = container_of(tool, struct report, tool);
 	struct addr_location al;
 	int ret;
 
@@ -263,21 +256,18 @@ static int process_sample_event(struct perf_tool *tool,
 		return 0;
 
 	if (sort__mode == SORT_MODE__BRANCH) {
-		ret = perf_report__add_branch_hist_entry(tool, &al, sample,
-							 evsel, machine);
+		ret = report__add_branch_hist_entry(tool, &al, sample, evsel, machine);
 		if (ret < 0)
 			pr_debug("problem adding lbr entry, skipping event\n");
 	} else if (rep->mem_mode == 1) {
-		ret = perf_report__add_mem_hist_entry(tool, &al, sample,
-						      evsel, machine, event);
+		ret = report__add_mem_hist_entry(tool, &al, sample, evsel, machine, event);
 		if (ret < 0)
 			pr_debug("problem adding mem entry, skipping event\n");
 	} else {
 		if (al.map != NULL)
 			al.map->dso->hit = 1;
 
-		ret = perf_evsel__add_hist_entry(tool, evsel, &al, sample,
-						 machine);
+		ret = report__add_hist_entry(tool, evsel, &al, sample, machine);
 		if (ret < 0)
 			pr_debug("problem incrementing symbol period, skipping event\n");
 	}
@@ -290,7 +280,7 @@ static int process_read_event(struct perf_tool *tool,
 			      struct perf_evsel *evsel,
 			      struct machine *machine __maybe_unused)
 {
-	struct perf_report *rep = container_of(tool, struct perf_report, tool);
+	struct report *rep = container_of(tool, struct report, tool);
 
 	if (rep->show_threads) {
 		const char *name = evsel ? perf_evsel__name(evsel) : "unknown";
@@ -309,7 +299,7 @@ static int process_read_event(struct perf_tool *tool,
 }
 
 /* For pipe mode, sample_type is not currently set */
-static int perf_report__setup_sample_type(struct perf_report *rep)
+static int report__setup_sample_type(struct report *rep)
 {
 	struct perf_session *session = rep->session;
 	u64 sample_type = perf_evlist__combined_sample_type(session->evlist);
@@ -354,8 +344,7 @@ static void sig_handler(int sig __maybe_unused)
 	session_done = 1;
 }
 
-static size_t hists__fprintf_nr_sample_events(struct perf_report *rep,
-					      struct hists *hists,
+static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report *rep,
 					      const char *evname, FILE *fp)
 {
 	size_t ret;
@@ -392,7 +381,7 @@ static size_t hists__fprintf_nr_sample_events(struct perf_report *rep,
 }
 
 static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
-					 struct perf_report *rep,
+					 struct report *rep,
 					 const char *help)
 {
 	struct perf_evsel *pos;
@@ -405,7 +394,7 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
 		    !perf_evsel__is_group_leader(pos))
 			continue;
 
-		hists__fprintf_nr_sample_events(rep, hists, evname, stdout);
+		hists__fprintf_nr_sample_events(hists, rep, evname, stdout);
 		hists__fprintf(hists, true, 0, 0, rep->min_percent, stdout);
 		fprintf(stdout, "\n\n");
 	}
@@ -425,7 +414,7 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
 	return 0;
 }
 
-static int __cmd_report(struct perf_report *rep)
+static int __cmd_report(struct report *rep)
 {
 	int ret = -EINVAL;
 	u64 nr_samples;
@@ -449,7 +438,7 @@ static int __cmd_report(struct perf_report *rep)
 	if (rep->show_threads)
 		perf_read_values_init(&rep->show_threads_values);
 
-	ret = perf_report__setup_sample_type(rep);
+	ret = report__setup_sample_type(rep);
 	if (ret)
 		return ret;
 
@@ -568,7 +557,7 @@ static int __cmd_report(struct perf_report *rep)
 static int
 parse_callchain_opt(const struct option *opt, const char *arg, int unset)
 {
-	struct perf_report *rep = (struct perf_report *)opt->value;
+	struct report *rep = (struct report *)opt->value;
 	char *tok, *tok2;
 	char *endptr;
 
@@ -688,7 +677,7 @@ static int
 parse_percent_limit(const struct option *opt, const char *str,
 		    int unset __maybe_unused)
 {
-	struct perf_report *rep = opt->value;
+	struct report *rep = opt->value;
 
 	rep->min_percent = strtof(str, NULL);
 	return 0;
@@ -706,7 +695,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 		"perf report [<options>]",
 		NULL
 	};
-	struct perf_report report = {
+	struct report report = {
 		.tool = {
 			.sample		 = process_sample_event,
 			.mmap		 = perf_event__process_mmap,
@@ -822,7 +811,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 		.mode  = PERF_DATA_MODE_READ,
 	};
 
-	perf_config(perf_report_config, &report);
+	perf_config(report__config, &report);
 
 	argc = parse_options(argc, argv, options, report_usage, 0);
 

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2017-08-16 20:20 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2017-08-17  7:45 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2017-08-17  7:45 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, David Ahern, Hendrik Brueckner, Jiri Olsa,
	Kim Phillips, Michael Petlan, Namhyung Kim, Thomas-Mich Richter,
	Wang Nan


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

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit cf31b7dd51b542f9a9b2d0de416b5524dfdb1cf2:
> 
>   Merge tag 'perf-core-for-mingo-4.14-20170814' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-14 19:38:40 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.14-20170816
> 
> for you to fetch changes up to 35435cd06081d7db96bc617b65ba556f8e24340e:
> 
>   perf test shell: Replace '|&' with '2>&1 |' to work with more shells (2017-08-16 16:23:26 -0300)
> 
> ----------------------------------------------------------------
> perf core improvements and fixes:
> 
> New features:
> 
> - Support exporting Intel PT data to sqlite3 with python perf scripts,
>   this is in addition to the postgresql support that was already there (Adrian Hunter)
> 
> Infrastructure:
> 
> - Handle perf tool builds with less features in perf shell tests, such
>   as those with NO_LIBDWARF=1 or even without 'perf probe' (Arnaldo Carvalho de Melo)
> 
> - Replace '|&' with '2>&1 |' to work with more shells in the just
>   introduced perf test shell harness (Kim Phillips)
> 
> Architecture related fixes:
> 
> - Fix endianness problem when loading parameters in the BPF prologue
>   generated by perf, noticed using 'perf test BPF' in s390x systems (Wang Nan, Thomas Richter)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (5):
>       perf scripts python: Fix missing call_path_id in export-to-postgresql script
>       perf scripts python: Fix query in call-graph-from-postgresql.py
>       perf script python: Add support for exporting to sqlite3
>       perf script python: Rename call-graph-from-postgresql.py to call-graph-from-sql.py
>       perf script python: Add support for sqlite3 to call-graph-from-sql.py
> 
> Arnaldo Carvalho de Melo (3):
>       perf tests shell: Remove duplicate skip_if_no_debuginfo() function
>       perf test shell: Check if 'perf probe' is available, skip tests if not
>       perf test shell vfs_getname: Skip for tools built with NO_LIBDWARF=1
> 
> Kim Phillips (1):
>       perf test shell: Replace '|&' with '2>&1 |' to work with more shells
> 
> Wang Nan (1):
>       perf bpf: Fix endianness problem when loading parameters in prologue
> 
>  tools/perf/Documentation/intel-pt.txt              |   6 +-
>  .../scripts/python/bin/export-to-sqlite-record     |   8 +
>  .../scripts/python/bin/export-to-sqlite-report     |  29 ++
>  ...h-from-postgresql.py => call-graph-from-sql.py} |  70 ++--
>  tools/perf/scripts/python/export-to-postgresql.py  |   5 +-
>  tools/perf/scripts/python/export-to-sqlite.py      | 451 +++++++++++++++++++++
>  tools/perf/tests/bpf-script-test-prologue.c        |   4 +-
>  tools/perf/tests/shell/lib/probe.sh                |   6 +
>  tools/perf/tests/shell/lib/probe_vfs_getname.sh    |  13 +-
>  tools/perf/tests/shell/probe_vfs_getname.sh        |   4 +
>  .../tests/shell/record+script_probe_vfs_getname.sh |   4 +
>  .../perf/tests/shell/trace+probe_libc_inet_pton.sh |   5 +-
>  tools/perf/tests/shell/trace+probe_vfs_getname.sh  |   4 +
>  tools/perf/util/bpf-prologue.c                     |  49 ++-
>  14 files changed, 611 insertions(+), 47 deletions(-)
>  create mode 100644 tools/perf/scripts/python/bin/export-to-sqlite-record
>  create mode 100644 tools/perf/scripts/python/bin/export-to-sqlite-report
>  rename tools/perf/scripts/python/{call-graph-from-postgresql.py => call-graph-from-sql.py} (87%)
>  create mode 100644 tools/perf/scripts/python/export-to-sqlite.py
>  create mode 100644 tools/perf/tests/shell/lib/probe.sh

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2017-08-16 20:20 Arnaldo Carvalho de Melo
  2017-08-17  7:45 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-08-16 20:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, David Ahern, Hendrik Brueckner, Jiri Olsa,
	Kim Phillips, Michael Petlan, Namhyung Kim, Thomas-Mich Richter,
	Wang Nan

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit cf31b7dd51b542f9a9b2d0de416b5524dfdb1cf2:

  Merge tag 'perf-core-for-mingo-4.14-20170814' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-14 19:38:40 +0200)

are available in the git repository at:

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

for you to fetch changes up to 35435cd06081d7db96bc617b65ba556f8e24340e:

  perf test shell: Replace '|&' with '2>&1 |' to work with more shells (2017-08-16 16:23:26 -0300)

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

New features:

- Support exporting Intel PT data to sqlite3 with python perf scripts,
  this is in addition to the postgresql support that was already there (Adrian Hunter)

Infrastructure:

- Handle perf tool builds with less features in perf shell tests, such
  as those with NO_LIBDWARF=1 or even without 'perf probe' (Arnaldo Carvalho de Melo)

- Replace '|&' with '2>&1 |' to work with more shells in the just
  introduced perf test shell harness (Kim Phillips)

Architecture related fixes:

- Fix endianness problem when loading parameters in the BPF prologue
  generated by perf, noticed using 'perf test BPF' in s390x systems (Wang Nan, Thomas Richter)

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

----------------------------------------------------------------
Adrian Hunter (5):
      perf scripts python: Fix missing call_path_id in export-to-postgresql script
      perf scripts python: Fix query in call-graph-from-postgresql.py
      perf script python: Add support for exporting to sqlite3
      perf script python: Rename call-graph-from-postgresql.py to call-graph-from-sql.py
      perf script python: Add support for sqlite3 to call-graph-from-sql.py

Arnaldo Carvalho de Melo (3):
      perf tests shell: Remove duplicate skip_if_no_debuginfo() function
      perf test shell: Check if 'perf probe' is available, skip tests if not
      perf test shell vfs_getname: Skip for tools built with NO_LIBDWARF=1

Kim Phillips (1):
      perf test shell: Replace '|&' with '2>&1 |' to work with more shells

Wang Nan (1):
      perf bpf: Fix endianness problem when loading parameters in prologue

 tools/perf/Documentation/intel-pt.txt              |   6 +-
 .../scripts/python/bin/export-to-sqlite-record     |   8 +
 .../scripts/python/bin/export-to-sqlite-report     |  29 ++
 ...h-from-postgresql.py => call-graph-from-sql.py} |  70 ++--
 tools/perf/scripts/python/export-to-postgresql.py  |   5 +-
 tools/perf/scripts/python/export-to-sqlite.py      | 451 +++++++++++++++++++++
 tools/perf/tests/bpf-script-test-prologue.c        |   4 +-
 tools/perf/tests/shell/lib/probe.sh                |   6 +
 tools/perf/tests/shell/lib/probe_vfs_getname.sh    |  13 +-
 tools/perf/tests/shell/probe_vfs_getname.sh        |   4 +
 .../tests/shell/record+script_probe_vfs_getname.sh |   4 +
 .../perf/tests/shell/trace+probe_libc_inet_pton.sh |   5 +-
 tools/perf/tests/shell/trace+probe_vfs_getname.sh  |   4 +
 tools/perf/util/bpf-prologue.c                     |  49 ++-
 14 files changed, 611 insertions(+), 47 deletions(-)
 create mode 100644 tools/perf/scripts/python/bin/export-to-sqlite-record
 create mode 100644 tools/perf/scripts/python/bin/export-to-sqlite-report
 rename tools/perf/scripts/python/{call-graph-from-postgresql.py => call-graph-from-sql.py} (87%)
 create mode 100644 tools/perf/scripts/python/export-to-sqlite.py
 create mode 100644 tools/perf/tests/shell/lib/probe.sh

Test results:

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

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

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

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

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

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

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

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

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2017-05-03 13:58 Arnaldo Carvalho de Melo
@ 2017-05-03 17:30 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2017-05-03 17:30 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, David Ahern, Jiri Olsa,
	Josh Poimboeuf, Masami Hiramatsu, Michael Petlan, Namhyung Kim,
	Paul A . Clarke, 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 fd7647979a3948dae4fc6f25dbbdf9ba269bed78:
> 
>   Merge tag 'perf-core-for-mingo-4.12-20170424' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-04-24 23:31:35 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170503
> 
> for you to fetch changes up to 4341ec6b3db4c3e903d6c44958722918baec1e59:
> 
>   perf config: Refactor a duplicated code for obtaining config file name (2017-05-02 18:23:12 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> Fixes:
> 
> - Support setting probes in versioned user space symbols, such as
>   pthread_create@@GLIBC_2.1, picking the default one, more work
>   needed to make it possible to set it on the other versions, as
>   the 'perf probe' syntax already uses @ for other purposes.
>   (Paul Clarke)
> 
> - Do not special case address zero as an error for routines that
>   return addresses (symbol lookup), instead use the return as the
>   success/error indication and pass a pointer to return the address,
>   fixing 'perf test vmlinux' (the one that compares address between
>   vmlinux and kallsyms) on s/390, where the '_text' address is equal
>   to zero (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - More header sanitization, moving stuff out of util.h into
>   more appropriate headers and objects and sometimes creating
>   new ones (Arnaldo Carvalho de Melo)
> 
> - Refactor a duplicated code for obtaining config file name (Taeung Song)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (8):
>       perf buildid: Move prototypes from util.h to build-id.h
>       perf tools: Move event prototypes from util.h to event.h
>       perf memswap: Split the byteswap memory range wrappers from util.[ch]
>       perf tools: Move HAS_BOOL define to where perl headers are used
>       perf ui gtk: Move gtk .so name to the only place where it is used
>       perf units: Move parse_tag_value() to units.[ch]
>       tools lib string: Adopt prefixcmp() from perf and subcmd
>       perf symbols: Accept symbols starting at address 0
> 
> Paul Clarke (1):
>       perf symbols: Allow user probes on versioned symbols
> 
> Taeung Song (1):
>       perf config: Refactor a duplicated code for obtaining config file name
> 
>  tools/include/linux/string.h                       |  2 +
>  tools/lib/string.c                                 |  9 +++
>  tools/lib/subcmd/help.c                            |  1 +
>  tools/lib/subcmd/parse-options.c                   |  1 +
>  tools/lib/subcmd/subcmd-util.h                     |  9 ---
>  tools/perf/arch/powerpc/util/sym-handling.c        | 12 ++++
>  tools/perf/builtin-buildid-cache.c                 | 13 ++--
>  tools/perf/builtin-c2c.c                           |  1 +
>  tools/perf/builtin-config.c                        | 19 +++---
>  tools/perf/builtin-top.c                           |  2 +-
>  tools/perf/builtin-trace.c                         |  1 +
>  tools/perf/perf.c                                  |  1 +
>  tools/perf/tests/hists_cumulate.c                  |  1 +
>  tools/perf/tests/hists_filter.c                    |  1 +
>  tools/perf/tests/hists_output.c                    |  1 +
>  tools/perf/tests/sdt.c                             |  1 -
>  tools/perf/ui/setup.c                              |  3 +
>  tools/perf/util/Build                              |  1 +
>  tools/perf/util/build-id.h                         |  4 ++
>  tools/perf/util/event.c                            | 10 +--
>  tools/perf/util/event.h                            | 12 +++-
>  tools/perf/util/evsel.c                            |  1 +
>  tools/perf/util/header.c                           |  1 +
>  tools/perf/util/intel-pt.c                         |  1 +
>  tools/perf/util/machine.c                          | 28 +++++----
>  tools/perf/util/map.c                              |  5 --
>  tools/perf/util/map.h                              |  5 +-
>  tools/perf/util/memswap.c                          | 24 ++++++++
>  tools/perf/util/memswap.h                          |  7 +++
>  .../perf/util/scripting-engines/trace-event-perl.c |  4 +-
>  tools/perf/util/session.c                          |  1 +
>  tools/perf/util/strbuf.c                           |  9 ---
>  tools/perf/util/symbol.c                           | 72 ++++++++++++++++------
>  tools/perf/util/symbol.h                           | 11 ++++
>  tools/perf/util/units.c                            | 29 +++++++++
>  tools/perf/util/units.h                            |  7 +++
>  tools/perf/util/util.c                             | 49 ---------------
>  tools/perf/util/util.h                             | 26 --------
>  38 files changed, 230 insertions(+), 155 deletions(-)
>  create mode 100644 tools/perf/util/memswap.c
>  create mode 100644 tools/perf/util/memswap.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2017-05-03 13:58 Arnaldo Carvalho de Melo
  2017-05-03 17:30 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-05-03 13:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Josh Poimboeuf, Masami Hiramatsu,
	Michael Petlan, Namhyung Kim, Paul A . Clarke, 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 fd7647979a3948dae4fc6f25dbbdf9ba269bed78:

  Merge tag 'perf-core-for-mingo-4.12-20170424' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-04-24 23:31:35 +0200)

are available in the git repository at:

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

for you to fetch changes up to 4341ec6b3db4c3e903d6c44958722918baec1e59:

  perf config: Refactor a duplicated code for obtaining config file name (2017-05-02 18:23:12 -0300)

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

Fixes:

- Support setting probes in versioned user space symbols, such as
  pthread_create@@GLIBC_2.1, picking the default one, more work
  needed to make it possible to set it on the other versions, as
  the 'perf probe' syntax already uses @ for other purposes.
  (Paul Clarke)

- Do not special case address zero as an error for routines that
  return addresses (symbol lookup), instead use the return as the
  success/error indication and pass a pointer to return the address,
  fixing 'perf test vmlinux' (the one that compares address between
  vmlinux and kallsyms) on s/390, where the '_text' address is equal
  to zero (Arnaldo Carvalho de Melo)

Infrastructure:

- More header sanitization, moving stuff out of util.h into
  more appropriate headers and objects and sometimes creating
  new ones (Arnaldo Carvalho de Melo)

- Refactor a duplicated code for obtaining config file name (Taeung Song)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (8):
      perf buildid: Move prototypes from util.h to build-id.h
      perf tools: Move event prototypes from util.h to event.h
      perf memswap: Split the byteswap memory range wrappers from util.[ch]
      perf tools: Move HAS_BOOL define to where perl headers are used
      perf ui gtk: Move gtk .so name to the only place where it is used
      perf units: Move parse_tag_value() to units.[ch]
      tools lib string: Adopt prefixcmp() from perf and subcmd
      perf symbols: Accept symbols starting at address 0

Paul Clarke (1):
      perf symbols: Allow user probes on versioned symbols

Taeung Song (1):
      perf config: Refactor a duplicated code for obtaining config file name

 tools/include/linux/string.h                       |  2 +
 tools/lib/string.c                                 |  9 +++
 tools/lib/subcmd/help.c                            |  1 +
 tools/lib/subcmd/parse-options.c                   |  1 +
 tools/lib/subcmd/subcmd-util.h                     |  9 ---
 tools/perf/arch/powerpc/util/sym-handling.c        | 12 ++++
 tools/perf/builtin-buildid-cache.c                 | 13 ++--
 tools/perf/builtin-c2c.c                           |  1 +
 tools/perf/builtin-config.c                        | 19 +++---
 tools/perf/builtin-top.c                           |  2 +-
 tools/perf/builtin-trace.c                         |  1 +
 tools/perf/perf.c                                  |  1 +
 tools/perf/tests/hists_cumulate.c                  |  1 +
 tools/perf/tests/hists_filter.c                    |  1 +
 tools/perf/tests/hists_output.c                    |  1 +
 tools/perf/tests/sdt.c                             |  1 -
 tools/perf/ui/setup.c                              |  3 +
 tools/perf/util/Build                              |  1 +
 tools/perf/util/build-id.h                         |  4 ++
 tools/perf/util/event.c                            | 10 +--
 tools/perf/util/event.h                            | 12 +++-
 tools/perf/util/evsel.c                            |  1 +
 tools/perf/util/header.c                           |  1 +
 tools/perf/util/intel-pt.c                         |  1 +
 tools/perf/util/machine.c                          | 28 +++++----
 tools/perf/util/map.c                              |  5 --
 tools/perf/util/map.h                              |  5 +-
 tools/perf/util/memswap.c                          | 24 ++++++++
 tools/perf/util/memswap.h                          |  7 +++
 .../perf/util/scripting-engines/trace-event-perl.c |  4 +-
 tools/perf/util/session.c                          |  1 +
 tools/perf/util/strbuf.c                           |  9 ---
 tools/perf/util/symbol.c                           | 72 ++++++++++++++++------
 tools/perf/util/symbol.h                           | 11 ++++
 tools/perf/util/units.c                            | 29 +++++++++
 tools/perf/util/units.h                            |  7 +++
 tools/perf/util/util.c                             | 49 ---------------
 tools/perf/util/util.h                             | 26 --------
 38 files changed, 230 insertions(+), 155 deletions(-)
 create mode 100644 tools/perf/util/memswap.c
 create mode 100644 tools/perf/util/memswap.h

Test results:

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

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

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

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

  # time dm
   1 alpine:3.4: Ok
   2 alpine:3.5: Ok
   3 alpine:edge: Ok
   4 android-ndk:r12b-arm: Ok
   5 archlinux:latest: Ok
   6 centos:5: Ok
   7 centos:6: Ok
   8 centos:7: Ok
   9 debian:7: Ok
  10 debian:8: Ok
  11 debian:9: Ok
  12 debian:experimental: Ok
  13 debian:experimental-x-arm64: Ok
  14 debian:experimental-x-mips: Ok
  15 debian:experimental-x-mips64: Ok
  16 debian:experimental-x-mipsel: Ok
  17 fedora:20: Ok
  18 fedora:21: Ok
  19 fedora:22: Ok
  20 fedora:23: Ok
  21 fedora:24: Ok
  22 fedora:24-x-ARC-uClibc: Ok
  23 fedora:25: Ok
  24 fedora:rawhide: Ok
  25 mageia:5: Ok
  26 opensuse:13.2: Ok
  27 opensuse:42.1: Ok
  28 opensuse:tumbleweed: Ok
  29 ubuntu:12.04.5: Ok
  30 ubuntu:14.04.4: Ok
  31 ubuntu:14.04.4-x-linaro-arm64: Ok
  32 ubuntu:15.10: Ok
  33 ubuntu:16.04: Ok
  34 ubuntu:16.04-x-arm: Ok
  35 ubuntu:16.04-x-arm64: Ok
  36 ubuntu:16.04-x-powerpc: Ok
  37 ubuntu:16.04-x-powerpc64: Ok
  38 ubuntu:16.04-x-s390: Ok
  39 ubuntu:16.10: Ok
  40 ubuntu:17.04: Ok
  #
  # uname -a
  Linux jouet 4.11.0-rc8+ #8 SMP Wed Apr 26 08:50:41 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
  # perf test
   1: vmlinux symtab matches kallsyms            : Ok
   2: Detect openat syscall event                : Ok
   3: Detect openat syscall event on all cpus    : Ok
   4: Read samples using the mmap interface      : Ok
   5: Parse event definition strings             : Ok
   6: Simple expression parser                   : Ok
   7: PERF_RECORD_* events & perf_sample fields  : Ok
   8: Parse perf pmu format                      : Ok
   9: DSO data read                              : Ok
  10: DSO data cache                             : Ok
  11: DSO data reopen                            : Ok
  12: Roundtrip evsel->name                      : Ok
  13: Parse sched tracepoints fields             : Ok
  14: syscalls:sys_enter_openat event fields     : Ok
  15: Setup struct perf_event_attr               : Ok
  16: Match and link multiple hists              : Ok
  17: 'import perf' in python                    : Ok
  18: Breakpoint overflow signal handler         : Ok
  19: Breakpoint overflow sampling               : Ok
  20: Number of exit events of a simple workload : Ok
  21: Software clock events period values        : Ok
  22: Object code reading                        : Ok
  23: Sample parsing                             : Ok
  24: Use a dummy software event to keep tracking: Ok
  25: Parse with no sample_id_all bit set        : Ok
  26: Filter hist entries                        : Ok
  27: Lookup mmap thread                         : Ok
  28: Share thread mg                            : Ok
  29: Sort output of hist entries                : Ok
  30: Cumulate child hist entries                : Ok
  31: Track with sched_switch                    : Ok
  32: Filter fds with revents mask in a fdarray  : Ok
  33: Add fd to a fdarray, making it autogrow    : Ok
  34: kmod_path__parse                           : Ok
  35: Thread map                                 : Ok
  36: LLVM search and compile                    :
  36.1: Basic BPF llvm compile                    : Ok
  36.2: kbuild searching                          : Ok
  36.3: Compile source for BPF prologue generation: Ok
  36.4: Compile source for BPF relocation         : Ok
  37: Session topology                           : Ok
  38: BPF filter                                 :
  38.1: Basic BPF filtering                      : Ok
  38.2: BPF pinning                              : Ok
  38.3: BPF prologue generation                  : Ok
  38.4: BPF relocation checker                   : Ok
  39: Synthesize thread map                      : Ok
  40: Remove thread map                          : Ok
  41: Synthesize cpu map                         : Ok
  42: Synthesize stat config                     : Ok
  43: Synthesize stat                            : Ok
  44: Synthesize stat round                      : Ok
  45: Synthesize attr update                     : Ok
  46: Event times                                : Ok
  47: Read backward ring buffer                  : Ok
  48: Print cpu map                              : Ok
  49: Probe SDT events                           : Ok
  50: is_printable_array                         : Ok
  51: Print bitmap                               : Ok
  52: perf hooks                                 : Ok
  53: builtin clang support                      : Skip (not compiled in)
  54: unit_number__scnprintf                     : Ok
  55: x86 rdpmc                                  : Ok
  56: Convert perf time to TSC                   : Ok
  57: DWARF unwind                               : Ok
  58: x86 instruction decoder - new instructions : Ok
  59: Intel cqm nmi context read                 : Skip
  #

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

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2017-01-17 16:06 Arnaldo Carvalho de Melo
@ 2017-01-18  9:09 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2017-01-18  9:09 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Andi Kleen, David Ahern, David Carrillo-Cisneros, Jiri Olsa,
	kernel-team, Mark Drayton, Michael Petlan, Minchan Kim,
	Namhyung Kim, Peter Zijlstra, Soramichi Akiyama,
	Stephane Eranian, Thomas Gleixner, Yannick Brosseau


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

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 5b485629ba0d5d027880769ff467c587b24b4bde:
> 
>   kprobes, extable: Identify kprobes trampolines as kernel text area (2017-01-14 08:38:05 +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-20170117
> 
> for you to fetch changes up to d94386f28abad0c5879f0760712e34e71f88a7da:
> 
>   perf evlist: Fix typo in deliver_sample() (2017-01-17 11:36:45 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New feature:
> 
> - Account thread wait time (off cpu time) separately: sleep, iowait and
>   preempt, based on the prev_state of the last event, show the breakdown
>   when using "perf sched timehist --state" (Namhyumg Kim)
> 
> Infrastructure:
> 
> - Factor out pmu scale conversion code (Andi Kleen)
> 
> - Remove unnecessary feature-dwarf warning (David Carrillo-Cisneros)
> 
> - Add missing member name in OPT_() macros (Soramichi AKIYAMA)
> 
> - Move variables referenced in libperf.a object files from perf's main()
>   file, so that other tools can use libperf.a with a different main()
>   (Soramichi AKIYAMA)
> 
> Documentation:
> 
> - Fix 'perf script' man page about --dump-raw-trace option (Michael Petlan)
> 
> - Also allow forcing reading of non-root owned files by root in 'perf
>   script' (Yannick Brosseau)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf pmu: Factor out scale conversion code
> 
> David Carrillo-Cisneros (1):
>       perf tools: Remove unneccessary feature-dwarf warning
> 
> Michael Petlan (1):
>       perf script: Fix man page about --dump-raw-trace option
> 
> Namhyung Kim (3):
>       perf sched timehist: Account thread wait time separately
>       perf sched timehist: Add --state option
>       perf sched timehist: Show total wait times for summary
> 
> Soramichi AKIYAMA (3):
>       tools lib subcmd: Fix missing member name
>       perf tools: Move two variables usied in libperf from perf.c
>       perf evlist: Fix typo in deliver_sample()
> 
> Yannick Brosseau (1):
>       perf script: Also allow forcing reading of non-root owned files by root
> 
>  tools/lib/subcmd/parse-options.h         |  18 ++---
>  tools/perf/Build                         |   3 +-
>  tools/perf/Documentation/perf-sched.txt  |   2 +
>  tools/perf/Documentation/perf-script.txt |   4 +-
>  tools/perf/Makefile.config               |   6 +-
>  tools/perf/builtin-sched.c               | 130 ++++++++++++++++++++++++++++---
>  tools/perf/builtin-script.c              |   3 +-
>  tools/perf/perf.c                        |   3 -
>  tools/perf/ui/setup.c                    |   1 +
>  tools/perf/util/Build                    |   1 +
>  tools/perf/util/header.c                 |   2 +
>  tools/perf/util/pmu.c                    |  62 ++++++++-------
>  tools/perf/util/session.c                |   2 +-
>  13 files changed, 177 insertions(+), 60 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2017-01-17 16:06 Arnaldo Carvalho de Melo
  2017-01-18  9:09 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-01-17 16:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Andi Kleen, David Ahern, David Carrillo-Cisneros, Jiri Olsa,
	kernel-team, Mark Drayton, Michael Petlan, Minchan Kim,
	Namhyung Kim, Peter Zijlstra, Soramichi Akiyama,
	Stephane Eranian, Thomas Gleixner, Yannick Brosseau

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit 5b485629ba0d5d027880769ff467c587b24b4bde:

  kprobes, extable: Identify kprobes trampolines as kernel text area (2017-01-14 08:38:05 +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-20170117

for you to fetch changes up to d94386f28abad0c5879f0760712e34e71f88a7da:

  perf evlist: Fix typo in deliver_sample() (2017-01-17 11:36:45 -0300)

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

New feature:

- Account thread wait time (off cpu time) separately: sleep, iowait and
  preempt, based on the prev_state of the last event, show the breakdown
  when using "perf sched timehist --state" (Namhyumg Kim)

Infrastructure:

- Factor out pmu scale conversion code (Andi Kleen)

- Remove unnecessary feature-dwarf warning (David Carrillo-Cisneros)

- Add missing member name in OPT_() macros (Soramichi AKIYAMA)

- Move variables referenced in libperf.a object files from perf's main()
  file, so that other tools can use libperf.a with a different main()
  (Soramichi AKIYAMA)

Documentation:

- Fix 'perf script' man page about --dump-raw-trace option (Michael Petlan)

- Also allow forcing reading of non-root owned files by root in 'perf
  script' (Yannick Brosseau)

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

----------------------------------------------------------------
Andi Kleen (1):
      perf pmu: Factor out scale conversion code

David Carrillo-Cisneros (1):
      perf tools: Remove unneccessary feature-dwarf warning

Michael Petlan (1):
      perf script: Fix man page about --dump-raw-trace option

Namhyung Kim (3):
      perf sched timehist: Account thread wait time separately
      perf sched timehist: Add --state option
      perf sched timehist: Show total wait times for summary

Soramichi AKIYAMA (3):
      tools lib subcmd: Fix missing member name
      perf tools: Move two variables usied in libperf from perf.c
      perf evlist: Fix typo in deliver_sample()

Yannick Brosseau (1):
      perf script: Also allow forcing reading of non-root owned files by root

 tools/lib/subcmd/parse-options.h         |  18 ++---
 tools/perf/Build                         |   3 +-
 tools/perf/Documentation/perf-sched.txt  |   2 +
 tools/perf/Documentation/perf-script.txt |   4 +-
 tools/perf/Makefile.config               |   6 +-
 tools/perf/builtin-sched.c               | 130 ++++++++++++++++++++++++++++---
 tools/perf/builtin-script.c              |   3 +-
 tools/perf/perf.c                        |   3 -
 tools/perf/ui/setup.c                    |   1 +
 tools/perf/util/Build                    |   1 +
 tools/perf/util/header.c                 |   2 +
 tools/perf/util/pmu.c                    |  62 ++++++++-------
 tools/perf/util/session.c                |   2 +-
 13 files changed, 177 insertions(+), 60 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.

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

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

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2016-12-07 16:53 Arnaldo Carvalho de Melo
@ 2016-12-07 18:17 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2016-12-07 18:17 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Alexei Starovoitov, Andi Kleen, David Ahern,
	He Kuang, Jiri Olsa, Joe Stringer, kernel-team, Minchan Kim,
	Namhyung Kim, Peter Zijlstra, pi3orama, Wang Nan,
	Yannick Brosseau, Zefan Li, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling, should get linux-next free of perf build fixdep
> related race conditions on high core count machines,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 34c4a42791bbc455e65a15d12dcd0b6b3c52ad13:
> 
>   Merge tag 'perf-core-for-mingo-20161205' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-12-06 09:14:56 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20161207
> 
> for you to fetch changes up to 108a7c103b761309ccbd997002e8428808cf1e04:
> 
>   perf tools: Explicitly document that --children is enabled by default (2016-12-07 12:00:35 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> Improvements:
> 
> - Improve error message when analyzing file with required events in
>   'perf sched timehist' (David Ahern)
> 
> Fixes:
> 
> - Force fixdep compilation to be done at the start of the build, fixing
>   some build race conditions in high core count machines (Jiri Olsa)
> 
> - Fix handling a zero sample->tid in 'perf sched timehist', as
>   sometimes that isn't the idle thread (Namhyung Kim)
> 
> Infrastructure:
> 
> - Check minimal accepted LLVM version in its feature check, 3.9 at this
>   time (Wang Nan)
> 
> Documentation:
> 
> - Explicitly document that --children is enabled by default (Yannick Brosseau)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> David Ahern (1):
>       perf sched timehist: Improve error message when analyzing wrong file
> 
> Jiri Olsa (3):
>       perf tools: Move PERF-VERSION-FILE target into rules area
>       perf tools: Force fixdep compilation at the start of the build
>       perf tools: Move perf build related variables under non fixdep leg
> 
> Namhyung Kim (4):
>       perf sched: Cleanup option processing
>       perf callchain: Introduce callchain_cursor__copy()
>       perf sched timehist: Handle zero sample->tid properly
>       perf sched timehist: Cleanup idle_max_cpu handling
> 
> Wang Nan (1):
>       perf build: Check LLVM version in feature check
> 
> Yannick Brosseau (1):
>       perf tools: Explicitly document that --children is enabled by default
> 
>  tools/build/feature/Makefile              |  8 +++-
>  tools/build/feature/test-llvm-version.cpp | 11 +++++
>  tools/build/feature/test-llvm.cpp         |  5 +++
>  tools/perf/Documentation/perf-report.txt  |  3 +-
>  tools/perf/Documentation/perf-top.txt     |  1 +
>  tools/perf/Makefile.config                |  8 +++-
>  tools/perf/Makefile.perf                  | 68 +++++++++++++++++++++----------
>  tools/perf/builtin-sched.c                | 26 ++++++------
>  tools/perf/util/callchain.c               | 27 ++++++++++++
>  tools/perf/util/callchain.h               |  3 ++
>  10 files changed, 122 insertions(+), 38 deletions(-)
>  create mode 100644 tools/build/feature/test-llvm-version.cpp
> 
>   # uname -a
>   Linux jouet 4.8.8-300.fc25.x86_64 #1 SMP Tue Nov 15 18:10:06 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>   # perf test
>    1: vmlinux symtab matches kallsyms            : Ok
>    2: Detect openat syscall event                : Ok
>    3: Detect openat syscall event on all cpus    : Ok
>    4: Read samples using the mmap interface      : Ok
>    5: Parse event definition strings             : Ok
>    6: PERF_RECORD_* events & perf_sample fields  : Ok
>    7: Parse perf pmu format                      : Ok
>    8: DSO data read                              : Ok
>    9: DSO data cache                             : Ok
>   10: DSO data reopen                            : Ok
>   11: Roundtrip evsel->name                      : Ok
>   12: Parse sched tracepoints fields             : Ok
>   13: syscalls:sys_enter_openat event fields     : Ok
>   14: Setup struct perf_event_attr               : Ok
>   15: Match and link multiple hists              : Ok
>   16: 'import perf' in python                    : Ok
>   17: Breakpoint overflow signal handler         : Ok
>   18: Breakpoint overflow sampling               : Ok
>   19: Number of exit events of a simple workload : Ok
>   20: Software clock events period values        : Ok
>   21: Object code reading                        : Ok
>   22: Sample parsing                             : Ok
>   23: Use a dummy software event to keep tracking: Ok
>   24: Parse with no sample_id_all bit set        : Ok
>   25: Filter hist entries                        : Ok
>   26: Lookup mmap thread                         : Ok
>   27: Share thread mg                            : Ok
>   28: Sort output of hist entries                : Ok
>   29: Cumulate child hist entries                : Ok
>   30: Track with sched_switch                    : Ok
>   31: Filter fds with revents mask in a fdarray  : Ok
>   32: Add fd to a fdarray, making it autogrow    : Ok
>   33: kmod_path__parse                           : Ok
>   34: Thread map                                 : Ok
>   35: LLVM search and compile                    :
>   35.1: Basic BPF llvm compile                    : Ok
>   35.2: kbuild searching                          : Ok
>   35.3: Compile source for BPF prologue generation: Ok
>   35.4: Compile source for BPF relocation         : Ok
>   36: Session topology                           : Ok
>   37: BPF filter                                 :
>   37.1: Basic BPF filtering                      : Ok
>   37.2: BPF prologue generation                  : Ok
>   37.3: BPF relocation checker                   : Ok
>   38: Synthesize thread map                      : Ok
>   39: Synthesize cpu map                         : Ok
>   40: Synthesize stat config                     : Ok
>   41: Synthesize stat                            : Ok
>   42: Synthesize stat round                      : Ok
>   43: Synthesize attr update                     : Ok
>   44: Event times                                : Ok
>   45: Read backward ring buffer                  : Ok
>   46: Print cpu map                              : Ok
>   47: Probe SDT events                           : Ok
>   48: is_printable_array                         : Ok
>   49: Print bitmap                               : Ok
>   50: perf hooks                                 : Ok
>   51: builtin clang support                      :
>   51.1: builtin clang compile C source to IR        : Ok
>   51.2: builtin clang compile C source to ELF object: Ok
>   52: x86 rdpmc                                  : Ok
>   53: Convert perf time to TSC                   : Ok
>   54: DWARF unwind                               : Ok
>   55: x86 instruction decoder - new instructions : Ok
>   56: Intel cqm nmi context read                 : Skip
>   # 
>   # uname -a
>   Linux zoo 4.7.3-200.fc24.x86_64 #1 SMP Wed Sep 7 17:31:21 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>   # time dm
>    1 alpine:3.4: Ok
>    2 android-ndk:r12b-arm: Ok
>    3 archlinux:latest: Ok
>    4 centos:5: Ok
>    5 centos:6: Ok
>    6 centos:7: Ok
>    7 debian:7: Ok
>    8 debian:8: Ok
>    9 debian:experimental: Ok
>   10 fedora:20: Ok
>   11 fedora:21: Ok
>   12 fedora:22: Ok
>   13 fedora:23: Ok
>   14 fedora:24: Ok
>   15 fedora:24-x-ARC-uClibc: Ok
>   16 fedora:rawhide: Ok
>   17 mageia:5: Ok
>   18 opensuse:13.2: Ok
>   19 opensuse:42.1: Ok
>   20 opensuse:tumbleweed: Ok
>   21 ubuntu:12.04.5: Ok
>   22 ubuntu:14.04: Ok
>   23 ubuntu:14.04.4: Ok
>   24 ubuntu:15.10: Ok
>   25 ubuntu:16.04: Ok
>   26 ubuntu:16.04-x-arm: Ok
>   27 ubuntu:16.04-x-arm64: Ok
>   28 ubuntu:16.04-x-powerpc: Ok
>   29 ubuntu:16.04-x-powerpc64: Ok
>   30 ubuntu:16.04-x-powerpc64el: Ok
>   31 ubuntu:16.04-x-s390: Ok
>   32 ubuntu:16.10: Ok
>   #
>   $ make -C tools/perf build-test
>   make: Entering directory '/home/acme/git/linux/tools/perf'
>   - tarpkg: ./tests/perf-targz-src-pkg .
>                   make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
>                    make_help_O: make help
>    make_install_prefix_slash_O: make install prefix=/tmp/krava/
>                 make_install_O: make install
>                  make_static_O: make LDFLAGS=-static
>            make_no_libbionic_O: make NO_LIBBIONIC=1
>            make_no_backtrace_O: make NO_BACKTRACE=1
>            make_no_libunwind_O: make NO_LIBUNWIND=1
>                 make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
>                     make_doc_O: make doc
>               make_no_libbpf_O: make NO_LIBBPF=1
>              make_util_map_o_O: make util/map.o
>             make_install_bin_O: make install-bin
>             make_no_auxtrace_O: make NO_AUXTRACE=1
>         make_with_babeltrace_O: make LIBBABELTRACE=1
>          make_with_clangllvm_O: make LIBCLANGLLVM=1
>                   make_debug_O: make DEBUG=1
>               make_no_libelf_O: make NO_LIBELF=1
>               make_clean_all_O: make clean all
>              make_no_libperl_O: make NO_LIBPERL=1
>             make_no_libaudit_O: make NO_LIBAUDIT=1
>                make_no_slang_O: make NO_SLANG=1
>        make_util_pmu_bison_o_O: make util/pmu-bison.o
>                 make_no_gtk2_O: make NO_GTK2=1
>                    make_pure_O: make
>              make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
>          make_install_prefix_O: make install prefix=/tmp/krava
>                    make_tags_O: make tags
>             make_no_demangle_O: make NO_DEMANGLE=1
>                  make_perf_o_O: make perf.o
>   make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
>              make_no_libnuma_O: make NO_LIBNUMA=1
>            make_no_libpython_O: make NO_LIBPYTHON=1
>                 make_no_newt_O: make NO_NEWT=1
>   OK
>   make: Leaving directory '/home/acme/git/linux/tools/perf'
>   $ 

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2016-12-07 16:53 Arnaldo Carvalho de Melo
  2016-12-07 18:17 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-12-07 16:53 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Alexei Starovoitov,
	Andi Kleen, David Ahern, He Kuang, Jiri Olsa, Joe Stringer,
	kernel-team, Minchan Kim, Namhyung Kim, Peter Zijlstra, pi3orama,
	Wang Nan, Yannick Brosseau, Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, should get linux-next free of perf build fixdep
related race conditions on high core count machines,

- Arnaldo

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

The following changes since commit 34c4a42791bbc455e65a15d12dcd0b6b3c52ad13:

  Merge tag 'perf-core-for-mingo-20161205' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-12-06 09:14:56 +0100)

are available in the git repository at:

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

for you to fetch changes up to 108a7c103b761309ccbd997002e8428808cf1e04:

  perf tools: Explicitly document that --children is enabled by default (2016-12-07 12:00:35 -0300)

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

Improvements:

- Improve error message when analyzing file with required events in
  'perf sched timehist' (David Ahern)

Fixes:

- Force fixdep compilation to be done at the start of the build, fixing
  some build race conditions in high core count machines (Jiri Olsa)

- Fix handling a zero sample->tid in 'perf sched timehist', as
  sometimes that isn't the idle thread (Namhyung Kim)

Infrastructure:

- Check minimal accepted LLVM version in its feature check, 3.9 at this
  time (Wang Nan)

Documentation:

- Explicitly document that --children is enabled by default (Yannick Brosseau)

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

----------------------------------------------------------------
David Ahern (1):
      perf sched timehist: Improve error message when analyzing wrong file

Jiri Olsa (3):
      perf tools: Move PERF-VERSION-FILE target into rules area
      perf tools: Force fixdep compilation at the start of the build
      perf tools: Move perf build related variables under non fixdep leg

Namhyung Kim (4):
      perf sched: Cleanup option processing
      perf callchain: Introduce callchain_cursor__copy()
      perf sched timehist: Handle zero sample->tid properly
      perf sched timehist: Cleanup idle_max_cpu handling

Wang Nan (1):
      perf build: Check LLVM version in feature check

Yannick Brosseau (1):
      perf tools: Explicitly document that --children is enabled by default

 tools/build/feature/Makefile              |  8 +++-
 tools/build/feature/test-llvm-version.cpp | 11 +++++
 tools/build/feature/test-llvm.cpp         |  5 +++
 tools/perf/Documentation/perf-report.txt  |  3 +-
 tools/perf/Documentation/perf-top.txt     |  1 +
 tools/perf/Makefile.config                |  8 +++-
 tools/perf/Makefile.perf                  | 68 +++++++++++++++++++++----------
 tools/perf/builtin-sched.c                | 26 ++++++------
 tools/perf/util/callchain.c               | 27 ++++++++++++
 tools/perf/util/callchain.h               |  3 ++
 10 files changed, 122 insertions(+), 38 deletions(-)
 create mode 100644 tools/build/feature/test-llvm-version.cpp

  # uname -a
  Linux jouet 4.8.8-300.fc25.x86_64 #1 SMP Tue Nov 15 18:10:06 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  # perf test
   1: vmlinux symtab matches kallsyms            : Ok
   2: Detect openat syscall event                : Ok
   3: Detect openat syscall event on all cpus    : Ok
   4: Read samples using the mmap interface      : Ok
   5: Parse event definition strings             : Ok
   6: PERF_RECORD_* events & perf_sample fields  : Ok
   7: Parse perf pmu format                      : Ok
   8: DSO data read                              : Ok
   9: DSO data cache                             : Ok
  10: DSO data reopen                            : Ok
  11: Roundtrip evsel->name                      : Ok
  12: Parse sched tracepoints fields             : Ok
  13: syscalls:sys_enter_openat event fields     : Ok
  14: Setup struct perf_event_attr               : Ok
  15: Match and link multiple hists              : Ok
  16: 'import perf' in python                    : Ok
  17: Breakpoint overflow signal handler         : Ok
  18: Breakpoint overflow sampling               : Ok
  19: Number of exit events of a simple workload : Ok
  20: Software clock events period values        : Ok
  21: Object code reading                        : Ok
  22: Sample parsing                             : Ok
  23: Use a dummy software event to keep tracking: Ok
  24: Parse with no sample_id_all bit set        : Ok
  25: Filter hist entries                        : Ok
  26: Lookup mmap thread                         : Ok
  27: Share thread mg                            : Ok
  28: Sort output of hist entries                : Ok
  29: Cumulate child hist entries                : Ok
  30: Track with sched_switch                    : Ok
  31: Filter fds with revents mask in a fdarray  : Ok
  32: Add fd to a fdarray, making it autogrow    : Ok
  33: kmod_path__parse                           : Ok
  34: Thread map                                 : Ok
  35: LLVM search and compile                    :
  35.1: Basic BPF llvm compile                    : Ok
  35.2: kbuild searching                          : Ok
  35.3: Compile source for BPF prologue generation: Ok
  35.4: Compile source for BPF relocation         : Ok
  36: Session topology                           : Ok
  37: BPF filter                                 :
  37.1: Basic BPF filtering                      : Ok
  37.2: BPF prologue generation                  : Ok
  37.3: BPF relocation checker                   : Ok
  38: Synthesize thread map                      : Ok
  39: Synthesize cpu map                         : Ok
  40: Synthesize stat config                     : Ok
  41: Synthesize stat                            : Ok
  42: Synthesize stat round                      : Ok
  43: Synthesize attr update                     : Ok
  44: Event times                                : Ok
  45: Read backward ring buffer                  : Ok
  46: Print cpu map                              : Ok
  47: Probe SDT events                           : Ok
  48: is_printable_array                         : Ok
  49: Print bitmap                               : Ok
  50: perf hooks                                 : Ok
  51: builtin clang support                      :
  51.1: builtin clang compile C source to IR        : Ok
  51.2: builtin clang compile C source to ELF object: Ok
  52: x86 rdpmc                                  : Ok
  53: Convert perf time to TSC                   : Ok
  54: DWARF unwind                               : Ok
  55: x86 instruction decoder - new instructions : Ok
  56: Intel cqm nmi context read                 : Skip
  # 
  # uname -a
  Linux zoo 4.7.3-200.fc24.x86_64 #1 SMP Wed Sep 7 17:31:21 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  # time dm
   1 alpine:3.4: Ok
   2 android-ndk:r12b-arm: Ok
   3 archlinux:latest: Ok
   4 centos:5: Ok
   5 centos:6: Ok
   6 centos:7: Ok
   7 debian:7: Ok
   8 debian:8: Ok
   9 debian:experimental: Ok
  10 fedora:20: Ok
  11 fedora:21: Ok
  12 fedora:22: Ok
  13 fedora:23: Ok
  14 fedora:24: Ok
  15 fedora:24-x-ARC-uClibc: Ok
  16 fedora:rawhide: Ok
  17 mageia:5: Ok
  18 opensuse:13.2: Ok
  19 opensuse:42.1: Ok
  20 opensuse:tumbleweed: Ok
  21 ubuntu:12.04.5: Ok
  22 ubuntu:14.04: Ok
  23 ubuntu:14.04.4: Ok
  24 ubuntu:15.10: Ok
  25 ubuntu:16.04: Ok
  26 ubuntu:16.04-x-arm: Ok
  27 ubuntu:16.04-x-arm64: Ok
  28 ubuntu:16.04-x-powerpc: Ok
  29 ubuntu:16.04-x-powerpc64: Ok
  30 ubuntu:16.04-x-powerpc64el: Ok
  31 ubuntu:16.04-x-s390: Ok
  32 ubuntu:16.10: Ok
  #
  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/linux/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
                   make_help_O: make help
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
                make_install_O: make install
                 make_static_O: make LDFLAGS=-static
           make_no_libbionic_O: make NO_LIBBIONIC=1
           make_no_backtrace_O: make NO_BACKTRACE=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
                    make_doc_O: make doc
              make_no_libbpf_O: make NO_LIBBPF=1
             make_util_map_o_O: make util/map.o
            make_install_bin_O: make install-bin
            make_no_auxtrace_O: make NO_AUXTRACE=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
                  make_debug_O: make DEBUG=1
              make_no_libelf_O: make NO_LIBELF=1
              make_clean_all_O: make clean all
             make_no_libperl_O: make NO_LIBPERL=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
               make_no_slang_O: make NO_SLANG=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                make_no_gtk2_O: make NO_GTK2=1
                   make_pure_O: make
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
         make_install_prefix_O: make install prefix=/tmp/krava
                   make_tags_O: make tags
            make_no_demangle_O: make NO_DEMANGLE=1
                 make_perf_o_O: make perf.o
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
             make_no_libnuma_O: make NO_LIBNUMA=1
           make_no_libpython_O: make NO_LIBPYTHON=1
                make_no_newt_O: make NO_NEWT=1
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $ 

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2016-06-21 10:08     ` Paolo Bonzini
@ 2016-06-21 16:14       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-06-21 16:14 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Brendan Gregg, Namhyung Kim, Arnaldo Carvalho de Melo,
	Ingo Molnar, linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexei Starovoitov, Andi Kleen, David Ahern, Ekaterina Tumanova,
	He Kuang, Jean Delvare, Jiri Olsa, Josh Poimboeuf, Kan Liang,
	linux-kbuild, Masami Hiramatsu, Michal Marek, Pekka Enberg,
	Peter Zijlstra, pi3orama, Stephane Eranian, Sukadev Bhattiprolu,
	Wang Nan, Zefan Li

Em Tue, Jun 21, 2016 at 12:08:47PM +0200, Paolo Bonzini escreveu:
> On 21/06/2016 05:11, Brendan Gregg wrote:
> >>> > > - Add stackcollapse.py script to help generating flame graphs (Paolo Bonzini)
> >> >
> >> > I think this is already done by '-g folded'.  Please see:
> >> >
> >> >   http://www.brendangregg.com/blog/2016-04-30/linux-perf-folded.html
> >> >
> > Pretty much. Two similar solutions were developed around the same
> > time. Although I have to use some awk to get "perf -g folded" in the
> > exact right format, and stackcollapse-perf.py does that directly.
> 
> Yes, the idea for stackcollapse-perf.py was:
> 
> - to do everything directly and emit "the right" format for the
> flamegraph tools.  This however is a very minimal output, and it's not
> necessarily the best for perf in general.
> 
> - to provide an example of visiting callgraphs from the scripting
> interface, since it's not really documented.  From the commit message:
> "Add stackcollapse.py script as an example of parsing call chains, and
> also of using optparse to access command line options".

Yeah, agreed, its short, and it provides the output ready to be used, no
need for extra processing, up to the user to decide if one or the other
is more suitable to their needs.

As a bonus, it documents callgraphs in scripts, good deal :-)

- Arnaldo

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2016-06-21  3:11   ` Brendan Gregg
@ 2016-06-21 10:08     ` Paolo Bonzini
  2016-06-21 16:14       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 73+ messages in thread
From: Paolo Bonzini @ 2016-06-21 10:08 UTC (permalink / raw)
  To: Brendan Gregg, Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel,
	Adrian Hunter, Alexander Shishkin, Alexei Starovoitov,
	Andi Kleen, David Ahern, Ekaterina Tumanova, He Kuang,
	Jean Delvare, Jiri Olsa, Josh Poimboeuf, Kan Liang, linux-kbuild,
	Masami Hiramatsu, Michal Marek, Pekka Enberg, Peter Zijlstra,
	pi3orama, Stephane Eranian, Sukadev Bhattiprolu, Wang Nan,
	Zefan Li, Arnaldo Carvalho de Melo



On 21/06/2016 05:11, Brendan Gregg wrote:
>>> > > - Add stackcollapse.py script to help generating flame graphs (Paolo Bonzini)
>> >
>> > I think this is already done by '-g folded'.  Please see:
>> >
>> >   http://www.brendangregg.com/blog/2016-04-30/linux-perf-folded.html
>> >
> Pretty much. Two similar solutions were developed around the same
> time. Although I have to use some awk to get "perf -g folded" in the
> exact right format, and stackcollapse-perf.py does that directly.

Yes, the idea for stackcollapse-perf.py was:

- to do everything directly and emit "the right" format for the
flamegraph tools.  This however is a very minimal output, and it's not
necessarily the best for perf in general.

- to provide an example of visiting callgraphs from the scripting
interface, since it's not really documented.  From the commit message:
"Add stackcollapse.py script as an example of parsing call chains, and
also of using optparse to access command line options".

Paolo

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2016-06-21  2:18 ` Namhyung Kim
@ 2016-06-21  3:11   ` Brendan Gregg
  2016-06-21 10:08     ` Paolo Bonzini
  0 siblings, 1 reply; 73+ messages in thread
From: Brendan Gregg @ 2016-06-21  3:11 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel,
	Adrian Hunter, Alexander Shishkin, Alexei Starovoitov,
	Andi Kleen, David Ahern, Ekaterina Tumanova, He Kuang,
	Jean Delvare, Jiri Olsa, Josh Poimboeuf, Kan Liang, linux-kbuild,
	Masami Hiramatsu, Michal Marek, Paolo Bonzini, Pekka Enberg,
	Peter Zijlstra, pi3orama, Stephane Eranian, Sukadev Bhattiprolu,
	Wang Nan, Zefan Li, Arnaldo Carvalho de Melo

On Mon, Jun 20, 2016 at 7:18 PM, Namhyung Kim <namhyung@kernel.org> wrote:
>
> Hi Arnaldo,
>
> On Mon, Jun 20, 2016 at 07:23:20PM -0300, Arnaldo Carvalho de Melo wrote:
> > Hi Ingo,
> >
> >       Please consider pulling,
> >
> > - Arnaldo
> >
> > The following changes since commit 02469a95096a549508c5adf61d84a1d72851c85b:
> >
> >   Merge tag 'perf-core-for-mingo-20160615' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-06-16 10:27:35 +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-20160620
> >
> > for you to fetch changes up to 2a0a7c72702bac1b87cd4d49196a334483386fab:
> >
> >   perf script: Add stackcollapse.py script (2016-06-20 17:50:39 -0300)
> >
> > ----------------------------------------------------------------
> > perf/core improvements and fixes:
> >
> > New features:
> >
> > . Add --dry-run option to 'perf record' to check if command line options can be
> >   parsed, but not doing any recording (Wang Nan)
> >
> > . Allow dumping the object files generated by llvm when processing eBPF
> >   scriptlet events (Wang Nan)
> >
> > - Add stackcollapse.py script to help generating flame graphs (Paolo Bonzini)
>
> I think this is already done by '-g folded'.  Please see:
>
>   http://www.brendangregg.com/blog/2016-04-30/linux-perf-folded.html
>

Pretty much. Two similar solutions were developed around the same
time. Although I have to use some awk to get "perf -g folded" in the
exact right format, and stackcollapse-perf.py does that directly.

Brendan

Brendan Gregg, Senior Performance Architect, Netflix

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2016-06-20 22:23 Arnaldo Carvalho de Melo
@ 2016-06-21  2:18 ` Namhyung Kim
  2016-06-21  3:11   ` Brendan Gregg
  0 siblings, 1 reply; 73+ messages in thread
From: Namhyung Kim @ 2016-06-21  2:18 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexei Starovoitov, Andi Kleen, Brendan Gregg, David Ahern,
	Ekaterina Tumanova, He Kuang, Jean Delvare, Jiri Olsa,
	Josh Poimboeuf, Kan Liang, linux-kbuild, Masami Hiramatsu,
	Michal Marek, Paolo Bonzini, Pekka Enberg, Peter Zijlstra,
	pi3orama, Stephane Eranian, Sukadev Bhattiprolu, Wang Nan,
	Zefan Li, Arnaldo Carvalho de Melo

Hi Arnaldo,

On Mon, Jun 20, 2016 at 07:23:20PM -0300, Arnaldo Carvalho de Melo wrote:
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 02469a95096a549508c5adf61d84a1d72851c85b:
> 
>   Merge tag 'perf-core-for-mingo-20160615' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-06-16 10:27:35 +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-20160620
> 
> for you to fetch changes up to 2a0a7c72702bac1b87cd4d49196a334483386fab:
> 
>   perf script: Add stackcollapse.py script (2016-06-20 17:50:39 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> . Add --dry-run option to 'perf record' to check if command line options can be
>   parsed, but not doing any recording (Wang Nan)
> 
> . Allow dumping the object files generated by llvm when processing eBPF
>   scriptlet events (Wang Nan)
> 
> - Add stackcollapse.py script to help generating flame graphs (Paolo Bonzini)

I think this is already done by '-g folded'.  Please see:

  http://www.brendangregg.com/blog/2016-04-30/linux-perf-folded.html

Thanks,
Namhyung


> 
> Documentation:
> 
> . Fix 'perf script'  documentation of '-f' when it should be '-F' (Adrian Hunter)
> 
> Infrastructure:
> 
> - Fix write_backwards fallback when using a new tool on older kernels
>   without support for this feature (Arnaldo Carvalho de Melo)
> 
> - Find vdso file in cross-platform perf.data file processing scenarios (He Kuang)
> 
> - Remove some leftovers from the initial codebase copying from git
>   (Arnaldo Carvalho de Melo)
> 
> - List libelf-devel as an alternative, as this is how the libelf
>   development package is called on OpenSuSE (Jean Delvare)
> 
> - Rename __hists__add_entry to hists__add_entry (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf script: Fix documentation of '-f' when it should be '-F'
> 
> Arnaldo Carvalho de Melo (3):
>       perf tools: Remove some unused functions
>       perf tools: Remove --perf-dir and --work-dir
>       perf evsel: Fix write_backwards fallback
> 
> He Kuang (1):
>       perf tools: Find vdso with the consider of cross-platform
> 
> Jean Delvare (1):
>       kbuild: List libelf-devel as an alternative
> 
> Jiri Olsa (1):
>       perf hists: Rename __hists__add_entry to hists__add_entry
> 
> Paolo Bonzini (1):
>       perf script: Add stackcollapse.py script
> 
> Wang Nan (2):
>       perf llvm: Allow dump llvm output object file using llvm.dump-obj
>       perf record: Add --dry-run option to check cmdline options
> 
>  Makefile                                           |   2 +-
>  tools/perf/Documentation/perf-record.txt           |   7 ++
>  tools/perf/Documentation/perf-script.txt           |  20 ++--
>  tools/perf/builtin-annotate.c                      |   2 +-
>  tools/perf/builtin-diff.c                          |  12 +-
>  tools/perf/builtin-record.c                        |   7 ++
>  tools/perf/config/Makefile                         |   2 +-
>  tools/perf/perf.c                                  |  36 ------
>  tools/perf/scripts/python/bin/stackcollapse-record |   8 ++
>  tools/perf/scripts/python/bin/stackcollapse-report |   3 +
>  tools/perf/scripts/python/stackcollapse.py         | 127 +++++++++++++++++++++
>  tools/perf/tests/hists_link.c                      |   4 +-
>  tools/perf/util/cache.h                            |   9 --
>  tools/perf/util/config.c                           |   2 +-
>  tools/perf/util/evsel.c                            |  23 ++--
>  tools/perf/util/hist.c                             |  34 +++---
>  tools/perf/util/hist.h                             |  14 +--
>  tools/perf/util/llvm-utils.c                       |  42 +++++++
>  tools/perf/util/llvm-utils.h                       |   5 +
>  tools/perf/util/path.c                             |  65 +----------
>  tools/perf/util/vdso.c                             |  40 ++++++-
>  21 files changed, 288 insertions(+), 176 deletions(-)
>  create mode 100755 tools/perf/scripts/python/bin/stackcollapse-record
>  create mode 100755 tools/perf/scripts/python/bin/stackcollapse-report
>  create mode 100755 tools/perf/scripts/python/stackcollapse.py

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2016-06-20 22:23 Arnaldo Carvalho de Melo
  2016-06-21  2:18 ` Namhyung Kim
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-06-20 22:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexei Starovoitov, Andi Kleen,
	Brendan Gregg, David Ahern, Ekaterina Tumanova, He Kuang,
	Jean Delvare, Jiri Olsa, Josh Poimboeuf, Kan Liang, linux-kbuild,
	Masami Hiramatsu, Michal Marek, Namhyung Kim, Paolo Bonzini,
	Pekka Enberg, Peter Zijlstra, pi3orama, Stephane Eranian,
	Sukadev Bhattiprolu, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 02469a95096a549508c5adf61d84a1d72851c85b:

  Merge tag 'perf-core-for-mingo-20160615' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-06-16 10:27:35 +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-20160620

for you to fetch changes up to 2a0a7c72702bac1b87cd4d49196a334483386fab:

  perf script: Add stackcollapse.py script (2016-06-20 17:50:39 -0300)

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

New features:

. Add --dry-run option to 'perf record' to check if command line options can be
  parsed, but not doing any recording (Wang Nan)

. Allow dumping the object files generated by llvm when processing eBPF
  scriptlet events (Wang Nan)

- Add stackcollapse.py script to help generating flame graphs (Paolo Bonzini)

Documentation:

. Fix 'perf script'  documentation of '-f' when it should be '-F' (Adrian Hunter)

Infrastructure:

- Fix write_backwards fallback when using a new tool on older kernels
  without support for this feature (Arnaldo Carvalho de Melo)

- Find vdso file in cross-platform perf.data file processing scenarios (He Kuang)

- Remove some leftovers from the initial codebase copying from git
  (Arnaldo Carvalho de Melo)

- List libelf-devel as an alternative, as this is how the libelf
  development package is called on OpenSuSE (Jean Delvare)

- Rename __hists__add_entry to hists__add_entry (Jiri Olsa)

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

----------------------------------------------------------------
Adrian Hunter (1):
      perf script: Fix documentation of '-f' when it should be '-F'

Arnaldo Carvalho de Melo (3):
      perf tools: Remove some unused functions
      perf tools: Remove --perf-dir and --work-dir
      perf evsel: Fix write_backwards fallback

He Kuang (1):
      perf tools: Find vdso with the consider of cross-platform

Jean Delvare (1):
      kbuild: List libelf-devel as an alternative

Jiri Olsa (1):
      perf hists: Rename __hists__add_entry to hists__add_entry

Paolo Bonzini (1):
      perf script: Add stackcollapse.py script

Wang Nan (2):
      perf llvm: Allow dump llvm output object file using llvm.dump-obj
      perf record: Add --dry-run option to check cmdline options

 Makefile                                           |   2 +-
 tools/perf/Documentation/perf-record.txt           |   7 ++
 tools/perf/Documentation/perf-script.txt           |  20 ++--
 tools/perf/builtin-annotate.c                      |   2 +-
 tools/perf/builtin-diff.c                          |  12 +-
 tools/perf/builtin-record.c                        |   7 ++
 tools/perf/config/Makefile                         |   2 +-
 tools/perf/perf.c                                  |  36 ------
 tools/perf/scripts/python/bin/stackcollapse-record |   8 ++
 tools/perf/scripts/python/bin/stackcollapse-report |   3 +
 tools/perf/scripts/python/stackcollapse.py         | 127 +++++++++++++++++++++
 tools/perf/tests/hists_link.c                      |   4 +-
 tools/perf/util/cache.h                            |   9 --
 tools/perf/util/config.c                           |   2 +-
 tools/perf/util/evsel.c                            |  23 ++--
 tools/perf/util/hist.c                             |  34 +++---
 tools/perf/util/hist.h                             |  14 +--
 tools/perf/util/llvm-utils.c                       |  42 +++++++
 tools/perf/util/llvm-utils.h                       |   5 +
 tools/perf/util/path.c                             |  65 +----------
 tools/perf/util/vdso.c                             |  40 ++++++-
 21 files changed, 288 insertions(+), 176 deletions(-)
 create mode 100755 tools/perf/scripts/python/bin/stackcollapse-record
 create mode 100755 tools/perf/scripts/python/bin/stackcollapse-report
 create mode 100755 tools/perf/scripts/python/stackcollapse.py

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2016-05-25 21:34 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-05-25 21:34 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexei Starovoitov, Andi Kleen,
	Brendan Gregg, David Ahern, Frederic Weisbecker, He Kuang,
	Jiri Olsa, Linus Torvalds, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Peter Zijlstra, pi3orama, Stephane Eranian,
	Thomas Gleixner, Vince Weaver, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 275ae411e56f8f900fa364da29c4706f9af4e1f3:

  perf/x86/intel/rapl: Fix pmus free during cleanup (2016-05-25 10:56:43 +0200)

are available in the git repository at:

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

for you to fetch changes up to 83e1e314baf9a1424bf2f50953ed7d50612763c4:

  tools: Pass arg to fdarray__filter's call back function (2016-05-25 17:27:25 -0300)

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

User visible/kernel ABI:

- Per event callchain limit: Recently we introduced a sysctl to tune the
  max-stack for all events for which callchains were requested:

  $ sysctl kernel.perf_event_max_stack
  kernel.perf_event_max_stack = 127

  Now this patch introduces a way to configure this per event, i.e. this
  becomes possible:

  $ perf record -e sched:*/max-stack=2/ -e block:*/max-stack=10/ -a

  allowing finer tuning of how much buffer space callchains use.

  This uses an u16 from the reserved space at the end, leaving another
  u16 for future use.

  There has been interest in even finer tuning, namely to control the
  max stack for kernel and userspace callchains separately. Further
  discussion is needed, we may for instance use the remaining u16 for
  that and when it is present, assume that the sample_max_stack introduced
  in this patch applies for the kernel, and the u16 left is used for
  limiting the userspace callchain. (Arnaldo Carvalho de Melo)

- Fix kptr_restrict=2 related 'perf record' segfault (Wang Nan)

Infrastructure;

- Adopt get_main_thread from db-export.c (Andi Kleen)

- More prep work for backward ring buffer support (Wang Nan)

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

----------------------------------------------------------------
Andi Kleen (1):
      perf thread: Adopt get_main_thread from db-export.c

Arnaldo Carvalho de Melo (2):
      perf core: Per event callchain limit
      perf tools: Per event max-stack settings

Wang Nan (7):
      perf symbols: Check kptr_restrict for root
      perf record: Fix crash when kptr is restricted
      perf record: Robustify perf_event__synth_time_conv()
      perf evlist: Don't poll and mmap overwritable events
      perf evlist: Check 'base' pointer before checking refcnt when put a mmap
      perf evlist: Choose correct reading direction according to evlist->backward
      tools: Pass arg to fdarray__filter's call back function

 include/linux/perf_event.h      |  2 +-
 include/uapi/linux/perf_event.h |  6 +++++-
 kernel/bpf/stackmap.c           |  2 +-
 kernel/events/callchain.c       | 14 ++++++++++++--
 kernel/events/core.c            |  5 ++++-
 tools/lib/api/fd/array.c        |  5 +++--
 tools/lib/api/fd/array.h        |  3 ++-
 tools/perf/arch/x86/util/tsc.c  |  2 ++
 tools/perf/builtin-record.c     |  9 ++++++++-
 tools/perf/tests/fdarray.c      |  8 ++++----
 tools/perf/util/callchain.h     |  1 +
 tools/perf/util/db-export.c     | 13 +------------
 tools/perf/util/event.c         |  2 ++
 tools/perf/util/evlist.c        | 43 ++++++++++++++++++++++++++++++++---------
 tools/perf/util/evlist.h        |  2 ++
 tools/perf/util/evsel.c         | 16 +++++++++++++--
 tools/perf/util/evsel.h         |  2 ++
 tools/perf/util/parse-events.c  |  8 ++++++++
 tools/perf/util/parse-events.h  |  1 +
 tools/perf/util/parse-events.l  |  1 +
 tools/perf/util/session.c       |  2 ++
 tools/perf/util/symbol.c        | 16 +++++++--------
 tools/perf/util/thread.c        | 11 +++++++++++
 tools/perf/util/thread.h        |  2 ++
 24 files changed, 131 insertions(+), 45 deletions(-)

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2016-04-01 21:56 Arnaldo Carvalho de Melo
@ 2016-04-06  6:47 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2016-04-06  6:47 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin, Andi Kleen,
	David Ahern, He Kuang, Jiri Olsa, Josh Poimboeuf, Kan Liang,
	Milian Wolff, Namhyung Kim, Peter Zijlstra, pi3orama,
	Stephane Eranian, Sukadev Bhattiprolu, Wang Nan,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit d1b26c70246bc72922ae61d9f972d5c2588409e7:
> 
>   perf/ring_buffer: Prepare writing into the ring-buffer from the end (2016-03-31 10:30:49 +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-20160401
> 
> for you to fetch changes up to d37ba880598654fda10b312331377cdca3edd574:
> 
>   perf bpf: Add sample types for 'bpf-output' event (2016-04-01 18:46:25 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Do not use events that don't have timestamps when setting 'perf trace's
>   base timestamp, fixing up the timestamp column for syscalls (Arnaldo Carvalho de Melo)
> 
> - Make the 'bpf-output' sample_type be the same as tracepoint's, fixing up
>   'perf trace's timestamp column for bpf events (Wang Nan)
> 
> - Fix PMU term format max value calculation (Kan Liang)
> 
> - Pretty print 'seccomp', 'getrandom' syscalls in 'perf trace' (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Add support for using TSC as an ARCH timestamp when synthesizing
>   JIT records (Adrian Hunter)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (3):
>       perf tools: Add time conversion event
>       perf jit: Add support for using TSC as a timestamp
>       perf intel-pt/bts: Define JITDUMP_USE_ARCH_TIMESTAMP
> 
> Arnaldo Carvalho de Melo (5):
>       perf trace: Do not process PERF_RECORD_LOST twice
>       perf trace: Pretty print seccomp() args
>       perf trace: Pretty print getrandom() args
>       perf trace: Introduce function to set the base timestamp
>       perf trace: Don't set the base timestamp using events without PERF_SAMPLE_TIME
> 
> Kan Liang (1):
>       perf tools: Fix PMU term format max value calculation
> 
> Wang Nan (1):
>       perf bpf: Add sample types for 'bpf-output' event
> 
>  tools/perf/arch/x86/util/intel-bts.c |  5 ++
>  tools/perf/arch/x86/util/intel-pt.c  |  5 ++
>  tools/perf/arch/x86/util/tsc.c       | 32 +++++++++++-
>  tools/perf/arch/x86/util/tsc.h       | 17 -------
>  tools/perf/builtin-inject.c          |  1 +
>  tools/perf/builtin-record.c          | 15 ++++++
>  tools/perf/builtin-trace.c           | 99 ++++++++++++++++++++++++++++++++++--
>  tools/perf/jvmti/jvmti_agent.c       | 43 +++++++++++++++-
>  tools/perf/util/Build                |  3 +-
>  tools/perf/util/event.c              |  1 +
>  tools/perf/util/event.h              |  9 ++++
>  tools/perf/util/evsel.c              |  3 +-
>  tools/perf/util/jitdump.c            | 37 ++++++++++++--
>  tools/perf/util/jitdump.h            |  3 ++
>  tools/perf/util/pmu.c                | 13 +++--
>  tools/perf/util/session.c            |  6 +++
>  tools/perf/util/session.h            |  1 +
>  tools/perf/util/tool.h               |  1 +
>  tools/perf/util/tsc.h                | 21 +++++++-
>  19 files changed, 274 insertions(+), 41 deletions(-)
>  delete mode 100644 tools/perf/arch/x86/util/tsc.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2016-04-01 21:56 Arnaldo Carvalho de Melo
  2016-04-06  6:47 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-04-01 21:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, David Ahern, He Kuang, Jiri Olsa,
	Josh Poimboeuf, Kan Liang, Milian Wolff, Namhyung Kim,
	Peter Zijlstra, pi3orama, Stephane Eranian, Sukadev Bhattiprolu,
	Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit d1b26c70246bc72922ae61d9f972d5c2588409e7:

  perf/ring_buffer: Prepare writing into the ring-buffer from the end (2016-03-31 10:30:49 +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-20160401

for you to fetch changes up to d37ba880598654fda10b312331377cdca3edd574:

  perf bpf: Add sample types for 'bpf-output' event (2016-04-01 18:46:25 -0300)

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

User visible:

- Do not use events that don't have timestamps when setting 'perf trace's
  base timestamp, fixing up the timestamp column for syscalls (Arnaldo Carvalho de Melo)

- Make the 'bpf-output' sample_type be the same as tracepoint's, fixing up
  'perf trace's timestamp column for bpf events (Wang Nan)

- Fix PMU term format max value calculation (Kan Liang)

- Pretty print 'seccomp', 'getrandom' syscalls in 'perf trace' (Arnaldo Carvalho de Melo)

Infrastructure:

- Add support for using TSC as an ARCH timestamp when synthesizing
  JIT records (Adrian Hunter)

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

----------------------------------------------------------------
Adrian Hunter (3):
      perf tools: Add time conversion event
      perf jit: Add support for using TSC as a timestamp
      perf intel-pt/bts: Define JITDUMP_USE_ARCH_TIMESTAMP

Arnaldo Carvalho de Melo (5):
      perf trace: Do not process PERF_RECORD_LOST twice
      perf trace: Pretty print seccomp() args
      perf trace: Pretty print getrandom() args
      perf trace: Introduce function to set the base timestamp
      perf trace: Don't set the base timestamp using events without PERF_SAMPLE_TIME

Kan Liang (1):
      perf tools: Fix PMU term format max value calculation

Wang Nan (1):
      perf bpf: Add sample types for 'bpf-output' event

 tools/perf/arch/x86/util/intel-bts.c |  5 ++
 tools/perf/arch/x86/util/intel-pt.c  |  5 ++
 tools/perf/arch/x86/util/tsc.c       | 32 +++++++++++-
 tools/perf/arch/x86/util/tsc.h       | 17 -------
 tools/perf/builtin-inject.c          |  1 +
 tools/perf/builtin-record.c          | 15 ++++++
 tools/perf/builtin-trace.c           | 99 ++++++++++++++++++++++++++++++++++--
 tools/perf/jvmti/jvmti_agent.c       | 43 +++++++++++++++-
 tools/perf/util/Build                |  3 +-
 tools/perf/util/event.c              |  1 +
 tools/perf/util/event.h              |  9 ++++
 tools/perf/util/evsel.c              |  3 +-
 tools/perf/util/jitdump.c            | 37 ++++++++++++--
 tools/perf/util/jitdump.h            |  3 ++
 tools/perf/util/pmu.c                | 13 +++--
 tools/perf/util/session.c            |  6 +++
 tools/perf/util/session.h            |  1 +
 tools/perf/util/tool.h               |  1 +
 tools/perf/util/tsc.h                | 21 +++++++-
 19 files changed, 274 insertions(+), 41 deletions(-)
 delete mode 100644 tools/perf/arch/x86/util/tsc.h

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2016-02-16 20:34 Arnaldo Carvalho de Melo
@ 2016-02-17  7:39 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2016-02-17  7:39 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, David Ahern, Jiri Olsa,
	Kan Liang, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
	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 fe7a2eaa71c55aadbf95d01d32df8dccc0db0646:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-02-16 08:45:56 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to cb110f471025f3278978aaccb18f3164ea2b8189:
> 
>   perf stat: Move noise/running printing into printout (2016-02-16 17:13:02 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Make 'perf record' collect CPU cache info in the perf.data file header:
> 
>   $ perf record usleep 1
>   [ perf record: Woken up 1 times to write data ]
>   [ perf record: Captured and wrote 0.017 MB perf.data (7 samples) ]
>   $ perf report --header-only -I | tail -10 | head -8
>   # CPU cache info:
>   #  L1 Data                 32K [0-1]
>   #  L1 Instruction          32K [0-1]
>   #  L1 Data                 32K [2-3]
>   #  L1 Instruction          32K [2-3]
>   #  L2 Unified             256K [0-1]
>   #  L2 Unified             256K [2-3]
>   #  L3 Unified            4096K [0-3]
>   $
> 
>   Will be used in 'perf c2c' and eventually in 'perf diff' to allow, for instance
>   running the same workload in multiple machines and then when using 'diff' show
>   the hardware difference. (Jiri Olsa)
> 
> - 'perf stat' now shows shadow metrics (insn per cycle, etc) in
>   interval mode too. E.g:
> 
>     # perf stat -I 1000 -e instructions,cycles sleep 1
>     #         time   counts unit events
>        1.000215928  519,620      instructions     #  0.69 insn per cycle
>        1.000215928  752,003      cycles
>     <SNIP>
> 
> Infrastructure:
> 
> - libapi now can also use pr_{warning,info,debug}() and that can be
>   set by tools using it (Jiri Olsa)
> 
> - libapi adopts filename__read_str() from perf, adds sysfs__read_str() (Jiri Olsa)
> 
> - Add check for java alternatives cmd in jvmti Makefile, so that it manages
>   to automatically find the right path for the JDK devel files in Ubuntu like
>   systems in addition to Fedora like ones (Stephane Eranian)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (3):
>       perf stat: Abstract stat metrics printing
>       perf stat: Add support for metrics in interval mode
>       perf stat: Move noise/running printing into printout
> 
> Arnaldo Carvalho de Melo (1):
>       perf debug: Rename __eprintf(va_list args) to veprintf
> 
> Jiri Olsa (5):
>       tools lib api: Add debug output support
>       tools lib api fs: Adopt filename__read_str from perf
>       tools lib api fs: Add sysfs__read_str function
>       perf tools: Initialize libapi debug output
>       perf tools: Add perf data cache feature
> 
> Stephane Eranian (1):
>       perf jvmti: Add check for java alternatives cmd in Makefile
> 
>  tools/lib/api/Build            |   1 +
>  tools/lib/api/Makefile         |   1 +
>  tools/lib/api/debug-internal.h |  20 +++
>  tools/lib/api/debug.c          |  28 +++++
>  tools/lib/api/debug.h          |  10 ++
>  tools/lib/api/fs/fs.c          |  64 ++++++++++
>  tools/lib/api/fs/fs.h          |   3 +
>  tools/perf/builtin-stat.c      | 202 +++++++++++++++---------------
>  tools/perf/jvmti/Makefile      |   6 +-
>  tools/perf/perf.c              |   2 +
>  tools/perf/util/debug.c        |  36 ++++--
>  tools/perf/util/debug.h        |   1 +
>  tools/perf/util/env.c          |  13 ++
>  tools/perf/util/env.h          |  15 +++
>  tools/perf/util/header.c       | 270 +++++++++++++++++++++++++++++++++++++++++
>  tools/perf/util/header.h       |   1 +
>  tools/perf/util/stat-shadow.c  | 211 +++++++++++++++++---------------
>  tools/perf/util/stat.h         |  15 ++-
>  tools/perf/util/trace-event.c  |   1 +
>  tools/perf/util/util.c         |  48 --------
>  tools/perf/util/util.h         |   1 -
>  21 files changed, 694 insertions(+), 255 deletions(-)
>  create mode 100644 tools/lib/api/debug-internal.h
>  create mode 100644 tools/lib/api/debug.c
>  create mode 100644 tools/lib/api/debug.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2016-02-16 20:34 Arnaldo Carvalho de Melo
  2016-02-17  7:39 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-02-16 20:34 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, David Ahern, Jiri Olsa, Kan Liang, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian, Wang Nan,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit fe7a2eaa71c55aadbf95d01d32df8dccc0db0646:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-02-16 08:45:56 +0100)

are available in the git repository at:

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

for you to fetch changes up to cb110f471025f3278978aaccb18f3164ea2b8189:

  perf stat: Move noise/running printing into printout (2016-02-16 17:13:02 -0300)

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

User visible:

- Make 'perf record' collect CPU cache info in the perf.data file header:

  $ perf record usleep 1
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.017 MB perf.data (7 samples) ]
  $ perf report --header-only -I | tail -10 | head -8
  # CPU cache info:
  #  L1 Data                 32K [0-1]
  #  L1 Instruction          32K [0-1]
  #  L1 Data                 32K [2-3]
  #  L1 Instruction          32K [2-3]
  #  L2 Unified             256K [0-1]
  #  L2 Unified             256K [2-3]
  #  L3 Unified            4096K [0-3]
  $

  Will be used in 'perf c2c' and eventually in 'perf diff' to allow, for instance
  running the same workload in multiple machines and then when using 'diff' show
  the hardware difference. (Jiri Olsa)

- 'perf stat' now shows shadow metrics (insn per cycle, etc) in
  interval mode too. E.g:

    # perf stat -I 1000 -e instructions,cycles sleep 1
    #         time   counts unit events
       1.000215928  519,620      instructions     #  0.69 insn per cycle
       1.000215928  752,003      cycles
    <SNIP>

Infrastructure:

- libapi now can also use pr_{warning,info,debug}() and that can be
  set by tools using it (Jiri Olsa)

- libapi adopts filename__read_str() from perf, adds sysfs__read_str() (Jiri Olsa)

- Add check for java alternatives cmd in jvmti Makefile, so that it manages
  to automatically find the right path for the JDK devel files in Ubuntu like
  systems in addition to Fedora like ones (Stephane Eranian)

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

----------------------------------------------------------------
Andi Kleen (3):
      perf stat: Abstract stat metrics printing
      perf stat: Add support for metrics in interval mode
      perf stat: Move noise/running printing into printout

Arnaldo Carvalho de Melo (1):
      perf debug: Rename __eprintf(va_list args) to veprintf

Jiri Olsa (5):
      tools lib api: Add debug output support
      tools lib api fs: Adopt filename__read_str from perf
      tools lib api fs: Add sysfs__read_str function
      perf tools: Initialize libapi debug output
      perf tools: Add perf data cache feature

Stephane Eranian (1):
      perf jvmti: Add check for java alternatives cmd in Makefile

 tools/lib/api/Build            |   1 +
 tools/lib/api/Makefile         |   1 +
 tools/lib/api/debug-internal.h |  20 +++
 tools/lib/api/debug.c          |  28 +++++
 tools/lib/api/debug.h          |  10 ++
 tools/lib/api/fs/fs.c          |  64 ++++++++++
 tools/lib/api/fs/fs.h          |   3 +
 tools/perf/builtin-stat.c      | 202 +++++++++++++++---------------
 tools/perf/jvmti/Makefile      |   6 +-
 tools/perf/perf.c              |   2 +
 tools/perf/util/debug.c        |  36 ++++--
 tools/perf/util/debug.h        |   1 +
 tools/perf/util/env.c          |  13 ++
 tools/perf/util/env.h          |  15 +++
 tools/perf/util/header.c       | 270 +++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/header.h       |   1 +
 tools/perf/util/stat-shadow.c  | 211 +++++++++++++++++---------------
 tools/perf/util/stat.h         |  15 ++-
 tools/perf/util/trace-event.c  |   1 +
 tools/perf/util/util.c         |  48 --------
 tools/perf/util/util.h         |   1 -
 21 files changed, 694 insertions(+), 255 deletions(-)
 create mode 100644 tools/lib/api/debug-internal.h
 create mode 100644 tools/lib/api/debug.c
 create mode 100644 tools/lib/api/debug.h

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2015-11-28  9:50 ` Ingo Molnar
@ 2015-11-29 13:16   ` Namhyung Kim
  0 siblings, 0 replies; 73+ messages in thread
From: Namhyung Kim @ 2015-11-29 13:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexei Starovoitov, David Ahern, He Kuang,
	Jiri Olsa, Masami Hiramatsu, Michael Petlan, Peter Zijlstra,
	pi3orama, Wang Nan, Zefan Li

Hi Ingo,

On Sat, Nov 28, 2015 at 10:50:19AM +0100, Ingo Molnar wrote:
> 
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> 
> > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > Hi Ingo,
> > 
> > 	Please consider applying,
> > 
> > - Arnaldo
> > 
> > The following changes since commit 3f3b1a46bfdbce97dd3f9594d8a95db82baa554b:
> > 
> >   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-11-27 08:28:44 +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 0bb93490170477224f8bd4cc9ce8920517461643:
> > 
> >   perf bpf: Rename bpf config to program config (2015-11-27 22:00:46 -0300)
> > 
> > ----------------------------------------------------------------
> > perf/core improvements and fixes:
> > 
> > User visible:
> > 
> > - Fix 'perf list' segfault due to lack of support for PERF_CONF_SW_BPF_OUTPUT
> >   in an array used just for printing available events, robustify the code
> >   involved (Arnaldo Carvalho de Melo)
> > 
> > - 'perf test unwind' should create kernel maps, now that entry works and the
> >   test passes (Jiri Olsa)
> > 
> > - Fix showing the running kernel build id in 'perf buildid-list' (Michael Petlan)
> > 
> > - Fix command line symbol filtering in 'perf report' (Namhyung Kim)
> > 
> > Infrastructure:
> > 
> > - Extract and collect map info from BPF object files in libbpf (Wang Nan)
> > 
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > ----------------------------------------------------------------
> > Arnaldo Carvalho de Melo (2):
> >       perf list: Add support for PERF_COUNT_SW_BPF_OUT
> >       perf list: Robustify event printing routine
> > 
> > Jiri Olsa (1):
> >       perf test: 'unwind' test should create kernel maps
> > 
> > Michael Petlan (1):
> >       perf buildid-list: Show running kernel build id fix
> > 
> > Namhyung Kim (3):
> >       perf report: Show error message when processing sample fails
> >       perf hists: Do not skip elided fields when processing samples
> >       perf hists browser: Update nr entries regardless of min percent
> > 
> > Wang Nan (3):
> >       tools lib bpf: Collect map definition in bpf_object
> >       tools lib bpf: Extract and collect map names from BPF object file
> >       perf bpf: Rename bpf config to program config
> > 
> >  tools/lib/bpf/libbpf.c          | 252 ++++++++++++++++++++++++++++++----------
> >  tools/lib/bpf/libbpf.h          |  24 ++++
> >  tools/perf/builtin-report.c     |  12 +-
> >  tools/perf/tests/dwarf-unwind.c |   5 +
> >  tools/perf/ui/browsers/hists.c  |   5 +-
> >  tools/perf/util/bpf-loader.c    |  65 +++++------
> >  tools/perf/util/bpf-loader.h    |   2 +-
> >  tools/perf/util/build-id.c      |   2 +-
> >  tools/perf/util/hist.c          |   6 -
> >  tools/perf/util/parse-events.c  |   6 +-
> >  10 files changed, 268 insertions(+), 111 deletions(-)
> 
> Pulled, thanks a lot Arnaldo!
> 
> Should any of the above fixes be cherry-picked over into perf/urgent, or are these 
> all new regressions?

At least my changes should go into perf/urgent and probably stable too.

Thanks,
Namhyung

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2015-11-28  1:22 Arnaldo Carvalho de Melo
@ 2015-11-28  9:50 ` Ingo Molnar
  2015-11-29 13:16   ` Namhyung Kim
  0 siblings, 1 reply; 73+ messages in thread
From: Ingo Molnar @ 2015-11-28  9:50 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, David Ahern, He Kuang, Jiri Olsa,
	Masami Hiramatsu, Michael Petlan, Namhyung Kim, Peter Zijlstra,
	pi3orama, Wang Nan, Zefan Li


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

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider applying,
> 
> - Arnaldo
> 
> The following changes since commit 3f3b1a46bfdbce97dd3f9594d8a95db82baa554b:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-11-27 08:28:44 +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 0bb93490170477224f8bd4cc9ce8920517461643:
> 
>   perf bpf: Rename bpf config to program config (2015-11-27 22:00:46 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Fix 'perf list' segfault due to lack of support for PERF_CONF_SW_BPF_OUTPUT
>   in an array used just for printing available events, robustify the code
>   involved (Arnaldo Carvalho de Melo)
> 
> - 'perf test unwind' should create kernel maps, now that entry works and the
>   test passes (Jiri Olsa)
> 
> - Fix showing the running kernel build id in 'perf buildid-list' (Michael Petlan)
> 
> - Fix command line symbol filtering in 'perf report' (Namhyung Kim)
> 
> Infrastructure:
> 
> - Extract and collect map info from BPF object files in libbpf (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf list: Add support for PERF_COUNT_SW_BPF_OUT
>       perf list: Robustify event printing routine
> 
> Jiri Olsa (1):
>       perf test: 'unwind' test should create kernel maps
> 
> Michael Petlan (1):
>       perf buildid-list: Show running kernel build id fix
> 
> Namhyung Kim (3):
>       perf report: Show error message when processing sample fails
>       perf hists: Do not skip elided fields when processing samples
>       perf hists browser: Update nr entries regardless of min percent
> 
> Wang Nan (3):
>       tools lib bpf: Collect map definition in bpf_object
>       tools lib bpf: Extract and collect map names from BPF object file
>       perf bpf: Rename bpf config to program config
> 
>  tools/lib/bpf/libbpf.c          | 252 ++++++++++++++++++++++++++++++----------
>  tools/lib/bpf/libbpf.h          |  24 ++++
>  tools/perf/builtin-report.c     |  12 +-
>  tools/perf/tests/dwarf-unwind.c |   5 +
>  tools/perf/ui/browsers/hists.c  |   5 +-
>  tools/perf/util/bpf-loader.c    |  65 +++++------
>  tools/perf/util/bpf-loader.h    |   2 +-
>  tools/perf/util/build-id.c      |   2 +-
>  tools/perf/util/hist.c          |   6 -
>  tools/perf/util/parse-events.c  |   6 +-
>  10 files changed, 268 insertions(+), 111 deletions(-)

Pulled, thanks a lot Arnaldo!

Should any of the above fixes be cherry-picked over into perf/urgent, or are these 
all new regressions?

Thanks,

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2015-11-28  1:22 Arnaldo Carvalho de Melo
  2015-11-28  9:50 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-11-28  1:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, David Ahern, He Kuang, Jiri Olsa,
	Masami Hiramatsu, Michael Petlan, Namhyung Kim, Peter Zijlstra,
	pi3orama, Wang Nan, Zefan Li

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

Hi Ingo,

	Please consider applying,

- Arnaldo

The following changes since commit 3f3b1a46bfdbce97dd3f9594d8a95db82baa554b:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-11-27 08:28:44 +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 0bb93490170477224f8bd4cc9ce8920517461643:

  perf bpf: Rename bpf config to program config (2015-11-27 22:00:46 -0300)

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

User visible:

- Fix 'perf list' segfault due to lack of support for PERF_CONF_SW_BPF_OUTPUT
  in an array used just for printing available events, robustify the code
  involved (Arnaldo Carvalho de Melo)

- 'perf test unwind' should create kernel maps, now that entry works and the
  test passes (Jiri Olsa)

- Fix showing the running kernel build id in 'perf buildid-list' (Michael Petlan)

- Fix command line symbol filtering in 'perf report' (Namhyung Kim)

Infrastructure:

- Extract and collect map info from BPF object files in libbpf (Wang Nan)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf list: Add support for PERF_COUNT_SW_BPF_OUT
      perf list: Robustify event printing routine

Jiri Olsa (1):
      perf test: 'unwind' test should create kernel maps

Michael Petlan (1):
      perf buildid-list: Show running kernel build id fix

Namhyung Kim (3):
      perf report: Show error message when processing sample fails
      perf hists: Do not skip elided fields when processing samples
      perf hists browser: Update nr entries regardless of min percent

Wang Nan (3):
      tools lib bpf: Collect map definition in bpf_object
      tools lib bpf: Extract and collect map names from BPF object file
      perf bpf: Rename bpf config to program config

 tools/lib/bpf/libbpf.c          | 252 ++++++++++++++++++++++++++++++----------
 tools/lib/bpf/libbpf.h          |  24 ++++
 tools/perf/builtin-report.c     |  12 +-
 tools/perf/tests/dwarf-unwind.c |   5 +
 tools/perf/ui/browsers/hists.c  |   5 +-
 tools/perf/util/bpf-loader.c    |  65 +++++------
 tools/perf/util/bpf-loader.h    |   2 +-
 tools/perf/util/build-id.c      |   2 +-
 tools/perf/util/hist.c          |   6 -
 tools/perf/util/parse-events.c  |   6 +-
 10 files changed, 268 insertions(+), 111 deletions(-)

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2015-08-28 18:06 Arnaldo Carvalho de Melo
@ 2015-08-31  8:28 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2015-08-31  8:28 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo, Carvalho, de, Adrian Hunter, Andi Kleen,
	Andy Lutomirski, Borislav Petkov, David Ahern,
	Frederic Weisbecker, Hemant Kumar, Jiri Olsa, Kan Liang,
	Mark Drayton, Mark Rutland, Masami Hiramatsu, Matt Fleming,
	Mel Gorman, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Raphael Beamonte, Stephane Eranian, Steven Rostedt, Tony Jones,
	Vlastimil Babka, Yannick Brosseau, Arnaldo Carvalho de Melo


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

> From: Arnaldo Carvalho de Melo <acme@kernel.org
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit d1ee8bc195ffedbf91af0245a2406d6ebd2578f8:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-28 08:22:02 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to 2c07144dfce366e21465cc7b0ada9f0b6dc7b7ed:
> 
>   perf evlist: Add backpointer for perf_env to evlist (2015-08-28 14:54:14 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvement and fixes:
> 
> User visible:
> 
> - Add new compaction-times python script (Tony Jones)
> 
> - Make the --[no-]-demangle/--[no-]-demangle-kernel command line
>   options available in 'perf script' too (Mark Drayton)
> 
> - Allow for negative numbers in libtraceevent's print format,
>   fixing up misformatting in some tracepoints (Steven Rostedt)
> 
> Infrastructure:
> 
> - perf_env/perf_evlist changes to allow accessing the data
>   structure with the environment where some perf data was
>   collected in functions not necessarily related to perf.data
>   file processing (Kan Liang)
> 
> - Cleanups for the tracepoint definition location paths routines (Jiri Olsa)
> 
> - Introduce sysfs/filename__sprintf_build_id, removing code
>   duplication (Masami Hiramatsu)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf trace: Add header with copyright and background info
>       perf evsel: Add a backpointer to the evlist a evsel is in
> 
> Jiri Olsa (2):
>       perf tools: Add tracing_path and remove unneeded functions
>       perf tools: Do not change lib/api/fs/debugfs directly
> 
> Kan Liang (2):
>       perf tools: Rename perf_session_env to perf_env
>       perf evlist: Add backpointer for perf_env to evlist
> 
> Mark Drayton (1):
>       perf script: Add --[no-]-demangle/--[no-]-demangle-kernel
> 
> Masami Hiramatsu (1):
>       perf buildid: Introduce sysfs/filename__sprintf_build_id
> 
> Steven Rostedt (1):
>       tools lib traceeveent: Allow for negative numbers in print format
> 
> Tony Jones (1):
>       perf scripts python: Add new compaction-times script
> 
>  tools/lib/traceevent/event-parse.c                 |   1 +
>  tools/perf/Documentation/perf-script.txt           |   7 +
>  tools/perf/arch/common.c                           |   4 +-
>  tools/perf/arch/common.h                           |   2 +-
>  tools/perf/builtin-buildid-cache.c                 |  14 +-
>  tools/perf/builtin-buildid-list.c                  |  24 +-
>  tools/perf/builtin-script.c                        |   5 +
>  tools/perf/builtin-trace.c                         |  19 ++
>  tools/perf/perf.c                                  |   2 +-
>  .../scripts/python/bin/compaction-times-record     |   2 +
>  .../scripts/python/bin/compaction-times-report     |   4 +
>  tools/perf/scripts/python/compaction-times.py      | 311 +++++++++++++++++++++
>  tools/perf/ui/browser.h                            |   4 +-
>  tools/perf/ui/browsers/header.c                    |   2 +-
>  tools/perf/ui/browsers/hists.c                     |  12 +-
>  tools/perf/util/build-id.c                         |  32 +++
>  tools/perf/util/build-id.h                         |   3 +
>  tools/perf/util/evlist.c                           |   2 +
>  tools/perf/util/evlist.h                           |   1 +
>  tools/perf/util/evsel.c                            |   2 +
>  tools/perf/util/evsel.h                            |   4 +
>  tools/perf/util/header.c                           |   1 +
>  tools/perf/util/header.h                           |   4 +-
>  tools/perf/util/hist.h                             |   4 +-
>  tools/perf/util/session.c                          |   2 +-
>  tools/perf/util/symbol.c                           |   4 +-
>  tools/perf/util/symbol.h                           |   4 +-
>  tools/perf/util/util.c                             |  57 +---
>  tools/perf/util/util.h                             |   2 +-
>  29 files changed, 433 insertions(+), 102 deletions(-)
>  create mode 100644 tools/perf/scripts/python/bin/compaction-times-record
>  create mode 100644 tools/perf/scripts/python/bin/compaction-times-report
>  create mode 100644 tools/perf/scripts/python/compaction-times.py

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2015-08-28 18:06 Arnaldo Carvalho de Melo
  2015-08-31  8:28 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-08-28 18:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo, Carvalho, de, Melo <acme,
	Adrian Hunter, Andi Kleen, Andy Lutomirski, Borislav Petkov,
	David Ahern, Frederic Weisbecker, Hemant Kumar, Jiri Olsa,
	Kan Liang, Mark Drayton, Mark Rutland, Masami Hiramatsu,
	Matt Fleming, Mel Gorman, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Raphael Beamonte, Stephane Eranian,
	Steven Rostedt, Tony Jones, Vlastimil Babka, Yannick Brosseau,
	Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <acme@kernel.org

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit d1ee8bc195ffedbf91af0245a2406d6ebd2578f8:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-28 08:22:02 +0200)

are available in the git repository at:

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

for you to fetch changes up to 2c07144dfce366e21465cc7b0ada9f0b6dc7b7ed:

  perf evlist: Add backpointer for perf_env to evlist (2015-08-28 14:54:14 -0300)

----------------------------------------------------------------
perf/core improvement and fixes:

User visible:

- Add new compaction-times python script (Tony Jones)

- Make the --[no-]-demangle/--[no-]-demangle-kernel command line
  options available in 'perf script' too (Mark Drayton)

- Allow for negative numbers in libtraceevent's print format,
  fixing up misformatting in some tracepoints (Steven Rostedt)

Infrastructure:

- perf_env/perf_evlist changes to allow accessing the data
  structure with the environment where some perf data was
  collected in functions not necessarily related to perf.data
  file processing (Kan Liang)

- Cleanups for the tracepoint definition location paths routines (Jiri Olsa)

- Introduce sysfs/filename__sprintf_build_id, removing code
  duplication (Masami Hiramatsu)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf trace: Add header with copyright and background info
      perf evsel: Add a backpointer to the evlist a evsel is in

Jiri Olsa (2):
      perf tools: Add tracing_path and remove unneeded functions
      perf tools: Do not change lib/api/fs/debugfs directly

Kan Liang (2):
      perf tools: Rename perf_session_env to perf_env
      perf evlist: Add backpointer for perf_env to evlist

Mark Drayton (1):
      perf script: Add --[no-]-demangle/--[no-]-demangle-kernel

Masami Hiramatsu (1):
      perf buildid: Introduce sysfs/filename__sprintf_build_id

Steven Rostedt (1):
      tools lib traceeveent: Allow for negative numbers in print format

Tony Jones (1):
      perf scripts python: Add new compaction-times script

 tools/lib/traceevent/event-parse.c                 |   1 +
 tools/perf/Documentation/perf-script.txt           |   7 +
 tools/perf/arch/common.c                           |   4 +-
 tools/perf/arch/common.h                           |   2 +-
 tools/perf/builtin-buildid-cache.c                 |  14 +-
 tools/perf/builtin-buildid-list.c                  |  24 +-
 tools/perf/builtin-script.c                        |   5 +
 tools/perf/builtin-trace.c                         |  19 ++
 tools/perf/perf.c                                  |   2 +-
 .../scripts/python/bin/compaction-times-record     |   2 +
 .../scripts/python/bin/compaction-times-report     |   4 +
 tools/perf/scripts/python/compaction-times.py      | 311 +++++++++++++++++++++
 tools/perf/ui/browser.h                            |   4 +-
 tools/perf/ui/browsers/header.c                    |   2 +-
 tools/perf/ui/browsers/hists.c                     |  12 +-
 tools/perf/util/build-id.c                         |  32 +++
 tools/perf/util/build-id.h                         |   3 +
 tools/perf/util/evlist.c                           |   2 +
 tools/perf/util/evlist.h                           |   1 +
 tools/perf/util/evsel.c                            |   2 +
 tools/perf/util/evsel.h                            |   4 +
 tools/perf/util/header.c                           |   1 +
 tools/perf/util/header.h                           |   4 +-
 tools/perf/util/hist.h                             |   4 +-
 tools/perf/util/session.c                          |   2 +-
 tools/perf/util/symbol.c                           |   4 +-
 tools/perf/util/symbol.h                           |   4 +-
 tools/perf/util/util.c                             |  57 +---
 tools/perf/util/util.h                             |   2 +-
 29 files changed, 433 insertions(+), 102 deletions(-)
 create mode 100644 tools/perf/scripts/python/bin/compaction-times-record
 create mode 100644 tools/perf/scripts/python/bin/compaction-times-report
 create mode 100644 tools/perf/scripts/python/compaction-times.py

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2015-07-31  8:04 ` Ingo Molnar
@ 2015-07-31 13:30   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-07-31 13:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
	David Ahern, Frederic Weisbecker, Jaroslav Skarvada, Jeremy Eder,
	Jiri Olsa, Kan Liang, Luiz Fernando Capitulino, Namhyung Kim,
	Pawel Moll, Peter Zijlstra, Stephane Eranian

Em Fri, Jul 31, 2015 at 10:04:35AM +0200, Ingo Molnar escreveu:
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > 	Please consider pulling,

> > for you to fetch changes up to aa53c09e90a19c215549bd1ca970fddcb7c0c001:
> 
> Hm, your pull request mail was cut short as it ends here abruptly. I figured it 
> out nevertheless, from the commit log:

Right, I forgot the 'git request-pull' part after pushing the signed tag
:-\

Thanks!

- Arnaldo
 
> ====================>
> 
> User visible changes:
> 
>   - Force period term to overload global settings, i.e. previously this
>     command line:
> 
>      $ perf record -e 'cpu/instructions,period=20000/',cycles -c 1000 sleep 1
> 
>     would result in both events having a period equal to 1000, with the fix we
>     get something saner:
> 
>      $ perf evlist -v | grep period
>      cpu/instructions,period=20000/: ... { sample_period, sample_freq }: 20000, ...
>      cycles: ... { sample_period, sample_freq }: 1000 ...
>      $
> 
>    (Jiri Olsa)
> 
> Infrastructure changes:
> 
>   - Use the dummy software event with freq=0 in the twatch.py python
>     binding example, to avoid disabling nohz. (Arnaldo Carvalho de Melo)
> 
>   - Add some missing constants to the python binding. (Arnaldo Carvalho de Melo)
> 
>   - Fix mismatched declarations for elf_getphdrnum, that happens
>     only in the corner case where this function is not found on
>     the system.  (Arnaldo Carvalho de Melo)
> 
>   - Add build test for having ending double slash. (Jiri Olsa)
> 
>   - Introduce callgraph_set for callgraph option. (Kan Liang)
> 
>  tools/perf/Documentation/perf-record.txt |   2 +-
>  tools/perf/builtin-record.c              |   9 +-
>  tools/perf/builtin-trace.c               |   2 +-
>  tools/perf/perf.h                        |   1 +
>  tools/perf/python/twatch.py              |  12 ++-
>  tools/perf/tests/make                    |  13 ++-
>  tools/perf/tests/parse-events.c          |  12 ++-
>  tools/perf/util/evsel.c                  |  33 ++++++++
>  tools/perf/util/evsel.h                  |  20 +++++
>  tools/perf/util/parse-events.c           |  70 +++++++++++++---
>  tools/perf/util/python.c                 | 140 ++++++++++++++++---------------
>  tools/perf/util/session.c                |   4 +-
>  tools/perf/util/symbol-elf.c             |   2 +-
>  tools/perf/util/trace-event.c            |   7 +-
>  tools/perf/util/trace-event.h            |   3 +-
>  15 files changed, 233 insertions(+), 97 deletions(-)
> 
> <================
> 
> Pulled, thanks a lot Arnaldo!
> 
> 	Ingo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2015-07-30 16:16 Arnaldo Carvalho de Melo
@ 2015-07-31  8:04 ` Ingo Molnar
  2015-07-31 13:30   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 73+ messages in thread
From: Ingo Molnar @ 2015-07-31  8:04 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
	David Ahern, Frederic Weisbecker, Jaroslav Skarvada, Jeremy Eder,
	Jiri Olsa, Kan Liang, Luiz Fernando Capitulino, Namhyung Kim,
	Pawel Moll, Peter Zijlstra, Stephane Eranian


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 4b0c53e9e1a2a785746b2d379a32cb70b4dbb2fd:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-07-27 17:56:18 +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 aa53c09e90a19c215549bd1ca970fddcb7c0c001:

Hm, your pull request mail was cut short as it ends here abruptly. I figured it 
out nevertheless, from the commit log:

====================>

User visible changes:

  - Force period term to overload global settings, i.e. previously this
    command line:

     $ perf record -e 'cpu/instructions,period=20000/',cycles -c 1000 sleep 1

    would result in both events having a period equal to 1000, with the fix we
    get something saner:

     $ perf evlist -v | grep period
     cpu/instructions,period=20000/: ... { sample_period, sample_freq }: 20000, ...
     cycles: ... { sample_period, sample_freq }: 1000 ...
     $

   (Jiri Olsa)

Infrastructure changes:

  - Use the dummy software event with freq=0 in the twatch.py python
    binding example, to avoid disabling nohz. (Arnaldo Carvalho de Melo)

  - Add some missing constants to the python binding. (Arnaldo Carvalho de Melo)

  - Fix mismatched declarations for elf_getphdrnum, that happens
    only in the corner case where this function is not found on
    the system.  (Arnaldo Carvalho de Melo)

  - Add build test for having ending double slash. (Jiri Olsa)

  - Introduce callgraph_set for callgraph option. (Kan Liang)

 tools/perf/Documentation/perf-record.txt |   2 +-
 tools/perf/builtin-record.c              |   9 +-
 tools/perf/builtin-trace.c               |   2 +-
 tools/perf/perf.h                        |   1 +
 tools/perf/python/twatch.py              |  12 ++-
 tools/perf/tests/make                    |  13 ++-
 tools/perf/tests/parse-events.c          |  12 ++-
 tools/perf/util/evsel.c                  |  33 ++++++++
 tools/perf/util/evsel.h                  |  20 +++++
 tools/perf/util/parse-events.c           |  70 +++++++++++++---
 tools/perf/util/python.c                 | 140 ++++++++++++++++---------------
 tools/perf/util/session.c                |   4 +-
 tools/perf/util/symbol-elf.c             |   2 +-
 tools/perf/util/trace-event.c            |   7 +-
 tools/perf/util/trace-event.h            |   3 +-
 15 files changed, 233 insertions(+), 97 deletions(-)

<================

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2015-07-30 16:16 Arnaldo Carvalho de Melo
  2015-07-31  8:04 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-07-30 16:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Frederic Weisbecker,
	Jaroslav Skarvada, Jeremy Eder, Jiri Olsa, Kan Liang,
	Luiz Fernando Capitulino, Namhyung Kim, Pawel Moll,
	Peter Zijlstra, Stephane Eranian

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 4b0c53e9e1a2a785746b2d379a32cb70b4dbb2fd:

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


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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2015-06-16 18:21 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-06-16 18:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Don Zickus,
	Frederic Weisbecker, He Kuang, Hou Pengyang, Jiri Olsa,
	Jiri Olsa, Masami Hiramatsu, Namhyung Kim, Naohiro Aota,
	Peter Zijlstra, Stephane Eranian, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 61d67d568445413137995e1bea2746783e3a81e9:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-06-12 10:08:38 +0200)

are available in the git repository at:

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

for you to fetch changes up to b031220d520238075bd99513a420e65cf37866ad:

  perf probe: Fix to return error if no probe is added (2015-06-16 11:39:51 -0300)

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

User visible:

- List perf probes to stdout (Masami Hiramatsu)

- Return error when none of the requested probes were
  installed (Masami Hiramatsu)

- Cut off the gcc optimization postfixes from
  function name in 'perf probe' (Masami Hiramatsu)

Infrastructure:

- Replace map->referenced & maps->removed_maps with
  map->refcnt (Arnaldo Carvalho de Melo)

- Introduce xyarray__reset function (Jiri Olsa)

- Add thread_map__(alloc|realloc) helpers (Jiri Olsa)

- Move perf_evsel__(alloc|free|reset)_counts into stat object (Jiri Olsa)

- Introduce perf_counts__(new|delete|reset) functions (Jiri Olsa)

Build Fixes:

- Fix a libunwind related compile error (Hou Pengyang)

- Fix python/perf.so compiling error related to libtraceevent (Wang Nan)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (1):
      perf tools: Replace map->referenced & maps->removed_maps with map->refcnt

Hou Pengyang (1):
      perf unwind: Fix a compile error

Jiri Olsa (4):
      perf tools: Introduce xyarray__reset function
      perf tools: Add thread_map__(alloc|realloc) helpers
      perf tools: Move perf_evsel__(alloc|free|reset)_counts into stat object
      perf stat: Introduce perf_counts__(new|delete|reset) functions

Masami Hiramatsu (3):
      perf probe: Cut off the gcc optimization postfixes from function name
      perf probe: List probes in stdout
      perf probe: Fix to return error if no probe is added

Wang Nan (1):
      tools lib traceevent: Fix python/perf.so compiling error

 tools/perf/Makefile.perf                   |   2 +-
 tools/perf/builtin-stat.c                  |  19 ++--
 tools/perf/tests/openat-syscall-all-cpus.c |   1 +
 tools/perf/util/evsel.c                    |  19 +---
 tools/perf/util/evsel.h                    |   3 -
 tools/perf/util/hist.c                     |  37 ++++---
 tools/perf/util/map.c                      |  58 +---------
 tools/perf/util/map.h                      |  10 +-
 tools/perf/util/probe-event.c              | 167 +++++++++++++++++++----------
 tools/perf/util/python-ext-sources         |   1 +
 tools/perf/util/stat.c                     |  36 +++++++
 tools/perf/util/stat.h                     |   6 ++
 tools/perf/util/thread_map.c               |  24 +++--
 tools/perf/util/unwind-libunwind.c         |   2 +-
 tools/perf/util/xyarray.c                  |   8 ++
 tools/perf/util/xyarray.h                  |   2 +
 16 files changed, 223 insertions(+), 172 deletions(-)

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2015-01-29 20:23 Arnaldo Carvalho de Melo
@ 2015-01-30 18:28 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2015-01-30 18:28 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexey Brodkin, Andi Kleen,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Milian Wolff,
	Namhyung Kim, Peter Zijlstra, Stephane Eranian, Vineet Gupta,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling, there is some more stuff in queue to be
> processed, but better send in smaller batches,
> 
> - Arnaldo
> 
> The following changes since commit b3890e4704594fa23abe1395d1fafc97d3214be8:
> 
>   Merge branch 'perf/hw_breakpoints' into perf/core (2015-01-28 15:48: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
> 
> for you to fetch changes up to c52686f9f888d23ca72f1309e86af8e91d075697:
> 
>   perf symbols: Convert lseek + read to pread (2015-01-29 17:02:01 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Show precise number of samples in at the end of a 'record' session, if
>   processing build ids, since we will then traverse the whole perf.data file
>   and see all the PERF_RECORD_SAMPLE records, otherwise stop showing the
>   previous off-base heuristicly counted number of "samples"  (Namhyung Kim).
> 
> - Support to read compressed module from build-id cache (Namhyung Kim)
> 
> Infrastructure:
> 
> - Cache eh/debug frame offset for dwarf unwind (Namhyung Kim)
> 
> - Set header version correctly in all cases (Namhyung Kim)
> 
> - Set attr.task bit for a tracking event, to be consistent (Namhyung Kim)
>   perf tools: Use perf_data_file__fd() consistently
>   perf symbols: Convert lseek + read to pread
> 
> - Don't rely on malloc working for sz 0, fixing another problem when
>   using uClibc (Vineet Gupta)
> 
> - Provide stub for missing pthread_attr_setaffinity_np for libcs where this
>   is not available, such as uClibc (Vineet Gupta)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Namhyung Kim (8):
>       perf callchain: Cache eh/debug frame offset for dwarf unwind
>       perf tools: Do not use __perf_session__process_events() directly
>       perf record: Show precise number of samples
>       perf header: Set header version correctly
>       perf evsel: Set attr.task bit for a tracking event
>       perf symbols: Support to read compressed module from build-id cache
>       perf tools: Use perf_data_file__fd() consistently
>       perf symbols: Convert lseek + read to pread
> 
> Vineet Gupta (2):
>       perf evsel: Don't rely on malloc working for sz 0
>       perf tools: Provide stub for missing pthread_attr_setaffinity_np
> 
>  tools/perf/bench/futex.h                           | 13 ++++
>  tools/perf/builtin-inject.c                        |  5 +-
>  tools/perf/builtin-record.c                        | 70 +++++++++++++++-------
>  tools/perf/config/Makefile                         |  6 ++
>  tools/perf/config/feature-checks/Makefile          |  4 ++
>  tools/perf/config/feature-checks/test-all.c        |  5 ++
>  .../test-pthread-attr-setaffinity-np.c             | 14 +++++
>  tools/perf/util/dso.c                              |  6 +-
>  tools/perf/util/dso.h                              |  1 +
>  tools/perf/util/evsel.c                            |  4 ++
>  tools/perf/util/header.c                           |  2 +-
>  tools/perf/util/session.c                          |  6 +-
>  tools/perf/util/session.h                          |  3 -
>  tools/perf/util/symbol-elf.c                       | 13 ++--
>  tools/perf/util/unwind-libunwind.c                 | 31 ++++++----
>  15 files changed, 131 insertions(+), 52 deletions(-)
>  create mode 100644 tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c

Pulled into tip:perf/core, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2015-01-29 20:23 Arnaldo Carvalho de Melo
  2015-01-30 18:28 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-29 20:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexey Brodkin, Andi Kleen, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Milian Wolff, Namhyung Kim, Peter Zijlstra,
	Stephane Eranian, Vineet Gupta, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, there is some more stuff in queue to be
processed, but better send in smaller batches,

- Arnaldo

The following changes since commit b3890e4704594fa23abe1395d1fafc97d3214be8:

  Merge branch 'perf/hw_breakpoints' into perf/core (2015-01-28 15:48: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

for you to fetch changes up to c52686f9f888d23ca72f1309e86af8e91d075697:

  perf symbols: Convert lseek + read to pread (2015-01-29 17:02:01 -0300)

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

User visible:

- Show precise number of samples in at the end of a 'record' session, if
  processing build ids, since we will then traverse the whole perf.data file
  and see all the PERF_RECORD_SAMPLE records, otherwise stop showing the
  previous off-base heuristicly counted number of "samples"  (Namhyung Kim).

- Support to read compressed module from build-id cache (Namhyung Kim)

Infrastructure:

- Cache eh/debug frame offset for dwarf unwind (Namhyung Kim)

- Set header version correctly in all cases (Namhyung Kim)

- Set attr.task bit for a tracking event, to be consistent (Namhyung Kim)
  perf tools: Use perf_data_file__fd() consistently
  perf symbols: Convert lseek + read to pread

- Don't rely on malloc working for sz 0, fixing another problem when
  using uClibc (Vineet Gupta)

- Provide stub for missing pthread_attr_setaffinity_np for libcs where this
  is not available, such as uClibc (Vineet Gupta)

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

----------------------------------------------------------------
Namhyung Kim (8):
      perf callchain: Cache eh/debug frame offset for dwarf unwind
      perf tools: Do not use __perf_session__process_events() directly
      perf record: Show precise number of samples
      perf header: Set header version correctly
      perf evsel: Set attr.task bit for a tracking event
      perf symbols: Support to read compressed module from build-id cache
      perf tools: Use perf_data_file__fd() consistently
      perf symbols: Convert lseek + read to pread

Vineet Gupta (2):
      perf evsel: Don't rely on malloc working for sz 0
      perf tools: Provide stub for missing pthread_attr_setaffinity_np

 tools/perf/bench/futex.h                           | 13 ++++
 tools/perf/builtin-inject.c                        |  5 +-
 tools/perf/builtin-record.c                        | 70 +++++++++++++++-------
 tools/perf/config/Makefile                         |  6 ++
 tools/perf/config/feature-checks/Makefile          |  4 ++
 tools/perf/config/feature-checks/test-all.c        |  5 ++
 .../test-pthread-attr-setaffinity-np.c             | 14 +++++
 tools/perf/util/dso.c                              |  6 +-
 tools/perf/util/dso.h                              |  1 +
 tools/perf/util/evsel.c                            |  4 ++
 tools/perf/util/header.c                           |  2 +-
 tools/perf/util/session.c                          |  6 +-
 tools/perf/util/session.h                          |  3 -
 tools/perf/util/symbol-elf.c                       | 13 ++--
 tools/perf/util/unwind-libunwind.c                 | 31 ++++++----
 15 files changed, 131 insertions(+), 52 deletions(-)
 create mode 100644 tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2014-12-22 15:29 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-12-22 15:29 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Don Zickus,
	Frederic Weisbecker, Jiri Olsa, Joe Mario, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Ramkumar Ramachandra, Richard Fowles, Rickard Strandqvist,
	Stephane Eranian

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit ac931f87a647ca156f65a4c00e7297165e4fa2d8:

  perf: Fix building warning on ARM 32 (2014-12-19 13:09:43 +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 e51679f54467febc6e9f1091c0ac8c31b54d59a1:

  perf tools: Remove some unused functions from color.c (2014-12-22 11:55:09 -0300)

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

User visible:

- Enable sampling loads and stores simultaneously by default
  in 'perf mem' (Stephane Eranian)

- Show progress bar in more places while doing histogram processing
  in the hists browser (Namhyung Kim)

- Print backtrace symbols when segfault occurs in 'report' (Namhyung Kim)

Infrastructure:

- Consistency and code duplication elimination fixes in the
  hists code (Arnaldo Carvalho de Melo)

- Append callchains only when requested (Namhyung Kim)

- Remove some unused functions from color.c (Rickard Strandqvist)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf mem: Move the mem_operations global to struct perf_mem
      perf tools: Remove EOL whitespaces
      perf hists: Rename hist_entry__free to __delete
      perf hists: Introduce function for deleting/removing hist_entry

Namhyung Kim (4):
      perf report: Get rid of report__inc_stat()
      perf report: Show progress bar for output resorting
      perf ui/tui: Print backtrace symbols when segfault occurs
      perf callchain: Append callchains only when requested

Rickard Strandqvist (1):
      perf tools: Remove some unused functions from color.c

Stephane Eranian (1):
      perf mem: Enable sampling loads and stores simultaneously

 tools/perf/Documentation/perf-buildid-cache.txt    |   2 +-
 tools/perf/Documentation/perf-mem.txt              |   9 +-
 tools/perf/Documentation/perf-script.txt           |  28 ++---
 tools/perf/builtin-annotate.c                      |   2 +-
 tools/perf/builtin-buildid-cache.c                 |   4 +-
 tools/perf/builtin-diff.c                          |   4 +-
 tools/perf/builtin-mem.c                           | 131 ++++++++++++++++-----
 tools/perf/builtin-report.c                        |  40 ++++---
 tools/perf/builtin-stat.c                          |   2 +-
 tools/perf/builtin-top.c                           |   6 +-
 tools/perf/builtin-trace.c                         |  80 ++++++-------
 tools/perf/tests/attr.py                           |   1 -
 tools/perf/tests/hists_cumulate.c                  |   4 +-
 tools/perf/tests/hists_filter.c                    |   2 +-
 tools/perf/tests/hists_output.c                    |  12 +-
 tools/perf/tests/make                              |   1 -
 tools/perf/tests/parse-events.c                    |   2 +-
 tools/perf/ui/browsers/annotate.c                  |   3 +-
 tools/perf/ui/progress.h                           |   4 +-
 tools/perf/ui/tui/setup.c                          |  26 +++-
 tools/perf/util/annotate.c                         |   2 +-
 tools/perf/util/color.c                            | 126 --------------------
 tools/perf/util/color.h                            |   2 -
 tools/perf/util/hist.c                             |  59 ++++++----
 tools/perf/util/hist.h                             |   4 +-
 tools/perf/util/parse-events.c                     |   6 +-
 tools/perf/util/python.c                           |   2 +-
 .../util/scripting-engines/trace-event-python.c    |   2 +-
 tools/perf/util/session.c                          |   2 +-
 tools/perf/util/symbol.c                           |   2 +-
 30 files changed, 278 insertions(+), 292 deletions(-)

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2014-09-26 20:19 Arnaldo Carvalho de Melo
@ 2014-09-27  7:20 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2014-09-27  7:20 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Corey Ashford,
	David Ahern, Jiri Olsa, Milian Wolff, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Peter Zijlstra, Pranith Kumar,
	Stephane Eranian, Taeung Song, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling.
> 
> - Arnaldo
> 
> The following changes since commit cf8102f64c8d23f0bd4af0659bbd94d0c1d8d1c7:
> 
>   Merge tag 'perf-fdarray-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-09-26 11:12:46 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to 49757c9cc7887bc79f742eb8aacf16e464ca5f0b:
> 
>   perf tools: Fix line number in the config file error message (2014-09-26 12:45:23 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> o Restore "--callchain graph" output, broken in recent cset to end
>   up being the same as "fractal" (Namhyung Kim)
> 
> o Allow profiling when kptr_restrict == 1 for non root users,
>   kernel samples will just remain unresolved (Andi Kleen)
> 
> o Allow configuring default options for callchains in config file (Namhyung Kim)
> 
> o Fix line number in the config file error message (Jiri Olsa)
> 
> o Fix --per-core on multi socket systems (Andi Kleen)
> 
> Cleanups:
> 
> o Use ACCESS_ONCE() instead of volatile cast. (Pranith Kumar)
> 
> o Modify error code for when perf_session__new() fails (Taeung Song)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (2):
>       perf stat: Fix --per-core on multi socket systems
>       perf tools: Fix perf record as non root with kptr_restrict == 1
> 
> Jiri Olsa (1):
>       perf tools: Fix line number in the config file error message
> 
> Namhyung Kim (5):
>       perf hists browser: Fix callchain print bug on TUI
>       perf tools: Move callchain config from record_opts to callchain_param
>       perf callchain: Move some parser functions to callchain.c
>       perf tools: Introduce perf_callchain_config()
>       perf tools: Convert {record,top}.call-graph option to call-graph.record-mode
> 
> Pranith Kumar (1):
>       perf tools: Use ACCESS_ONCE() instead of volatile cast
> 
> Taeung Song (1):
>       perf tools: Modify error code for when perf_session__new() fails
> 
>  tools/perf/builtin-annotate.c  |   2 +-
>  tools/perf/builtin-diff.c      |   2 +-
>  tools/perf/builtin-evlist.c    |   2 +-
>  tools/perf/builtin-inject.c    |   2 +-
>  tools/perf/builtin-kmem.c      |   2 +-
>  tools/perf/builtin-kvm.c       |   4 +-
>  tools/perf/builtin-lock.c      |   2 +-
>  tools/perf/builtin-mem.c       |   2 +-
>  tools/perf/builtin-record.c    | 119 ++++---------------------
>  tools/perf/builtin-report.c    |   2 +-
>  tools/perf/builtin-script.c    |   2 +-
>  tools/perf/builtin-stat.c      |   9 +-
>  tools/perf/builtin-timechart.c |   2 +-
>  tools/perf/builtin-top.c       |   6 +-
>  tools/perf/builtin-trace.c     |   2 +-
>  tools/perf/perf.h              |   3 -
>  tools/perf/ui/browsers/hists.c |   3 -
>  tools/perf/util/callchain.c    | 193 +++++++++++++++++++++++++++++++++++++----
>  tools/perf/util/callchain.h    |   6 +-
>  tools/perf/util/config.c       |  16 +++-
>  tools/perf/util/event.c        |   8 +-
>  tools/perf/util/evsel.c        |  11 ++-
>  tools/perf/util/session.c      |   2 +-
>  tools/perf/util/session.h      |   2 +-
>  24 files changed, 241 insertions(+), 163 deletions(-)

Pulled into tip:perf/core, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2014-09-26 20:19 Arnaldo Carvalho de Melo
  2014-09-27  7:20 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-09-26 20:19 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Corey Ashford, David Ahern, Jiri Olsa, Milian Wolff,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Peter Zijlstra,
	Pranith Kumar, Stephane Eranian, Taeung Song,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling.

- Arnaldo

The following changes since commit cf8102f64c8d23f0bd4af0659bbd94d0c1d8d1c7:

  Merge tag 'perf-fdarray-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-09-26 11:12:46 +0200)

are available in the git repository at:


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

for you to fetch changes up to 49757c9cc7887bc79f742eb8aacf16e464ca5f0b:

  perf tools: Fix line number in the config file error message (2014-09-26 12:45:23 -0300)

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

User visible:

o Restore "--callchain graph" output, broken in recent cset to end
  up being the same as "fractal" (Namhyung Kim)

o Allow profiling when kptr_restrict == 1 for non root users,
  kernel samples will just remain unresolved (Andi Kleen)

o Allow configuring default options for callchains in config file (Namhyung Kim)

o Fix line number in the config file error message (Jiri Olsa)

o Fix --per-core on multi socket systems (Andi Kleen)

Cleanups:

o Use ACCESS_ONCE() instead of volatile cast. (Pranith Kumar)

o Modify error code for when perf_session__new() fails (Taeung Song)

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

----------------------------------------------------------------
Andi Kleen (2):
      perf stat: Fix --per-core on multi socket systems
      perf tools: Fix perf record as non root with kptr_restrict == 1

Jiri Olsa (1):
      perf tools: Fix line number in the config file error message

Namhyung Kim (5):
      perf hists browser: Fix callchain print bug on TUI
      perf tools: Move callchain config from record_opts to callchain_param
      perf callchain: Move some parser functions to callchain.c
      perf tools: Introduce perf_callchain_config()
      perf tools: Convert {record,top}.call-graph option to call-graph.record-mode

Pranith Kumar (1):
      perf tools: Use ACCESS_ONCE() instead of volatile cast

Taeung Song (1):
      perf tools: Modify error code for when perf_session__new() fails

 tools/perf/builtin-annotate.c  |   2 +-
 tools/perf/builtin-diff.c      |   2 +-
 tools/perf/builtin-evlist.c    |   2 +-
 tools/perf/builtin-inject.c    |   2 +-
 tools/perf/builtin-kmem.c      |   2 +-
 tools/perf/builtin-kvm.c       |   4 +-
 tools/perf/builtin-lock.c      |   2 +-
 tools/perf/builtin-mem.c       |   2 +-
 tools/perf/builtin-record.c    | 119 ++++---------------------
 tools/perf/builtin-report.c    |   2 +-
 tools/perf/builtin-script.c    |   2 +-
 tools/perf/builtin-stat.c      |   9 +-
 tools/perf/builtin-timechart.c |   2 +-
 tools/perf/builtin-top.c       |   6 +-
 tools/perf/builtin-trace.c     |   2 +-
 tools/perf/perf.h              |   3 -
 tools/perf/ui/browsers/hists.c |   3 -
 tools/perf/util/callchain.c    | 193 +++++++++++++++++++++++++++++++++++++----
 tools/perf/util/callchain.h    |   6 +-
 tools/perf/util/config.c       |  16 +++-
 tools/perf/util/event.c        |   8 +-
 tools/perf/util/evsel.c        |  11 ++-
 tools/perf/util/session.c      |   2 +-
 tools/perf/util/session.h      |   2 +-
 24 files changed, 241 insertions(+), 163 deletions(-)

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
       [not found]   ` <CAM9d7ciP4tLUmR-soEKH3nf6=XC5evKGfuQW1fUGA8Z42U3xCg@mail.gmail.com>
@ 2014-04-09  5:31     ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2014-04-09  5:31 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Andi Kleen, Jiri Olsa, Peter Zijlstra, Stephane Eranian,
	Don Zickus, linux-kernel, Thomas Gleixner


* Namhyung Kim <namhyung@kernel.org> wrote:

> Hi Andi,
> 
> On Wed, Apr 9, 2014 at 4:50 AM, Andi Kleen <andi@firstfloor.org> wrote:
> > Jiri Olsa <jolsa@redhat.com> writes:
> >
> >> hi Ingo,
> >> please consider pulling
> >
> > So who actually maintains perf user space now?
> >
> > I have at least 4 perf user patchkits/bug fixes pending, but 
> > Arnaldo hasn't answered any email for weeks.

So a bit of background: sloppy, abusive contributors not willing to 
change get ignored after some time. For example Andi got such a bad 
track record in the x86 and perf space with me that all your mails go 
to /dev/null currently. (I only saw this one because Namhyung replied 
to it.)

Andi, as I explained it to you previously, if you want me to merge 
patches from you then you need to 1) improve the way you work 2) send 
it to someone who is willing to deal with you and sign off on it and 
forward it to me.

Seems like you managed to burn up your goodwill with Arnaldo as well. 
You need to find someone else willing to pay the expense of dealing 
with your passive-aggressive style.

Just a quick example of your abuse: for example you know it perfectly 
well that perf is well maintained, a simple 'git log tools/perf/' will 
tell you that there's a steady stream of patches going in and that 
perf contributors are busy.

Yet in this mail you actually lie about that: you pretend that you 
don't know that most Linux maintainers have trouble working with you, 
you pretend that perf is "unmaintained", you pretend that you don't 
know who is maintaining it, just to create unfair pressure on Arnaldo 
...

That kind of approach really sucks, and if you run out of people's 
patience with petty office tactics like that then you should not fault 
them, you should fault yourself.

Thanks,

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2014-04-08 18:00 Jiri Olsa
       [not found] ` <8738hnk3dg.fsf@tassilo.jf.intel.com>
  0 siblings, 1 reply; 73+ messages in thread
From: Jiri Olsa @ 2014-04-08 18:00 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Corey Ashford, David Ahern,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Ramkumar Ramachandra, Stephane Eranian, Steven Rostedt

hi Ingo,
please consider pulling

jirka

The following changes since commit 538592ff0b008237ae88f5ce5fb1247127dc3ce5:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-03-19 08:05:47 +0100)

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

  MAINTAINERS: Change e-mail to kernel.org one (2014-04-08 19:39:43 +0200)

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

Documentation:

. Fix documentation of invalid 'perf top -s' option (Namhyung Kim)

. Change e-mail to kernel.org one in MAINTAINERS file (Arnaldo Carvalho de Melo)

Developer stuff:

. Disable unwind libraries when libelf isn't found (Arnaldo Carvalho de Melo)

. Add thread maps lookup automated tests (Jiri Olsa)

. Print event name when showing libtraceevent warnings if possible (Namhyung Kim)

. Add --list-cmds to 'kmem', 'mem', 'lock' and 'sched', for use by completion scripts (Ramkumar Ramachandra)

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf callchains: Disable unwind libraries when libelf isn't found
      MAINTAINERS: Change e-mail to kernel.org one

Jiri Olsa (1):
      perf tests: Add thread maps lookup automated tests

Namhyung Kim (3):
      perf top: Fix documentation of invalid -s option
      tools lib traceevent: Print event name when show warning if possible
      tools lib traceevent: Do not call warning() directly

Ramkumar Ramachandra (4):
      perf kmem: Introduce --list-cmds for use by scripts
      perf mem: Introduce --list-cmds for use by scripts
      perf lock: Introduce --list-cmds for use by scripts
      perf sched: Introduce --list-cmds for use by scripts

 MAINTAINERS                           |   2 +-
 tools/lib/traceevent/event-parse.c    | 109 +++++++++-------
 tools/perf/Documentation/perf-top.txt |   1 -
 tools/perf/Makefile.perf              |   1 +
 tools/perf/builtin-kmem.c             |   8 +-
 tools/perf/builtin-lock.c             |  10 +-
 tools/perf/builtin-mem.c              |  15 ++-
 tools/perf/builtin-sched.c            |  10 +-
 tools/perf/config/Makefile            |   2 +
 tools/perf/perf-completion.sh         |   4 +-
 tools/perf/perf.h                     |   6 +
 tools/perf/tests/builtin-test.c       |   4 +
 tools/perf/tests/mmap-thread-lookup.c | 233 ++++++++++++++++++++++++++++++++++
 tools/perf/tests/tests.h              |   1 +
 14 files changed, 341 insertions(+), 65 deletions(-)
 create mode 100644 tools/perf/tests/mmap-thread-lookup.c

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2013-11-14 20:25 Arnaldo Carvalho de Melo
@ 2013-11-15  6:38 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2013-11-15  6:38 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Azat Khuzhin, Bill Gray, David Ahern, Davidlohr Bueso,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Joe Mario,
	Mike Galbraith, Namhyung Kim, Paul Mackerras, Pekka Enberg,
	Peter Zijlstra, Richard Fowles, stable, Stephane Eranian,
	Sukadev Bhattiprolu, v.karpov, Waiman Long,
	Arnaldo Carvalho de Melo


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

> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> 
> Hi Ingo,
> 
> 	Please consider pulling, done on top of tip/perf/urgent.
> 
> - Arnaldo
> 
> The following changes since commit e310718d0e83aeb9969264dc577c45db16d9104d:
> 
>   tools/perf/build: Fix feature-libunwind-debug-frame handling (2013-11-14 18:00:45 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 539e6bb71e350541105e67e3d6c31392d9da25ef:
> 
>   perf record: Add an option to force per-cpu mmaps (2013-11-14 16:10:27 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Synthesize anon MMAP records again, fix from Don Zickus.
> 
> . Add an option in 'perf record' to force per-cpu mmaps, from Adrian Hunter.
> 
> . Limit max callchain using max_stack on DWARF unwinding too.
> 
> . Fix segfault in the UI browser caused by off by one handling END key.
> 
> . Add '--demangle'/'--no-demangle' to perf probe, so that we can overcome
>   current limitations in handling C++ symbols, from Azat Khuzhin .
> 
> . Tweak 'perf trace' summary output, from Pekka Enberg.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf record: Add an option to force per-cpu mmaps
> 
> Arnaldo Carvalho de Melo (4):
>       perf tools: Use perf_evlist__{first,last}, perf_evsel__next
>       perf evsel: Introduce perf_evsel__prev() method
>       perf symbols: Limit max callchain using max_stack on DWARF unwinding too
>       perf ui browser: Fix segfault caused by off by one handling END key
> 
> Azat Khuzhin (1):
>       perf probe: Add '--demangle'/'--no-demangle'
> 
> Davidlohr Bueso (1):
>       perf tools: Remove trivial extra semincolon
> 
> Don Zickus (1):
>       perf tools: Synthesize anon MMAP records again
> 
> Ingo Molnar (1):
>       perf top: Add missing newline if the 'uid' is invalid
> 
> Pekka Enberg (1):
>       perf trace: Tweak summary output
> 
>  tools/perf/Documentation/perf-record.txt |  6 ++++++
>  tools/perf/builtin-probe.c               |  2 ++
>  tools/perf/builtin-record.c              |  2 ++
>  tools/perf/builtin-top.c                 |  4 ++--
>  tools/perf/builtin-trace.c               | 10 +++++-----
>  tools/perf/tests/parse-events.c          |  3 +--
>  tools/perf/ui/browser.c                  |  4 ++--
>  tools/perf/ui/browsers/hists.c           | 11 +++++------
>  tools/perf/util/event.c                  |  6 ++++--
>  tools/perf/util/evlist.c                 |  6 ++++--
>  tools/perf/util/evsel.c                  |  4 ++--
>  tools/perf/util/evsel.h                  |  5 +++++
>  tools/perf/util/machine.c                |  2 +-
>  tools/perf/util/target.h                 |  1 +
>  tools/perf/util/unwind.c                 |  9 +++++----
>  tools/perf/util/unwind.h                 |  5 +++--
>  16 files changed, 50 insertions(+), 30 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2013-11-14 20:25 Arnaldo Carvalho de Melo
  2013-11-15  6:38 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-14 20:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Azat Khuzhin, Bill Gray, David Ahern, Davidlohr Bueso,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Joe Mario,
	Mike Galbraith, Namhyung Kim, Paul Mackerras, Pekka Enberg,
	Peter Zijlstra, Richard Fowles, stable, Stephane Eranian,
	Sukadev Bhattiprolu, v.karpov, Waiman Long,
	Arnaldo Carvalho de Melo

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

Hi Ingo,

	Please consider pulling, done on top of tip/perf/urgent.

- Arnaldo

The following changes since commit e310718d0e83aeb9969264dc577c45db16d9104d:

  tools/perf/build: Fix feature-libunwind-debug-frame handling (2013-11-14 18:00:45 +0100)

are available in the git repository at:

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

for you to fetch changes up to 539e6bb71e350541105e67e3d6c31392d9da25ef:

  perf record: Add an option to force per-cpu mmaps (2013-11-14 16:10:27 -0300)

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

. Synthesize anon MMAP records again, fix from Don Zickus.

. Add an option in 'perf record' to force per-cpu mmaps, from Adrian Hunter.

. Limit max callchain using max_stack on DWARF unwinding too.

. Fix segfault in the UI browser caused by off by one handling END key.

. Add '--demangle'/'--no-demangle' to perf probe, so that we can overcome
  current limitations in handling C++ symbols, from Azat Khuzhin .

. Tweak 'perf trace' summary output, from Pekka Enberg.

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

----------------------------------------------------------------
Adrian Hunter (1):
      perf record: Add an option to force per-cpu mmaps

Arnaldo Carvalho de Melo (4):
      perf tools: Use perf_evlist__{first,last}, perf_evsel__next
      perf evsel: Introduce perf_evsel__prev() method
      perf symbols: Limit max callchain using max_stack on DWARF unwinding too
      perf ui browser: Fix segfault caused by off by one handling END key

Azat Khuzhin (1):
      perf probe: Add '--demangle'/'--no-demangle'

Davidlohr Bueso (1):
      perf tools: Remove trivial extra semincolon

Don Zickus (1):
      perf tools: Synthesize anon MMAP records again

Ingo Molnar (1):
      perf top: Add missing newline if the 'uid' is invalid

Pekka Enberg (1):
      perf trace: Tweak summary output

 tools/perf/Documentation/perf-record.txt |  6 ++++++
 tools/perf/builtin-probe.c               |  2 ++
 tools/perf/builtin-record.c              |  2 ++
 tools/perf/builtin-top.c                 |  4 ++--
 tools/perf/builtin-trace.c               | 10 +++++-----
 tools/perf/tests/parse-events.c          |  3 +--
 tools/perf/ui/browser.c                  |  4 ++--
 tools/perf/ui/browsers/hists.c           | 11 +++++------
 tools/perf/util/event.c                  |  6 ++++--
 tools/perf/util/evlist.c                 |  6 ++++--
 tools/perf/util/evsel.c                  |  4 ++--
 tools/perf/util/evsel.h                  |  5 +++++
 tools/perf/util/machine.c                |  2 +-
 tools/perf/util/target.h                 |  1 +
 tools/perf/util/unwind.c                 |  9 +++++----
 tools/perf/util/unwind.h                 |  5 +++--
 16 files changed, 50 insertions(+), 30 deletions(-)

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2013-11-05 20:09 Arnaldo Carvalho de Melo
@ 2013-11-06  5:31 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2013-11-06  5:31 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Mike Galbraith, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Rodrigo Campos, Stephane Eranian


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

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 87968f94fbea47df334502a0db645833ce8a848b:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2013-11-04 21:14:04 +0100)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 316c7136f8bad924609163b9b115f68d59a68c82:
> 
>   perf tools: Finish the removal of 'self' arguments (2013-11-05 15:32:36 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Check maximum frequency rate for record/top, emitting better error
>   messages, from Jiri Olsa.
> 
> . Disable live kvm command if timerfd is not supported, from David Ahern.
> 
> . Add usage to 'perf list', from David Ahern.
> 
> . Fix detection of non-core features, from David Ahern.
> 
> . Consolidate __hists__add_*entry(), cleanup from Namhyung Kim.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf fs: Rename NAME_find_mountpoint() to NAME__mountpoint()
>       perf tools: Finish the removal of 'self' arguments
> 
> David Ahern (4):
>       perf kvm: Disable live command if timerfd is not supported
>       tools/perf/build: Fix detection of non-core features
>       perf list: Remove a level of indentation
>       perf list: Add usage
> 
> Jiri Olsa (3):
>       perf tools: Factor sysfs code into generic fs object
>       perf fs: Add procfs support
>       perf tools: Check maximum frequency rate for record/top
> 
> Namhyung Kim (1):
>       perf hists: Consolidate __hists__add_*entry()
> 
>  tools/perf/Makefile.perf                           |   4 +-
>  tools/perf/builtin-annotate.c                      |   2 +-
>  tools/perf/builtin-diff.c                          |   3 +-
>  tools/perf/builtin-kvm.c                           |  12 ++
>  tools/perf/builtin-list.c                          |  84 ++++++++------
>  tools/perf/builtin-record.c                        |  15 +--
>  tools/perf/builtin-report.c                        |  16 ++-
>  tools/perf/builtin-top.c                           |  20 +---
>  tools/perf/config/Makefile                         |  17 ++-
>  tools/perf/config/feature-checks/Makefile          |   6 +-
>  tools/perf/config/feature-checks/test-all.c        |   5 +
>  tools/perf/config/feature-checks/test-timerfd.c    |  18 +++
>  .../perf/scripts/python/Perf-Trace-Util/Context.c  |   6 +-
>  tools/perf/tests/hists_link.c                      |   6 +-
>  tools/perf/tests/parse-events.c                    |   6 +-
>  tools/perf/ui/browser.h                            |  32 +++---
>  tools/perf/ui/browsers/hists.c                     |   2 +-
>  tools/perf/ui/browsers/map.c                       |  40 +++----
>  tools/perf/ui/browsers/map.h                       |   2 +-
>  tools/perf/ui/browsers/scripts.c                   |   8 +-
>  tools/perf/ui/stdio/hist.c                         |  14 +--
>  tools/perf/util/build-id.h                         |   3 +-
>  tools/perf/util/cpumap.c                           |   6 +-
>  tools/perf/util/event.c                            |   6 +-
>  tools/perf/util/event.h                            |   3 +-
>  tools/perf/util/evlist.h                           |   3 +-
>  tools/perf/util/fs.c                               | 119 ++++++++++++++++++++
>  tools/perf/util/fs.h                               |   7 ++
>  tools/perf/util/hist.c                             |  75 ++-----------
>  tools/perf/util/hist.h                             |  51 +++------
>  tools/perf/util/include/linux/magic.h              |   4 +
>  tools/perf/util/pmu.c                              |  17 +--
>  tools/perf/util/probe-finder.c                     | 113 +++++++++----------
>  tools/perf/util/probe-finder.h                     |  10 +-
>  tools/perf/util/pstack.h                           |  10 +-
>  tools/perf/util/python-ext-sources                 |   2 +-
>  tools/perf/util/record.c                           |  71 ++++++++++++
>  tools/perf/util/session.c                          | 121 ++++++++++-----------
>  tools/perf/util/session.h                          |  27 ++---
>  tools/perf/util/sort.h                             |   2 +-
>  tools/perf/util/strfilter.c                        |  32 +++---
>  tools/perf/util/strfilter.h                        |  12 +-
>  tools/perf/util/sysfs.c                            |  60 ----------
>  tools/perf/util/sysfs.h                            |   6 -
>  tools/perf/util/thread.h                           |  10 +-
>  45 files changed, 591 insertions(+), 497 deletions(-)
>  create mode 100644 tools/perf/config/feature-checks/test-timerfd.c
>  create mode 100644 tools/perf/util/fs.c
>  create mode 100644 tools/perf/util/fs.h
>  delete mode 100644 tools/perf/util/sysfs.c
>  delete mode 100644 tools/perf/util/sysfs.h

Pulled, thanks Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2013-11-05 20:09 Arnaldo Carvalho de Melo
  2013-11-06  5:31 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-05 20:09 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Mike Galbraith, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Rodrigo Campos, Stephane Eranian

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 87968f94fbea47df334502a0db645833ce8a848b:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2013-11-04 21:14:04 +0100)

are available in the git repository at:


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

for you to fetch changes up to 316c7136f8bad924609163b9b115f68d59a68c82:

  perf tools: Finish the removal of 'self' arguments (2013-11-05 15:32:36 -0300)

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

. Check maximum frequency rate for record/top, emitting better error
  messages, from Jiri Olsa.

. Disable live kvm command if timerfd is not supported, from David Ahern.

. Add usage to 'perf list', from David Ahern.

. Fix detection of non-core features, from David Ahern.

. Consolidate __hists__add_*entry(), cleanup from Namhyung Kim.

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf fs: Rename NAME_find_mountpoint() to NAME__mountpoint()
      perf tools: Finish the removal of 'self' arguments

David Ahern (4):
      perf kvm: Disable live command if timerfd is not supported
      tools/perf/build: Fix detection of non-core features
      perf list: Remove a level of indentation
      perf list: Add usage

Jiri Olsa (3):
      perf tools: Factor sysfs code into generic fs object
      perf fs: Add procfs support
      perf tools: Check maximum frequency rate for record/top

Namhyung Kim (1):
      perf hists: Consolidate __hists__add_*entry()

 tools/perf/Makefile.perf                           |   4 +-
 tools/perf/builtin-annotate.c                      |   2 +-
 tools/perf/builtin-diff.c                          |   3 +-
 tools/perf/builtin-kvm.c                           |  12 ++
 tools/perf/builtin-list.c                          |  84 ++++++++------
 tools/perf/builtin-record.c                        |  15 +--
 tools/perf/builtin-report.c                        |  16 ++-
 tools/perf/builtin-top.c                           |  20 +---
 tools/perf/config/Makefile                         |  17 ++-
 tools/perf/config/feature-checks/Makefile          |   6 +-
 tools/perf/config/feature-checks/test-all.c        |   5 +
 tools/perf/config/feature-checks/test-timerfd.c    |  18 +++
 .../perf/scripts/python/Perf-Trace-Util/Context.c  |   6 +-
 tools/perf/tests/hists_link.c                      |   6 +-
 tools/perf/tests/parse-events.c                    |   6 +-
 tools/perf/ui/browser.h                            |  32 +++---
 tools/perf/ui/browsers/hists.c                     |   2 +-
 tools/perf/ui/browsers/map.c                       |  40 +++----
 tools/perf/ui/browsers/map.h                       |   2 +-
 tools/perf/ui/browsers/scripts.c                   |   8 +-
 tools/perf/ui/stdio/hist.c                         |  14 +--
 tools/perf/util/build-id.h                         |   3 +-
 tools/perf/util/cpumap.c                           |   6 +-
 tools/perf/util/event.c                            |   6 +-
 tools/perf/util/event.h                            |   3 +-
 tools/perf/util/evlist.h                           |   3 +-
 tools/perf/util/fs.c                               | 119 ++++++++++++++++++++
 tools/perf/util/fs.h                               |   7 ++
 tools/perf/util/hist.c                             |  75 ++-----------
 tools/perf/util/hist.h                             |  51 +++------
 tools/perf/util/include/linux/magic.h              |   4 +
 tools/perf/util/pmu.c                              |  17 +--
 tools/perf/util/probe-finder.c                     | 113 +++++++++----------
 tools/perf/util/probe-finder.h                     |  10 +-
 tools/perf/util/pstack.h                           |  10 +-
 tools/perf/util/python-ext-sources                 |   2 +-
 tools/perf/util/record.c                           |  71 ++++++++++++
 tools/perf/util/session.c                          | 121 ++++++++++-----------
 tools/perf/util/session.h                          |  27 ++---
 tools/perf/util/sort.h                             |   2 +-
 tools/perf/util/strfilter.c                        |  32 +++---
 tools/perf/util/strfilter.h                        |  12 +-
 tools/perf/util/sysfs.c                            |  60 ----------
 tools/perf/util/sysfs.h                            |   6 -
 tools/perf/util/thread.h                           |  10 +-
 45 files changed, 591 insertions(+), 497 deletions(-)
 create mode 100644 tools/perf/config/feature-checks/test-timerfd.c
 create mode 100644 tools/perf/util/fs.c
 create mode 100644 tools/perf/util/fs.h
 delete mode 100644 tools/perf/util/sysfs.c
 delete mode 100644 tools/perf/util/sysfs.h

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2013-09-02 20:56 Arnaldo Carvalho de Melo
@ 2013-09-03  5:49 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2013-09-03  5:49 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo


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

> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 7bfb7e6bdd906f11ee9e751b3fec4f4fc728e818:
> 
>   perf: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node() (2013-09-02 08:42:49 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 31cd3855c98119cae287b761d8d2e75018714c5d:
> 
>   perf trace: Tell arg formatters the arg index (2013-09-02 16:40:40 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . 'perf trace' arg formatting improvements to allow masking arguments
>   in syscalls such as futex and open, where the some arguments are
>   ignored and thus should not be printed depending on other args.
> 
> . Beautify futex open, openat, open_by_handle_at, lseek and futex syscalls.
> 
> . Add dummy software event to use when wanting just to keep receiving
>   PERF_RECORD_{MMAP,COMM,etc}, add test for it, from Adrian Hunter.
> 
> . Fix symbol offset computation for some dsos in 'perf script', from David Ahern.
> 
> . Skip unsupported hardware events in 'perf list', from Namhyung Kim.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (3):
>       perf: Add a dummy software event to keep tracking
>       perf tools: Add support for PERF_COUNT_SW_DUMMY
>       perf tests: Add 'keep tracking' test
> 
> Arnaldo Carvalho de Melo (5):
>       perf trace: Allow syscall arg formatters to mask args
>       perf trace: Add beautifier for futex 'operation' parm
>       perf trace: Add beautifier for lseek's whence arg
>       perf trace: Add beautifier for open's flags arg
>       perf trace: Tell arg formatters the arg index
> 
> David Ahern (1):
>       perf tools: Fix symbol offset computation for some dsos
> 
> Namhyung Kim (1):
>       perf list: Skip unsupported events
> 
>  include/uapi/linux/perf_event.h  |   1 +
>  tools/perf/Makefile              |   1 +
>  tools/perf/builtin-trace.c       | 180 ++++++++++++++++++++++++++++++++++++---
>  tools/perf/tests/builtin-test.c  |   4 +
>  tools/perf/tests/keep-tracking.c | 154 +++++++++++++++++++++++++++++++++
>  tools/perf/tests/tests.h         |   1 +
>  tools/perf/util/evlist.c         |  42 ++++++++-
>  tools/perf/util/evlist.h         |   5 ++
>  tools/perf/util/evsel.c          |   1 +
>  tools/perf/util/parse-events.c   |  45 +++++++++-
>  tools/perf/util/parse-events.l   |   1 +
>  tools/perf/util/python.c         |   1 +
>  tools/perf/util/session.c        |   1 +
>  tools/perf/util/symbol.c         |   5 +-
>  14 files changed, 424 insertions(+), 18 deletions(-)
>  create mode 100644 tools/perf/tests/keep-tracking.c

Pulled, thanks Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2013-09-02 20:56 Arnaldo Carvalho de Melo
  2013-09-03  5:49 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-09-02 20:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 7bfb7e6bdd906f11ee9e751b3fec4f4fc728e818:

  perf: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node() (2013-09-02 08:42:49 +0200)

are available in the git repository at:

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

for you to fetch changes up to 31cd3855c98119cae287b761d8d2e75018714c5d:

  perf trace: Tell arg formatters the arg index (2013-09-02 16:40:40 -0300)

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

. 'perf trace' arg formatting improvements to allow masking arguments
  in syscalls such as futex and open, where the some arguments are
  ignored and thus should not be printed depending on other args.

. Beautify futex open, openat, open_by_handle_at, lseek and futex syscalls.

. Add dummy software event to use when wanting just to keep receiving
  PERF_RECORD_{MMAP,COMM,etc}, add test for it, from Adrian Hunter.

. Fix symbol offset computation for some dsos in 'perf script', from David Ahern.

. Skip unsupported hardware events in 'perf list', from Namhyung Kim.

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

----------------------------------------------------------------
Adrian Hunter (3):
      perf: Add a dummy software event to keep tracking
      perf tools: Add support for PERF_COUNT_SW_DUMMY
      perf tests: Add 'keep tracking' test

Arnaldo Carvalho de Melo (5):
      perf trace: Allow syscall arg formatters to mask args
      perf trace: Add beautifier for futex 'operation' parm
      perf trace: Add beautifier for lseek's whence arg
      perf trace: Add beautifier for open's flags arg
      perf trace: Tell arg formatters the arg index

David Ahern (1):
      perf tools: Fix symbol offset computation for some dsos

Namhyung Kim (1):
      perf list: Skip unsupported events

 include/uapi/linux/perf_event.h  |   1 +
 tools/perf/Makefile              |   1 +
 tools/perf/builtin-trace.c       | 180 ++++++++++++++++++++++++++++++++++++---
 tools/perf/tests/builtin-test.c  |   4 +
 tools/perf/tests/keep-tracking.c | 154 +++++++++++++++++++++++++++++++++
 tools/perf/tests/tests.h         |   1 +
 tools/perf/util/evlist.c         |  42 ++++++++-
 tools/perf/util/evlist.h         |   5 ++
 tools/perf/util/evsel.c          |   1 +
 tools/perf/util/parse-events.c   |  45 +++++++++-
 tools/perf/util/parse-events.l   |   1 +
 tools/perf/util/python.c         |   1 +
 tools/perf/util/session.c        |   1 +
 tools/perf/util/symbol.c         |   5 +-
 14 files changed, 424 insertions(+), 18 deletions(-)
 create mode 100644 tools/perf/tests/keep-tracking.c

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2013-02-14 21:44 Arnaldo Carvalho de Melo
@ 2013-02-15 15:39 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2013-02-15 15:39 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Borislav Petkov, Daniel Baluta, Dirk Behme, Frederic Weisbecker,
	Jiri Olsa, Li Zefan, Namhyung Kim, Paul Mackerras, Pekka Enberg,
	Peter Zijlstra, Vinson Lee, Arnaldo Carvalho de Melo


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

> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit a3d4fd7a2d81604fedfa270d29c824b8d3380c2e:
> 
>   Merge branch 'uprobes/core' of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc into perf/core (2013-02-11 10:41:53 +0100)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 02e176af92f3e2e9ec3a48792036566af2dcd534:
> 
>   perf/hwbp: Fix cleanup in case of kzalloc failure (2013-02-14 17:06:39 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Fix cleanup in case of kzalloc failure, from Daniel Baluta.
> 
> . Limit unwind support to x86 archs, fix from Jiri Olsa.
> 
> . Initial GTK+ annotate browser, from Namhyung Kim.
> 
> . Fix build with bison 2.3 and older, from Vinson Lee.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Daniel Baluta (1):
>       perf/hwbp: Fix cleanup in case of kzalloc failure
> 
> Jiri Olsa (1):
>       perf tools: Limit unwind support to x86 archs
> 
> Namhyung Kim (7):
>       perf buildid-cache: Add --update option
>       perf annotate: Fix warning message on a missing vmlinux
>       perf ui/gtk: Implement basic GTK2 annotation browser
>       perf gtk/annotate: Support multiple event annotation
>       perf gtk/annotate: Show source lines with gray color
>       perf gtk/annotate: Fail early if it can't annotate
>       perf annotate: Make it to be able to skip unannotatable symbols
> 
> Vinson Lee (1):
>       perf tools: Fix build with bison 2.3 and older.
> 
>  kernel/events/hw_breakpoint.c                   |   2 +-
>  tools/perf/Documentation/perf-annotate.txt      |   7 +-
>  tools/perf/Documentation/perf-buildid-cache.txt |   4 +
>  tools/perf/Makefile                             |  10 +-
>  tools/perf/builtin-annotate.c                   |  27 ++-
>  tools/perf/builtin-buildid-cache.c              |  50 +++++-
>  tools/perf/ui/gtk/annotate.c                    | 229 ++++++++++++++++++++++++
>  tools/perf/ui/gtk/gtk.h                         |   1 +
>  tools/perf/ui/setup.c                           |   2 +-
>  tools/perf/util/annotate.c                      |   2 +-
>  tools/perf/util/annotate.h                      |  24 +++
>  tools/perf/util/parse-events.y                  |   1 -
>  tools/perf/util/pmu.y                           |   1 -
>  13 files changed, 349 insertions(+), 11 deletions(-)
>  create mode 100644 tools/perf/ui/gtk/annotate.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2013-02-14 21:44 Arnaldo Carvalho de Melo
  2013-02-15 15:39 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-14 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Borislav Petkov, Daniel Baluta, Dirk Behme, Frederic Weisbecker,
	Jiri Olsa, Li Zefan, Namhyung Kim, Paul Mackerras, Pekka Enberg,
	Peter Zijlstra, Vinson Lee, Arnaldo Carvalho de Melo

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit a3d4fd7a2d81604fedfa270d29c824b8d3380c2e:

  Merge branch 'uprobes/core' of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc into perf/core (2013-02-11 10:41:53 +0100)

are available in the git repository at:


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

for you to fetch changes up to 02e176af92f3e2e9ec3a48792036566af2dcd534:

  perf/hwbp: Fix cleanup in case of kzalloc failure (2013-02-14 17:06:39 -0300)

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

. Fix cleanup in case of kzalloc failure, from Daniel Baluta.

. Limit unwind support to x86 archs, fix from Jiri Olsa.

. Initial GTK+ annotate browser, from Namhyung Kim.

. Fix build with bison 2.3 and older, from Vinson Lee.

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

----------------------------------------------------------------
Daniel Baluta (1):
      perf/hwbp: Fix cleanup in case of kzalloc failure

Jiri Olsa (1):
      perf tools: Limit unwind support to x86 archs

Namhyung Kim (7):
      perf buildid-cache: Add --update option
      perf annotate: Fix warning message on a missing vmlinux
      perf ui/gtk: Implement basic GTK2 annotation browser
      perf gtk/annotate: Support multiple event annotation
      perf gtk/annotate: Show source lines with gray color
      perf gtk/annotate: Fail early if it can't annotate
      perf annotate: Make it to be able to skip unannotatable symbols

Vinson Lee (1):
      perf tools: Fix build with bison 2.3 and older.

 kernel/events/hw_breakpoint.c                   |   2 +-
 tools/perf/Documentation/perf-annotate.txt      |   7 +-
 tools/perf/Documentation/perf-buildid-cache.txt |   4 +
 tools/perf/Makefile                             |  10 +-
 tools/perf/builtin-annotate.c                   |  27 ++-
 tools/perf/builtin-buildid-cache.c              |  50 +++++-
 tools/perf/ui/gtk/annotate.c                    | 229 ++++++++++++++++++++++++
 tools/perf/ui/gtk/gtk.h                         |   1 +
 tools/perf/ui/setup.c                           |   2 +-
 tools/perf/util/annotate.c                      |   2 +-
 tools/perf/util/annotate.h                      |  24 +++
 tools/perf/util/parse-events.y                  |   1 -
 tools/perf/util/pmu.y                           |   1 -
 13 files changed, 349 insertions(+), 11 deletions(-)
 create mode 100644 tools/perf/ui/gtk/annotate.c

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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2011-12-20 19:18 Arnaldo Carvalho de Melo
@ 2011-12-20 19:33 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2011-12-20 19:33 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Andrew Vagin, Arun Sharma, cjashfor, David Ahern,
	devel, Jiri Olsa, Johannes Schindelin, Linus Torvalds,
	Namhyung Kim, Nelson Elhage, Paul Mackerras, Peter Zijlstra,
	Robert Richter, arnaldo.melo


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

> Hi Ingo,
> 
>         Please consider pulling from:
> 
> git://github.com/acmel/linux.git perf/core
> 
> 	There are still patchkits I need to merge/review, thanks everybody, the
> more, the better!
> 
> 	I'll continue processing them tomorrow,
> 
> Regards,
> 
> - Arnaldo
> 
> Andrew Vagin (1):
>   perf record: Add ability to record event period
> 
> Jiri Olsa (1):
>   perf test: Add more automated tests for event parsing
> 
> Namhyung Kim (6):
>   perf report: Document '--call-graph' for optional print_limit argument
>   perf symbols: Get rid of duplicated snprintf()
>   perf symbols: Fix error path on symbol__init()
>   perf tools: Fix a memory leak on perf_read_values_destroy
>   perf tools: Remove stale git headlines from top comment
>   perf events: Tidy up perf_event__preprocess_sample
> 
> Nelson Elhage (1):
>   perf evlist: Fix errno value reporting on failed mmap
> 
> Robert Richter (1):
>   perf evsel: Fix uninitialized memory access to struct perf_sample
> 
>  tools/perf/Documentation/perf-report.txt |    5 +-
>  tools/perf/builtin-record.c              |    1 +
>  tools/perf/builtin-report.c              |    6 +-
>  tools/perf/builtin-test.c                |  127 +++++++++++++++++++++++++++++-
>  tools/perf/perf.h                        |    1 +
>  tools/perf/util/config.c                 |    5 +-
>  tools/perf/util/event.c                  |   13 ++--
>  tools/perf/util/evlist.c                 |    4 +-
>  tools/perf/util/evsel.c                  |    5 +-
>  tools/perf/util/symbol.c                 |   11 +--
>  tools/perf/util/usage.c                  |    5 +-
>  tools/perf/util/values.c                 |    1 +
>  12 files changed, 160 insertions(+), 24 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2011-12-20 19:18 Arnaldo Carvalho de Melo
  2011-12-20 19:33 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-12-20 19:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andrew Vagin,
	Arun Sharma, cjashfor, David Ahern, devel, Jiri Olsa,
	Johannes Schindelin, Linus Torvalds, Namhyung Kim, Nelson Elhage,
	Paul Mackerras, Peter Zijlstra, Robert Richter, arnaldo.melo

Hi Ingo,

        Please consider pulling from:

git://github.com/acmel/linux.git perf/core

	There are still patchkits I need to merge/review, thanks everybody, the
more, the better!

	I'll continue processing them tomorrow,

Regards,

- Arnaldo

Andrew Vagin (1):
  perf record: Add ability to record event period

Jiri Olsa (1):
  perf test: Add more automated tests for event parsing

Namhyung Kim (6):
  perf report: Document '--call-graph' for optional print_limit argument
  perf symbols: Get rid of duplicated snprintf()
  perf symbols: Fix error path on symbol__init()
  perf tools: Fix a memory leak on perf_read_values_destroy
  perf tools: Remove stale git headlines from top comment
  perf events: Tidy up perf_event__preprocess_sample

Nelson Elhage (1):
  perf evlist: Fix errno value reporting on failed mmap

Robert Richter (1):
  perf evsel: Fix uninitialized memory access to struct perf_sample

 tools/perf/Documentation/perf-report.txt |    5 +-
 tools/perf/builtin-record.c              |    1 +
 tools/perf/builtin-report.c              |    6 +-
 tools/perf/builtin-test.c                |  127 +++++++++++++++++++++++++++++-
 tools/perf/perf.h                        |    1 +
 tools/perf/util/config.c                 |    5 +-
 tools/perf/util/event.c                  |   13 ++--
 tools/perf/util/evlist.c                 |    4 +-
 tools/perf/util/evsel.c                  |    5 +-
 tools/perf/util/symbol.c                 |   11 +--
 tools/perf/util/usage.c                  |    5 +-
 tools/perf/util/values.c                 |    1 +
 12 files changed, 160 insertions(+), 24 deletions(-)

-- 
1.7.8.rc0.35.gee6df


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

* Re: [GIT PULL 00/10] perf/core improvements and fixes
  2010-08-06  1:46 Arnaldo Carvalho de Melo
@ 2010-08-06  7:00 ` Ingo Molnar
  0 siblings, 0 replies; 73+ messages in thread
From: Ingo Molnar @ 2010-08-06  7:00 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Andrea Gelmini, Arnaldo Carvalho de Melo,
	Frederic Weisbecker, Julia Lawall, Masami Hiramatsu,
	Mike Galbraith, Nick Piggin, Paul Mackerras, Peter Zijlstra,
	Peter Zijlstra, Srikar Dronamraju, Stephane Eranian,
	Thomas Gleixner, Tom Zanussi


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

> Hi Ingo,
> 
>         Please pull from:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/core
> 
> Regards,
> 
> - Arnaldo
> 
> Andrea Gelmini (2):
>   perf probe: Remove duplicated #include
>   perf trace: Clean up #includes
> 
> Arnaldo Carvalho de Melo (7):
>   perf symbols: Store the symbol binding
>   perf ui: Add a map browser
>   perf ui: Shorten ui_browser->refresh_entries to refresh
>   perf hists: Handle verbose in hists__sort_list_width
>   perf hists: Fixup addr snprintf width on 32 bit arches
>   perf ui: Add search by name/addr to the map__browser
>   perf report: Speed up exit path
> 
> Julia Lawall (1):
>   perf timechart: Adjust confusing if indentation
> 
>  tools/perf/builtin-report.c    |   31 +++++-
>  tools/perf/builtin-timechart.c |    4 +-
>  tools/perf/builtin-trace.c     |   19 +--
>  tools/perf/util/hist.c         |    3 +
>  tools/perf/util/newt.c         |  242 +++++++++++++++++++++++++++++++++++++--
>  tools/perf/util/probe-finder.c |    1 -
>  tools/perf/util/sort.c         |    6 +-
>  tools/perf/util/symbol.c       |   30 ++++--
>  tools/perf/util/symbol.h       |    1 +
>  9 files changed, 297 insertions(+), 40 deletions(-)

Pulled, thanks Arnaldo!

	Ingo

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

* [GIT PULL 00/10] perf/core improvements and fixes
@ 2010-08-06  1:46 Arnaldo Carvalho de Melo
  2010-08-06  7:00 ` Ingo Molnar
  0 siblings, 1 reply; 73+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-08-06  1:46 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andrea Gelmini,
	Arnaldo Carvalho de Melo, Frederic Weisbecker, Ingo Molnar,
	Julia Lawall, Masami Hiramatsu, Mike Galbraith, Nick Piggin,
	Paul Mackerras, Peter Zijlstra, Peter Zijlstra,
	Srikar Dronamraju, Stephane Eranian, Thomas Gleixner,
	Tom Zanussi

Hi Ingo,

        Please pull from:

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

Regards,

- Arnaldo

Andrea Gelmini (2):
  perf probe: Remove duplicated #include
  perf trace: Clean up #includes

Arnaldo Carvalho de Melo (7):
  perf symbols: Store the symbol binding
  perf ui: Add a map browser
  perf ui: Shorten ui_browser->refresh_entries to refresh
  perf hists: Handle verbose in hists__sort_list_width
  perf hists: Fixup addr snprintf width on 32 bit arches
  perf ui: Add search by name/addr to the map__browser
  perf report: Speed up exit path

Julia Lawall (1):
  perf timechart: Adjust confusing if indentation

 tools/perf/builtin-report.c    |   31 +++++-
 tools/perf/builtin-timechart.c |    4 +-
 tools/perf/builtin-trace.c     |   19 +--
 tools/perf/util/hist.c         |    3 +
 tools/perf/util/newt.c         |  242 +++++++++++++++++++++++++++++++++++++--
 tools/perf/util/probe-finder.c |    1 -
 tools/perf/util/sort.c         |    6 +-
 tools/perf/util/symbol.c       |   30 ++++--
 tools/perf/util/symbol.h       |    1 +
 9 files changed, 297 insertions(+), 40 deletions(-)


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

end of thread, other threads:[~2017-08-17  7:45 UTC | newest]

Thread overview: 73+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 01/10] perf ui tui progress: Don't force a refresh during progress update Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 02/10] perf evsel: Remove idx parm from constructor Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 03/10] perf record: Synthesize non-exec MMAP records when --data used Arnaldo Carvalho de Melo
2013-11-11 20:38   ` David Ahern
2013-11-11 21:02     ` Vince Weaver
2013-11-11 20:22 ` [PATCH 04/10] perf machine: Introduce synthesize_threads method out of open coded equivalent Arnaldo Carvalho de Melo
2013-11-11 20:40   ` David Ahern
2013-11-11 20:50     ` Ingo Molnar
2013-11-12 11:34       ` Arnaldo Carvalho de Melo
2013-11-12 12:44         ` Ingo Molnar
2013-11-12 21:57         ` [tip:perf/urgent] perf target: Shorten perf_target__ to target__ tip-bot for Arnaldo Carvalho de Melo
2014-01-12 18:33         ` [tip:perf/core] perf tools: Rename 'perf_record_opts' to ' record_opts tip-bot for Arnaldo Carvalho de Melo
2014-01-12 18:35         ` [tip:perf/core] perf report: Rename 'perf_report' to 'report' tip-bot for Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 05/10] perf machine: Simplify synthesize_threads method Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 06/10] perf tools: Prevent condition that all sort keys are elided Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 07/10] perf record: Use correct return type for write() Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 08/10] perf record: Move existing write_output into helper function Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 09/10] perf tests: Check return of perf_evlist__open sw clock event period test Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 10/10] perf tests: Use lower sample_freq in " Arnaldo Carvalho de Melo
2013-11-11 20:45   ` David Ahern
2013-11-12  7:07   ` Adrian Hunter
2013-11-12  8:40     ` Namhyung Kim
2013-11-12 11:59       ` Arnaldo Carvalho de Melo
2013-11-12 14:41     ` Arnaldo Carvalho de Melo
2013-11-15  6:03       ` Namhyung Kim
2013-11-12 21:56     ` [tip:perf/urgent] perf tests: Compensate lower sample freq with longer test loop tip-bot for Adrian Hunter
  -- strict thread matches above, loose matches on Subject: below --
2017-08-16 20:20 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
2017-08-17  7:45 ` Ingo Molnar
2017-05-03 13:58 Arnaldo Carvalho de Melo
2017-05-03 17:30 ` Ingo Molnar
2017-01-17 16:06 Arnaldo Carvalho de Melo
2017-01-18  9:09 ` Ingo Molnar
2016-12-07 16:53 Arnaldo Carvalho de Melo
2016-12-07 18:17 ` Ingo Molnar
2016-06-20 22:23 Arnaldo Carvalho de Melo
2016-06-21  2:18 ` Namhyung Kim
2016-06-21  3:11   ` Brendan Gregg
2016-06-21 10:08     ` Paolo Bonzini
2016-06-21 16:14       ` Arnaldo Carvalho de Melo
2016-05-25 21:34 Arnaldo Carvalho de Melo
2016-04-01 21:56 Arnaldo Carvalho de Melo
2016-04-06  6:47 ` Ingo Molnar
2016-02-16 20:34 Arnaldo Carvalho de Melo
2016-02-17  7:39 ` Ingo Molnar
2015-11-28  1:22 Arnaldo Carvalho de Melo
2015-11-28  9:50 ` Ingo Molnar
2015-11-29 13:16   ` Namhyung Kim
2015-08-28 18:06 Arnaldo Carvalho de Melo
2015-08-31  8:28 ` Ingo Molnar
2015-07-30 16:16 Arnaldo Carvalho de Melo
2015-07-31  8:04 ` Ingo Molnar
2015-07-31 13:30   ` Arnaldo Carvalho de Melo
2015-06-16 18:21 Arnaldo Carvalho de Melo
2015-01-29 20:23 Arnaldo Carvalho de Melo
2015-01-30 18:28 ` Ingo Molnar
2014-12-22 15:29 Arnaldo Carvalho de Melo
2014-09-26 20:19 Arnaldo Carvalho de Melo
2014-09-27  7:20 ` Ingo Molnar
2014-04-08 18:00 Jiri Olsa
     [not found] ` <8738hnk3dg.fsf@tassilo.jf.intel.com>
     [not found]   ` <CAM9d7ciP4tLUmR-soEKH3nf6=XC5evKGfuQW1fUGA8Z42U3xCg@mail.gmail.com>
2014-04-09  5:31     ` Ingo Molnar
2013-11-14 20:25 Arnaldo Carvalho de Melo
2013-11-15  6:38 ` Ingo Molnar
2013-11-05 20:09 Arnaldo Carvalho de Melo
2013-11-06  5:31 ` Ingo Molnar
2013-09-02 20:56 Arnaldo Carvalho de Melo
2013-09-03  5:49 ` Ingo Molnar
2013-02-14 21:44 Arnaldo Carvalho de Melo
2013-02-15 15:39 ` Ingo Molnar
2011-12-20 19:18 Arnaldo Carvalho de Melo
2011-12-20 19:33 ` Ingo Molnar
2010-08-06  1:46 Arnaldo Carvalho de Melo
2010-08-06  7:00 ` 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.