All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 00/16] perf/core improvements and fixes
@ 2013-10-23 20:57 Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 01/16] perf test: Clarify the "sample parsing" test entry Arnaldo Carvalho de Melo
                   ` (16 more replies)
  0 siblings, 17 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:57 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, David Ahern, Frederic Weisbecker, Hitoshi Mitake,
	Jiri Olsa, Linus Torvalds, Masami Hiramatsu, 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 aa30a2e03a453aad9fd96c3f2d4a82c3497674e5:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2013-10-23 09:45:50 +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 c1fb5651bb40f9efaf32d280f39e06df7e352673:

  perf tools: Show progress on histogram collapsing (2013-10-23 15:48:24 -0300)

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

. Show progress on histogram collapsing, that can take a long time, from
  Namhyung Kim.

. Support "$vars" meta argument syntax for local variables, allowing
  asking for all possible variables at a given probe point to be
  collected when it hits, from Masami Hiramatsu.

. Address the root cause of that 'perf sched' stack initialization build
  slowdown, by programmatically setting a big array after moving the
  global variable back to the stack. Fix from Adrian Hunter.

. Do not repipe attributes to a perf.data file in 'perf inject',
  fix from Adrian Hunter

. Change the procps visible command-name of invididual benchmark tests
  plus cleanups, from Ingo Molnar.

. Do not accept parse_tag_value() overflow, fix from Adrian Hunter.

. Validate that mmap_pages is not too big. From Adrian Hunter.

. Fix non-debug build, from Adrian Hunter

. Clarify the "sample parsing" test entry.

. Consider PERF_SAMPLE_TRANSACTION in the "sample parsing" test.

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

----------------------------------------------------------------
Adrian Hunter (7):
      perf sched: Make struct perf_sched sched a local variable
      perf sched: Optimize build time
      perf script: Make perf_script a local variable
      perf inject: Do not repipe attributes to a perf.data file
      perf tools: Do not accept parse_tag_value() overflow
      perf evlist: Validate that mmap_pages is not too big
      perf tools: Fix non-debug build

Arnaldo Carvalho de Melo (5):
      perf test: Clarify the "sample parsing" test entry
      perf test: Consider PERF_SAMPLE_TRANSACTION in the "sample parsing" test
      perf tools: Stop using 'self' in some more places
      perf ui: Rename ui_progress to ui_progress_ops
      perf ui progress: Per progress bar state

Ingo Molnar (1):
      perf bench: Change the procps visible command-name of invididual benchmark tests plus cleanups

Masami Hiramatsu (2):
      perf probe: Support "$vars" meta argument syntax for local variables
      perf probe: Find fentry mcount fuzzed parameter location

Namhyung Kim (1):
      perf tools: Show progress on histogram collapsing

 tools/perf/Makefile.perf          |   1 +
 tools/perf/builtin-annotate.c     |   6 +-
 tools/perf/builtin-bench.c        | 239 +++++++++++++++++++-------------------
 tools/perf/builtin-diff.c         |   7 +-
 tools/perf/builtin-inject.c       |  27 +++--
 tools/perf/builtin-report.c       |  24 ++--
 tools/perf/builtin-sched.c        |  44 +++----
 tools/perf/builtin-script.c       |  40 ++++---
 tools/perf/builtin-top.c          |   4 +-
 tools/perf/config/Makefile        |   4 +
 tools/perf/tests/hists_link.c     |   2 +-
 tools/perf/tests/sample-parsing.c |   4 +-
 tools/perf/ui/gtk/gtk.h           |   2 +-
 tools/perf/ui/gtk/progress.c      |  20 ++--
 tools/perf/ui/gtk/setup.c         |   2 +-
 tools/perf/ui/progress.c          |  32 +++--
 tools/perf/ui/progress.h          |  19 +--
 tools/perf/ui/tui/progress.c      |  15 +--
 tools/perf/ui/tui/setup.c         |   3 +-
 tools/perf/ui/tui/tui.h           |   6 +
 tools/perf/util/build-id.c        |   6 +-
 tools/perf/util/evlist.c          |  14 ++-
 tools/perf/util/hist.c            |  23 ++--
 tools/perf/util/hist.h            |   3 +-
 tools/perf/util/probe-event.c     |   1 -
 tools/perf/util/probe-finder.c    | 133 ++++++++++++++++++---
 tools/perf/util/probe-finder.h    |   1 +
 tools/perf/util/session.c         |  24 ++--
 tools/perf/util/sort.c            | 124 ++++++++++----------
 tools/perf/util/strfilter.c       |  46 ++++----
 tools/perf/util/thread.c          |  72 ++++++------
 tools/perf/util/util.c            |   2 +
 32 files changed, 560 insertions(+), 390 deletions(-)
 create mode 100644 tools/perf/ui/tui/tui.h

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

* [PATCH 01/16] perf test: Clarify the "sample parsing" test entry
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 02/16] perf test: Consider PERF_SAMPLE_TRANSACTION in the "sample parsing" test Arnaldo Carvalho de Melo
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian

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

Before:

  [root@sandy ~]# perf test -v 22
  22: Test sample parsing                                    :
  --- start ---
  sample format has changed - test needs updating
  ---- end ----
  Test sample parsing: FAILED!
  [root@sandy ~]#

After:

  [root@sandy ~]# perf test -v 22
  22: Test sample parsing                                    :
  --- start ---
  sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating
  ---- end ----
  Test sample parsing: FAILED!
  [root@sandy ~]#

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
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-8cazc2fpmk70jcbww8c0cobx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/sample-parsing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index 77f598dbd97a..17d000c6c8ff 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -276,7 +276,7 @@ int test__sample_parsing(void)
 	 * were added.
 	 */
 	if (PERF_SAMPLE_MAX > PERF_SAMPLE_IDENTIFIER << 1) {
-		pr_debug("sample format has changed - test needs updating\n");
+		pr_debug("sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating\n");
 		return -1;
 	}
 
-- 
1.8.1.4


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

* [PATCH 02/16] perf test: Consider PERF_SAMPLE_TRANSACTION in the "sample parsing" test
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 01/16] perf test: Clarify the "sample parsing" test entry Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 03/16] perf tools: Stop using 'self' in some more places Arnaldo Carvalho de Melo
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian

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

[root@sandy ~]# perf test -v 22
22: Test sample parsing                                    :
--- start ---
sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating
---- end ----
Test sample parsing: FAILED!
[root@sandy ~]#

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
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-cx83wuzz30m10m4s1xt0ocyq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/sample-parsing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index 17d000c6c8ff..61c9da2eb3a9 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -275,7 +275,7 @@ int test__sample_parsing(void)
 	 * Fail the test if it has not been updated when new sample format bits
 	 * were added.
 	 */
-	if (PERF_SAMPLE_MAX > PERF_SAMPLE_IDENTIFIER << 1) {
+	if (PERF_SAMPLE_MAX > PERF_SAMPLE_TRANSACTION << 1) {
 		pr_debug("sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating\n");
 		return -1;
 	}
-- 
1.8.1.4


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

* [PATCH 03/16] perf tools: Stop using 'self' in some more places
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 01/16] perf test: Clarify the "sample parsing" test entry Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 02/16] perf test: Consider PERF_SAMPLE_TRANSACTION in the "sample parsing" test Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 04/16] perf probe: Support "$vars" meta argument syntax for local variables Arnaldo Carvalho de Melo
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 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>

As suggested by tglx, 'self' should be replaced by something that is
more useful.

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-fmblhc6tbb99tk1q8vowtsbj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-annotate.c |   4 +-
 tools/perf/builtin-diff.c     |   5 +-
 tools/perf/builtin-inject.c   |  22 ++++----
 tools/perf/builtin-report.c   |  14 ++---
 tools/perf/util/build-id.c    |   6 +-
 tools/perf/util/hist.c        |  18 +++---
 tools/perf/util/sort.c        | 124 +++++++++++++++++++++---------------------
 tools/perf/util/strfilter.c   |  46 ++++++++--------
 tools/perf/util/thread.c      |  72 ++++++++++++------------
 9 files changed, 155 insertions(+), 156 deletions(-)

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 03cfa592071f..17c6b494e8cc 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -118,11 +118,11 @@ static int hist_entry__tty_annotate(struct hist_entry *he,
 				    ann->print_line, ann->full_paths, 0, 0);
 }
 
-static void hists__find_annotations(struct hists *self,
+static void hists__find_annotations(struct hists *hists,
 				    struct perf_evsel *evsel,
 				    struct perf_annotate *ann)
 {
-	struct rb_node *nd = rb_first(&self->entries), *next;
+	struct rb_node *nd = rb_first(&hists->entries), *next;
 	int key = K_RIGHT;
 
 	while (nd) {
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 419d27dd708b..9c828881714c 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -303,12 +303,11 @@ static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair,
 	return -1;
 }
 
-static int hists__add_entry(struct hists *self,
+static int hists__add_entry(struct hists *hists,
 			    struct addr_location *al, u64 period,
 			    u64 weight, u64 transaction)
 {
-	if (__hists__add_entry(self, al, NULL, period, weight, transaction)
-	    != NULL)
+	if (__hists__add_entry(hists, al, NULL, period, weight, transaction) != NULL)
 		return 0;
 	return -ENOMEM;
 }
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 4aa6d7850bcc..eb1a5941912b 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -162,38 +162,38 @@ static int perf_event__repipe_tracing_data(struct perf_tool *tool,
 	return err;
 }
 
-static int dso__read_build_id(struct dso *self)
+static int dso__read_build_id(struct dso *dso)
 {
-	if (self->has_build_id)
+	if (dso->has_build_id)
 		return 0;
 
-	if (filename__read_build_id(self->long_name, self->build_id,
-				    sizeof(self->build_id)) > 0) {
-		self->has_build_id = true;
+	if (filename__read_build_id(dso->long_name, dso->build_id,
+				    sizeof(dso->build_id)) > 0) {
+		dso->has_build_id = true;
 		return 0;
 	}
 
 	return -1;
 }
 
-static int dso__inject_build_id(struct dso *self, struct perf_tool *tool,
+static int dso__inject_build_id(struct dso *dso, struct perf_tool *tool,
 				struct machine *machine)
 {
 	u16 misc = PERF_RECORD_MISC_USER;
 	int err;
 
-	if (dso__read_build_id(self) < 0) {
-		pr_debug("no build_id found for %s\n", self->long_name);
+	if (dso__read_build_id(dso) < 0) {
+		pr_debug("no build_id found for %s\n", dso->long_name);
 		return -1;
 	}
 
-	if (self->kernel)
+	if (dso->kernel)
 		misc = PERF_RECORD_MISC_KERNEL;
 
-	err = perf_event__synthesize_build_id(tool, self, misc, perf_event__repipe,
+	err = perf_event__synthesize_build_id(tool, dso, misc, perf_event__repipe,
 					      machine);
 	if (err) {
-		pr_err("Can't synthesize build_id event for %s\n", self->long_name);
+		pr_err("Can't synthesize build_id event for %s\n", dso->long_name);
 		return -1;
 	}
 
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 81addcabb356..e3598a456017 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -373,9 +373,9 @@ 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)
 {
-	struct perf_session *self = rep->session;
-	u64 sample_type = perf_evlist__combined_sample_type(self->evlist);
-	bool is_pipe = perf_data_file__is_pipe(self->file);
+	struct perf_session *session = rep->session;
+	u64 sample_type = perf_evlist__combined_sample_type(session->evlist);
+	bool is_pipe = perf_data_file__is_pipe(session->file);
 
 	if (!is_pipe && !(sample_type & PERF_SAMPLE_CALLCHAIN)) {
 		if (sort__has_parent) {
@@ -417,14 +417,14 @@ static void sig_handler(int sig __maybe_unused)
 }
 
 static size_t hists__fprintf_nr_sample_events(struct perf_report *rep,
-					      struct hists *self,
+					      struct hists *hists,
 					      const char *evname, FILE *fp)
 {
 	size_t ret;
 	char unit;
-	unsigned long nr_samples = self->stats.nr_events[PERF_RECORD_SAMPLE];
-	u64 nr_events = self->stats.total_period;
-	struct perf_evsel *evsel = hists_to_evsel(self);
+	unsigned long nr_samples = hists->stats.nr_events[PERF_RECORD_SAMPLE];
+	u64 nr_events = hists->stats.total_period;
+	struct perf_evsel *evsel = hists_to_evsel(hists);
 	char buf[512];
 	size_t size = sizeof(buf);
 
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 7ded71d19d75..a92770c98cc7 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -89,14 +89,14 @@ int build_id__sprintf(const u8 *build_id, int len, char *bf)
 	return raw - build_id;
 }
 
-char *dso__build_id_filename(struct dso *self, char *bf, size_t size)
+char *dso__build_id_filename(struct dso *dso, char *bf, size_t size)
 {
 	char build_id_hex[BUILD_ID_SIZE * 2 + 1];
 
-	if (!self->has_build_id)
+	if (!dso->has_build_id)
 		return NULL;
 
-	build_id__sprintf(self->build_id, sizeof(self->build_id), build_id_hex);
+	build_id__sprintf(dso->build_id, sizeof(dso->build_id), build_id_hex);
 	if (bf == NULL) {
 		if (asprintf(&bf, "%s/.build-id/%.2s/%s", buildid_dir,
 			     build_id_hex, build_id_hex + 2) < 0)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index cca03831f41a..f0b863ef4896 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -406,7 +406,7 @@ out:
 	return he;
 }
 
-struct hist_entry *__hists__add_mem_entry(struct hists *self,
+struct hist_entry *__hists__add_mem_entry(struct hists *hists,
 					  struct addr_location *al,
 					  struct symbol *sym_parent,
 					  struct mem_info *mi,
@@ -429,14 +429,14 @@ struct hist_entry *__hists__add_mem_entry(struct hists *self,
 		.level	= al->level,
 		.parent = sym_parent,
 		.filtered = symbol__parent_filter(sym_parent),
-		.hists = self,
+		.hists = hists,
 		.mem_info = mi,
 		.branch_info = NULL,
 	};
-	return add_hist_entry(self, &entry, al, period, weight);
+	return add_hist_entry(hists, &entry, al, period, weight);
 }
 
-struct hist_entry *__hists__add_branch_entry(struct hists *self,
+struct hist_entry *__hists__add_branch_entry(struct hists *hists,
 					     struct addr_location *al,
 					     struct symbol *sym_parent,
 					     struct branch_info *bi,
@@ -460,14 +460,14 @@ struct hist_entry *__hists__add_branch_entry(struct hists *self,
 		.parent = sym_parent,
 		.filtered = symbol__parent_filter(sym_parent),
 		.branch_info = bi,
-		.hists	= self,
+		.hists	= hists,
 		.mem_info = NULL,
 	};
 
-	return add_hist_entry(self, &entry, al, period, weight);
+	return add_hist_entry(hists, &entry, al, period, weight);
 }
 
-struct hist_entry *__hists__add_entry(struct hists *self,
+struct hist_entry *__hists__add_entry(struct hists *hists,
 				      struct addr_location *al,
 				      struct symbol *sym_parent, u64 period,
 				      u64 weight, u64 transaction)
@@ -488,13 +488,13 @@ struct hist_entry *__hists__add_entry(struct hists *self,
 		},
 		.parent = sym_parent,
 		.filtered = symbol__parent_filter(sym_parent),
-		.hists	= self,
+		.hists	= hists,
 		.branch_info = NULL,
 		.mem_info = NULL,
 		.transaction = transaction,
 	};
 
-	return add_hist_entry(self, &entry, al, period, weight);
+	return add_hist_entry(hists, &entry, al, period, weight);
 }
 
 int64_t
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 1f9821db9e77..19b4aa279d1e 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -60,11 +60,11 @@ sort__thread_cmp(struct hist_entry *left, struct hist_entry *right)
 	return right->thread->tid - left->thread->tid;
 }
 
-static int hist_entry__thread_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__thread_snprintf(struct hist_entry *he, char *bf,
 				       size_t size, unsigned int width)
 {
 	return repsep_snprintf(bf, size, "%*s:%5d", width - 6,
-			      self->thread->comm ?: "", self->thread->tid);
+			      he->thread->comm ?: "", he->thread->tid);
 }
 
 struct sort_entry sort_thread = {
@@ -94,10 +94,10 @@ sort__comm_collapse(struct hist_entry *left, struct hist_entry *right)
 	return strcmp(comm_l, comm_r);
 }
 
-static int hist_entry__comm_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__comm_snprintf(struct hist_entry *he, char *bf,
 				     size_t size, unsigned int width)
 {
-	return repsep_snprintf(bf, size, "%*s", width, self->thread->comm);
+	return repsep_snprintf(bf, size, "%*s", width, he->thread->comm);
 }
 
 struct sort_entry sort_comm = {
@@ -148,10 +148,10 @@ static int _hist_entry__dso_snprintf(struct map *map, char *bf,
 	return repsep_snprintf(bf, size, "%-*s", width, "[unknown]");
 }
 
-static int hist_entry__dso_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__dso_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
-	return _hist_entry__dso_snprintf(self->ms.map, bf, size, width);
+	return _hist_entry__dso_snprintf(he->ms.map, bf, size, width);
 }
 
 struct sort_entry sort_dso = {
@@ -234,11 +234,11 @@ static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym,
 	return ret;
 }
 
-static int hist_entry__sym_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__sym_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
-	return _hist_entry__sym_snprintf(self->ms.map, self->ms.sym, self->ip,
-					 self->level, bf, size, width);
+	return _hist_entry__sym_snprintf(he->ms.map, he->ms.sym, he->ip,
+					 he->level, bf, size, width);
 }
 
 struct sort_entry sort_sym = {
@@ -274,11 +274,11 @@ sort__srcline_cmp(struct hist_entry *left, struct hist_entry *right)
 	return strcmp(left->srcline, right->srcline);
 }
 
-static int hist_entry__srcline_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__srcline_snprintf(struct hist_entry *he, char *bf,
 					size_t size,
 					unsigned int width __maybe_unused)
 {
-	return repsep_snprintf(bf, size, "%s", self->srcline);
+	return repsep_snprintf(bf, size, "%s", he->srcline);
 }
 
 struct sort_entry sort_srcline = {
@@ -302,11 +302,11 @@ sort__parent_cmp(struct hist_entry *left, struct hist_entry *right)
 	return strcmp(sym_l->name, sym_r->name);
 }
 
-static int hist_entry__parent_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__parent_snprintf(struct hist_entry *he, char *bf,
 				       size_t size, unsigned int width)
 {
 	return repsep_snprintf(bf, size, "%-*s", width,
-			      self->parent ? self->parent->name : "[other]");
+			      he->parent ? he->parent->name : "[other]");
 }
 
 struct sort_entry sort_parent = {
@@ -324,10 +324,10 @@ sort__cpu_cmp(struct hist_entry *left, struct hist_entry *right)
 	return right->cpu - left->cpu;
 }
 
-static int hist_entry__cpu_snprintf(struct hist_entry *self, char *bf,
-				       size_t size, unsigned int width)
+static int hist_entry__cpu_snprintf(struct hist_entry *he, char *bf,
+				    size_t size, unsigned int width)
 {
-	return repsep_snprintf(bf, size, "%*d", width, self->cpu);
+	return repsep_snprintf(bf, size, "%*d", width, he->cpu);
 }
 
 struct sort_entry sort_cpu = {
@@ -346,10 +346,10 @@ sort__dso_from_cmp(struct hist_entry *left, struct hist_entry *right)
 			      right->branch_info->from.map);
 }
 
-static int hist_entry__dso_from_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
-	return _hist_entry__dso_snprintf(self->branch_info->from.map,
+	return _hist_entry__dso_snprintf(he->branch_info->from.map,
 					 bf, size, width);
 }
 
@@ -360,10 +360,10 @@ sort__dso_to_cmp(struct hist_entry *left, struct hist_entry *right)
 			      right->branch_info->to.map);
 }
 
-static int hist_entry__dso_to_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__dso_to_snprintf(struct hist_entry *he, char *bf,
 				       size_t size, unsigned int width)
 {
-	return _hist_entry__dso_snprintf(self->branch_info->to.map,
+	return _hist_entry__dso_snprintf(he->branch_info->to.map,
 					 bf, size, width);
 }
 
@@ -391,21 +391,21 @@ sort__sym_to_cmp(struct hist_entry *left, struct hist_entry *right)
 	return _sort__sym_cmp(to_l->sym, to_r->sym);
 }
 
-static int hist_entry__sym_from_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__sym_from_snprintf(struct hist_entry *he, char *bf,
 					 size_t size, unsigned int width)
 {
-	struct addr_map_symbol *from = &self->branch_info->from;
+	struct addr_map_symbol *from = &he->branch_info->from;
 	return _hist_entry__sym_snprintf(from->map, from->sym, from->addr,
-					 self->level, bf, size, width);
+					 he->level, bf, size, width);
 
 }
 
-static int hist_entry__sym_to_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__sym_to_snprintf(struct hist_entry *he, char *bf,
 				       size_t size, unsigned int width)
 {
-	struct addr_map_symbol *to = &self->branch_info->to;
+	struct addr_map_symbol *to = &he->branch_info->to;
 	return _hist_entry__sym_snprintf(to->map, to->sym, to->addr,
-					 self->level, bf, size, width);
+					 he->level, bf, size, width);
 
 }
 
@@ -448,13 +448,13 @@ sort__mispredict_cmp(struct hist_entry *left, struct hist_entry *right)
 	return mp || p;
 }
 
-static int hist_entry__mispredict_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__mispredict_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width){
 	static const char *out = "N/A";
 
-	if (self->branch_info->flags.predicted)
+	if (he->branch_info->flags.predicted)
 		out = "N";
-	else if (self->branch_info->flags.mispred)
+	else if (he->branch_info->flags.mispred)
 		out = "Y";
 
 	return repsep_snprintf(bf, size, "%-*s", width, out);
@@ -474,19 +474,19 @@ sort__daddr_cmp(struct hist_entry *left, struct hist_entry *right)
 	return (int64_t)(r - l);
 }
 
-static int hist_entry__daddr_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__daddr_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
 	uint64_t addr = 0;
 	struct map *map = NULL;
 	struct symbol *sym = NULL;
 
-	if (self->mem_info) {
-		addr = self->mem_info->daddr.addr;
-		map = self->mem_info->daddr.map;
-		sym = self->mem_info->daddr.sym;
+	if (he->mem_info) {
+		addr = he->mem_info->daddr.addr;
+		map = he->mem_info->daddr.map;
+		sym = he->mem_info->daddr.sym;
 	}
-	return _hist_entry__sym_snprintf(map, sym, addr, self->level, bf, size,
+	return _hist_entry__sym_snprintf(map, sym, addr, he->level, bf, size,
 					 width);
 }
 
@@ -504,13 +504,13 @@ sort__dso_daddr_cmp(struct hist_entry *left, struct hist_entry *right)
 	return _sort__dso_cmp(map_l, map_r);
 }
 
-static int hist_entry__dso_daddr_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__dso_daddr_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
 	struct map *map = NULL;
 
-	if (self->mem_info)
-		map = self->mem_info->daddr.map;
+	if (he->mem_info)
+		map = he->mem_info->daddr.map;
 
 	return _hist_entry__dso_snprintf(map, bf, size, width);
 }
@@ -534,14 +534,14 @@ sort__locked_cmp(struct hist_entry *left, struct hist_entry *right)
 	return (int64_t)(data_src_r.mem_lock - data_src_l.mem_lock);
 }
 
-static int hist_entry__locked_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__locked_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
 	const char *out;
 	u64 mask = PERF_MEM_LOCK_NA;
 
-	if (self->mem_info)
-		mask = self->mem_info->data_src.mem_lock;
+	if (he->mem_info)
+		mask = he->mem_info->data_src.mem_lock;
 
 	if (mask & PERF_MEM_LOCK_NA)
 		out = "N/A";
@@ -583,7 +583,7 @@ static const char * const tlb_access[] = {
 };
 #define NUM_TLB_ACCESS (sizeof(tlb_access)/sizeof(const char *))
 
-static int hist_entry__tlb_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__tlb_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
 	char out[64];
@@ -594,8 +594,8 @@ static int hist_entry__tlb_snprintf(struct hist_entry *self, char *bf,
 
 	out[0] = '\0';
 
-	if (self->mem_info)
-		m = self->mem_info->data_src.mem_dtlb;
+	if (he->mem_info)
+		m = he->mem_info->data_src.mem_dtlb;
 
 	hit = m & PERF_MEM_TLB_HIT;
 	miss = m & PERF_MEM_TLB_MISS;
@@ -660,7 +660,7 @@ static const char * const mem_lvl[] = {
 };
 #define NUM_MEM_LVL (sizeof(mem_lvl)/sizeof(const char *))
 
-static int hist_entry__lvl_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__lvl_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
 	char out[64];
@@ -669,8 +669,8 @@ static int hist_entry__lvl_snprintf(struct hist_entry *self, char *bf,
 	u64 m =  PERF_MEM_LVL_NA;
 	u64 hit, miss;
 
-	if (self->mem_info)
-		m  = self->mem_info->data_src.mem_lvl;
+	if (he->mem_info)
+		m  = he->mem_info->data_src.mem_lvl;
 
 	out[0] = '\0';
 
@@ -728,7 +728,7 @@ static const char * const snoop_access[] = {
 };
 #define NUM_SNOOP_ACCESS (sizeof(snoop_access)/sizeof(const char *))
 
-static int hist_entry__snoop_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
 	char out[64];
@@ -738,8 +738,8 @@ static int hist_entry__snoop_snprintf(struct hist_entry *self, char *bf,
 
 	out[0] = '\0';
 
-	if (self->mem_info)
-		m = self->mem_info->data_src.mem_snoop;
+	if (he->mem_info)
+		m = he->mem_info->data_src.mem_snoop;
 
 	for (i = 0; m && i < NUM_SNOOP_ACCESS; i++, m >>= 1) {
 		if (!(m & 0x1))
@@ -776,10 +776,10 @@ sort__local_weight_cmp(struct hist_entry *left, struct hist_entry *right)
 	return he_weight(left) - he_weight(right);
 }
 
-static int hist_entry__local_weight_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__local_weight_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
-	return repsep_snprintf(bf, size, "%-*llu", width, he_weight(self));
+	return repsep_snprintf(bf, size, "%-*llu", width, he_weight(he));
 }
 
 struct sort_entry sort_local_weight = {
@@ -795,10 +795,10 @@ sort__global_weight_cmp(struct hist_entry *left, struct hist_entry *right)
 	return left->stat.weight - right->stat.weight;
 }
 
-static int hist_entry__global_weight_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__global_weight_snprintf(struct hist_entry *he, char *bf,
 					      size_t size, unsigned int width)
 {
-	return repsep_snprintf(bf, size, "%-*llu", width, self->stat.weight);
+	return repsep_snprintf(bf, size, "%-*llu", width, he->stat.weight);
 }
 
 struct sort_entry sort_global_weight = {
@@ -857,12 +857,12 @@ sort__abort_cmp(struct hist_entry *left, struct hist_entry *right)
 		right->branch_info->flags.abort;
 }
 
-static int hist_entry__abort_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__abort_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
 	static const char *out = ".";
 
-	if (self->branch_info->flags.abort)
+	if (he->branch_info->flags.abort)
 		out = "A";
 	return repsep_snprintf(bf, size, "%-*s", width, out);
 }
@@ -881,12 +881,12 @@ sort__in_tx_cmp(struct hist_entry *left, struct hist_entry *right)
 		right->branch_info->flags.in_tx;
 }
 
-static int hist_entry__in_tx_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__in_tx_snprintf(struct hist_entry *he, char *bf,
 				    size_t size, unsigned int width)
 {
 	static const char *out = ".";
 
-	if (self->branch_info->flags.in_tx)
+	if (he->branch_info->flags.in_tx)
 		out = "T";
 
 	return repsep_snprintf(bf, size, "%-*s", width, out);
@@ -940,10 +940,10 @@ int hist_entry__transaction_len(void)
 	return len;
 }
 
-static int hist_entry__transaction_snprintf(struct hist_entry *self, char *bf,
+static int hist_entry__transaction_snprintf(struct hist_entry *he, char *bf,
 					    size_t size, unsigned int width)
 {
-	u64 t = self->transaction;
+	u64 t = he->transaction;
 	char buf[128];
 	char *p = buf;
 	int i;
@@ -1125,7 +1125,7 @@ int setup_sorting(void)
 	return ret;
 }
 
-static void sort_entry__setup_elide(struct sort_entry *self,
+static void sort_entry__setup_elide(struct sort_entry *se,
 				    struct strlist *list,
 				    const char *list_name, FILE *fp)
 {
@@ -1133,7 +1133,7 @@ static void sort_entry__setup_elide(struct sort_entry *self,
 		if (fp != NULL)
 			fprintf(fp, "# %s: %s\n", list_name,
 				strlist__entry(list, 0)->s);
-		self->elide = true;
+		se->elide = true;
 	}
 }
 
diff --git a/tools/perf/util/strfilter.c b/tools/perf/util/strfilter.c
index 834c8ebfe38e..67e4a0082822 100644
--- a/tools/perf/util/strfilter.c
+++ b/tools/perf/util/strfilter.c
@@ -10,22 +10,22 @@ static const char *OP_not	= "!";	/* Logical NOT */
 #define is_operator(c)	((c) == '|' || (c) == '&' || (c) == '!')
 #define is_separator(c)	(is_operator(c) || (c) == '(' || (c) == ')')
 
-static void strfilter_node__delete(struct strfilter_node *self)
+static void strfilter_node__delete(struct strfilter_node *node)
 {
-	if (self) {
-		if (self->p && !is_operator(*self->p))
-			free((char *)self->p);
-		strfilter_node__delete(self->l);
-		strfilter_node__delete(self->r);
-		free(self);
+	if (node) {
+		if (node->p && !is_operator(*node->p))
+			free((char *)node->p);
+		strfilter_node__delete(node->l);
+		strfilter_node__delete(node->r);
+		free(node);
 	}
 }
 
-void strfilter__delete(struct strfilter *self)
+void strfilter__delete(struct strfilter *filter)
 {
-	if (self) {
-		strfilter_node__delete(self->root);
-		free(self);
+	if (filter) {
+		strfilter_node__delete(filter->root);
+		free(filter);
 	}
 }
 
@@ -170,30 +170,30 @@ struct strfilter *strfilter__new(const char *rules, const char **err)
 	return ret;
 }
 
-static bool strfilter_node__compare(struct strfilter_node *self,
+static bool strfilter_node__compare(struct strfilter_node *node,
 				    const char *str)
 {
-	if (!self || !self->p)
+	if (!node || !node->p)
 		return false;
 
-	switch (*self->p) {
+	switch (*node->p) {
 	case '|':	/* OR */
-		return strfilter_node__compare(self->l, str) ||
-			strfilter_node__compare(self->r, str);
+		return strfilter_node__compare(node->l, str) ||
+			strfilter_node__compare(node->r, str);
 	case '&':	/* AND */
-		return strfilter_node__compare(self->l, str) &&
-			strfilter_node__compare(self->r, str);
+		return strfilter_node__compare(node->l, str) &&
+			strfilter_node__compare(node->r, str);
 	case '!':	/* NOT */
-		return !strfilter_node__compare(self->r, str);
+		return !strfilter_node__compare(node->r, str);
 	default:
-		return strglobmatch(str, self->p);
+		return strglobmatch(str, node->p);
 	}
 }
 
 /* Return true if STR matches the filter rules */
-bool strfilter__compare(struct strfilter *self, const char *str)
+bool strfilter__compare(struct strfilter *node, const char *str)
 {
-	if (!self)
+	if (!node)
 		return false;
-	return strfilter_node__compare(self->root, str);
+	return strfilter_node__compare(node->root, str);
 }
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index e3d4a550a703..80d19a086072 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -9,51 +9,51 @@
 
 struct thread *thread__new(pid_t pid, pid_t tid)
 {
-	struct thread *self = zalloc(sizeof(*self));
+	struct thread *thread = zalloc(sizeof(*thread));
 
-	if (self != NULL) {
-		map_groups__init(&self->mg);
-		self->pid_ = pid;
-		self->tid = tid;
-		self->ppid = -1;
-		self->comm = malloc(32);
-		if (self->comm)
-			snprintf(self->comm, 32, ":%d", self->tid);
+	if (thread != NULL) {
+		map_groups__init(&thread->mg);
+		thread->pid_ = pid;
+		thread->tid = tid;
+		thread->ppid = -1;
+		thread->comm = malloc(32);
+		if (thread->comm)
+			snprintf(thread->comm, 32, ":%d", thread->tid);
 	}
 
-	return self;
+	return thread;
 }
 
-void thread__delete(struct thread *self)
+void thread__delete(struct thread *thread)
 {
-	map_groups__exit(&self->mg);
-	free(self->comm);
-	free(self);
+	map_groups__exit(&thread->mg);
+	free(thread->comm);
+	free(thread);
 }
 
-int thread__set_comm(struct thread *self, const char *comm)
+int thread__set_comm(struct thread *thread, const char *comm)
 {
 	int err;
 
-	if (self->comm)
-		free(self->comm);
-	self->comm = strdup(comm);
-	err = self->comm == NULL ? -ENOMEM : 0;
+	if (thread->comm)
+		free(thread->comm);
+	thread->comm = strdup(comm);
+	err = thread->comm == NULL ? -ENOMEM : 0;
 	if (!err) {
-		self->comm_set = true;
+		thread->comm_set = true;
 	}
 	return err;
 }
 
-int thread__comm_len(struct thread *self)
+int thread__comm_len(struct thread *thread)
 {
-	if (!self->comm_len) {
-		if (!self->comm)
+	if (!thread->comm_len) {
+		if (!thread->comm)
 			return 0;
-		self->comm_len = strlen(self->comm);
+		thread->comm_len = strlen(thread->comm);
 	}
 
-	return self->comm_len;
+	return thread->comm_len;
 }
 
 size_t thread__fprintf(struct thread *thread, FILE *fp)
@@ -62,30 +62,30 @@ size_t thread__fprintf(struct thread *thread, FILE *fp)
 	       map_groups__fprintf(&thread->mg, verbose, fp);
 }
 
-void thread__insert_map(struct thread *self, struct map *map)
+void thread__insert_map(struct thread *thread, struct map *map)
 {
-	map_groups__fixup_overlappings(&self->mg, map, verbose, stderr);
-	map_groups__insert(&self->mg, map);
+	map_groups__fixup_overlappings(&thread->mg, map, verbose, stderr);
+	map_groups__insert(&thread->mg, map);
 }
 
-int thread__fork(struct thread *self, struct thread *parent)
+int thread__fork(struct thread *thread, struct thread *parent)
 {
 	int i;
 
 	if (parent->comm_set) {
-		if (self->comm)
-			free(self->comm);
-		self->comm = strdup(parent->comm);
-		if (!self->comm)
+		if (thread->comm)
+			free(thread->comm);
+		thread->comm = strdup(parent->comm);
+		if (!thread->comm)
 			return -ENOMEM;
-		self->comm_set = true;
+		thread->comm_set = true;
 	}
 
 	for (i = 0; i < MAP__NR_TYPES; ++i)
-		if (map_groups__clone(&self->mg, &parent->mg, i) < 0)
+		if (map_groups__clone(&thread->mg, &parent->mg, i) < 0)
 			return -ENOMEM;
 
-	self->ppid = parent->tid;
+	thread->ppid = parent->tid;
 
 	return 0;
 }
-- 
1.8.1.4


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

* [PATCH 04/16] perf probe: Support "$vars" meta argument syntax for local variables
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 03/16] perf tools: Stop using 'self' in some more places Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 05/16] perf probe: Find fentry mcount fuzzed parameter location Arnaldo Carvalho de Melo
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Ingo Molnar, Paul Mackerras,
	Peter Zijlstra, Arnaldo Carvalho de Melo

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

Support "$vars" meta argument syntax for tracing all local variables at
probe point.

Now you can trace all available local variables (including function
parameters) at the probe point by passing $vars.

 # perf probe --add foo $vars

This automatically finds all local variables at foo() and adds it as
probe arguments.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20131011071023.15557.51770.stgit@udc4-manage.rcp.hitachi.co.jp
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c  |  1 -
 tools/perf/util/probe-finder.c | 96 ++++++++++++++++++++++++++++++++++++++----
 tools/perf/util/probe-finder.h |  1 +
 3 files changed, 89 insertions(+), 9 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 779b2dacd43f..9c6989ca2bea 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -47,7 +47,6 @@
 #include "session.h"
 
 #define MAX_CMDLEN 256
-#define MAX_PROBE_ARGS 128
 #define PERFPROBE_GROUP "probe"
 
 bool probe_event_dry_run;	/* Dry run flag */
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index c09e0a9fdf4c..5a46be968c0b 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -1136,12 +1136,78 @@ found:
 	return ret;
 }
 
+struct local_vars_finder {
+	struct probe_finder *pf;
+	struct perf_probe_arg *args;
+	int max_args;
+	int nargs;
+	int ret;
+};
+
+/* Collect available variables in this scope */
+static int copy_variables_cb(Dwarf_Die *die_mem, void *data)
+{
+	struct local_vars_finder *vf = data;
+	int tag;
+
+	tag = dwarf_tag(die_mem);
+	if (tag == DW_TAG_formal_parameter ||
+	    tag == DW_TAG_variable) {
+		if (convert_variable_location(die_mem, vf->pf->addr,
+					      vf->pf->fb_ops, NULL) == 0) {
+			vf->args[vf->nargs].var = (char *)dwarf_diename(die_mem);
+			if (vf->args[vf->nargs].var == NULL) {
+				vf->ret = -ENOMEM;
+				return DIE_FIND_CB_END;
+			}
+			pr_debug(" %s", vf->args[vf->nargs].var);
+			vf->nargs++;
+		}
+	}
+
+	if (dwarf_haspc(die_mem, vf->pf->addr))
+		return DIE_FIND_CB_CONTINUE;
+	else
+		return DIE_FIND_CB_SIBLING;
+}
+
+static int expand_probe_args(Dwarf_Die *sc_die, struct probe_finder *pf,
+			     struct perf_probe_arg *args)
+{
+	Dwarf_Die die_mem;
+	int i;
+	int n = 0;
+	struct local_vars_finder vf = {.pf = pf, .args = args,
+				.max_args = MAX_PROBE_ARGS, .ret = 0};
+
+	for (i = 0; i < pf->pev->nargs; i++) {
+		/* var never be NULL */
+		if (strcmp(pf->pev->args[i].var, "$vars") == 0) {
+			pr_debug("Expanding $vars into:");
+			vf.nargs = n;
+			/* Special local variables */
+			die_find_child(sc_die, copy_variables_cb, (void *)&vf,
+				       &die_mem);
+			pr_debug(" (%d)\n", vf.nargs - n);
+			if (vf.ret < 0)
+				return vf.ret;
+			n = vf.nargs;
+		} else {
+			/* Copy normal argument */
+			args[n] = pf->pev->args[i];
+			n++;
+		}
+	}
+	return n;
+}
+
 /* Add a found probe point into trace event list */
 static int add_probe_trace_event(Dwarf_Die *sc_die, struct probe_finder *pf)
 {
 	struct trace_event_finder *tf =
 			container_of(pf, struct trace_event_finder, pf);
 	struct probe_trace_event *tev;
+	struct perf_probe_arg *args;
 	int ret, i;
 
 	/* Check number of tevs */
@@ -1161,21 +1227,35 @@ static int add_probe_trace_event(Dwarf_Die *sc_die, struct probe_finder *pf)
 	pr_debug("Probe point found: %s+%lu\n", tev->point.symbol,
 		 tev->point.offset);
 
-	/* Find each argument */
-	tev->nargs = pf->pev->nargs;
-	tev->args = zalloc(sizeof(struct probe_trace_arg) * tev->nargs);
-	if (tev->args == NULL)
+	/* Expand special probe argument if exist */
+	args = zalloc(sizeof(struct perf_probe_arg) * MAX_PROBE_ARGS);
+	if (args == NULL)
 		return -ENOMEM;
-	for (i = 0; i < pf->pev->nargs; i++) {
-		pf->pvar = &pf->pev->args[i];
+
+	ret = expand_probe_args(sc_die, pf, args);
+	if (ret < 0)
+		goto end;
+
+	tev->nargs = ret;
+	tev->args = zalloc(sizeof(struct probe_trace_arg) * tev->nargs);
+	if (tev->args == NULL) {
+		ret = -ENOMEM;
+		goto end;
+	}
+
+	/* Find each argument */
+	for (i = 0; i < tev->nargs; i++) {
+		pf->pvar = &args[i];
 		pf->tvar = &tev->args[i];
 		/* Variable should be found from scope DIE */
 		ret = find_variable(sc_die, pf);
 		if (ret != 0)
-			return ret;
+			break;
 	}
 
-	return 0;
+end:
+	free(args);
+	return ret;
 }
 
 /* Find probe_trace_events specified by perf_probe_event from debuginfo */
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h
index 3f0c29dd6ac5..d6dab0e0a937 100644
--- a/tools/perf/util/probe-finder.h
+++ b/tools/perf/util/probe-finder.h
@@ -7,6 +7,7 @@
 
 #define MAX_PROBE_BUFFER	1024
 #define MAX_PROBES		 128
+#define MAX_PROBE_ARGS		 128
 
 static inline int is_c_varname(const char *name)
 {
-- 
1.8.1.4


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

* [PATCH 05/16] perf probe: Find fentry mcount fuzzed parameter location
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 04/16] perf probe: Support "$vars" meta argument syntax for local variables Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 06/16] perf bench: Change the procps visible command-name of invididual benchmark tests plus cleanups Arnaldo Carvalho de Melo
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Ingo Molnar, Paul Mackerras,
	Peter Zijlstra, Arnaldo Carvalho de Melo

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

At this point, --fentry (mcount function entry) option for gcc fuzzes
the debuginfo variable locations by skipping the mcount instruction
offset (on x86, this is a 5 byte call instruction).

This makes variable searching fail at the entry of functions which
are mcount'ed.

e.g.)
Available variables at vfs_read
        @<vfs_read+0>
                (No matched variables)

This patch adds additional location search at the function entry point
to solve this issue, which tries to find the earliest address for the
variable location.

Note that this only works with function parameters (formal parameters)
because any local variables should not exist on the function entry
address (those are not initialized yet).

With this patch, perf probe shows correct parameters if possible;
 # perf probe --vars vfs_read
 Available variables at vfs_read
         @<vfs_read+0>
                 char*   buf
                 loff_t* pos
                 size_t  count
                 struct file*    file

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20131011071025.15557.13275.stgit@udc4-manage.rcp.hitachi.co.jp
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-finder.c | 39 +++++++++++++++++++++++++++++++--------
 1 file changed, 31 insertions(+), 8 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 5a46be968c0b..c04405296e5b 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -273,12 +273,15 @@ static struct probe_trace_arg_ref *alloc_trace_arg_ref(long offs)
 /*
  * Convert a location into trace_arg.
  * If tvar == NULL, this just checks variable can be converted.
+ * If fentry == true and vr_die is a parameter, do huristic search
+ * for the location fuzzed by function entry mcount.
  */
 static int convert_variable_location(Dwarf_Die *vr_die, Dwarf_Addr addr,
-				     Dwarf_Op *fb_ops,
+				     Dwarf_Op *fb_ops, Dwarf_Die *sp_die,
 				     struct probe_trace_arg *tvar)
 {
 	Dwarf_Attribute attr;
+	Dwarf_Addr tmp = 0;
 	Dwarf_Op *op;
 	size_t nops;
 	unsigned int regn;
@@ -291,12 +294,29 @@ static int convert_variable_location(Dwarf_Die *vr_die, Dwarf_Addr addr,
 		goto static_var;
 
 	/* TODO: handle more than 1 exprs */
-	if (dwarf_attr(vr_die, DW_AT_location, &attr) == NULL ||
-	    dwarf_getlocation_addr(&attr, addr, &op, &nops, 1) <= 0 ||
-	    nops == 0) {
-		/* TODO: Support const_value */
+	if (dwarf_attr(vr_die, DW_AT_location, &attr) == NULL)
+		return -EINVAL;	/* Broken DIE ? */
+	if (dwarf_getlocation_addr(&attr, addr, &op, &nops, 1) <= 0) {
+		ret = dwarf_entrypc(sp_die, &tmp);
+		if (ret || addr != tmp ||
+		    dwarf_tag(vr_die) != DW_TAG_formal_parameter ||
+		    dwarf_highpc(sp_die, &tmp))
+			return -ENOENT;
+		/*
+		 * This is fuzzed by fentry mcount. We try to find the
+		 * parameter location at the earliest address.
+		 */
+		for (addr += 1; addr <= tmp; addr++) {
+			if (dwarf_getlocation_addr(&attr, addr, &op,
+						   &nops, 1) > 0)
+				goto found;
+		}
 		return -ENOENT;
 	}
+found:
+	if (nops == 0)
+		/* TODO: Support const_value */
+		return -ENOENT;
 
 	if (op->atom == DW_OP_addr) {
 static_var:
@@ -600,7 +620,7 @@ static int convert_variable(Dwarf_Die *vr_die, struct probe_finder *pf)
 		 dwarf_diename(vr_die));
 
 	ret = convert_variable_location(vr_die, pf->addr, pf->fb_ops,
-					pf->tvar);
+					&pf->sp_die, pf->tvar);
 	if (ret == -ENOENT)
 		pr_err("Failed to find the location of %s at this address.\n"
 		       " Perhaps, it has been optimized out.\n", pf->pvar->var);
@@ -1148,13 +1168,15 @@ struct local_vars_finder {
 static int copy_variables_cb(Dwarf_Die *die_mem, void *data)
 {
 	struct local_vars_finder *vf = data;
+	struct probe_finder *pf = vf->pf;
 	int tag;
 
 	tag = dwarf_tag(die_mem);
 	if (tag == DW_TAG_formal_parameter ||
 	    tag == DW_TAG_variable) {
 		if (convert_variable_location(die_mem, vf->pf->addr,
-					      vf->pf->fb_ops, NULL) == 0) {
+					      vf->pf->fb_ops, &pf->sp_die,
+					      NULL) == 0) {
 			vf->args[vf->nargs].var = (char *)dwarf_diename(die_mem);
 			if (vf->args[vf->nargs].var == NULL) {
 				vf->ret = -ENOMEM;
@@ -1302,7 +1324,8 @@ static int collect_variables_cb(Dwarf_Die *die_mem, void *data)
 	if (tag == DW_TAG_formal_parameter ||
 	    tag == DW_TAG_variable) {
 		ret = convert_variable_location(die_mem, af->pf.addr,
-						af->pf.fb_ops, NULL);
+						af->pf.fb_ops, &af->pf.sp_die,
+						NULL);
 		if (ret == 0) {
 			ret = die_get_varname(die_mem, buf, MAX_VAR_LEN);
 			pr_debug2("Add new var: %s\n", buf);
-- 
1.8.1.4


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

* [PATCH 06/16] perf bench: Change the procps visible command-name of invididual benchmark tests plus cleanups
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 05/16] perf probe: Find fentry mcount fuzzed parameter location Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 07/16] perf sched: Make struct perf_sched sched a local variable Arnaldo Carvalho de Melo
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Hitoshi Mitake, Jiri Olsa,
	Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Ingo Molnar <mingo@kernel.org>

Before this patch, looking at 'perf bench sched pipe' behavior over
'top' only told us that something related to perf is running:

      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    19934 mingo     20   0 54836 1296  952 R 18.6  0.0   0:00.56 perf
    19935 mingo     20   0 54836  384   36 S 18.6  0.0   0:00.56 perf

After the patch it's clearly visible what's going on:

      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    19744 mingo     20   0  125m 3536 2644 R 68.2  0.0   0:01.12 sched-pipe
    19745 mingo     20   0  125m 1172  276 R 68.2  0.0   0:01.12 sched-pipe

The benchmark-subsystem name is concatenated with the individual
testcase name.

Unfortunately 'perf top' does not show the reconfigured name, possibly
because it caches ->comm[] values and does not recognize changes to
them?

Also clean up a few bits in builtin-bench.c while at it and reorganize
the code and the output strings to be consistent.

Use iterators to access the various arrays. Rename 'suites' concept to
'benchmark collection' and the 'bench_suite' to 'benchmark/bench'. The
many repetitions of 'suite' made the code harder to read and understand.

The new output is:

  comet:~/tip/tools/perf> ./perf bench
  Usage:
        perf bench [<common options>] <collection> <benchmark> [<options>]

        # List of all available benchmark collections:

         sched: Scheduler and IPC benchmarks
           mem: Memory access benchmarks
          numa: NUMA scheduling and MM benchmarks
           all: All benchmarks

  comet:~/tip/tools/perf> ./perf bench sched

        # List of available benchmarks for collection 'sched':

     messaging: Benchmark for scheduling and IPC
          pipe: Benchmark for pipe() between two processes
           all: Test all scheduler benchmarks

  comet:~/tip/tools/perf> ./perf bench mem

        # List of available benchmarks for collection 'mem':

        memcpy: Benchmark for memcpy()
        memset: Benchmark for memset() tests
           all: Test all memory benchmarks

  comet:~/tip/tools/perf> ./perf bench numa

        # List of available benchmarks for collection 'numa':

           mem: Benchmark for NUMA workloads
           all: Test all NUMA benchmarks

Individual benchmark modules were not touched.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Hitoshi Mitake <h.mitake@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20131023123756.GA17871@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-bench.c | 239 +++++++++++++++++++++++----------------------
 1 file changed, 122 insertions(+), 117 deletions(-)

diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c
index 33af80fa49cf..e47f90cc7b98 100644
--- a/tools/perf/builtin-bench.c
+++ b/tools/perf/builtin-bench.c
@@ -1,21 +1,18 @@
 /*
- *
  * builtin-bench.c
  *
- * General benchmarking subsystem provided by perf
+ * General benchmarking collections provided by perf
  *
  * Copyright (C) 2009, Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
- *
  */
 
 /*
+ * Available benchmark collection list:
  *
- * Available subsystem list:
- *  sched ... scheduler and IPC mechanism
+ *  sched ... scheduler and IPC performance
  *  mem   ... memory access performance
- *
+ *  numa  ... NUMA scheduling and MM performance
  */
-
 #include "perf.h"
 #include "util/util.h"
 #include "util/parse-options.h"
@@ -25,112 +22,92 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/prctl.h>
 
-struct bench_suite {
-	const char *name;
-	const char *summary;
-	int (*fn)(int, const char **, const char *);
+typedef int (*bench_fn_t)(int argc, const char **argv, const char *prefix);
+
+struct bench {
+	const char	*name;
+	const char	*summary;
+	bench_fn_t	fn;
 };
-						\
-/* sentinel: easy for help */
-#define suite_all { "all", "Test all benchmark suites", NULL }
 
 #ifdef HAVE_LIBNUMA_SUPPORT
-static struct bench_suite numa_suites[] = {
-	{ "mem",
-	  "Benchmark for NUMA workloads",
-	  bench_numa },
-	suite_all,
-	{ NULL,
-	  NULL,
-	  NULL                  }
+static struct bench numa_benchmarks[] = {
+	{ "mem",	"Benchmark for NUMA workloads",			bench_numa		},
+	{ "all",	"Test all NUMA benchmarks",			NULL			},
+	{ NULL,		NULL,						NULL			}
 };
 #endif
 
-static struct bench_suite sched_suites[] = {
-	{ "messaging",
-	  "Benchmark for scheduler and IPC mechanisms",
-	  bench_sched_messaging },
-	{ "pipe",
-	  "Flood of communication over pipe() between two processes",
-	  bench_sched_pipe      },
-	suite_all,
-	{ NULL,
-	  NULL,
-	  NULL                  }
+static struct bench sched_benchmarks[] = {
+	{ "messaging",	"Benchmark for scheduling and IPC",		bench_sched_messaging	},
+	{ "pipe",	"Benchmark for pipe() between two processes",	bench_sched_pipe	},
+	{ "all",	"Test all scheduler benchmarks",		NULL			},
+	{ NULL,		NULL,						NULL			}
 };
 
-static struct bench_suite mem_suites[] = {
-	{ "memcpy",
-	  "Simple memory copy in various ways",
-	  bench_mem_memcpy },
-	{ "memset",
-	  "Simple memory set in various ways",
-	  bench_mem_memset },
-	suite_all,
-	{ NULL,
-	  NULL,
-	  NULL             }
+static struct bench mem_benchmarks[] = {
+	{ "memcpy",	"Benchmark for memcpy()",			bench_mem_memcpy	},
+	{ "memset",	"Benchmark for memset() tests",			bench_mem_memset	},
+	{ "all",	"Test all memory benchmarks",			NULL			},
+	{ NULL,		NULL,						NULL			}
 };
 
-struct bench_subsys {
-	const char *name;
-	const char *summary;
-	struct bench_suite *suites;
+struct collection {
+	const char	*name;
+	const char	*summary;
+	struct bench	*benchmarks;
 };
 
-static struct bench_subsys subsystems[] = {
+static struct collection collections[] = {
+	{ "sched",	"Scheduler and IPC benchmarks",		sched_benchmarks	},
+	{ "mem",	"Memory access benchmarks",			mem_benchmarks		},
 #ifdef HAVE_LIBNUMA_SUPPORT
-	{ "numa",
-	  "NUMA scheduling and MM behavior",
-	  numa_suites },
+	{ "numa",	"NUMA scheduling and MM benchmarks",		numa_benchmarks		},
 #endif
-	{ "sched",
-	  "scheduler and IPC mechanism",
-	  sched_suites },
-	{ "mem",
-	  "memory access performance",
-	  mem_suites },
-	{ "all",		/* sentinel: easy for help */
-	  "all benchmark subsystem",
-	  NULL },
-	{ NULL,
-	  NULL,
-	  NULL       }
+	{ "all",	"All benchmarks",				NULL			},
+	{ NULL,		NULL,						NULL			}
 };
 
-static void dump_suites(int subsys_index)
+/* Iterate over all benchmark collections: */
+#define for_each_collection(coll) \
+	for (coll = collections; coll->name; coll++)
+
+/* Iterate over all benchmarks within a collection: */
+#define for_each_bench(coll, bench) \
+	for (bench = coll->benchmarks; bench->name; bench++)
+
+static void dump_benchmarks(struct collection *coll)
 {
-	int i;
+	struct bench *bench;
 
-	printf("# List of available suites for %s...\n\n",
-	       subsystems[subsys_index].name);
+	printf("\n        # List of available benchmarks for collection '%s':\n\n", coll->name);
 
-	for (i = 0; subsystems[subsys_index].suites[i].name; i++)
-		printf("%14s: %s\n",
-		       subsystems[subsys_index].suites[i].name,
-		       subsystems[subsys_index].suites[i].summary);
+	for_each_bench(coll, bench)
+		printf("%14s: %s\n", bench->name, bench->summary);
 
 	printf("\n");
-	return;
 }
 
 static const char *bench_format_str;
+
+/* Output/formatting style, exported to benchmark modules: */
 int bench_format = BENCH_FORMAT_DEFAULT;
 
 static const struct option bench_options[] = {
-	OPT_STRING('f', "format", &bench_format_str, "default",
-		    "Specify format style"),
+	OPT_STRING('f', "format", &bench_format_str, "default", "Specify format style"),
 	OPT_END()
 };
 
 static const char * const bench_usage[] = {
-	"perf bench [<common options>] <subsystem> <suite> [<options>]",
+	"perf bench [<common options>] <collection> <benchmark> [<options>]",
 	NULL
 };
 
 static void print_usage(void)
 {
+	struct collection *coll;
 	int i;
 
 	printf("Usage: \n");
@@ -138,11 +115,10 @@ static void print_usage(void)
 		printf("\t%s\n", bench_usage[i]);
 	printf("\n");
 
-	printf("# List of available subsystems...\n\n");
+	printf("        # List of all available benchmark collections:\n\n");
 
-	for (i = 0; subsystems[i].name; i++)
-		printf("%14s: %s\n",
-		       subsystems[i].name, subsystems[i].summary);
+	for_each_collection(coll)
+		printf("%14s: %s\n", coll->name, coll->summary);
 	printf("\n");
 }
 
@@ -159,44 +135,74 @@ static int bench_str2int(const char *str)
 	return BENCH_FORMAT_UNKNOWN;
 }
 
-static void all_suite(struct bench_subsys *subsys)	  /* FROM HERE */
+/*
+ * Run a specific benchmark but first rename the running task's ->comm[]
+ * to something meaningful:
+ */
+static int run_bench(const char *coll_name, const char *bench_name, bench_fn_t fn,
+		     int argc, const char **argv, const char *prefix)
 {
-	int i;
+	int size;
+	char *name;
+	int ret;
+
+	size = strlen(coll_name) + 1 + strlen(bench_name) + 1;
+
+	name = zalloc(size);
+	BUG_ON(!name);
+
+	scnprintf(name, size, "%s-%s", coll_name, bench_name);
+
+	prctl(PR_SET_NAME, name);
+	argv[0] = name;
+
+	ret = fn(argc, argv, prefix);
+
+	free(name);
+
+	return ret;
+}
+
+static void run_collection(struct collection *coll)
+{
+	struct bench *bench;
 	const char *argv[2];
-	struct bench_suite *suites = subsys->suites;
 
 	argv[1] = NULL;
 	/*
 	 * TODO:
-	 * preparing preset parameters for
+	 *
+	 * Preparing preset parameters for
 	 * embedded, ordinary PC, HPC, etc...
-	 * will be helpful
+	 * would be helpful.
 	 */
-	for (i = 0; suites[i].fn; i++) {
-		printf("# Running %s/%s benchmark...\n",
-		       subsys->name,
-		       suites[i].name);
+	for_each_bench(coll, bench) {
+		if (!bench->fn)
+			break;
+		printf("# Running %s/%s benchmark...\n", coll->name, bench->name);
 		fflush(stdout);
 
-		argv[1] = suites[i].name;
-		suites[i].fn(1, argv, NULL);
+		argv[1] = bench->name;
+		run_bench(coll->name, bench->name, bench->fn, 1, argv, NULL);
 		printf("\n");
 	}
 }
 
-static void all_subsystem(void)
+static void run_all_collections(void)
 {
-	int i;
-	for (i = 0; subsystems[i].suites; i++)
-		all_suite(&subsystems[i]);
+	struct collection *coll;
+
+	for_each_collection(coll)
+		run_collection(coll);
 }
 
 int cmd_bench(int argc, const char **argv, const char *prefix __maybe_unused)
 {
-	int i, j, status = 0;
+	struct collection *coll;
+	int ret = 0;
 
 	if (argc < 2) {
-		/* No subsystem specified. */
+		/* No collection specified. */
 		print_usage();
 		goto end;
 	}
@@ -206,7 +212,7 @@ int cmd_bench(int argc, const char **argv, const char *prefix __maybe_unused)
 
 	bench_format = bench_str2int(bench_format_str);
 	if (bench_format == BENCH_FORMAT_UNKNOWN) {
-		printf("Unknown format descriptor:%s\n", bench_format_str);
+		printf("Unknown format descriptor: '%s'\n", bench_format_str);
 		goto end;
 	}
 
@@ -216,52 +222,51 @@ int cmd_bench(int argc, const char **argv, const char *prefix __maybe_unused)
 	}
 
 	if (!strcmp(argv[0], "all")) {
-		all_subsystem();
+		run_all_collections();
 		goto end;
 	}
 
-	for (i = 0; subsystems[i].name; i++) {
-		if (strcmp(subsystems[i].name, argv[0]))
+	for_each_collection(coll) {
+		struct bench *bench;
+
+		if (strcmp(coll->name, argv[0]))
 			continue;
 
 		if (argc < 2) {
-			/* No suite specified. */
-			dump_suites(i);
+			/* No bench specified. */
+			dump_benchmarks(coll);
 			goto end;
 		}
 
 		if (!strcmp(argv[1], "all")) {
-			all_suite(&subsystems[i]);
+			run_collection(coll);
 			goto end;
 		}
 
-		for (j = 0; subsystems[i].suites[j].name; j++) {
-			if (strcmp(subsystems[i].suites[j].name, argv[1]))
+		for_each_bench(coll, bench) {
+			if (strcmp(bench->name, argv[1]))
 				continue;
 
 			if (bench_format == BENCH_FORMAT_DEFAULT)
-				printf("# Running %s/%s benchmark...\n",
-				       subsystems[i].name,
-				       subsystems[i].suites[j].name);
+				printf("# Running '%s/%s' benchmark:\n", coll->name, bench->name);
 			fflush(stdout);
-			status = subsystems[i].suites[j].fn(argc - 1,
-							    argv + 1, prefix);
+			ret = run_bench(coll->name, bench->name, bench->fn, argc-1, argv+1, prefix);
 			goto end;
 		}
 
 		if (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")) {
-			dump_suites(i);
+			dump_benchmarks(coll);
 			goto end;
 		}
 
-		printf("Unknown suite:%s for %s\n", argv[1], argv[0]);
-		status = 1;
+		printf("Unknown benchmark: '%s' for collection '%s'\n", argv[1], argv[0]);
+		ret = 1;
 		goto end;
 	}
 
-	printf("Unknown subsystem:%s\n", argv[0]);
-	status = 1;
+	printf("Unknown collection: '%s'\n", argv[0]);
+	ret = 1;
 
 end:
-	return status;
+	return ret;
 }
-- 
1.8.1.4


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

* [PATCH 07/16] perf sched: Make struct perf_sched sched a local variable
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 06/16] perf bench: Change the procps visible command-name of invididual benchmark tests plus cleanups Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 08/16] perf sched: Optimize build time Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 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>

Change "struct perf_sched sched" from being global to being local.

The build slowdown cured by f36f83f947ed is dealt with in the following
patch, by programatically setting perf_sched.curr_pid.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: David Ahern <dsahern@gmail.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/1382427258-17495-12-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-sched.c | 41 ++++++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 21 deletions(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 5a46b102eb08..5a338566195e 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1655,29 +1655,28 @@ static int __cmd_record(int argc, const char **argv)
 	return cmd_record(i, rec_argv, NULL);
 }
 
-static const char default_sort_order[] = "avg, max, switch, runtime";
-static struct perf_sched sched = {
-	.tool = {
-		.sample		 = perf_sched__process_tracepoint_sample,
-		.comm		 = perf_event__process_comm,
-		.lost		 = perf_event__process_lost,
-		.fork		 = perf_sched__process_fork_event,
-		.ordered_samples = true,
-	},
-	.cmp_pid	      = LIST_HEAD_INIT(sched.cmp_pid),
-	.sort_list	      = LIST_HEAD_INIT(sched.sort_list),
-	.start_work_mutex     = PTHREAD_MUTEX_INITIALIZER,
-	.work_done_wait_mutex = PTHREAD_MUTEX_INITIALIZER,
-	.curr_pid	      = { [0 ... MAX_CPUS - 1] = -1 },
-	.sort_order	      = default_sort_order,
-	.replay_repeat	      = 10,
-	.profile_cpu	      = -1,
-	.next_shortname1      = 'A',
-	.next_shortname2      = '0',
-};
-
 int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 {
+	const char default_sort_order[] = "avg, max, switch, runtime";
+	struct perf_sched sched = {
+		.tool = {
+			.sample		 = perf_sched__process_tracepoint_sample,
+			.comm		 = perf_event__process_comm,
+			.lost		 = perf_event__process_lost,
+			.fork		 = perf_sched__process_fork_event,
+			.ordered_samples = true,
+		},
+		.cmp_pid	      = LIST_HEAD_INIT(sched.cmp_pid),
+		.sort_list	      = LIST_HEAD_INIT(sched.sort_list),
+		.start_work_mutex     = PTHREAD_MUTEX_INITIALIZER,
+		.work_done_wait_mutex = PTHREAD_MUTEX_INITIALIZER,
+		.curr_pid	      = { [0 ... MAX_CPUS - 1] = -1 },
+		.sort_order	      = default_sort_order,
+		.replay_repeat	      = 10,
+		.profile_cpu	      = -1,
+		.next_shortname1      = 'A',
+		.next_shortname2      = '0',
+	};
 	const struct option latency_options[] = {
 	OPT_STRING('s', "sort", &sched.sort_order, "key[,key2...]",
 		   "sort by key(s): runtime, switch, avg, max"),
-- 
1.8.1.4


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

* [PATCH 08/16] perf sched: Optimize build time
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 07/16] perf sched: Make struct perf_sched sched a local variable Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 09/16] perf script: Make perf_script a local variable Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 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>

builtin-sched.c took a log time to build with -O6 optimization. This
turned out to be caused by:

	.curr_pid = { [0 ... MAX_CPUS - 1] = -1 },

Fix by initializing curr_pid programmatically.

This addresses the problem cured in f36f83f947ed using a smaller hammer.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: David Ahern <dsahern@gmail.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/1382427258-17495-13-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-sched.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 5a338566195e..ddb5dc15be17 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1670,7 +1670,6 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		.sort_list	      = LIST_HEAD_INIT(sched.sort_list),
 		.start_work_mutex     = PTHREAD_MUTEX_INITIALIZER,
 		.work_done_wait_mutex = PTHREAD_MUTEX_INITIALIZER,
-		.curr_pid	      = { [0 ... MAX_CPUS - 1] = -1 },
 		.sort_order	      = default_sort_order,
 		.replay_repeat	      = 10,
 		.profile_cpu	      = -1,
@@ -1732,6 +1731,10 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		.switch_event	    = replay_switch_event,
 		.fork_event	    = replay_fork_event,
 	};
+	unsigned int i;
+
+	for (i = 0; i < ARRAY_SIZE(sched.curr_pid); i++)
+		sched.curr_pid[i] = -1;
 
 	argc = parse_options(argc, argv, sched_options, sched_usage,
 			     PARSE_OPT_STOP_AT_NON_OPTION);
-- 
1.8.1.4


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

* [PATCH 09/16] perf script: Make perf_script a local variable
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 08/16] perf sched: Optimize build time Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 10/16] perf inject: Do not repipe attributes to a perf.data file Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 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>

Change perf_script from being global to being local.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: David Ahern <dsahern@gmail.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/1382427258-17495-4-git-send-email-adrian.hunter@intel.com
[ Made the minor consistency changes suggested by David Ahern ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-script.c | 40 ++++++++++++++++++++++++----------------
 1 file changed, 24 insertions(+), 16 deletions(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 27de6068049d..0ae88c2538a1 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -542,18 +542,9 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
 	return 0;
 }
 
-static struct perf_tool perf_script = {
-	.sample		 = process_sample_event,
-	.mmap		 = perf_event__process_mmap,
-	.mmap2		 = perf_event__process_mmap2,
-	.comm		 = perf_event__process_comm,
-	.exit		 = perf_event__process_exit,
-	.fork		 = perf_event__process_fork,
-	.attr		 = perf_event__process_attr,
-	.tracing_data	 = perf_event__process_tracing_data,
-	.build_id	 = perf_event__process_build_id,
-	.ordered_samples = true,
-	.ordering_requires_timestamps = true,
+struct perf_script {
+	struct perf_tool	tool;
+	struct perf_session	*session;
 };
 
 static void sig_handler(int sig __maybe_unused)
@@ -561,13 +552,13 @@ static void sig_handler(int sig __maybe_unused)
 	session_done = 1;
 }
 
-static int __cmd_script(struct perf_session *session)
+static int __cmd_script(struct perf_script *script)
 {
 	int ret;
 
 	signal(SIGINT, sig_handler);
 
-	ret = perf_session__process_events(session, &perf_script);
+	ret = perf_session__process_events(script->session, &script->tool);
 
 	if (debug_mode)
 		pr_err("Misordered timestamps: %" PRIu64 "\n", nr_unordered);
@@ -1273,6 +1264,21 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
 	char *script_path = NULL;
 	const char **__argv;
 	int i, j, err;
+	struct perf_script script = {
+		.tool = {
+			.sample		 = process_sample_event,
+			.mmap		 = perf_event__process_mmap,
+			.mmap2		 = perf_event__process_mmap2,
+			.comm		 = perf_event__process_comm,
+			.exit		 = perf_event__process_exit,
+			.fork		 = perf_event__process_fork,
+			.attr		 = perf_event__process_attr,
+			.tracing_data	 = perf_event__process_tracing_data,
+			.build_id	 = perf_event__process_build_id,
+			.ordered_samples = true,
+			.ordering_requires_timestamps = true,
+		},
+	};
 	const struct option options[] = {
 	OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
 		    "dump raw trace in ASCII"),
@@ -1498,10 +1504,12 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (!script_name)
 		setup_pager();
 
-	session = perf_session__new(&file, false, &perf_script);
+	session = perf_session__new(&file, false, &script.tool);
 	if (session == NULL)
 		return -ENOMEM;
 
+	script.session = session;
+
 	if (cpu_list) {
 		if (perf_session__cpu_bitmap(session, cpu_list, cpu_bitmap))
 			return -1;
@@ -1565,7 +1573,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (err < 0)
 		goto out;
 
-	err = __cmd_script(session);
+	err = __cmd_script(&script);
 
 	perf_session__delete(session);
 	cleanup_scripting();
-- 
1.8.1.4


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

* [PATCH 10/16] perf inject: Do not repipe attributes to a perf.data file
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 09/16] perf script: Make perf_script a local variable Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 11/16] perf tools: Do not accept parse_tag_value() overflow Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 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>

perf.data files contain the attributes separately, do not put them in
the event stream as well.

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/1382427258-17495-6-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-inject.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index eb1a5941912b..409ceaf3b9b9 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -72,12 +72,17 @@ static int perf_event__repipe_attr(struct perf_tool *tool,
 				   union perf_event *event,
 				   struct perf_evlist **pevlist)
 {
+	struct perf_inject *inject = container_of(tool, struct perf_inject,
+						  tool);
 	int ret;
 
 	ret = perf_event__process_attr(tool, event, pevlist);
 	if (ret)
 		return ret;
 
+	if (!inject->pipe_output)
+		return 0;
+
 	return perf_event__repipe_synth(tool, event);
 }
 
-- 
1.8.1.4


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

* [PATCH 11/16] perf tools: Do not accept parse_tag_value() overflow
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 10/16] perf inject: Do not repipe attributes to a perf.data file Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 12/16] perf evlist: Validate that mmap_pages is not too big Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 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>

parse_tag_value() accepts an "unsigned long" and multiplies it according
to a tag character.  Do not accept the value if the multiplication
overflows.

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/1382427258-17495-14-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/util.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index c25e57b3acb2..28a0a89c1f73 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -386,6 +386,8 @@ unsigned long parse_tag_value(const char *str, struct parse_tag *tags)
 			if (s != endptr)
 				break;
 
+			if (value > ULONG_MAX / i->mult)
+				break;
 			value *= i->mult;
 			return value;
 		}
-- 
1.8.1.4


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

* [PATCH 12/16] perf evlist: Validate that mmap_pages is not too big
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (10 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 11/16] perf tools: Do not accept parse_tag_value() overflow Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 13/16] perf tools: Fix non-debug build Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 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>

Amend perf_evlist__parse_mmap_pages() to check that the mmap_pages
entered via the --mmap_pages/-m option is not too big.

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/1382427258-17495-15-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evlist.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 85c4c80bcac8..2ce92eceb424 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -698,7 +698,8 @@ static size_t perf_evlist__mmap_size(unsigned long pages)
 int perf_evlist__parse_mmap_pages(const struct option *opt, const char *str,
 				  int unset __maybe_unused)
 {
-	unsigned int pages, val, *mmap_pages = opt->value;
+	unsigned int *mmap_pages = opt->value;
+	unsigned long pages, val;
 	size_t size;
 	static struct parse_tag tags[] = {
 		{ .tag  = 'B', .mult = 1       },
@@ -709,12 +710,12 @@ int perf_evlist__parse_mmap_pages(const struct option *opt, const char *str,
 	};
 
 	val = parse_tag_value(str, tags);
-	if (val != (unsigned int) -1) {
+	if (val != (unsigned long) -1) {
 		/* we got file size value */
 		pages = PERF_ALIGN(val, page_size) / page_size;
-		if (!is_power_of_2(pages)) {
+		if (pages < (1UL << 31) && !is_power_of_2(pages)) {
 			pages = next_pow2(pages);
-			pr_info("rounding mmap pages size to %u (%u pages)\n",
+			pr_info("rounding mmap pages size to %lu (%lu pages)\n",
 				pages * page_size, pages);
 		}
 	} else {
@@ -727,6 +728,11 @@ int perf_evlist__parse_mmap_pages(const struct option *opt, const char *str,
 		}
 	}
 
+	if (pages > UINT_MAX || pages > SIZE_MAX / page_size) {
+		pr_err("--mmap_pages/-m value too big\n");
+		return -1;
+	}
+
 	size = perf_evlist__mmap_size(pages);
 	if (!size) {
 		pr_err("--mmap_pages/-m value must be a power of two.");
-- 
1.8.1.4


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

* [PATCH 13/16] perf tools: Fix non-debug build
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (11 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 12/16] perf evlist: Validate that mmap_pages is not too big Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 14/16] perf ui: Rename ui_progress to ui_progress_ops Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 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>

In the absence of s DEBUG variable definition on the command line perf
tools was building without optimization.  Fix by assigning DEBUG if it
is not defined.

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/1382427258-17495-2-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index c516d6ba6716..543aa953bab1 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -66,6 +66,10 @@ ifneq ($(WERROR),0)
   CFLAGS += -Werror
 endif
 
+ifndef DEBUG
+  DEBUG := 0
+endif
+
 ifeq ($(DEBUG),0)
   CFLAGS += -O6
 endif
-- 
1.8.1.4


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

* [PATCH 14/16] perf ui: Rename ui_progress to ui_progress_ops
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (12 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 13/16] perf tools: Fix non-debug build Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 15/16] perf ui progress: Per progress bar state Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 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>

Reserving 'struct ui_progress' to the per progress instances, not to the
particular set of operations used to implmenet a progress bar in the
current UI (GTK, TUI, etc).

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-zjqbfp9gx3yo45s0rp9uv42n@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.perf     |  1 +
 tools/perf/ui/gtk/gtk.h      |  2 +-
 tools/perf/ui/gtk/progress.c | 14 +++++++-------
 tools/perf/ui/gtk/setup.c    |  2 +-
 tools/perf/ui/progress.c     | 18 +++++++++---------
 tools/perf/ui/progress.h     |  6 ++----
 tools/perf/ui/tui/progress.c |  7 ++++---
 tools/perf/ui/tui/setup.c    |  3 ++-
 tools/perf/ui/tui/tui.h      |  6 ++++++
 9 files changed, 33 insertions(+), 26 deletions(-)
 create mode 100644 tools/perf/ui/tui/tui.h

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 326a26e5fc1c..8a9ca3836043 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -487,6 +487,7 @@ ifndef NO_SLANG
   LIB_OBJS += $(OUTPUT)ui/tui/util.o
   LIB_OBJS += $(OUTPUT)ui/tui/helpline.o
   LIB_OBJS += $(OUTPUT)ui/tui/progress.o
+  LIB_H += ui/tui/tui.h
   LIB_H += ui/browser.h
   LIB_H += ui/browsers/map.h
   LIB_H += ui/keysyms.h
diff --git a/tools/perf/ui/gtk/gtk.h b/tools/perf/ui/gtk/gtk.h
index 8576cf194872..0a9173ff9a61 100644
--- a/tools/perf/ui/gtk/gtk.h
+++ b/tools/perf/ui/gtk/gtk.h
@@ -34,7 +34,7 @@ struct perf_gtk_context *perf_gtk__activate_context(GtkWidget *window);
 int perf_gtk__deactivate_context(struct perf_gtk_context **ctx);
 
 void perf_gtk__init_helpline(void);
-void perf_gtk__init_progress(void);
+void gtk_ui_progress__init(void);
 void perf_gtk__init_hpp(void);
 
 void perf_gtk__signal(int sig);
diff --git a/tools/perf/ui/gtk/progress.c b/tools/perf/ui/gtk/progress.c
index 482bcf3df9b7..195c7f94f98e 100644
--- a/tools/perf/ui/gtk/progress.c
+++ b/tools/perf/ui/gtk/progress.c
@@ -7,7 +7,7 @@
 static GtkWidget *dialog;
 static GtkWidget *progress;
 
-static void gtk_progress_update(u64 curr, u64 total, const char *title)
+static void gtk_ui_progress__update(u64 curr, u64 total, const char *title)
 {
 	double fraction = total ? 1.0 * curr / total : 0.0;
 	char buf[1024];
@@ -40,7 +40,7 @@ static void gtk_progress_update(u64 curr, u64 total, const char *title)
 		gtk_main_iteration();
 }
 
-static void gtk_progress_finish(void)
+static void gtk_ui_progress__finish(void)
 {
 	/* this will also destroy all of its children */
 	gtk_widget_destroy(dialog);
@@ -48,12 +48,12 @@ static void gtk_progress_finish(void)
 	dialog = NULL;
 }
 
-static struct ui_progress gtk_progress_fns = {
-	.update		= gtk_progress_update,
-	.finish		= gtk_progress_finish,
+static struct ui_progress_ops gtk_ui_progress__ops = {
+	.update		= gtk_ui_progress__update,
+	.finish		= gtk_ui_progress__finish,
 };
 
-void perf_gtk__init_progress(void)
+void gtk_ui_progress__init(void)
 {
-	progress_fns = &gtk_progress_fns;
+	ui_progress__ops = &gtk_ui_progress__ops;
 }
diff --git a/tools/perf/ui/gtk/setup.c b/tools/perf/ui/gtk/setup.c
index 6c2dd2e423f3..1d57676f8212 100644
--- a/tools/perf/ui/gtk/setup.c
+++ b/tools/perf/ui/gtk/setup.c
@@ -8,7 +8,7 @@ int perf_gtk__init(void)
 {
 	perf_error__register(&perf_gtk_eops);
 	perf_gtk__init_helpline();
-	perf_gtk__init_progress();
+	gtk_ui_progress__init();
 	perf_gtk__init_hpp();
 
 	return gtk_init_check(NULL, NULL) ? 0 : -1;
diff --git a/tools/perf/ui/progress.c b/tools/perf/ui/progress.c
index 3ec695607a4d..d753821b6e0b 100644
--- a/tools/perf/ui/progress.c
+++ b/tools/perf/ui/progress.c
@@ -1,26 +1,26 @@
 #include "../cache.h"
 #include "progress.h"
 
-static void nop_progress_update(u64 curr __maybe_unused,
-				u64 total __maybe_unused,
-				const char *title __maybe_unused)
+static void null_progress__update(u64 curr __maybe_unused,
+				  u64 total __maybe_unused,
+				  const char *title __maybe_unused)
 {
 }
 
-static struct ui_progress default_progress_fns =
+static struct ui_progress_ops null_progress__ops =
 {
-	.update		= nop_progress_update,
+	.update = null_progress__update,
 };
 
-struct ui_progress *progress_fns = &default_progress_fns;
+struct ui_progress_ops *ui_progress__ops = &null_progress__ops;
 
 void ui_progress__update(u64 curr, u64 total, const char *title)
 {
-	return progress_fns->update(curr, total, title);
+	return ui_progress__ops->update(curr, total, title);
 }
 
 void ui_progress__finish(void)
 {
-	if (progress_fns->finish)
-		progress_fns->finish();
+	if (ui_progress__ops->finish)
+		ui_progress__ops->finish();
 }
diff --git a/tools/perf/ui/progress.h b/tools/perf/ui/progress.h
index 257cc224f9cf..d41bde5908a6 100644
--- a/tools/perf/ui/progress.h
+++ b/tools/perf/ui/progress.h
@@ -3,14 +3,12 @@
 
 #include <../types.h>
 
-struct ui_progress {
+struct ui_progress_ops {
 	void (*update)(u64, u64, const char *);
 	void (*finish)(void);
 };
 
-extern struct ui_progress *progress_fns;
-
-void ui_progress__init(void);
+extern struct ui_progress_ops *ui_progress__ops;
 
 void ui_progress__update(u64 curr, u64 total, const char *title);
 void ui_progress__finish(void);
diff --git a/tools/perf/ui/tui/progress.c b/tools/perf/ui/tui/progress.c
index 6c2184d53cbf..0fcc5a1f525a 100644
--- a/tools/perf/ui/tui/progress.c
+++ b/tools/perf/ui/tui/progress.c
@@ -2,6 +2,7 @@
 #include "../progress.h"
 #include "../libslang.h"
 #include "../ui.h"
+#include "tui.h"
 #include "../browser.h"
 
 static void tui_progress__update(u64 curr, u64 total, const char *title)
@@ -31,12 +32,12 @@ static void tui_progress__update(u64 curr, u64 total, const char *title)
 	pthread_mutex_unlock(&ui__lock);
 }
 
-static struct ui_progress tui_progress_fns =
+static struct ui_progress_ops tui_progress__ops =
 {
 	.update		= tui_progress__update,
 };
 
-void ui_progress__init(void)
+void tui_progress__init(void)
 {
-	progress_fns = &tui_progress_fns;
+	ui_progress__ops = &tui_progress__ops;
 }
diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c
index b9401482d110..2f612562978c 100644
--- a/tools/perf/ui/tui/setup.c
+++ b/tools/perf/ui/tui/setup.c
@@ -9,6 +9,7 @@
 #include "../util.h"
 #include "../libslang.h"
 #include "../keysyms.h"
+#include "tui.h"
 
 static volatile int ui__need_resize;
 
@@ -119,7 +120,7 @@ int ui__init(void)
 
 	ui_helpline__init();
 	ui_browser__init();
-	ui_progress__init();
+	tui_progress__init();
 
 	signal(SIGSEGV, ui__signal);
 	signal(SIGFPE, ui__signal);
diff --git a/tools/perf/ui/tui/tui.h b/tools/perf/ui/tui/tui.h
new file mode 100644
index 000000000000..18961c7b6ec5
--- /dev/null
+++ b/tools/perf/ui/tui/tui.h
@@ -0,0 +1,6 @@
+#ifndef _PERF_TUI_H_
+#define _PERF_TUI_H_ 1
+
+void tui_progress__init(void);
+
+#endif /* _PERF_TUI_H_ */
-- 
1.8.1.4


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

* [PATCH 15/16] perf ui progress: Per progress bar state
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (13 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 14/16] perf ui: Rename ui_progress to ui_progress_ops Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-23 20:58 ` [PATCH 16/16] perf tools: Show progress on histogram collapsing Arnaldo Carvalho de Melo
  2013-10-24  6:52 ` [GIT PULL 00/16] perf/core improvements and fixes Ingo Molnar
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 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>

That will ease using a progress bar across multiple functions, like in
the upcoming patches that will present a progress bar when collapsing
histograms.

Based on a previous patch by Namhyung Kim.

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-cr7lq7ud9fj21bg7wvq27w1u@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/gtk/progress.c |  8 ++++----
 tools/perf/ui/progress.c     | 22 +++++++++++++++++-----
 tools/perf/ui/progress.h     | 15 +++++++++++----
 tools/perf/ui/tui/progress.c |  8 ++++----
 tools/perf/util/session.c    | 24 +++++++++++-------------
 5 files changed, 47 insertions(+), 30 deletions(-)

diff --git a/tools/perf/ui/gtk/progress.c b/tools/perf/ui/gtk/progress.c
index 195c7f94f98e..b656655fbc39 100644
--- a/tools/perf/ui/gtk/progress.c
+++ b/tools/perf/ui/gtk/progress.c
@@ -7,14 +7,14 @@
 static GtkWidget *dialog;
 static GtkWidget *progress;
 
-static void gtk_ui_progress__update(u64 curr, u64 total, const char *title)
+static void gtk_ui_progress__update(struct ui_progress *p)
 {
-	double fraction = total ? 1.0 * curr / total : 0.0;
+	double fraction = p->total ? 1.0 * p->curr / p->total : 0.0;
 	char buf[1024];
 
 	if (dialog == NULL) {
 		GtkWidget *vbox = gtk_vbox_new(TRUE, 5);
-		GtkWidget *label = gtk_label_new(title);
+		GtkWidget *label = gtk_label_new(p->title);
 
 		dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 		progress = gtk_progress_bar_new();
@@ -32,7 +32,7 @@ static void gtk_ui_progress__update(u64 curr, u64 total, const char *title)
 	}
 
 	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), fraction);
-	snprintf(buf, sizeof(buf), "%"PRIu64" / %"PRIu64, curr, total);
+	snprintf(buf, sizeof(buf), "%"PRIu64" / %"PRIu64, p->curr, p->total);
 	gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress), buf);
 
 	/* we didn't call gtk_main yet, so do it manually */
diff --git a/tools/perf/ui/progress.c b/tools/perf/ui/progress.c
index d753821b6e0b..a0f24c7115c5 100644
--- a/tools/perf/ui/progress.c
+++ b/tools/perf/ui/progress.c
@@ -1,9 +1,7 @@
 #include "../cache.h"
 #include "progress.h"
 
-static void null_progress__update(u64 curr __maybe_unused,
-				  u64 total __maybe_unused,
-				  const char *title __maybe_unused)
+static void null_progress__update(struct ui_progress *p __maybe_unused)
 {
 }
 
@@ -14,9 +12,23 @@ static struct ui_progress_ops null_progress__ops =
 
 struct ui_progress_ops *ui_progress__ops = &null_progress__ops;
 
-void ui_progress__update(u64 curr, u64 total, const char *title)
+void ui_progress__update(struct ui_progress *p, u64 adv)
 {
-	return ui_progress__ops->update(curr, total, title);
+	p->curr += adv;
+
+	if (p->curr >= p->next) {
+		p->next += p->step;
+		ui_progress__ops->update(p);
+	}
+}
+
+void ui_progress__init(struct ui_progress *p, u64 total, const char *title)
+{
+	p->curr = 0;
+	p->next = p->step = total / 16;
+	p->total = total;
+	p->title = title;
+
 }
 
 void ui_progress__finish(void)
diff --git a/tools/perf/ui/progress.h b/tools/perf/ui/progress.h
index d41bde5908a6..29ec8efffefb 100644
--- a/tools/perf/ui/progress.h
+++ b/tools/perf/ui/progress.h
@@ -3,14 +3,21 @@
 
 #include <../types.h>
 
+void ui_progress__finish(void);
+ 
+struct ui_progress {
+	const char *title;
+	u64 curr, next, step, total;
+};
+ 
+void ui_progress__init(struct ui_progress *p, u64 total, const char *title);
+void ui_progress__update(struct ui_progress *p, u64 adv);
+
 struct ui_progress_ops {
-	void (*update)(u64, u64, const char *);
+	void (*update)(struct ui_progress *p);
 	void (*finish)(void);
 };
 
 extern struct ui_progress_ops *ui_progress__ops;
 
-void ui_progress__update(u64 curr, u64 total, const char *title);
-void ui_progress__finish(void);
-
 #endif
diff --git a/tools/perf/ui/tui/progress.c b/tools/perf/ui/tui/progress.c
index 0fcc5a1f525a..3e2d936d7443 100644
--- a/tools/perf/ui/tui/progress.c
+++ b/tools/perf/ui/tui/progress.c
@@ -5,7 +5,7 @@
 #include "tui.h"
 #include "../browser.h"
 
-static void tui_progress__update(u64 curr, u64 total, const char *title)
+static void tui_progress__update(struct ui_progress *p)
 {
 	int bar, y;
 	/*
@@ -15,7 +15,7 @@ static void tui_progress__update(u64 curr, u64 total, const char *title)
 	if (use_browser <= 0)
 		return;
 
-	if (total == 0)
+	if (p->total == 0)
 		return;
 
 	ui__refresh_dimensions(true);
@@ -24,9 +24,9 @@ static void tui_progress__update(u64 curr, u64 total, const char *title)
 	SLsmg_set_color(0);
 	SLsmg_draw_box(y, 0, 3, SLtt_Screen_Cols);
 	SLsmg_gotorc(y++, 1);
-	SLsmg_write_string((char *)title);
+	SLsmg_write_string((char *)p->title);
 	SLsmg_set_color(HE_COLORSET_SELECTED);
-	bar = ((SLtt_Screen_Cols - 2) * curr) / total;
+	bar = ((SLtt_Screen_Cols - 2) * p->curr) / p->total;
 	SLsmg_fill_region(y, 1, 1, bar, ' ');
 	SLsmg_refresh();
 	pthread_mutex_unlock(&ui__lock);
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 854c5aa4db0d..4ba7b548e055 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -503,13 +503,16 @@ static int flush_sample_queue(struct perf_session *s,
 	struct perf_sample sample;
 	u64 limit = os->next_flush;
 	u64 last_ts = os->last_sample ? os->last_sample->timestamp : 0ULL;
-	unsigned idx = 0, progress_next = os->nr_samples / 16;
 	bool show_progress = limit == ULLONG_MAX;
+	struct ui_progress prog;
 	int ret;
 
 	if (!tool->ordered_samples || !limit)
 		return 0;
 
+	if (show_progress)
+		ui_progress__init(&prog, os->nr_samples, "Processing time ordered events...");
+
 	list_for_each_entry_safe(iter, tmp, head, list) {
 		if (session_done())
 			return 0;
@@ -530,11 +533,9 @@ static int flush_sample_queue(struct perf_session *s,
 		os->last_flush = iter->timestamp;
 		list_del(&iter->list);
 		list_add(&iter->list, &os->sample_cache);
-		if (show_progress && (++idx >= progress_next)) {
-			progress_next += os->nr_samples / 16;
-			ui_progress__update(idx, os->nr_samples,
-					    "Processing time ordered events...");
-		}
+
+		if (show_progress)
+			ui_progress__update(&prog, 1);
 	}
 
 	if (list_empty(head)) {
@@ -1285,12 +1286,13 @@ int __perf_session__process_events(struct perf_session *session,
 				   u64 file_size, struct perf_tool *tool)
 {
 	int fd = perf_data_file__fd(session->file);
-	u64 head, page_offset, file_offset, file_pos, progress_next;
+	u64 head, page_offset, file_offset, file_pos;
 	int err, mmap_prot, mmap_flags, map_idx = 0;
 	size_t	mmap_size;
 	char *buf, *mmaps[NUM_MMAPS];
 	union perf_event *event;
 	uint32_t size;
+	struct ui_progress prog;
 
 	perf_tool__fill_defaults(tool);
 
@@ -1301,7 +1303,7 @@ int __perf_session__process_events(struct perf_session *session,
 	if (data_size && (data_offset + data_size < file_size))
 		file_size = data_offset + data_size;
 
-	progress_next = file_size / 16;
+	ui_progress__init(&prog, file_size, "Processing events...");
 
 	mmap_size = MMAP_SIZE;
 	if (mmap_size > file_size)
@@ -1356,11 +1358,7 @@ more:
 	head += size;
 	file_pos += size;
 
-	if (file_pos >= progress_next) {
-		progress_next += file_size / 16;
-		ui_progress__update(file_pos, file_size,
-				    "Processing events...");
-	}
+	ui_progress__update(&prog, size);
 
 	if (session_done())
 		goto out;
-- 
1.8.1.4


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

* [PATCH 16/16] perf tools: Show progress on histogram collapsing
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (14 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 15/16] perf ui progress: Per progress bar state Arnaldo Carvalho de Melo
@ 2013-10-23 20:58 ` Arnaldo Carvalho de Melo
  2013-10-24  6:52 ` [GIT PULL 00/16] perf/core improvements and fixes Ingo Molnar
  16 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-23 20:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, Frederic Weisbecker,
	Jiri Olsa, Linus Torvalds, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

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

It can take quite amount of time so add progress bar UI to inform user.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1381468543-25334-4-git-send-email-namhyung@kernel.org
[ perf_progress -> ui_progress ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-annotate.c |  2 +-
 tools/perf/builtin-diff.c     |  2 +-
 tools/perf/builtin-report.c   | 10 +++++++++-
 tools/perf/builtin-top.c      |  4 ++--
 tools/perf/tests/hists_link.c |  2 +-
 tools/perf/util/hist.c        |  5 ++++-
 tools/perf/util/hist.h        |  3 ++-
 7 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 17c6b494e8cc..6c5ae57831f6 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -247,7 +247,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
 
 		if (nr_samples > 0) {
 			total_nr_samples += nr_samples;
-			hists__collapse_resort(hists);
+			hists__collapse_resort(hists, NULL);
 			hists__output_resort(hists);
 
 			if (symbol_conf.event_group &&
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 9c828881714c..b605009e803f 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -369,7 +369,7 @@ static void perf_evlist__collapse_resort(struct perf_evlist *evlist)
 	list_for_each_entry(evsel, &evlist->entries, node) {
 		struct hists *hists = &evsel->hists;
 
-		hists__collapse_resort(hists);
+		hists__collapse_resort(hists, NULL);
 	}
 }
 
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index e3598a456017..98d3891392e2 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -496,6 +496,7 @@ static int __cmd_report(struct perf_report *rep)
 	struct map *kernel_map;
 	struct kmap *kernel_kmap;
 	const char *help = "For a higher level overview, try: perf report --sort comm,dso";
+	struct ui_progress prog;
 	struct perf_data_file *file = session->file;
 
 	signal(SIGINT, sig_handler);
@@ -558,13 +559,19 @@ static int __cmd_report(struct perf_report *rep)
 	}
 
 	nr_samples = 0;
+	list_for_each_entry(pos, &session->evlist->entries, node)
+		nr_samples += pos->hists.nr_entries;
+
+	ui_progress__init(&prog, nr_samples, "Merging related events...");
+
+	nr_samples = 0;
 	list_for_each_entry(pos, &session->evlist->entries, node) {
 		struct hists *hists = &pos->hists;
 
 		if (pos->idx == 0)
 			hists->symbol_filter_str = rep->symbol_filter_str;
 
-		hists__collapse_resort(hists);
+		hists__collapse_resort(hists, &prog);
 		nr_samples += hists->stats.nr_events[PERF_RECORD_SAMPLE];
 
 		/* Non-group events are considered as leader */
@@ -576,6 +583,7 @@ static int __cmd_report(struct perf_report *rep)
 			hists__link(leader_hists, hists);
 		}
 	}
+	ui_progress__finish();
 
 	if (session_done())
 		return 0;
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 386d83324a8d..76c9264ed070 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -286,7 +286,7 @@ static void perf_top__print_sym_table(struct perf_top *top)
 		return;
 	}
 
-	hists__collapse_resort(&top->sym_evsel->hists);
+	hists__collapse_resort(&top->sym_evsel->hists, NULL);
 	hists__output_resort(&top->sym_evsel->hists);
 	hists__decay_entries(&top->sym_evsel->hists,
 			     top->hide_user_symbols,
@@ -552,7 +552,7 @@ static void perf_top__sort_new_samples(void *arg)
 	if (t->evlist->selected != NULL)
 		t->sym_evsel = t->evlist->selected;
 
-	hists__collapse_resort(&t->sym_evsel->hists);
+	hists__collapse_resort(&t->sym_evsel->hists, NULL);
 	hists__output_resort(&t->sym_evsel->hists);
 	hists__decay_entries(&t->sym_evsel->hists,
 			     t->hide_user_symbols,
diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c
index 025503a22ff7..b51abcb2c243 100644
--- a/tools/perf/tests/hists_link.c
+++ b/tools/perf/tests/hists_link.c
@@ -467,7 +467,7 @@ int test__hists_link(void)
 		goto out;
 
 	list_for_each_entry(evsel, &evlist->entries, node) {
-		hists__collapse_resort(&evsel->hists);
+		hists__collapse_resort(&evsel->hists, NULL);
 
 		if (verbose > 2)
 			print_hists(&evsel->hists);
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index f0b863ef4896..7e80253074b0 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -399,6 +399,7 @@ static struct hist_entry *add_hist_entry(struct hists *hists,
 	if (!he)
 		return NULL;
 
+	hists->nr_entries++;
 	rb_link_node(&he->rb_node_in, parent, p);
 	rb_insert_color(&he->rb_node_in, hists->entries_in);
 out:
@@ -604,7 +605,7 @@ static void hists__apply_filters(struct hists *hists, struct hist_entry *he)
 	hists__filter_entry_by_symbol(hists, he);
 }
 
-void hists__collapse_resort(struct hists *hists)
+void hists__collapse_resort(struct hists *hists, struct ui_progress *prog)
 {
 	struct rb_root *root;
 	struct rb_node *next;
@@ -631,6 +632,8 @@ void hists__collapse_resort(struct hists *hists)
 			 */
 			hists__apply_filters(hists, n);
 		}
+		if (prog)
+			ui_progress__update(prog, 1);
 	}
 }
 
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 20b175808cd3..0c7ce8bb8eba 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -5,6 +5,7 @@
 #include <pthread.h>
 #include "callchain.h"
 #include "header.h"
+#include "ui/progress.h"
 
 extern struct callchain_param callchain_param;
 
@@ -108,7 +109,7 @@ struct hist_entry *__hists__add_mem_entry(struct hists *self,
 					  u64 weight);
 
 void hists__output_resort(struct hists *self);
-void hists__collapse_resort(struct hists *self);
+void hists__collapse_resort(struct hists *self, struct ui_progress *prog);
 
 void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel);
 void hists__output_recalc_col_len(struct hists *hists, int max_rows);
-- 
1.8.1.4


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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (15 preceding siblings ...)
  2013-10-23 20:58 ` [PATCH 16/16] perf tools: Show progress on histogram collapsing Arnaldo Carvalho de Melo
@ 2013-10-24  6:52 ` Ingo Molnar
  16 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2013-10-24  6:52 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, David Ahern, Frederic Weisbecker, Hitoshi Mitake,
	Jiri Olsa, Linus Torvalds, Masami Hiramatsu, 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 aa30a2e03a453aad9fd96c3f2d4a82c3497674e5:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2013-10-23 09:45:50 +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 c1fb5651bb40f9efaf32d280f39e06df7e352673:
> 
>   perf tools: Show progress on histogram collapsing (2013-10-23 15:48:24 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Show progress on histogram collapsing, that can take a long time, from
>   Namhyung Kim.
> 
> . Support "$vars" meta argument syntax for local variables, allowing
>   asking for all possible variables at a given probe point to be
>   collected when it hits, from Masami Hiramatsu.
> 
> . Address the root cause of that 'perf sched' stack initialization build
>   slowdown, by programmatically setting a big array after moving the
>   global variable back to the stack. Fix from Adrian Hunter.
> 
> . Do not repipe attributes to a perf.data file in 'perf inject',
>   fix from Adrian Hunter
> 
> . Change the procps visible command-name of invididual benchmark tests
>   plus cleanups, from Ingo Molnar.
> 
> . Do not accept parse_tag_value() overflow, fix from Adrian Hunter.
> 
> . Validate that mmap_pages is not too big. From Adrian Hunter.
> 
> . Fix non-debug build, from Adrian Hunter
> 
> . Clarify the "sample parsing" test entry.
> 
> . Consider PERF_SAMPLE_TRANSACTION in the "sample parsing" test.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (7):
>       perf sched: Make struct perf_sched sched a local variable
>       perf sched: Optimize build time
>       perf script: Make perf_script a local variable
>       perf inject: Do not repipe attributes to a perf.data file
>       perf tools: Do not accept parse_tag_value() overflow
>       perf evlist: Validate that mmap_pages is not too big
>       perf tools: Fix non-debug build
> 
> Arnaldo Carvalho de Melo (5):
>       perf test: Clarify the "sample parsing" test entry
>       perf test: Consider PERF_SAMPLE_TRANSACTION in the "sample parsing" test
>       perf tools: Stop using 'self' in some more places
>       perf ui: Rename ui_progress to ui_progress_ops
>       perf ui progress: Per progress bar state
> 
> Ingo Molnar (1):
>       perf bench: Change the procps visible command-name of invididual benchmark tests plus cleanups
> 
> Masami Hiramatsu (2):
>       perf probe: Support "$vars" meta argument syntax for local variables
>       perf probe: Find fentry mcount fuzzed parameter location
> 
> Namhyung Kim (1):
>       perf tools: Show progress on histogram collapsing
> 
>  tools/perf/Makefile.perf          |   1 +
>  tools/perf/builtin-annotate.c     |   6 +-
>  tools/perf/builtin-bench.c        | 239 +++++++++++++++++++-------------------
>  tools/perf/builtin-diff.c         |   7 +-
>  tools/perf/builtin-inject.c       |  27 +++--
>  tools/perf/builtin-report.c       |  24 ++--
>  tools/perf/builtin-sched.c        |  44 +++----
>  tools/perf/builtin-script.c       |  40 ++++---
>  tools/perf/builtin-top.c          |   4 +-
>  tools/perf/config/Makefile        |   4 +
>  tools/perf/tests/hists_link.c     |   2 +-
>  tools/perf/tests/sample-parsing.c |   4 +-
>  tools/perf/ui/gtk/gtk.h           |   2 +-
>  tools/perf/ui/gtk/progress.c      |  20 ++--
>  tools/perf/ui/gtk/setup.c         |   2 +-
>  tools/perf/ui/progress.c          |  32 +++--
>  tools/perf/ui/progress.h          |  19 +--
>  tools/perf/ui/tui/progress.c      |  15 +--
>  tools/perf/ui/tui/setup.c         |   3 +-
>  tools/perf/ui/tui/tui.h           |   6 +
>  tools/perf/util/build-id.c        |   6 +-
>  tools/perf/util/evlist.c          |  14 ++-
>  tools/perf/util/hist.c            |  23 ++--
>  tools/perf/util/hist.h            |   3 +-
>  tools/perf/util/probe-event.c     |   1 -
>  tools/perf/util/probe-finder.c    | 133 ++++++++++++++++++---
>  tools/perf/util/probe-finder.h    |   1 +
>  tools/perf/util/session.c         |  24 ++--
>  tools/perf/util/sort.c            | 124 ++++++++++----------
>  tools/perf/util/strfilter.c       |  46 ++++----
>  tools/perf/util/thread.c          |  72 ++++++------
>  tools/perf/util/util.c            |   2 +
>  32 files changed, 560 insertions(+), 390 deletions(-)
>  create mode 100644 tools/perf/ui/tui/tui.h

Pulled, thanks Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2019-01-04 18:33 Arnaldo Carvalho de Melo
@ 2019-01-08 15:32 ` Ingo Molnar
  0 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2019-01-08 15:32 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Ivan Krylov, Jin Yao,
	Mattias Jacobsson


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> Best regards,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 2573be22e5b6f24a0cabc97715c808c47e29eaaf:
> 
>   Merge tag 'perf-core-for-mingo-4.21-20190103' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2019-01-03 14:05:16 +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.21-20190104
> 
> for you to fetch changes up to 03fa483821c0b4db7c2b1453d3332f397d82313f:
> 
>   perf test shell: Use a fallback to get the pathname in vfs_getname (2019-01-04 15:12:29 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> perf annotate:
> 
>   Ivan Krylov:
> 
>   - Pass filename to objdump via execl, fixing usage with filenames
>     with special characters.
> 
> perf report:
> 
>   Jin Yao:
> 
>      Fix wrong iteration count in --branch-history
> 
> perf stat:
> 
>   Jin Yao:
> 
>   - Fix endless wait for child process
> 
> perf test:
> 
>   Arnaldo Carvalho de Melo:
> 
>   - Use a fallback to get the pathname in vfs_getname in
> 
> tools build:
> 
>   Jiri Olsa:
> 
>   - Allow overriding CFLAGS assignments.
> 
> Misc:
> 
>   Arnaldo Carvalho de Melo:
> 
>   - Syncronize UAPI headers
> 
>   Mattias Jacobsson:
> 
>   - Remove redundant va_end() in strbuf_addv()
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (10):
>       tools headers x86: Sync disabled-features.h
>       tools headers uapi: Sync prctl.h with the kernel sources
>       tools beauty: Make the prctl option table generator catch all PR_ options
>       tools headers uapi: Update i915_drm.h
>       tools headers uapi: Sync linux/in.h copy from the kernel sources
>       tools headers uapi: Sync linux/kvm.h with the kernel sources
>       tools headers uapi: Sync copy of asm-generic/unistd.h with the kernel sources
>       tools headers x86: Sync asm/cpufeatures.h copy with the kernel sources
>       perf python: Make sure the python binding output directory is in place
>       perf test shell: Use a fallback to get the pathname in vfs_getname
> 
> Ivan Krylov (1):
>       perf annotate: Pass filename to objdump via execl
> 
> Jin Yao (2):
>       perf stat: Fix endless wait for child process
>       perf report: Fix wrong iteration count in --branch-history
> 
> Jiri Olsa (2):
>       tools thermal tmon: Use -O3 instead of -O1 if available
>       tools iio: Override CFLAGS assignments
> 
> Mattias Jacobsson (1):
>       perf strbuf: Remove redundant va_end() in strbuf_addv()
> 
>  tools/arch/x86/include/asm/cpufeatures.h        |  2 ++
>  tools/arch/x86/include/asm/disabled-features.h  |  8 ++++++-
>  tools/iio/Makefile                              |  2 +-
>  tools/include/uapi/asm-generic/unistd.h         |  4 +++-
>  tools/include/uapi/drm/i915_drm.h               |  8 +++++++
>  tools/include/uapi/linux/in.h                   | 10 +++++---
>  tools/include/uapi/linux/kvm.h                  | 19 +++++++++++++++
>  tools/include/uapi/linux/prctl.h                |  8 +++++++
>  tools/perf/Makefile.perf                        |  4 +++-
>  tools/perf/builtin-stat.c                       |  3 ++-
>  tools/perf/tests/shell/lib/probe_vfs_getname.sh |  3 ++-
>  tools/perf/trace/beauty/prctl_option.sh         |  2 +-
>  tools/perf/util/annotate.c                      |  8 +++----
>  tools/perf/util/callchain.c                     | 32 +++++++++++++++----------
>  tools/perf/util/callchain.h                     |  1 +
>  tools/perf/util/machine.c                       |  2 +-
>  tools/perf/util/strbuf.c                        |  1 -
>  tools/thermal/tmon/Makefile                     |  2 +-
>  18 files changed, 90 insertions(+), 29 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2019-01-04 18:33 Arnaldo Carvalho de Melo
  2019-01-08 15:32 ` Ingo Molnar
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-01-04 18:33 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Arnaldo Carvalho de Melo, Ivan Krylov,
	Jin Yao, Mattias Jacobsson

Hi Ingo,

	Please consider pulling,

Best regards,

- Arnaldo

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

The following changes since commit 2573be22e5b6f24a0cabc97715c808c47e29eaaf:

  Merge tag 'perf-core-for-mingo-4.21-20190103' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2019-01-03 14:05:16 +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.21-20190104

for you to fetch changes up to 03fa483821c0b4db7c2b1453d3332f397d82313f:

  perf test shell: Use a fallback to get the pathname in vfs_getname (2019-01-04 15:12:29 -0300)

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

perf annotate:

  Ivan Krylov:

  - Pass filename to objdump via execl, fixing usage with filenames
    with special characters.

perf report:

  Jin Yao:

     Fix wrong iteration count in --branch-history

perf stat:

  Jin Yao:

  - Fix endless wait for child process

perf test:

  Arnaldo Carvalho de Melo:

  - Use a fallback to get the pathname in vfs_getname in

tools build:

  Jiri Olsa:

  - Allow overriding CFLAGS assignments.

Misc:

  Arnaldo Carvalho de Melo:

  - Syncronize UAPI headers

  Mattias Jacobsson:

  - Remove redundant va_end() in strbuf_addv()

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (10):
      tools headers x86: Sync disabled-features.h
      tools headers uapi: Sync prctl.h with the kernel sources
      tools beauty: Make the prctl option table generator catch all PR_ options
      tools headers uapi: Update i915_drm.h
      tools headers uapi: Sync linux/in.h copy from the kernel sources
      tools headers uapi: Sync linux/kvm.h with the kernel sources
      tools headers uapi: Sync copy of asm-generic/unistd.h with the kernel sources
      tools headers x86: Sync asm/cpufeatures.h copy with the kernel sources
      perf python: Make sure the python binding output directory is in place
      perf test shell: Use a fallback to get the pathname in vfs_getname

Ivan Krylov (1):
      perf annotate: Pass filename to objdump via execl

Jin Yao (2):
      perf stat: Fix endless wait for child process
      perf report: Fix wrong iteration count in --branch-history

Jiri Olsa (2):
      tools thermal tmon: Use -O3 instead of -O1 if available
      tools iio: Override CFLAGS assignments

Mattias Jacobsson (1):
      perf strbuf: Remove redundant va_end() in strbuf_addv()

 tools/arch/x86/include/asm/cpufeatures.h        |  2 ++
 tools/arch/x86/include/asm/disabled-features.h  |  8 ++++++-
 tools/iio/Makefile                              |  2 +-
 tools/include/uapi/asm-generic/unistd.h         |  4 +++-
 tools/include/uapi/drm/i915_drm.h               |  8 +++++++
 tools/include/uapi/linux/in.h                   | 10 +++++---
 tools/include/uapi/linux/kvm.h                  | 19 +++++++++++++++
 tools/include/uapi/linux/prctl.h                |  8 +++++++
 tools/perf/Makefile.perf                        |  4 +++-
 tools/perf/builtin-stat.c                       |  3 ++-
 tools/perf/tests/shell/lib/probe_vfs_getname.sh |  3 ++-
 tools/perf/trace/beauty/prctl_option.sh         |  2 +-
 tools/perf/util/annotate.c                      |  8 +++----
 tools/perf/util/callchain.c                     | 32 +++++++++++++++----------
 tools/perf/util/callchain.h                     |  1 +
 tools/perf/util/machine.c                       |  2 +-
 tools/perf/util/strbuf.c                        |  1 -
 tools/thermal/tmon/Makefile                     |  2 +-
 18 files changed, 90 insertions(+), 29 deletions(-)

Test results:

The first ones are container based builds of tools/perf with and without libelf
support.  Where clang is available, it is also used to build perf with/without
libelf, and building with LIBCLANGLLVM=1 (built-in clang) with gcc and clang
when clang and its devel libraries are installed.

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

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

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

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

  $ dm
   1  alpine:3.4                    : Ok   gcc (Alpine 5.3.0) 5.3.0
   2  alpine:3.5                    : Ok   gcc (Alpine 6.2.1) 6.2.1 20160822
   3  alpine:3.6                    : Ok   gcc (Alpine 6.3.0) 6.3.0
   4  alpine:3.7                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   5  alpine:3.8                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   6  alpine:edge                   : Ok   gcc (Alpine 8.2.0) 8.2.0
   7  amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   8  amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   9  android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10  android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  11  centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  12  centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
  13  centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
  14  clearlinux:latest             : Ok   gcc (Clear Linux OS for Intel Architecture) 8.2.1 20180502
  15  debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
  16  debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u2) 4.9.2
  17  debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
  18  debian:experimental           : Ok   gcc (Debian 8.2.0-13) 8.2.0
  19  debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
  20  debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
  21  debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 8.2.0-11) 8.2.0
  22  debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
  23  fedora:20                     : Ok   gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
  24  fedora:22                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  25  fedora:23                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  26  fedora:24                     : Ok   gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
  27  fedora:24-x-ARC-uClibc        : Ok   arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
  28  fedora:25                     : Ok   gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
  29  fedora:26                     : Ok   gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
  30  fedora:27                     : Ok   gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-6)
  31  fedora:28                     : Ok   gcc (GCC) 8.2.1 20181105 (Red Hat 8.2.1-5)
  32  fedora:29                     : Ok   gcc (GCC) 8.2.1 20181105 (Red Hat 8.2.1-5)
  33  fedora:rawhide                : Ok   gcc (GCC) 8.2.1 20181105 (Red Hat 8.2.1-5)
  34  gentoo-stage3-amd64:latest    : Ok   gcc (Gentoo 7.3.0-r3 p1.4) 7.3.0
  35  mageia:5                      : Ok   gcc (GCC) 4.9.2
  36  mageia:6                      : Ok   gcc (Mageia 5.5.0-1.mga6) 5.5.0
  37  opensuse:13.2                 : Ok   gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064]
  38  opensuse:15.0                 : Ok   gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
  39  opensuse:42.1                 : Ok   gcc (SUSE Linux) 4.8.5
  40  opensuse:42.2                 : Ok   gcc (SUSE Linux) 4.8.5
  41  opensuse:42.3                 : Ok   gcc (SUSE Linux) 4.8.5
  42  opensuse:tumbleweed           : Ok   gcc (SUSE Linux) 8.2.1 20181108 [gcc-8-branch revision 265914]
  43  oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23.0.1)
  44  oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36.0.1)
  45  ubuntu:12.04.5                : Ok   gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  46  ubuntu:14.04.4                : Ok   gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4
  47  ubuntu:14.04.4-x-linaro-arm64 : Ok   aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0
  48  ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
  49  ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  50  ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  51  ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  52  ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  53  ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  54  ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  55  ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
  56  ubuntu:18.04                  : Ok   gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  57  ubuntu:18.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 7.3.0
  58  ubuntu:18.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 7.3.0
  59  ubuntu:18.04-x-m68k           : Ok   m68k-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  60  ubuntu:18.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  61  ubuntu:18.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  62  ubuntu:18.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  63  ubuntu:18.04-x-riscv64        : Ok   riscv64-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  64  ubuntu:18.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  65  ubuntu:18.04-x-sh4            : Ok   sh4-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  66  ubuntu:18.04-x-sparc64        : Ok   sparc64-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  67  ubuntu:18.10                  : Ok   gcc (Ubuntu 8.2.0-7ubuntu1) 8.2.0
  68  ubuntu:19.04                  : Ok   gcc (Ubuntu 8.2.0-12ubuntu1) 8.2.0
  69  ubuntu:19.04-x-alpha          : Ok   alpha-linux-gnu-gcc (Ubuntu 8.2.0-11ubuntu1) 8.2.0
  70  ubuntu:19.04-x-hppa           : Ok   hppa-linux-gnu-gcc (Ubuntu 8.2.0-11ubuntu1) 8.2.0

  # uname -a
  Linux quaco 4.19.13-300.fc29.x86_64 #1 SMP Sat Dec 29 22:54:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  # git log --oneline -1
  03fa483821c0 perf test shell: Use a fallback to get the pathname in vfs_getname
  # perf version --build-options
  perf version 4.20.g03fa48
                   dwarf: [ on  ]  # HAVE_DWARF_SUPPORT
      dwarf_getlocations: [ on  ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
                   glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
                    gtk2: [ on  ]  # HAVE_GTK2_SUPPORT
           syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
                  libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
                  libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
                 libnuma: [ on  ]  # HAVE_LIBNUMA_SUPPORT
  numa_num_possible_cpus: [ on  ]  # HAVE_LIBNUMA_SUPPORT
                 libperl: [ on  ]  # HAVE_LIBPERL_SUPPORT
               libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
                libslang: [ on  ]  # HAVE_SLANG_SUPPORT
               libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
               libunwind: [ on  ]  # HAVE_LIBUNWIND_SUPPORT
      libdw-dwarf-unwind: [ on  ]  # HAVE_DWARF_SUPPORT
                    zlib: [ on  ]  # HAVE_ZLIB_SUPPORT
                    lzma: [ on  ]  # HAVE_LZMA_SUPPORT
               get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
                     bpf: [ on  ]  # HAVE_LIBBPF_SUPPORT
  # perf test
   1: vmlinux symtab matches kallsyms                       : Ok
   2: Detect openat syscall event                           : Ok
   3: Detect openat syscall event on all cpus               : Ok
   4: Read samples using the mmap interface                 : Ok
   5: Test data source output                               : Ok
   6: Parse event definition strings                        : Ok
   7: Simple expression parser                              : Ok
   8: PERF_RECORD_* events & perf_sample fields             : Ok
   9: Parse perf pmu format                                 : Ok
  10: DSO data read                                         : Ok
  11: DSO data cache                                        : Ok
  12: DSO data reopen                                       : Ok
  13: Roundtrip evsel->name                                 : Ok
  14: Parse sched tracepoints fields                        : Ok
  15: syscalls:sys_enter_openat event fields                : Ok
  16: Setup struct perf_event_attr                          : Ok
  17: Match and link multiple hists                         : Ok
  18: 'import perf' in python                               : Ok
  19: Breakpoint overflow signal handler                    : Ok
  20: Breakpoint overflow sampling                          : Ok
  21: Breakpoint accounting                                 : Ok
  22: Watchpoint                                            :
  22.1: Read Only Watchpoint                                : Skip
  22.2: Write Only Watchpoint                               : Ok
  22.3: Read / Write Watchpoint                             : Ok
  22.4: Modify Watchpoint                                   : Ok
  23: Number of exit events of a simple workload            : Ok
  24: Software clock events period values                   : Ok
  25: Object code reading                                   : Ok
  26: Sample parsing                                        : Ok
  27: Use a dummy software event to keep tracking           : Ok
  28: Parse with no sample_id_all bit set                   : Ok
  29: Filter hist entries                                   : Ok
  30: Lookup mmap thread                                    : Ok
  31: Share thread mg                                       : Ok
  32: Sort output of hist entries                           : Ok
  33: Cumulate child hist entries                           : Ok
  34: Track with sched_switch                               : Ok
  35: Filter fds with revents mask in a fdarray             : Ok
  36: Add fd to a fdarray, making it autogrow               : Ok
  37: kmod_path__parse                                      : Ok
  38: Thread map                                            : Ok
  39: LLVM search and compile                               :
  39.1: Basic BPF llvm compile                              : Ok
  39.2: kbuild searching                                    : Ok
  39.3: Compile source for BPF prologue generation          : Ok
  39.4: Compile source for BPF relocation                   : Ok
  40: Session topology                                      : Ok
  41: BPF filter                                            :
  41.1: Basic BPF filtering                                 : Ok
  41.2: BPF pinning                                         : Ok
  41.3: BPF prologue generation                             : Ok
  41.4: BPF relocation checker                              : Ok
  42: Synthesize thread map                                 : Ok
  43: Remove thread map                                     : Ok
  44: Synthesize cpu map                                    : Ok
  45: Synthesize stat config                                : Ok
  46: Synthesize stat                                       : Ok
  47: Synthesize stat round                                 : Ok
  48: Synthesize attr update                                : Ok
  49: Event times                                           : Ok
  50: Read backward ring buffer                             : Ok
  51: Print cpu map                                         : Ok
  52: Probe SDT events                                      : Ok
  53: is_printable_array                                    : Ok
  54: Print bitmap                                          : Ok
  55: perf hooks                                            : Ok
  56: builtin clang support                                 : Skip (not compiled in)
  57: unit_number__scnprintf                                : Ok
  58: mem2node                                              : Ok
  59: x86 rdpmc                                             : Ok
  60: Convert perf time to TSC                              : Ok
  61: DWARF unwind                                          : Ok
  62: x86 instruction decoder - new instructions            : Ok
  63: x86 bp modify                                         : Ok
  64: probe libc's inet_pton & backtrace it with ping       : Ok
  65: Use vfs_getname probe to get syscall args filenames   : Ok
  66: Add vfs_getname probe to get syscall args filenames   : Ok
  67: Check open filename arg using perf trace + vfs_getname: Ok

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


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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2016-07-05  0:38 Arnaldo Carvalho de Melo
@ 2016-07-05 10:14 ` Ingo Molnar
  0 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2016-07-05 10:14 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov,
	Ananth N Mavinakayanahalli, Brendan Gregg, Chris Phlipot,
	Christoph Hellwig, Daniel Borkmann, David Ahern, Eric Leblond,
	He Kuang, Hemant Kumar, Jiri Olsa, Masami Hiramatsu,
	Milian Wolff, Namhyung Kim, Peter Zijlstra, pi3orama,
	Taeung Song, Wang Nan, Zefan Li, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> 	Build status:
> 
> [root@jouet ~]# dm
> alpine:3.4: FAIL  <--- strerror_r usage needs to be made XSI-compliant, Alpine Linux uses musl libc
> centos:5: FAIL    <--- flex snafu, being investigated by Jiri
> centos:6: Ok
> centos:7: Ok
> debian:7: Ok
> debian:8: Ok
> debian:experimental: Ok
> fedora:21: Ok
> fedora:22: Ok
> fedora:23: Ok
> fedora:24: Ok
> fedora:rawhide: Ok
> mageia:5: Ok
> opensuse:13.2: Ok
> opensuse:42.1: Ok
> ubuntu:12.04.5: Ok
> ubuntu:14.04.4: Ok
> ubuntu:15.10: Ok
> ubuntu:16.04: Ok
> [root@jouet ~]#
> 
> 	These images are now available at: https://hub.docker.com/search/?q=acmel
> 
> 	And the 'dm' script at: https://fedorapeople.org/~acme/perf/dm
> 
> Regards,
> 
> - Arnaldo
> 
> The following changes since commit dc29bb47a34130459fadd58f05e2acd051a6327d:
> 
>   Merge tag 'perf-core-for-mingo-20160630' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-07-01 08:40:39 +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-20160704
> 
> for you to fetch changes up to f3d082ceabe53177c98bfa4580a294c2844966e8:
> 
>   perf tools: Sync copy of syscall_64.tbl with the kernel (2016-07-04 20:29:40 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> Documentation:
> 
> - Update android build documentation (Chris Phlipot)
> 
> Infrastructure:
> 
> - Respect WERROR=0 in libapi and libsubcmd, to allow building on Android (Chris Phlipot)
> 
> - Prep work to support SDT events in probe cache (Masami Hiramatsu)
> 
> - ELF support for SDT (Hemant Kumar)
> 
> - Add feature detection for libelf's elf_getshdrstrndx function (Arnaldo Carvalho de Melo)
> 
> - Fix hist accumulation test (Jiri Olsa)
> 
> - Unwind callchain fixes (Jiri Olsa)
> 
> - Change internal representation of numa nodes obtained from
>   perf.data header (Jiri Olsa)
> 
> - Sync copy of syscall_64.tbl with the kernel (Arnaldo Carvalho de Melo)
> 
> - Add LGPL 2.1 license header to libbpf source files (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf build: Add feature detection for libelf's elf_getshdrstrndx()
>       perf tools: Sync copy of syscall_64.tbl with the kernel
> 
> Chris Phlipot (3):
>       tools lib api: Respect WERROR=0 for build
>       tools lib subcmd: Respect WERROR=0 for build
>       perf tools: Update android build documentation
> 
> Hemant Kumar (1):
>       perf sdt: ELF support for SDT
> 
> Jiri Olsa (4):
>       perf header: Transform nodes string info to struct
>       perf tests: Fix hist accumulation test
>       perf unwind: Add initialized arg into unwind__prepare_access
>       perf unwind: Call unwind__prepare_access for forked thread
> 
> Masami Hiramatsu (5):
>       perf probe: Use cache entry if possible
>       perf probe: Show all cached probes
>       perf probe: Remove caches when --cache is given
>       perf probe: Add group name support
>       perf buildid-cache: Scan and import user SDT events to probe cache
> 
> Wang Nan (1):
>       tools lib bpf: Add license header
> 
>  tools/build/Makefile.feature                      |   1 +
>  tools/build/feature/Makefile                      |   4 +
>  tools/build/feature/test-all.c                    |   5 +
>  tools/build/feature/test-libelf-getshdrstrndx.c   |   8 +
>  tools/lib/api/Makefile                            |   8 +-
>  tools/lib/bpf/bpf.c                               |  13 ++
>  tools/lib/bpf/bpf.h                               |  13 ++
>  tools/lib/bpf/libbpf.c                            |  13 ++
>  tools/lib/bpf/libbpf.h                            |  13 ++
>  tools/lib/subcmd/Makefile                         |   8 +-
>  tools/perf/Documentation/android.txt              |  16 +-
>  tools/perf/Documentation/perf-buildid-cache.txt   |   3 +
>  tools/perf/Documentation/perf-probe.txt           |  19 +-
>  tools/perf/arch/x86/entry/syscalls/syscall_64.tbl |   2 +
>  tools/perf/builtin-probe.c                        |  31 ++-
>  tools/perf/config/Makefile                        |   4 +
>  tools/perf/tests/hists_cumulate.c                 |   4 +
>  tools/perf/util/build-id.c                        | 138 +++++++++++-
>  tools/perf/util/build-id.h                        |   3 +
>  tools/perf/util/callchain.h                       |   1 +
>  tools/perf/util/env.c                             |   5 +-
>  tools/perf/util/env.h                             |  10 +-
>  tools/perf/util/header.c                          |  76 +++----
>  tools/perf/util/map.c                             |   9 +-
>  tools/perf/util/map.h                             |   2 +-
>  tools/perf/util/probe-event.c                     |  91 +++++++-
>  tools/perf/util/probe-file.c                      | 175 ++++++++++++++-
>  tools/perf/util/probe-file.h                      |  10 +-
>  tools/perf/util/symbol-elf.c                      | 260 ++++++++++++++++++++++
>  tools/perf/util/symbol.h                          |  22 ++
>  tools/perf/util/thread.c                          |  39 +++-
>  tools/perf/util/unwind-libunwind.c                |  11 +-
>  tools/perf/util/unwind.h                          |   9 +-
>  tools/perf/util/util.c                            |  19 +-
>  34 files changed, 940 insertions(+), 105 deletions(-)
>  create mode 100644 tools/build/feature/test-libelf-getshdrstrndx.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2016-07-05  0:38 Arnaldo Carvalho de Melo
  2016-07-05 10:14 ` Ingo Molnar
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-07-05  0:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Ananth N Mavinakayanahalli, Brendan Gregg,
	Chris Phlipot, Christoph Hellwig, Daniel Borkmann, David Ahern,
	Eric Leblond, He Kuang, Hemant Kumar, Jiri Olsa,
	Masami Hiramatsu, Milian Wolff, Namhyung Kim, Peter Zijlstra,
	pi3orama, Taeung Song, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

	Build status:

[root@jouet ~]# dm
alpine:3.4: FAIL  <--- strerror_r usage needs to be made XSI-compliant, Alpine Linux uses musl libc
centos:5: FAIL    <--- flex snafu, being investigated by Jiri
centos:6: Ok
centos:7: Ok
debian:7: Ok
debian:8: Ok
debian:experimental: Ok
fedora:21: Ok
fedora:22: Ok
fedora:23: Ok
fedora:24: Ok
fedora:rawhide: Ok
mageia:5: Ok
opensuse:13.2: Ok
opensuse:42.1: Ok
ubuntu:12.04.5: Ok
ubuntu:14.04.4: Ok
ubuntu:15.10: Ok
ubuntu:16.04: Ok
[root@jouet ~]#

	These images are now available at: https://hub.docker.com/search/?q=acmel

	And the 'dm' script at: https://fedorapeople.org/~acme/perf/dm

Regards,

- Arnaldo

The following changes since commit dc29bb47a34130459fadd58f05e2acd051a6327d:

  Merge tag 'perf-core-for-mingo-20160630' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-07-01 08:40:39 +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-20160704

for you to fetch changes up to f3d082ceabe53177c98bfa4580a294c2844966e8:

  perf tools: Sync copy of syscall_64.tbl with the kernel (2016-07-04 20:29:40 -0300)

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

Documentation:

- Update android build documentation (Chris Phlipot)

Infrastructure:

- Respect WERROR=0 in libapi and libsubcmd, to allow building on Android (Chris Phlipot)

- Prep work to support SDT events in probe cache (Masami Hiramatsu)

- ELF support for SDT (Hemant Kumar)

- Add feature detection for libelf's elf_getshdrstrndx function (Arnaldo Carvalho de Melo)

- Fix hist accumulation test (Jiri Olsa)

- Unwind callchain fixes (Jiri Olsa)

- Change internal representation of numa nodes obtained from
  perf.data header (Jiri Olsa)

- Sync copy of syscall_64.tbl with the kernel (Arnaldo Carvalho de Melo)

- Add LGPL 2.1 license header to libbpf source files (Wang Nan)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf build: Add feature detection for libelf's elf_getshdrstrndx()
      perf tools: Sync copy of syscall_64.tbl with the kernel

Chris Phlipot (3):
      tools lib api: Respect WERROR=0 for build
      tools lib subcmd: Respect WERROR=0 for build
      perf tools: Update android build documentation

Hemant Kumar (1):
      perf sdt: ELF support for SDT

Jiri Olsa (4):
      perf header: Transform nodes string info to struct
      perf tests: Fix hist accumulation test
      perf unwind: Add initialized arg into unwind__prepare_access
      perf unwind: Call unwind__prepare_access for forked thread

Masami Hiramatsu (5):
      perf probe: Use cache entry if possible
      perf probe: Show all cached probes
      perf probe: Remove caches when --cache is given
      perf probe: Add group name support
      perf buildid-cache: Scan and import user SDT events to probe cache

Wang Nan (1):
      tools lib bpf: Add license header

 tools/build/Makefile.feature                      |   1 +
 tools/build/feature/Makefile                      |   4 +
 tools/build/feature/test-all.c                    |   5 +
 tools/build/feature/test-libelf-getshdrstrndx.c   |   8 +
 tools/lib/api/Makefile                            |   8 +-
 tools/lib/bpf/bpf.c                               |  13 ++
 tools/lib/bpf/bpf.h                               |  13 ++
 tools/lib/bpf/libbpf.c                            |  13 ++
 tools/lib/bpf/libbpf.h                            |  13 ++
 tools/lib/subcmd/Makefile                         |   8 +-
 tools/perf/Documentation/android.txt              |  16 +-
 tools/perf/Documentation/perf-buildid-cache.txt   |   3 +
 tools/perf/Documentation/perf-probe.txt           |  19 +-
 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl |   2 +
 tools/perf/builtin-probe.c                        |  31 ++-
 tools/perf/config/Makefile                        |   4 +
 tools/perf/tests/hists_cumulate.c                 |   4 +
 tools/perf/util/build-id.c                        | 138 +++++++++++-
 tools/perf/util/build-id.h                        |   3 +
 tools/perf/util/callchain.h                       |   1 +
 tools/perf/util/env.c                             |   5 +-
 tools/perf/util/env.h                             |  10 +-
 tools/perf/util/header.c                          |  76 +++----
 tools/perf/util/map.c                             |   9 +-
 tools/perf/util/map.h                             |   2 +-
 tools/perf/util/probe-event.c                     |  91 +++++++-
 tools/perf/util/probe-file.c                      | 175 ++++++++++++++-
 tools/perf/util/probe-file.h                      |  10 +-
 tools/perf/util/symbol-elf.c                      | 260 ++++++++++++++++++++++
 tools/perf/util/symbol.h                          |  22 ++
 tools/perf/util/thread.c                          |  39 +++-
 tools/perf/util/unwind-libunwind.c                |  11 +-
 tools/perf/util/unwind.h                          |   9 +-
 tools/perf/util/util.c                            |  19 +-
 34 files changed, 940 insertions(+), 105 deletions(-)
 create mode 100644 tools/build/feature/test-libelf-getshdrstrndx.c

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2016-01-29 21:17 ` Arnaldo Carvalho de Melo
@ 2016-02-03 10:02   ` Ingo Molnar
  -1 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2016-02-03 10:02 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Yarygin,
	Alexei Starovoitov, Al Grant, Brendan Gregg, Chunyan Zhang,
	Daniel Borkmann, David Ahern, He Kuang, Hemant Kumar, Jiri Olsa,
	linux-arm-kernel, linux-doc, linuxppc-dev, Li Zefan,
	Masami Hiramatsu, Mathieu Poirier, Michael Ellerman, Mike Leach,
	Namhyung Kim, Naveen N . Rao, Paul Mackerras, Peter Zijlstra,
	pi3orama, Rabin Vincent, Scott Wood, Srikar Dronamraju,
	Tor Jeremiassen, Wang Nan, Will Deacon, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	This is on top of the previously submitted perf-core-for-mingo tag,
> please consider applying,
> 
> - Arnaldo
> 
> The following changes since commit 5ac76283b32b116c58e362e99542182ddcfc8262:
> 
>   perf cpumap: Auto initialize cpu__max_{node,cpu} (2016-01-26 16:08:36 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2
> 
> for you to fetch changes up to 814568db641f6587c1e98a3a85f214cb6a30fe10:
> 
>   perf build: Align the names of the build tests: (2016-01-29 17:51:04 -0300)
> 
> ----------------------------------------------------------------
> New features:
> 
> - Port 'perf kvm stat' to PowerPC (Hemant Kumar)
> 
> Infrastructure:
> 
> - Use the 'feature-dump' target to do the feature checks just once and then
>   add code to reuse that in the tests/make makefile, speeding up the
>   'make -C tools/perf build-test' target (Wang Nan)
> 
> - Reduce the number of tests the 'build-test' target do to those that don't
>   pollute the source tree (Arnaldo Carvalho de Melo)
> 
> - Improve the output of the build tests a bit by aligning the name of the
>   tests, more can be done to filter out uninteresting info in the output
>   (Arnaldo Carvalho de Melo)
> 
> - Add perf_evlist pointer to *info_priv_size(), more prep work for
>   supporting the coresight architecture (Mathieu Poirier)
> 
> - Improve the 'perf test bp_signal' test (Wang Nan)
> 
> - Check environment before starting the BPF 'perf test', so that we can just
>   'Skip' older kernels instead of 'FAIL'ing them (Wang Nan)
> 
> - Fix cpumode of synthesized buildid event (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf tools: Speed up build-tests by reducing the number of builds tested
>       perf build: Align the names of the build tests:
> 
> Hemant Kumar (4):
>       perf kvm/{x86,s390}: Remove dependency on uapi/kvm_perf.h
>       perf kvm/{x86,s390}: Remove const from kvm_events_tp
>       perf kvm/powerpc: Port perf kvm stat to powerpc
>       perf kvm/powerpc: Add support for HCALL reasons
> 
> Jiri Olsa (1):
>       perf build: Fix feature-dump checks, we need to test all features
> 
> Mathieu Poirier (1):
>       perf auxtrace: Add perf_evlist pointer to *info_priv_size()
> 
> Wang Nan (8):
>       tools build: Check basic headers for test-compile feature checker
>       perf build: Remove all condition feature check {C,LD}FLAGS
>       perf build: Use feature dump file for build-test
>       perf buildid: Fix cpumode of buildid event
>       perf test: Check environment before start real BPF test
>       perf test: Improve bp_signal
>       perf tools: Move timestamp creation to util
>       perf record: Use OPT_BOOLEAN_SET for buildid cache related options
> 
>  tools/build/Makefile.feature                   |   8 ++
>  tools/build/feature/test-compile.c             |   2 +
>  tools/perf/Makefile                            |  11 +-
>  tools/perf/arch/powerpc/Makefile               |   2 +
>  tools/perf/arch/powerpc/util/Build             |   1 +
>  tools/perf/arch/powerpc/util/book3s_hcalls.h   | 123 ++++++++++++++++++
>  tools/perf/arch/powerpc/util/book3s_hv_exits.h |  33 +++++
>  tools/perf/arch/powerpc/util/kvm-stat.c        | 170 +++++++++++++++++++++++++
>  tools/perf/arch/s390/util/kvm-stat.c           |  10 +-
>  tools/perf/arch/x86/util/intel-bts.c           |   4 +-
>  tools/perf/arch/x86/util/intel-pt.c            |   4 +-
>  tools/perf/arch/x86/util/kvm-stat.c            |  16 ++-
>  tools/perf/builtin-buildid-cache.c             |  14 +-
>  tools/perf/builtin-kvm.c                       |  38 ++++--
>  tools/perf/builtin-record.c                    |  12 +-
>  tools/perf/config/Makefile                     | 101 +++++++--------
>  tools/perf/tests/bp_signal.c                   | 140 ++++++++++++++++----
>  tools/perf/tests/bpf.c                         |  37 ++++++
>  tools/perf/tests/make                          |  39 +++++-
>  tools/perf/util/auxtrace.c                     |   7 +-
>  tools/perf/util/auxtrace.h                     |   6 +-
>  tools/perf/util/build-id.c                     |   6 +-
>  tools/perf/util/kvm-stat.h                     |   8 +-
>  tools/perf/util/util.c                         |  17 +++
>  tools/perf/util/util.h                         |   1 +
>  25 files changed, 688 insertions(+), 122 deletions(-)
>  create mode 100644 tools/perf/arch/powerpc/util/book3s_hcalls.h
>  create mode 100644 tools/perf/arch/powerpc/util/book3s_hv_exits.h
>  create mode 100644 tools/perf/arch/powerpc/util/kvm-stat.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2016-02-03 10:02   ` Ingo Molnar
  0 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2016-02-03 10:02 UTC (permalink / raw)
  To: linux-arm-kernel


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

> Hi Ingo,
> 
> 	This is on top of the previously submitted perf-core-for-mingo tag,
> please consider applying,
> 
> - Arnaldo
> 
> The following changes since commit 5ac76283b32b116c58e362e99542182ddcfc8262:
> 
>   perf cpumap: Auto initialize cpu__max_{node,cpu} (2016-01-26 16:08:36 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2
> 
> for you to fetch changes up to 814568db641f6587c1e98a3a85f214cb6a30fe10:
> 
>   perf build: Align the names of the build tests: (2016-01-29 17:51:04 -0300)
> 
> ----------------------------------------------------------------
> New features:
> 
> - Port 'perf kvm stat' to PowerPC (Hemant Kumar)
> 
> Infrastructure:
> 
> - Use the 'feature-dump' target to do the feature checks just once and then
>   add code to reuse that in the tests/make makefile, speeding up the
>   'make -C tools/perf build-test' target (Wang Nan)
> 
> - Reduce the number of tests the 'build-test' target do to those that don't
>   pollute the source tree (Arnaldo Carvalho de Melo)
> 
> - Improve the output of the build tests a bit by aligning the name of the
>   tests, more can be done to filter out uninteresting info in the output
>   (Arnaldo Carvalho de Melo)
> 
> - Add perf_evlist pointer to *info_priv_size(), more prep work for
>   supporting the coresight architecture (Mathieu Poirier)
> 
> - Improve the 'perf test bp_signal' test (Wang Nan)
> 
> - Check environment before starting the BPF 'perf test', so that we can just
>   'Skip' older kernels instead of 'FAIL'ing them (Wang Nan)
> 
> - Fix cpumode of synthesized buildid event (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf tools: Speed up build-tests by reducing the number of builds tested
>       perf build: Align the names of the build tests:
> 
> Hemant Kumar (4):
>       perf kvm/{x86,s390}: Remove dependency on uapi/kvm_perf.h
>       perf kvm/{x86,s390}: Remove const from kvm_events_tp
>       perf kvm/powerpc: Port perf kvm stat to powerpc
>       perf kvm/powerpc: Add support for HCALL reasons
> 
> Jiri Olsa (1):
>       perf build: Fix feature-dump checks, we need to test all features
> 
> Mathieu Poirier (1):
>       perf auxtrace: Add perf_evlist pointer to *info_priv_size()
> 
> Wang Nan (8):
>       tools build: Check basic headers for test-compile feature checker
>       perf build: Remove all condition feature check {C,LD}FLAGS
>       perf build: Use feature dump file for build-test
>       perf buildid: Fix cpumode of buildid event
>       perf test: Check environment before start real BPF test
>       perf test: Improve bp_signal
>       perf tools: Move timestamp creation to util
>       perf record: Use OPT_BOOLEAN_SET for buildid cache related options
> 
>  tools/build/Makefile.feature                   |   8 ++
>  tools/build/feature/test-compile.c             |   2 +
>  tools/perf/Makefile                            |  11 +-
>  tools/perf/arch/powerpc/Makefile               |   2 +
>  tools/perf/arch/powerpc/util/Build             |   1 +
>  tools/perf/arch/powerpc/util/book3s_hcalls.h   | 123 ++++++++++++++++++
>  tools/perf/arch/powerpc/util/book3s_hv_exits.h |  33 +++++
>  tools/perf/arch/powerpc/util/kvm-stat.c        | 170 +++++++++++++++++++++++++
>  tools/perf/arch/s390/util/kvm-stat.c           |  10 +-
>  tools/perf/arch/x86/util/intel-bts.c           |   4 +-
>  tools/perf/arch/x86/util/intel-pt.c            |   4 +-
>  tools/perf/arch/x86/util/kvm-stat.c            |  16 ++-
>  tools/perf/builtin-buildid-cache.c             |  14 +-
>  tools/perf/builtin-kvm.c                       |  38 ++++--
>  tools/perf/builtin-record.c                    |  12 +-
>  tools/perf/config/Makefile                     | 101 +++++++--------
>  tools/perf/tests/bp_signal.c                   | 140 ++++++++++++++++----
>  tools/perf/tests/bpf.c                         |  37 ++++++
>  tools/perf/tests/make                          |  39 +++++-
>  tools/perf/util/auxtrace.c                     |   7 +-
>  tools/perf/util/auxtrace.h                     |   6 +-
>  tools/perf/util/build-id.c                     |   6 +-
>  tools/perf/util/kvm-stat.h                     |   8 +-
>  tools/perf/util/util.c                         |  17 +++
>  tools/perf/util/util.h                         |   1 +
>  25 files changed, 688 insertions(+), 122 deletions(-)
>  create mode 100644 tools/perf/arch/powerpc/util/book3s_hcalls.h
>  create mode 100644 tools/perf/arch/powerpc/util/book3s_hv_exits.h
>  create mode 100644 tools/perf/arch/powerpc/util/kvm-stat.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2016-01-29 21:17 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-01-29 21:17 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Yarygin, Alexei Starovoitov, Al Grant, Brendan Gregg,
	Chunyan Zhang, Daniel Borkmann, David Ahern, He Kuang,
	Hemant Kumar, Jiri Olsa, linux-arm-kernel, linux-doc,
	linuxppc-dev, Li Zefan, Masami Hiramatsu, Mathieu Poirier,
	Michael Ellerman, Mike Leach, Namhyung Kim, Naveen N . Rao,
	Paul Mackerras, Peter Zijlstra, pi3orama, Rabin Vincent,
	Scott Wood, Srikar Dronamraju, Tor Jeremiassen, Wang Nan,
	Will Deacon, Arnaldo Carvalho de Melo

See http://www.infradead.org/rpr.html

Hi Ingo,

	This is on top of the previously submitted perf-core-for-mingo tag,
please consider applying,

- Arnaldo

The following changes since commit 5ac76283b32b116c58e362e99542182ddcfc8262:

  perf cpumap: Auto initialize cpu__max_{node,cpu} (2016-01-26 16:08:36 -0300)

are available in the git repository at:

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

for you to fetch changes up to 814568db641f6587c1e98a3a85f214cb6a30fe10:

  perf build: Align the names of the build tests: (2016-01-29 17:51:04 -0300)

----------------------------------------------------------------
New features:

- Port 'perf kvm stat' to PowerPC (Hemant Kumar)

Infrastructure:

- Use the 'feature-dump' target to do the feature checks just once and then
  add code to reuse that in the tests/make makefile, speeding up the
  'make -C tools/perf build-test' target (Wang Nan)

- Reduce the number of tests the 'build-test' target do to those that don't
  pollute the source tree (Arnaldo Carvalho de Melo)

- Improve the output of the build tests a bit by aligning the name of the
  tests, more can be done to filter out uninteresting info in the output
  (Arnaldo Carvalho de Melo)

- Add perf_evlist pointer to *info_priv_size(), more prep work for
  supporting the coresight architecture (Mathieu Poirier)

- Improve the 'perf test bp_signal' test (Wang Nan)

- Check environment before starting the BPF 'perf test', so that we can just
  'Skip' older kernels instead of 'FAIL'ing them (Wang Nan)

- Fix cpumode of synthesized buildid event (Wang Nan)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf tools: Speed up build-tests by reducing the number of builds tested
      perf build: Align the names of the build tests:

Hemant Kumar (4):
      perf kvm/{x86,s390}: Remove dependency on uapi/kvm_perf.h
      perf kvm/{x86,s390}: Remove const from kvm_events_tp
      perf kvm/powerpc: Port perf kvm stat to powerpc
      perf kvm/powerpc: Add support for HCALL reasons

Jiri Olsa (1):
      perf build: Fix feature-dump checks, we need to test all features

Mathieu Poirier (1):
      perf auxtrace: Add perf_evlist pointer to *info_priv_size()

Wang Nan (8):
      tools build: Check basic headers for test-compile feature checker
      perf build: Remove all condition feature check {C,LD}FLAGS
      perf build: Use feature dump file for build-test
      perf buildid: Fix cpumode of buildid event
      perf test: Check environment before start real BPF test
      perf test: Improve bp_signal
      perf tools: Move timestamp creation to util
      perf record: Use OPT_BOOLEAN_SET for buildid cache related options

 tools/build/Makefile.feature                   |   8 ++
 tools/build/feature/test-compile.c             |   2 +
 tools/perf/Makefile                            |  11 +-
 tools/perf/arch/powerpc/Makefile               |   2 +
 tools/perf/arch/powerpc/util/Build             |   1 +
 tools/perf/arch/powerpc/util/book3s_hcalls.h   | 123 ++++++++++++++++++
 tools/perf/arch/powerpc/util/book3s_hv_exits.h |  33 +++++
 tools/perf/arch/powerpc/util/kvm-stat.c        | 170 +++++++++++++++++++++++++
 tools/perf/arch/s390/util/kvm-stat.c           |  10 +-
 tools/perf/arch/x86/util/intel-bts.c           |   4 +-
 tools/perf/arch/x86/util/intel-pt.c            |   4 +-
 tools/perf/arch/x86/util/kvm-stat.c            |  16 ++-
 tools/perf/builtin-buildid-cache.c             |  14 +-
 tools/perf/builtin-kvm.c                       |  38 ++++--
 tools/perf/builtin-record.c                    |  12 +-
 tools/perf/config/Makefile                     | 101 +++++++--------
 tools/perf/tests/bp_signal.c                   | 140 ++++++++++++++++----
 tools/perf/tests/bpf.c                         |  37 ++++++
 tools/perf/tests/make                          |  39 +++++-
 tools/perf/util/auxtrace.c                     |   7 +-
 tools/perf/util/auxtrace.h                     |   6 +-
 tools/perf/util/build-id.c                     |   6 +-
 tools/perf/util/kvm-stat.h                     |   8 +-
 tools/perf/util/util.c                         |  17 +++
 tools/perf/util/util.h                         |   1 +
 25 files changed, 688 insertions(+), 122 deletions(-)
 create mode 100644 tools/perf/arch/powerpc/util/book3s_hcalls.h
 create mode 100644 tools/perf/arch/powerpc/util/book3s_hv_exits.h
 create mode 100644 tools/perf/arch/powerpc/util/kvm-stat.c

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2016-01-29 21:17 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-01-29 21:17 UTC (permalink / raw)
  To: linux-arm-kernel

See http://www.infradead.org/rpr.html

Hi Ingo,

	This is on top of the previously submitted perf-core-for-mingo tag,
please consider applying,

- Arnaldo

The following changes since commit 5ac76283b32b116c58e362e99542182ddcfc8262:

  perf cpumap: Auto initialize cpu__max_{node,cpu} (2016-01-26 16:08:36 -0300)

are available in the git repository at:

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

for you to fetch changes up to 814568db641f6587c1e98a3a85f214cb6a30fe10:

  perf build: Align the names of the build tests: (2016-01-29 17:51:04 -0300)

----------------------------------------------------------------
New features:

- Port 'perf kvm stat' to PowerPC (Hemant Kumar)

Infrastructure:

- Use the 'feature-dump' target to do the feature checks just once and then
  add code to reuse that in the tests/make makefile, speeding up the
  'make -C tools/perf build-test' target (Wang Nan)

- Reduce the number of tests the 'build-test' target do to those that don't
  pollute the source tree (Arnaldo Carvalho de Melo)

- Improve the output of the build tests a bit by aligning the name of the
  tests, more can be done to filter out uninteresting info in the output
  (Arnaldo Carvalho de Melo)

- Add perf_evlist pointer to *info_priv_size(), more prep work for
  supporting the coresight architecture (Mathieu Poirier)

- Improve the 'perf test bp_signal' test (Wang Nan)

- Check environment before starting the BPF 'perf test', so that we can just
  'Skip' older kernels instead of 'FAIL'ing them (Wang Nan)

- Fix cpumode of synthesized buildid event (Wang Nan)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf tools: Speed up build-tests by reducing the number of builds tested
      perf build: Align the names of the build tests:

Hemant Kumar (4):
      perf kvm/{x86,s390}: Remove dependency on uapi/kvm_perf.h
      perf kvm/{x86,s390}: Remove const from kvm_events_tp
      perf kvm/powerpc: Port perf kvm stat to powerpc
      perf kvm/powerpc: Add support for HCALL reasons

Jiri Olsa (1):
      perf build: Fix feature-dump checks, we need to test all features

Mathieu Poirier (1):
      perf auxtrace: Add perf_evlist pointer to *info_priv_size()

Wang Nan (8):
      tools build: Check basic headers for test-compile feature checker
      perf build: Remove all condition feature check {C,LD}FLAGS
      perf build: Use feature dump file for build-test
      perf buildid: Fix cpumode of buildid event
      perf test: Check environment before start real BPF test
      perf test: Improve bp_signal
      perf tools: Move timestamp creation to util
      perf record: Use OPT_BOOLEAN_SET for buildid cache related options

 tools/build/Makefile.feature                   |   8 ++
 tools/build/feature/test-compile.c             |   2 +
 tools/perf/Makefile                            |  11 +-
 tools/perf/arch/powerpc/Makefile               |   2 +
 tools/perf/arch/powerpc/util/Build             |   1 +
 tools/perf/arch/powerpc/util/book3s_hcalls.h   | 123 ++++++++++++++++++
 tools/perf/arch/powerpc/util/book3s_hv_exits.h |  33 +++++
 tools/perf/arch/powerpc/util/kvm-stat.c        | 170 +++++++++++++++++++++++++
 tools/perf/arch/s390/util/kvm-stat.c           |  10 +-
 tools/perf/arch/x86/util/intel-bts.c           |   4 +-
 tools/perf/arch/x86/util/intel-pt.c            |   4 +-
 tools/perf/arch/x86/util/kvm-stat.c            |  16 ++-
 tools/perf/builtin-buildid-cache.c             |  14 +-
 tools/perf/builtin-kvm.c                       |  38 ++++--
 tools/perf/builtin-record.c                    |  12 +-
 tools/perf/config/Makefile                     | 101 +++++++--------
 tools/perf/tests/bp_signal.c                   | 140 ++++++++++++++++----
 tools/perf/tests/bpf.c                         |  37 ++++++
 tools/perf/tests/make                          |  39 +++++-
 tools/perf/util/auxtrace.c                     |   7 +-
 tools/perf/util/auxtrace.h                     |   6 +-
 tools/perf/util/build-id.c                     |   6 +-
 tools/perf/util/kvm-stat.h                     |   8 +-
 tools/perf/util/util.c                         |  17 +++
 tools/perf/util/util.h                         |   1 +
 25 files changed, 688 insertions(+), 122 deletions(-)
 create mode 100644 tools/perf/arch/powerpc/util/book3s_hcalls.h
 create mode 100644 tools/perf/arch/powerpc/util/book3s_hv_exits.h
 create mode 100644 tools/perf/arch/powerpc/util/kvm-stat.c

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2015-12-14 17:44 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-12-14 17:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Andi Kleen, David Ahern, He Kuang, Jiri Olsa,
	Josh Poimboeuf, Masami Hiramatsu, Namhyung Kim, Peter Zijlstra,
	pi3orama, Wang Nan, Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 0d76ded582c178d3cca55c9112eceb5b0f12f558:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-12-14 09:31:39 +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 7efe0e034c713716060bc7794c7e332589980c70:

  perf record: Support custom vmlinux path (2015-12-14 13:04:12 -0300)

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

User visible:

- Make command line options always available, even when they
  depend on some feature being enabled, warning the user about
  use of such options (Wang Nan)

- Support --vmlinux in perf record, useful, so far, for eBPF,
  where we will set up events that will be used in the record
  session (He Kuang)

- Automatically disable collecting branch flags and cycles with
  --call-graph lbr. This allows avoiding a bunch of extra MSR
  reads in the PMI on Skylake.  (Andi Kleen)

Infrastructure:

- Dump the stack when a 'perf test -v ' entry segfaults, so far we
  would have to run it under gdb with 'set follow-fork-mode child'
  set to get a proper backtrace (Arnaldo Carvalho de Melo)

- Initialize the refcnt in 'struct thread' to 1 and fixup its
  users accordingly, so that we try to have the same refcount
  model accross the perf codebase (Arnaldo Carvalho de Melo)

- More prep work for moving the subcmd infrastructure out of
  tools/perf/ and into tools/lib/subcmd/ to be used by other
  tools/ living utilities (Josh Poimboeuf)

- Fix 'perf test' hist testcases when kptr_restrict is on (Namhyung Kim)

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

----------------------------------------------------------------
Andi Kleen (1):
      perf evsel: Disable branch flags/cycles for --callgraph lbr

Arnaldo Carvalho de Melo (3):
      perf tools: Use same signal handling strategy as 'record'
      perf test: Dump the stack when test segfaults when in verbose mode
      perf thread: Fix reference count initial state

He Kuang (1):
      perf record: Support custom vmlinux path

Josh Poimboeuf (9):
      perf build: Remove unnecessary line in Makefile.feature
      perf test: Add Build file to dependencies for llvm-src-*.c
      perf test: Remove tarpkg at end of test
      perf build: Fix 'make clean'
      perf build: Rename LIB_PATH -> API_PATH
      perf tools: Create pager.h
      perf tools: Remove check for unused PERF_PAGER_IN_USE
      perf tools: Move help_unknown_cmd() to its own file
      perf tools: Convert parse-options.c internal functions to static

Namhyung Kim (1):
      perf test: Fix hist testcases when kptr_restrict is on

Wang Nan (1):
      perf tools: Make options always available, even if required libs not linked

 tools/build/Makefile.feature             |   1 -
 tools/perf/Documentation/perf-record.txt |  10 ++-
 tools/perf/Makefile.perf                 |  15 ++--
 tools/perf/builtin-probe.c               |  15 +++-
 tools/perf/builtin-record.c              |  25 +++++-
 tools/perf/tests/Build                   |   6 +-
 tools/perf/tests/builtin-test.c          |   3 +
 tools/perf/tests/hists_common.c          |   5 +-
 tools/perf/tests/make                    |   3 +-
 tools/perf/util/Build                    |   1 +
 tools/perf/util/cache.h                  |   5 +-
 tools/perf/util/evsel.c                  |  14 +++-
 tools/perf/util/help-unknown-cmd.c       | 103 +++++++++++++++++++++++
 tools/perf/util/help-unknown-cmd.h       |   0
 tools/perf/util/help.c                   | 107 +-----------------------
 tools/perf/util/help.h                   |   3 +
 tools/perf/util/intel-pt.c               |   4 +-
 tools/perf/util/machine.c                |  19 +++--
 tools/perf/util/pager.c                  |   8 +-
 tools/perf/util/pager.h                  |   7 ++
 tools/perf/util/parse-options.c          | 136 +++++++++++++++++++++++++++----
 tools/perf/util/parse-options.h          |  14 ++--
 tools/perf/util/thread.c                 |  10 ++-
 tools/perf/util/util.c                   |   3 +-
 24 files changed, 341 insertions(+), 176 deletions(-)
 create mode 100644 tools/perf/util/help-unknown-cmd.c
 create mode 100644 tools/perf/util/help-unknown-cmd.h
 create mode 100644 tools/perf/util/pager.h

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2015-10-05 21:03 Arnaldo Carvalho de Melo
@ 2015-10-06  7:09 ` Ingo Molnar
  0 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2015-10-06  7:09 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
	Chandler Carruth, Daniel Bristot de Oliveira, David Ahern,
	Don Zickus, Fenghua Yu, Frederic Weisbecker, Jiri Olsa,
	Kanaka Juvva, Kan Liang, Matt Fleming, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian, Vikas Shivappa, Vince Weaver,
	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 e3b0ac1b7a8a590440a2030e7d10d48c59ab8a2a:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-10-03 08:20:14 +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 27bf90bf0690f55c3679bcc4c325823cf1cfd19d:
> 
>   perf tools: Fail properly in case pattern matching fails to find tracepoint (2015-10-05 17:59:50 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Switch the default callchain output mode to 'graph,0.5,caller', to make it
>   look like the default for other tools, reducing the learning curve for
>   people used to 'caller' based viewing (Arnaldo Carvalho de Melo)
> 
> - Implement column based horizontal scrolling in the hists browser (top, report),
>   making it possible to use the TUI for things like 'perf mem report' where
>   there are many more columns than can fit in a terminal (Arnaldo Carvalho de Melo)
> 
> - Support sorting by symbol_iaddr with perf.data files produced by
>   'perf mem record' (Don Zickus)
> 
> - Display DATA_SRC sample type bit, i.e. when running 'perf evlist -v' the
>   "DATA_SRC" wasn't appearing when set, fix it to look like: (Jiri Olsa)
> 
>   cpu/mem-loads/pp: ...SNIP... sample_type: IP|TID|TIME|ADDR|CPU|PERIOD|DATA_SRC
> 
> - Introduce 'P' event modified, meaning 'max precision level, please', i.e.:
> 
>    $ perf record -e cycles:P usleep 1
> 
>   Is now similar to:
> 
>    $ perf record usleep 1
> 
>   Useful, for instance, when specifying multiple events (Jiri Olsa)
> 
> - Make 'perf -v' and 'perf -h' work (Jiri Olsa)
> 
> - Fail properly when pattern matching fails to find a tracepoint, i.e.
>   '-e non:existent' was being correctly handled, with a proper error message
>   about that not being a valid event, but '-e non:existent*' wasn't,
>   fix it (Jiri Olsa)
> 
> Infrastructure:
> 
> - Separate arch specific entries in 'perf test' and add an 'Intel CQM' one
>   to be fun on x86 only (Matt Fleming)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (3):
>       perf callchain: Switch default to 'graph,0.5,caller'
>       perf ui browser: Optional horizontal scrolling key binding
>       perf hists browser: Implement horizontal scrolling
> 
> Don Zickus (1):
>       perf tools: Add support for sorting on the iaddr
> 
> Jiri Olsa (9):
>       tools lib api fs: No need to use PATH_MAX + 1
>       perf evlist: Display DATA_SRC sample type bit
>       perf annotate: Fix sizeof_sym_hist overflow issue
>       perf tools: Export perf_event_attr__set_max_precise_ip()
>       perf tools: Introduce 'P' modifier to request max precision
>       perf tests: Add parsing test for 'P' modifier
>       perf tools: Setup proper width for symbol_iaddr field
>       perf tools: Handle -h and -v options
>       perf tools: Fail properly in case pattern matching fails to find tracepoint
> 
> Matt Fleming (3):
>       perf tests: Add arch tests
>       perf tests: Move x86 tests into arch directory
>       perf tests: Add Intel CQM test
> 
>  tools/lib/api/fs/fs.c                              |   2 +-
>  tools/lib/api/fs/tracing_path.c                    |   6 +-
>  tools/perf/Documentation/perf-list.txt             |   1 +
>  tools/perf/Documentation/perf-report.txt           |   2 +-
>  tools/perf/Documentation/perf.txt                  |   8 ++
>  tools/perf/arch/x86/Build                          |   2 +-
>  tools/perf/arch/x86/include/arch-tests.h           |  19 ++++
>  tools/perf/arch/x86/tests/Build                    |  10 +-
>  tools/perf/arch/x86/tests/arch-tests.c             |  34 ++++++
>  tools/perf/arch/x86/tests/dwarf-unwind.c           |   1 +
>  .../perf/{ => arch/x86}/tests/gen-insn-x86-dat.awk |   0
>  .../perf/{ => arch/x86}/tests/gen-insn-x86-dat.sh  |   0
>  tools/perf/{ => arch/x86}/tests/insn-x86-dat-32.c  |   0
>  tools/perf/{ => arch/x86}/tests/insn-x86-dat-64.c  |   0
>  tools/perf/{ => arch/x86}/tests/insn-x86-dat-src.c |   0
>  tools/perf/{ => arch/x86}/tests/insn-x86.c         |   3 +-
>  tools/perf/arch/x86/tests/intel-cqm.c              | 124 +++++++++++++++++++++
>  tools/perf/{ => arch/x86}/tests/perf-time-to-tsc.c |   4 +-
>  tools/perf/{ => arch/x86}/tests/rdpmc.c            |   7 +-
>  tools/perf/builtin-report.c                        |   4 +-
>  tools/perf/perf.c                                  |  14 +++
>  tools/perf/tests/Build                             |   6 -
>  tools/perf/tests/builtin-test.c                    |  56 ++++------
>  tools/perf/tests/dwarf-unwind.c                    |   4 +
>  tools/perf/tests/parse-events.c                    |  16 +++
>  tools/perf/tests/tests.h                           |  10 +-
>  tools/perf/ui/browser.c                            |  14 +++
>  tools/perf/ui/browser.h                            |   2 +-
>  tools/perf/ui/browsers/hists.c                     |  22 +++-
>  tools/perf/util/annotate.h                         |   2 +-
>  tools/perf/util/evlist.c                           |   2 +-
>  tools/perf/util/evlist.h                           |   2 +
>  tools/perf/util/evsel.c                            |   5 +-
>  tools/perf/util/evsel.h                            |   1 +
>  tools/perf/util/hist.c                             |  13 +++
>  tools/perf/util/hist.h                             |   1 +
>  tools/perf/util/parse-events.c                     |  17 ++-
>  tools/perf/util/parse-events.l                     |   2 +-
>  tools/perf/util/sort.c                             |  37 ++++++
>  tools/perf/util/sort.h                             |   1 +
>  tools/perf/util/util.c                             |   4 +-
>  41 files changed, 381 insertions(+), 77 deletions(-)
>  create mode 100644 tools/perf/arch/x86/include/arch-tests.h
>  create mode 100644 tools/perf/arch/x86/tests/arch-tests.c
>  rename tools/perf/{ => arch/x86}/tests/gen-insn-x86-dat.awk (100%)
>  rename tools/perf/{ => arch/x86}/tests/gen-insn-x86-dat.sh (100%)
>  rename tools/perf/{ => arch/x86}/tests/insn-x86-dat-32.c (100%)
>  rename tools/perf/{ => arch/x86}/tests/insn-x86-dat-64.c (100%)
>  rename tools/perf/{ => arch/x86}/tests/insn-x86-dat-src.c (100%)
>  rename tools/perf/{ => arch/x86}/tests/insn-x86.c (98%)
>  create mode 100644 tools/perf/arch/x86/tests/intel-cqm.c
>  rename tools/perf/{ => arch/x86}/tests/perf-time-to-tsc.c (98%)
>  rename tools/perf/{ => arch/x86}/tests/rdpmc.c (97%)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2015-10-05 21:03 Arnaldo Carvalho de Melo
  2015-10-06  7:09 ` Ingo Molnar
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-05 21:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, Chandler Carruth,
	Daniel Bristot de Oliveira, David Ahern, Don Zickus, Fenghua Yu,
	Frederic Weisbecker, Jiri Olsa, Kanaka Juvva, Kan Liang,
	Matt Fleming, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
	Vikas Shivappa, Vince Weaver, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit e3b0ac1b7a8a590440a2030e7d10d48c59ab8a2a:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-10-03 08:20:14 +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 27bf90bf0690f55c3679bcc4c325823cf1cfd19d:

  perf tools: Fail properly in case pattern matching fails to find tracepoint (2015-10-05 17:59:50 -0300)

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

User visible:

- Switch the default callchain output mode to 'graph,0.5,caller', to make it
  look like the default for other tools, reducing the learning curve for
  people used to 'caller' based viewing (Arnaldo Carvalho de Melo)

- Implement column based horizontal scrolling in the hists browser (top, report),
  making it possible to use the TUI for things like 'perf mem report' where
  there are many more columns than can fit in a terminal (Arnaldo Carvalho de Melo)

- Support sorting by symbol_iaddr with perf.data files produced by
  'perf mem record' (Don Zickus)

- Display DATA_SRC sample type bit, i.e. when running 'perf evlist -v' the
  "DATA_SRC" wasn't appearing when set, fix it to look like: (Jiri Olsa)

  cpu/mem-loads/pp: ...SNIP... sample_type: IP|TID|TIME|ADDR|CPU|PERIOD|DATA_SRC

- Introduce 'P' event modified, meaning 'max precision level, please', i.e.:

   $ perf record -e cycles:P usleep 1

  Is now similar to:

   $ perf record usleep 1

  Useful, for instance, when specifying multiple events (Jiri Olsa)

- Make 'perf -v' and 'perf -h' work (Jiri Olsa)

- Fail properly when pattern matching fails to find a tracepoint, i.e.
  '-e non:existent' was being correctly handled, with a proper error message
  about that not being a valid event, but '-e non:existent*' wasn't,
  fix it (Jiri Olsa)

Infrastructure:

- Separate arch specific entries in 'perf test' and add an 'Intel CQM' one
  to be fun on x86 only (Matt Fleming)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
      perf callchain: Switch default to 'graph,0.5,caller'
      perf ui browser: Optional horizontal scrolling key binding
      perf hists browser: Implement horizontal scrolling

Don Zickus (1):
      perf tools: Add support for sorting on the iaddr

Jiri Olsa (9):
      tools lib api fs: No need to use PATH_MAX + 1
      perf evlist: Display DATA_SRC sample type bit
      perf annotate: Fix sizeof_sym_hist overflow issue
      perf tools: Export perf_event_attr__set_max_precise_ip()
      perf tools: Introduce 'P' modifier to request max precision
      perf tests: Add parsing test for 'P' modifier
      perf tools: Setup proper width for symbol_iaddr field
      perf tools: Handle -h and -v options
      perf tools: Fail properly in case pattern matching fails to find tracepoint

Matt Fleming (3):
      perf tests: Add arch tests
      perf tests: Move x86 tests into arch directory
      perf tests: Add Intel CQM test

 tools/lib/api/fs/fs.c                              |   2 +-
 tools/lib/api/fs/tracing_path.c                    |   6 +-
 tools/perf/Documentation/perf-list.txt             |   1 +
 tools/perf/Documentation/perf-report.txt           |   2 +-
 tools/perf/Documentation/perf.txt                  |   8 ++
 tools/perf/arch/x86/Build                          |   2 +-
 tools/perf/arch/x86/include/arch-tests.h           |  19 ++++
 tools/perf/arch/x86/tests/Build                    |  10 +-
 tools/perf/arch/x86/tests/arch-tests.c             |  34 ++++++
 tools/perf/arch/x86/tests/dwarf-unwind.c           |   1 +
 .../perf/{ => arch/x86}/tests/gen-insn-x86-dat.awk |   0
 .../perf/{ => arch/x86}/tests/gen-insn-x86-dat.sh  |   0
 tools/perf/{ => arch/x86}/tests/insn-x86-dat-32.c  |   0
 tools/perf/{ => arch/x86}/tests/insn-x86-dat-64.c  |   0
 tools/perf/{ => arch/x86}/tests/insn-x86-dat-src.c |   0
 tools/perf/{ => arch/x86}/tests/insn-x86.c         |   3 +-
 tools/perf/arch/x86/tests/intel-cqm.c              | 124 +++++++++++++++++++++
 tools/perf/{ => arch/x86}/tests/perf-time-to-tsc.c |   4 +-
 tools/perf/{ => arch/x86}/tests/rdpmc.c            |   7 +-
 tools/perf/builtin-report.c                        |   4 +-
 tools/perf/perf.c                                  |  14 +++
 tools/perf/tests/Build                             |   6 -
 tools/perf/tests/builtin-test.c                    |  56 ++++------
 tools/perf/tests/dwarf-unwind.c                    |   4 +
 tools/perf/tests/parse-events.c                    |  16 +++
 tools/perf/tests/tests.h                           |  10 +-
 tools/perf/ui/browser.c                            |  14 +++
 tools/perf/ui/browser.h                            |   2 +-
 tools/perf/ui/browsers/hists.c                     |  22 +++-
 tools/perf/util/annotate.h                         |   2 +-
 tools/perf/util/evlist.c                           |   2 +-
 tools/perf/util/evlist.h                           |   2 +
 tools/perf/util/evsel.c                            |   5 +-
 tools/perf/util/evsel.h                            |   1 +
 tools/perf/util/hist.c                             |  13 +++
 tools/perf/util/hist.h                             |   1 +
 tools/perf/util/parse-events.c                     |  17 ++-
 tools/perf/util/parse-events.l                     |   2 +-
 tools/perf/util/sort.c                             |  37 ++++++
 tools/perf/util/sort.h                             |   1 +
 tools/perf/util/util.c                             |   4 +-
 41 files changed, 381 insertions(+), 77 deletions(-)
 create mode 100644 tools/perf/arch/x86/include/arch-tests.h
 create mode 100644 tools/perf/arch/x86/tests/arch-tests.c
 rename tools/perf/{ => arch/x86}/tests/gen-insn-x86-dat.awk (100%)
 rename tools/perf/{ => arch/x86}/tests/gen-insn-x86-dat.sh (100%)
 rename tools/perf/{ => arch/x86}/tests/insn-x86-dat-32.c (100%)
 rename tools/perf/{ => arch/x86}/tests/insn-x86-dat-64.c (100%)
 rename tools/perf/{ => arch/x86}/tests/insn-x86-dat-src.c (100%)
 rename tools/perf/{ => arch/x86}/tests/insn-x86.c (98%)
 create mode 100644 tools/perf/arch/x86/tests/intel-cqm.c
 rename tools/perf/{ => arch/x86}/tests/perf-time-to-tsc.c (98%)
 rename tools/perf/{ => arch/x86}/tests/rdpmc.c (97%)

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2015-09-30 21:54 Arnaldo Carvalho de Melo
@ 2015-10-01  7:05 ` Ingo Molnar
  0 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2015-10-01  7:05 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, Chandler Carruth,
	David Ahern, Dominik Dingel, Frederic Weisbecker, He Kuang,
	H . Peter Anvin, Jiri Olsa, linuxppc-dev, linux-tip-commits,
	Masami Hiramatsu, Matt Fleming, Namhyung Kim, Naveen N . Rao,
	Peter Zijlstra, Raphael Beamonte, Stephane Eranian,
	Sukadev Bhattiprolu, Thomas Gleixner, Vinson Lee, 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 9c17dbc6eb73bdd8a6aaea1baefd37ff78d86148:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-09-29 09:43: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 7f8d1ade1b19f684ed3a7c4fb1dc5d347127b438:
> 
>   perf tools: By default use the most precise "cycles" hw counter available (2015-09-30 18:34:39 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - By default use the most precise "cycles" hw counter available, i.e.
>   when the user doesn't specify any event, it will try using cycles:ppp,
>   cycles:pp, etc (Arnaldo Carvalho de Melo)

That looks really useful!

> - Remove blank lines, headers when piping output in 'perf list', so that it can
>   be sanely used with 'wc -l', etc (Arnaldo Carvalho de Melo)
> 
> - Amend documentation about max_stack and synthesized callchains (Adrian Hunter)
> 
> - Fix 'perf probe -l' for probes added to kernel module functions (Masami Hiramatsu)
> 
> Build fixes:
> 
> - Fix shadowed declarations that break the build on older distros (Jiri Olsa)
> 
> - Fix build break on powerpc due to sample_reg_masks (Sukadev Bhattiprolu)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf report: Amend documentation about max_stack and synthesized callchains
> 
> Arnaldo Carvalho de Melo (7):
>       perf maps: Introduce maps__find_symbol_by_name()
>       perf machine: Use machine__kernel_map() thoroughly
>       perf machine: Add method for common kernel_map(FUNCTION) operation
>       tools lib symbol: Rename kallsyms2elf_type to kallsyms2elf_binding
>       tools lib symbol: Introduce kallsyms2elf_type
>       perf list: Remove blank lines, headers when piping output
>       perf tools: By default use the most precise "cycles" hw counter available
> 
> Jiri Olsa (2):
>       tools: Fix shadowed declaration in err.h
>       perf tools: Fix shadowed declaration in parse-events.c
> 
> Masami Hiramatsu (5):
>       perf probe: Fix to remove dot suffix from second or latter events
>       perf probe: Begin and end libdwfl report session correctly
>       perf probe: Show correct source lines of probes on kmodules
>       perf probe: Fix a segfault bug in debuginfo_cache
>       perf probe: Improve error message when %return is on inlined function
> 
> Sukadev Bhattiprolu (1):
>       perf tools: Fix build break on powerpc due to sample_reg_masks
> 
>  tools/include/linux/err.h                |  4 +-
>  tools/lib/symbol/kallsyms.c              |  6 ++
>  tools/lib/symbol/kallsyms.h              |  4 +-
>  tools/perf/Documentation/perf-report.txt |  2 +
>  tools/perf/builtin-kmem.c                |  2 +-
>  tools/perf/builtin-list.c                |  2 +-
>  tools/perf/builtin-report.c              |  2 +-
>  tools/perf/tests/code-reading.c          |  2 +-
>  tools/perf/tests/vmlinux-kallsyms.c      |  4 +-
>  tools/perf/util/Build                    |  2 +-
>  tools/perf/util/event.c                  |  7 +--
>  tools/perf/util/evlist.c                 | 22 +++++++-
>  tools/perf/util/intel-pt.c               |  2 +-
>  tools/perf/util/machine.c                | 26 ++++-----
>  tools/perf/util/machine.h                |  8 ++-
>  tools/perf/util/map.c                    | 21 ++++---
>  tools/perf/util/map.h                    |  2 +
>  tools/perf/util/parse-events.c           | 53 +++++++++---------
>  tools/perf/util/perf_regs.c              |  2 +
>  tools/perf/util/perf_regs.h              |  1 +
>  tools/perf/util/pmu.c                    |  2 +-
>  tools/perf/util/probe-event.c            | 96 ++++++++++++++++++++------------
>  tools/perf/util/probe-finder.c           | 58 +++++++++++++++++--
>  tools/perf/util/symbol.c                 |  2 +-
>  24 files changed, 224 insertions(+), 108 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2015-09-30 21:54 Arnaldo Carvalho de Melo
  2015-10-01  7:05 ` Ingo Molnar
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-09-30 21:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, Chandler Carruth, David Ahern, Dominik Dingel,
	Frederic Weisbecker, He Kuang, H . Peter Anvin, Jiri Olsa,
	linuxppc-dev, linux-tip-commits, Masami Hiramatsu, Matt Fleming,
	Namhyung Kim, Naveen N . Rao, Peter Zijlstra, Raphael Beamonte,
	Stephane Eranian, Sukadev Bhattiprolu, Thomas Gleixner,
	Vinson Lee, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 9c17dbc6eb73bdd8a6aaea1baefd37ff78d86148:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-09-29 09:43: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 7f8d1ade1b19f684ed3a7c4fb1dc5d347127b438:

  perf tools: By default use the most precise "cycles" hw counter available (2015-09-30 18:34:39 -0300)

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

User visible:

- By default use the most precise "cycles" hw counter available, i.e.
  when the user doesn't specify any event, it will try using cycles:ppp,
  cycles:pp, etc (Arnaldo Carvalho de Melo)

- Remove blank lines, headers when piping output in 'perf list', so that it can
  be sanely used with 'wc -l', etc (Arnaldo Carvalho de Melo)

- Amend documentation about max_stack and synthesized callchains (Adrian Hunter)

- Fix 'perf probe -l' for probes added to kernel module functions (Masami Hiramatsu)

Build fixes:

- Fix shadowed declarations that break the build on older distros (Jiri Olsa)

- Fix build break on powerpc due to sample_reg_masks (Sukadev Bhattiprolu)

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

----------------------------------------------------------------
Adrian Hunter (1):
      perf report: Amend documentation about max_stack and synthesized callchains

Arnaldo Carvalho de Melo (7):
      perf maps: Introduce maps__find_symbol_by_name()
      perf machine: Use machine__kernel_map() thoroughly
      perf machine: Add method for common kernel_map(FUNCTION) operation
      tools lib symbol: Rename kallsyms2elf_type to kallsyms2elf_binding
      tools lib symbol: Introduce kallsyms2elf_type
      perf list: Remove blank lines, headers when piping output
      perf tools: By default use the most precise "cycles" hw counter available

Jiri Olsa (2):
      tools: Fix shadowed declaration in err.h
      perf tools: Fix shadowed declaration in parse-events.c

Masami Hiramatsu (5):
      perf probe: Fix to remove dot suffix from second or latter events
      perf probe: Begin and end libdwfl report session correctly
      perf probe: Show correct source lines of probes on kmodules
      perf probe: Fix a segfault bug in debuginfo_cache
      perf probe: Improve error message when %return is on inlined function

Sukadev Bhattiprolu (1):
      perf tools: Fix build break on powerpc due to sample_reg_masks

 tools/include/linux/err.h                |  4 +-
 tools/lib/symbol/kallsyms.c              |  6 ++
 tools/lib/symbol/kallsyms.h              |  4 +-
 tools/perf/Documentation/perf-report.txt |  2 +
 tools/perf/builtin-kmem.c                |  2 +-
 tools/perf/builtin-list.c                |  2 +-
 tools/perf/builtin-report.c              |  2 +-
 tools/perf/tests/code-reading.c          |  2 +-
 tools/perf/tests/vmlinux-kallsyms.c      |  4 +-
 tools/perf/util/Build                    |  2 +-
 tools/perf/util/event.c                  |  7 +--
 tools/perf/util/evlist.c                 | 22 +++++++-
 tools/perf/util/intel-pt.c               |  2 +-
 tools/perf/util/machine.c                | 26 ++++-----
 tools/perf/util/machine.h                |  8 ++-
 tools/perf/util/map.c                    | 21 ++++---
 tools/perf/util/map.h                    |  2 +
 tools/perf/util/parse-events.c           | 53 +++++++++---------
 tools/perf/util/perf_regs.c              |  2 +
 tools/perf/util/perf_regs.h              |  1 +
 tools/perf/util/pmu.c                    |  2 +-
 tools/perf/util/probe-event.c            | 96 ++++++++++++++++++++------------
 tools/perf/util/probe-finder.c           | 58 +++++++++++++++++--
 tools/perf/util/symbol.c                 |  2 +-
 24 files changed, 224 insertions(+), 108 deletions(-)

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

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

Em Tue, Aug 25, 2015 at 01:14:22PM -0300, Arnaldo Carvalho de Melo escreveu:
> Hi Ingo,
> 
> 	Please consider pulling, now to get back looking at eBPF :-)

Ingo, please do not process this one, there was a NAK from Masami to
some new syntax on adding non symbolic probes, will resubmit with the
new patches provided by Wang Nan that already got Masami's approval.

- Arnaldo
 
> - Arnaldo
> 
> The following changes since commit 0e53909a1cf0153736fb52c216558a65530d8c40:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-22 08:45: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 1cbebfc7abb549ed3f4080e12c4d7b07d1f16637:
> 
>   perf probe: Support probing at absolute addresses (2015-08-25 12:36:22 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Add support for using several Intel PT features (CYC, MTC packets), the
>   relevant documentation was updated: tools/perf/Documentation/intel-pt.txt,
>   briefly describing those packets, its purposes, how to configure them in
>   the event config terms and relevant external documentation for further
>   reading. (Adrian Hunter)
> 
> - Introduce support for probing at an absolut address, for user and kernel
>   'perf probe's, useful when one have the symbol maps on a developer machine
>   but not on an embedded system (Wang Nan)
> 
> - Clear the progress bar at the end of a ordered_events flush, fixing
>   an UI artifact when, after ordering the events the screen doesn't get
>   completely redraw, for instance, when an error window covers just the
>   center of the screen and waits for user input. (Arnaldo Carvalho de Melo)
> 
> - Fix 'annotate' segfault by resetting the dso find_symbol cache when removing
>   symbols (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Fix Intel PT 'instructions' sample period (Adrian Hunter)
> 
> - Prevent segfault when reading probe point with absolute address (Wang Nan)
> 
> Build fixes:
> 
> - Fix tarball build broken by pt/bts (Adrian Hunter)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (11):
>       perf tools: Fix tarball build broken by pt/bts
>       perf tools: Fix Intel PT 'instructions' sample period
>       perf tools: Add Intel PT support for PSB periods
>       perf tools: Add new Intel PT packet definitions
>       perf tools: Pass Intel PT information for decoding MTC and CYC
>       perf tools: Add Intel PT support for decoding MTC packets
>       perf tools: Add Intel PT support for using MTC packets
>       perf tools: Add Intel PT support for decoding CYC packets
>       perf tools: Add Intel PT support for using CYC packets
>       perf tools: Add Intel PT support for decoding TRACESTOP packets
>       perf tools: Update Intel PT documentation
> 
> Arnaldo Carvalho de Melo (3):
>       perf annotate: Reset the dso find_symbol cache when removing symbols
>       perf ui tui progress: Implement the ui_progress_ops->finish() method
>       perf ordered_events: Clear the progress bar at the end of a flush
> 
> Wang Nan (2):
>       perf probe: Prevent segfault when reading probe point with absolute address
>       perf probe: Support probing at absolute addresses
> 
>  tools/perf/Documentation/intel-pt.txt              | 194 ++++++-
>  tools/perf/arch/x86/util/intel-pt.c                | 271 +++++++++-
>  tools/perf/builtin-annotate.c                      |   1 +
>  tools/perf/ui/tui/progress.c                       |  19 +-
>  tools/perf/util/dso.h                              |   2 +
>  tools/perf/util/intel-pt-decoder/inat.c            |   2 +-
>  tools/perf/util/intel-pt-decoder/inat.h            |   2 +-
>  tools/perf/util/intel-pt-decoder/inat_types.h      |  29 ++
>  tools/perf/util/intel-pt-decoder/insn.c            |   4 +-
>  tools/perf/util/intel-pt-decoder/insn.h            |   2 +-
>  .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 555 ++++++++++++++++++++-
>  .../perf/util/intel-pt-decoder/intel-pt-decoder.h  |   5 +
>  .../util/intel-pt-decoder/intel-pt-insn-decoder.c  |   2 +-
>  .../util/intel-pt-decoder/intel-pt-pkt-decoder.c   | 142 +++++-
>  .../util/intel-pt-decoder/intel-pt-pkt-decoder.h   |   6 +
>  tools/perf/util/intel-pt.c                         |  67 ++-
>  tools/perf/util/intel-pt.h                         |   5 +
>  tools/perf/util/ordered-events.c                   |   3 +
>  tools/perf/util/probe-event.c                      | 152 +++++-
>  tools/perf/util/probe-event.h                      |   3 +
>  tools/perf/util/probe-finder.c                     |  21 +-
>  tools/perf/util/symbol.c                           |  10 +
>  22 files changed, 1404 insertions(+), 93 deletions(-)
>  create mode 100644 tools/perf/util/intel-pt-decoder/inat_types.h
> --
> 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] 59+ messages in thread

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

Hi Ingo,

	Please consider pulling, now to get back looking at eBPF :-)

- Arnaldo

The following changes since commit 0e53909a1cf0153736fb52c216558a65530d8c40:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-22 08:45: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 1cbebfc7abb549ed3f4080e12c4d7b07d1f16637:

  perf probe: Support probing at absolute addresses (2015-08-25 12:36:22 -0300)

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

User visible:

- Add support for using several Intel PT features (CYC, MTC packets), the
  relevant documentation was updated: tools/perf/Documentation/intel-pt.txt,
  briefly describing those packets, its purposes, how to configure them in
  the event config terms and relevant external documentation for further
  reading. (Adrian Hunter)

- Introduce support for probing at an absolut address, for user and kernel
  'perf probe's, useful when one have the symbol maps on a developer machine
  but not on an embedded system (Wang Nan)

- Clear the progress bar at the end of a ordered_events flush, fixing
  an UI artifact when, after ordering the events the screen doesn't get
  completely redraw, for instance, when an error window covers just the
  center of the screen and waits for user input. (Arnaldo Carvalho de Melo)

- Fix 'annotate' segfault by resetting the dso find_symbol cache when removing
  symbols (Arnaldo Carvalho de Melo)

Infrastructure:

- Fix Intel PT 'instructions' sample period (Adrian Hunter)

- Prevent segfault when reading probe point with absolute address (Wang Nan)

Build fixes:

- Fix tarball build broken by pt/bts (Adrian Hunter)

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

----------------------------------------------------------------
Adrian Hunter (11):
      perf tools: Fix tarball build broken by pt/bts
      perf tools: Fix Intel PT 'instructions' sample period
      perf tools: Add Intel PT support for PSB periods
      perf tools: Add new Intel PT packet definitions
      perf tools: Pass Intel PT information for decoding MTC and CYC
      perf tools: Add Intel PT support for decoding MTC packets
      perf tools: Add Intel PT support for using MTC packets
      perf tools: Add Intel PT support for decoding CYC packets
      perf tools: Add Intel PT support for using CYC packets
      perf tools: Add Intel PT support for decoding TRACESTOP packets
      perf tools: Update Intel PT documentation

Arnaldo Carvalho de Melo (3):
      perf annotate: Reset the dso find_symbol cache when removing symbols
      perf ui tui progress: Implement the ui_progress_ops->finish() method
      perf ordered_events: Clear the progress bar at the end of a flush

Wang Nan (2):
      perf probe: Prevent segfault when reading probe point with absolute address
      perf probe: Support probing at absolute addresses

 tools/perf/Documentation/intel-pt.txt              | 194 ++++++-
 tools/perf/arch/x86/util/intel-pt.c                | 271 +++++++++-
 tools/perf/builtin-annotate.c                      |   1 +
 tools/perf/ui/tui/progress.c                       |  19 +-
 tools/perf/util/dso.h                              |   2 +
 tools/perf/util/intel-pt-decoder/inat.c            |   2 +-
 tools/perf/util/intel-pt-decoder/inat.h            |   2 +-
 tools/perf/util/intel-pt-decoder/inat_types.h      |  29 ++
 tools/perf/util/intel-pt-decoder/insn.c            |   4 +-
 tools/perf/util/intel-pt-decoder/insn.h            |   2 +-
 .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 555 ++++++++++++++++++++-
 .../perf/util/intel-pt-decoder/intel-pt-decoder.h  |   5 +
 .../util/intel-pt-decoder/intel-pt-insn-decoder.c  |   2 +-
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.c   | 142 +++++-
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.h   |   6 +
 tools/perf/util/intel-pt.c                         |  67 ++-
 tools/perf/util/intel-pt.h                         |   5 +
 tools/perf/util/ordered-events.c                   |   3 +
 tools/perf/util/probe-event.c                      | 152 +++++-
 tools/perf/util/probe-event.h                      |   3 +
 tools/perf/util/probe-finder.c                     |  21 +-
 tools/perf/util/symbol.c                           |  10 +
 22 files changed, 1404 insertions(+), 93 deletions(-)
 create mode 100644 tools/perf/util/intel-pt-decoder/inat_types.h

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2015-04-07 16:40 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-07 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andrew Morton, Borislav Petkov, David Ahern, Don Zickus,
	Frederic Weisbecker, He Kuang, H. Peter Anvin, Jiri Olsa,
	John Stultz, Joonsoo Kim, Linus Torvalds, linux-mm, Minchan Kim,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, pi3orama,
	Stephane Eranian, Steven Rostedt, Thomas Gleixner, Wang Nan,
	Yunlong Song, Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 6645f3187f5beb64f7a40515cfa18f3889264ece:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-04-03 07:00:02 +0200)

are available in the git repository at:


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

for you to fetch changes up to d083e5ff09eccc0afd44e02ec85f10c06271e93b:

  perf tools: Merge all perf_event_attr print functions (2015-04-07 13:25:05 -0300)

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

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

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

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

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

Infrastructure:

- Honor operator priority in libtraceevent (Namhyung Kim)

- Merge all perf_event_attr print functions (Peter Zijlstra)

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

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

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (1):
      perf top: Consider PERF_RECORD_ events with cpumode == 0

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

Jiri Olsa (1):
      perf kmem: Respect -i option

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

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

Wang Nan (1):
      perf kmaps: Check kmaps to make code more robust

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

 tools/lib/traceevent/event-parse.c       |  17 +-
 tools/perf/Documentation/perf-record.txt |   7 +
 tools/perf/builtin-kmem.c                |   3 +-
 tools/perf/builtin-record.c              |  80 ++++++++
 tools/perf/builtin-sched.c               |  67 +++++--
 tools/perf/builtin-top.c                 |   8 +-
 tools/perf/perf.h                        |   2 +
 tools/perf/util/evlist.c                 |   2 +-
 tools/perf/util/evsel.c                  | 325 ++++++++++++++++---------------
 tools/perf/util/evsel.h                  |   6 +
 tools/perf/util/header.c                 |  28 +--
 tools/perf/util/machine.c                |   5 +-
 tools/perf/util/map.c                    |  20 ++
 tools/perf/util/map.h                    |   6 +-
 tools/perf/util/probe-event.c            |   2 +
 tools/perf/util/session.c                |   3 +
 tools/perf/util/symbol-elf.c             |  16 +-
 tools/perf/util/symbol.c                 |  34 +++-
 18 files changed, 422 insertions(+), 209 deletions(-)

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2015-04-07 16:40 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-07 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andrew Morton, Borislav Petkov, David Ahern, Don Zickus,
	Frederic Weisbecker, He Kuang, H. Peter Anvin, Jiri Olsa,
	John Stultz, Joonsoo Kim, Linus Torvalds, linux-mm, Minchan Kim,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, pi3orama,
	Stephane Eranian, Steven Rostedt, Thomas Gleixner, Wang Nan,
	Yunlong Song, Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 6645f3187f5beb64f7a40515cfa18f3889264ece:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-04-03 07:00:02 +0200)

are available in the git repository at:


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

for you to fetch changes up to d083e5ff09eccc0afd44e02ec85f10c06271e93b:

  perf tools: Merge all perf_event_attr print functions (2015-04-07 13:25:05 -0300)

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

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

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

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

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

Infrastructure:

- Honor operator priority in libtraceevent (Namhyung Kim)

- Merge all perf_event_attr print functions (Peter Zijlstra)

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

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

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (1):
      perf top: Consider PERF_RECORD_ events with cpumode == 0

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

Jiri Olsa (1):
      perf kmem: Respect -i option

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

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

Wang Nan (1):
      perf kmaps: Check kmaps to make code more robust

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

 tools/lib/traceevent/event-parse.c       |  17 +-
 tools/perf/Documentation/perf-record.txt |   7 +
 tools/perf/builtin-kmem.c                |   3 +-
 tools/perf/builtin-record.c              |  80 ++++++++
 tools/perf/builtin-sched.c               |  67 +++++--
 tools/perf/builtin-top.c                 |   8 +-
 tools/perf/perf.h                        |   2 +
 tools/perf/util/evlist.c                 |   2 +-
 tools/perf/util/evsel.c                  | 325 ++++++++++++++++---------------
 tools/perf/util/evsel.h                  |   6 +
 tools/perf/util/header.c                 |  28 +--
 tools/perf/util/machine.c                |   5 +-
 tools/perf/util/map.c                    |  20 ++
 tools/perf/util/map.h                    |   6 +-
 tools/perf/util/probe-event.c            |   2 +
 tools/perf/util/session.c                |   3 +
 tools/perf/util/symbol-elf.c             |  16 +-
 tools/perf/util/symbol.c                 |  34 +++-
 18 files changed, 422 insertions(+), 209 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2014-11-19 16:03 Arnaldo Carvalho de Melo
@ 2014-11-20  7:33 ` Ingo Molnar
  0 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2014-11-20  7:33 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Aravinda Prasad,
	Borislav Petkov, Brendan Gregg, Corey Ashford, David Ahern,
	Don Zickus, Frederic Weisbecker, Hemant Kumar, Jean Pihet,
	Jiri Olsa, Kan Liang, Masami Hiramatsu, Mike Galbraith,
	Namhyung Kim, Oleg Nesterov, Paul Mackerras, Pekka Enberg,
	Peter Zijlstra, Srikar Dronamraju, Stephane Eranian,
	Steven Rostedt, systemtap, Vasant Hegde, WANG Chao,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 2565711fb7d7c28e0cd93c8971b520d1b10b857c:
> 
>   perf: Improve the perf_sample_data struct layout (2014-11-16 11:42:04 +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 a84808083688d82d7f1e5786ccf5df0ff7d448cb:
> 
>   perf tools: Only override the default :tid comm entry (2014-11-19 12:37:26 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible fixes:
> 
> - Fallback to kallsyms when using the minimal 'ELF' loader (Arnaldo Carvalho de Melo)
> 
> - Fix annotation with kcore (Adrian Hunter)
> 
> - Fix up srcline histogram key formatting (Arnaldo Carvalho de Melo)
> 
> - Add missing handler for PERF_RECORD_MMAP2 events in 'perf diff' (Kan Liang)
> 
> User visible changes/new features:
> 
> - Only print base source file for srcline histogram sort key (Andi Kleen)
> 
> - Support source line numbers in annotate using a hotkey (Andi Kleen)
> 
> Infrastructure:
> 
> - Do not poll events that use the system_wide flag (Adrian Hunter)
> 
> - Add perf-read-vdso32 and perf-read-vdsox32 to .gitignore (Adrian Hunter)
> 
>   perf tools: Only override the default :tid comm entry (Adrian Hunter)
> 
> - Factor out adding new call chain entries (Andi Kleen)
> 
> - Use al.addr to set up call chain (Andi Kleen)
> 
> - Use a common function to resolve symbol or name (Andi Kleen)
> 
> - Fix ftrace:function event recording (Jiri Olsa)
> 
> - Move disable_buildid_cache() to util/build-id.c (Namhyung Kim)
> 
> - Clean up libelf feature support code (Namhyung Kim)
> 
> - fix typo in python 'perf test' (WANG Chao)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (4):
>       perf tools: Fix annotation with kcore
>       perf evlist: Do not poll events that use the system_wide flag
>       perf tools: Add perf-read-vdso32 and perf-read-vdsox32 to .gitignore
>       perf tools: Only override the default :tid comm entry
> 
> Andi Kleen (5):
>       perf callchain: Factor out adding new call chain entries
>       perf callchain: Use al.addr to set up call chain
>       perf callchain: Use a common function to resolve symbol or name
>       perf tools: Only print base source file for srcline
>       perf annotate: Support source line numbers in annotate
> 
> Arnaldo Carvalho de Melo (2):
>       perf symbols: Fallback to kallsyms when using the minimal 'ELF' loader
>       perf hists: Fix up srcline histogram key formatting
> 
> Jiri Olsa (1):
>       perf evsel: Fix ftrace:function event recording
> 
> Kan Liang (1):
>       perf diff: Add missing handler for PERF_RECORD_MMAP2 events
> 
> Namhyung Kim (2):
>       perf build-id: Move disable_buildid_cache() to util/build-id.c
>       perf tools: Clean up libelf feature support code
> 
> WANG Chao (1):
>       perf test: fix typo in python test
> 
>  tools/perf/.gitignore             |  2 ++
>  tools/perf/Makefile.perf          |  2 --
>  tools/perf/builtin-diff.c         |  1 +
>  tools/perf/config/Makefile        |  5 ++--
>  tools/perf/tests/builtin-test.c   |  2 +-
>  tools/perf/ui/browsers/annotate.c | 13 +++++++++-
>  tools/perf/ui/browsers/hists.c    | 17 -------------
>  tools/perf/ui/gtk/hists.c         | 11 +--------
>  tools/perf/ui/stdio/hist.c        | 23 +++++++-----------
>  tools/perf/util/annotate.c        | 32 ++++++++++++++++++++----
>  tools/perf/util/annotate.h        |  1 +
>  tools/perf/util/build-id.c        | 11 +++++++++
>  tools/perf/util/build-id.h        |  1 +
>  tools/perf/util/callchain.c       | 19 +++++++++++++++
>  tools/perf/util/callchain.h       |  3 +++
>  tools/perf/util/evlist.c          | 10 +++++++-
>  tools/perf/util/evsel.c           |  8 ++++++
>  tools/perf/util/header.c          | 10 +-------
>  tools/perf/util/machine.c         | 51 ++++++++++++++++++++++++---------------
>  tools/perf/util/sort.c            |  2 +-
>  tools/perf/util/srcline.c         |  2 +-
>  tools/perf/util/symbol-minimal.c  |  1 -
>  tools/perf/util/thread.c          |  5 ++--
>  tools/perf/util/util.h            |  1 -
>  24 files changed, 145 insertions(+), 88 deletions(-)

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

	Ingo

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2014-11-19 16:03 Arnaldo Carvalho de Melo
  2014-11-20  7:33 ` Ingo Molnar
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-11-19 16:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Aravinda Prasad, Borislav Petkov, Brendan Gregg,
	Corey Ashford, David Ahern, Don Zickus, Frederic Weisbecker,
	Hemant Kumar, Jean Pihet, Jiri Olsa, Kan Liang, Masami Hiramatsu,
	Mike Galbraith, Namhyung Kim, Oleg Nesterov, Paul Mackerras,
	Pekka Enberg, Peter Zijlstra, Srikar Dronamraju,
	Stephane Eranian, Steven Rostedt, systemtap, Vasant Hegde,
	WANG Chao, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 2565711fb7d7c28e0cd93c8971b520d1b10b857c:

  perf: Improve the perf_sample_data struct layout (2014-11-16 11:42:04 +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 a84808083688d82d7f1e5786ccf5df0ff7d448cb:

  perf tools: Only override the default :tid comm entry (2014-11-19 12:37:26 -0300)

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

User visible fixes:

- Fallback to kallsyms when using the minimal 'ELF' loader (Arnaldo Carvalho de Melo)

- Fix annotation with kcore (Adrian Hunter)

- Fix up srcline histogram key formatting (Arnaldo Carvalho de Melo)

- Add missing handler for PERF_RECORD_MMAP2 events in 'perf diff' (Kan Liang)

User visible changes/new features:

- Only print base source file for srcline histogram sort key (Andi Kleen)

- Support source line numbers in annotate using a hotkey (Andi Kleen)

Infrastructure:

- Do not poll events that use the system_wide flag (Adrian Hunter)

- Add perf-read-vdso32 and perf-read-vdsox32 to .gitignore (Adrian Hunter)

  perf tools: Only override the default :tid comm entry (Adrian Hunter)

- Factor out adding new call chain entries (Andi Kleen)

- Use al.addr to set up call chain (Andi Kleen)

- Use a common function to resolve symbol or name (Andi Kleen)

- Fix ftrace:function event recording (Jiri Olsa)

- Move disable_buildid_cache() to util/build-id.c (Namhyung Kim)

- Clean up libelf feature support code (Namhyung Kim)

- fix typo in python 'perf test' (WANG Chao)

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

----------------------------------------------------------------
Adrian Hunter (4):
      perf tools: Fix annotation with kcore
      perf evlist: Do not poll events that use the system_wide flag
      perf tools: Add perf-read-vdso32 and perf-read-vdsox32 to .gitignore
      perf tools: Only override the default :tid comm entry

Andi Kleen (5):
      perf callchain: Factor out adding new call chain entries
      perf callchain: Use al.addr to set up call chain
      perf callchain: Use a common function to resolve symbol or name
      perf tools: Only print base source file for srcline
      perf annotate: Support source line numbers in annotate

Arnaldo Carvalho de Melo (2):
      perf symbols: Fallback to kallsyms when using the minimal 'ELF' loader
      perf hists: Fix up srcline histogram key formatting

Jiri Olsa (1):
      perf evsel: Fix ftrace:function event recording

Kan Liang (1):
      perf diff: Add missing handler for PERF_RECORD_MMAP2 events

Namhyung Kim (2):
      perf build-id: Move disable_buildid_cache() to util/build-id.c
      perf tools: Clean up libelf feature support code

WANG Chao (1):
      perf test: fix typo in python test

 tools/perf/.gitignore             |  2 ++
 tools/perf/Makefile.perf          |  2 --
 tools/perf/builtin-diff.c         |  1 +
 tools/perf/config/Makefile        |  5 ++--
 tools/perf/tests/builtin-test.c   |  2 +-
 tools/perf/ui/browsers/annotate.c | 13 +++++++++-
 tools/perf/ui/browsers/hists.c    | 17 -------------
 tools/perf/ui/gtk/hists.c         | 11 +--------
 tools/perf/ui/stdio/hist.c        | 23 +++++++-----------
 tools/perf/util/annotate.c        | 32 ++++++++++++++++++++----
 tools/perf/util/annotate.h        |  1 +
 tools/perf/util/build-id.c        | 11 +++++++++
 tools/perf/util/build-id.h        |  1 +
 tools/perf/util/callchain.c       | 19 +++++++++++++++
 tools/perf/util/callchain.h       |  3 +++
 tools/perf/util/evlist.c          | 10 +++++++-
 tools/perf/util/evsel.c           |  8 ++++++
 tools/perf/util/header.c          | 10 +-------
 tools/perf/util/machine.c         | 51 ++++++++++++++++++++++++---------------
 tools/perf/util/sort.c            |  2 +-
 tools/perf/util/srcline.c         |  2 +-
 tools/perf/util/symbol-minimal.c  |  1 -
 tools/perf/util/thread.c          |  5 ++--
 tools/perf/util/util.h            |  1 -
 24 files changed, 145 insertions(+), 88 deletions(-)

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2014-08-24 11:16   ` Arnaldo Carvalho de Melo
@ 2014-08-24 14:47     ` Ingo Molnar
  0 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2014-08-24 14:47 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Corey Ashford,
	David Ahern, Don Zickus, Frederic Weisbecker, Jean Pihet,
	Jiri Olsa, Joe Mario, Michael Ellerman, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Sukadev Bhattiprolu


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

> Em Sun, Aug 24, 2014 at 12:11:24PM +0200, Ingo Molnar escreveu:
> > * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > o Kernel fix to properly handle exited tasks, by returning POLLHUP values
> > >   on perf event file descriptors. Tooling changes will come next, but were
> > >   tested with this kernel fix. (Jiri Olsa)
>  
> > So the signoffs are really weird (and invalid) here:
>  
> > commit ce1d77c667e40631d6673717e65e72f72265bf10
> > Author: Jiri Olsa <jolsa@kernel.org>
> > Date:   Fri Aug 15 16:24:45 2014 -0300
>  
> >     perf top: Use set_term_quiet() instead of open coded equivalent
>  
> > ...    
> >     Cc: Jiri Olsa <jolsa@kernel.org>
> >     Cc: Namhyung Kim <namhyung@kernel.org>
> >     Cc: Paul Mackerras <paulus@samba.org>
> >     Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >     Link: http://lkml.kernel.org/n/tip-h7n9te70flmaqfnj6l06ay6r@git.kernel.org
> >     [ Yanked this out of a patch containing this and some other change ]
> >     Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>  
> > and in 7713886adc15 and f017bf0a8d92 - results of a rebase gone wrong?
> 
> Should be ok now, I recreated the perf-core-for-mingo signed tag, please
> let me know if there are still any problems,

Looks good now. Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2014-08-24 10:11 ` Ingo Molnar
@ 2014-08-24 11:16   ` Arnaldo Carvalho de Melo
  2014-08-24 14:47     ` Ingo Molnar
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-08-24 11:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Corey Ashford,
	David Ahern, Don Zickus, Frederic Weisbecker, Jean Pihet,
	Jiri Olsa, Joe Mario, Michael Ellerman, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Sukadev Bhattiprolu

Em Sun, Aug 24, 2014 at 12:11:24PM +0200, Ingo Molnar escreveu:
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > o Kernel fix to properly handle exited tasks, by returning POLLHUP values
> >   on perf event file descriptors. Tooling changes will come next, but were
> >   tested with this kernel fix. (Jiri Olsa)
 
> So the signoffs are really weird (and invalid) here:
 
> commit ce1d77c667e40631d6673717e65e72f72265bf10
> Author: Jiri Olsa <jolsa@kernel.org>
> Date:   Fri Aug 15 16:24:45 2014 -0300
 
>     perf top: Use set_term_quiet() instead of open coded equivalent
 
> ...    
>     Cc: Jiri Olsa <jolsa@kernel.org>
>     Cc: Namhyung Kim <namhyung@kernel.org>
>     Cc: Paul Mackerras <paulus@samba.org>
>     Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
>     Link: http://lkml.kernel.org/n/tip-h7n9te70flmaqfnj6l06ay6r@git.kernel.org
>     [ Yanked this out of a patch containing this and some other change ]
>     Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 
> and in 7713886adc15 and f017bf0a8d92 - results of a rebase gone wrong?

Should be ok now, I recreated the perf-core-for-mingo signed tag, please
let me know if there are still any problems,

Thanks!

- Arnaldo

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2014-08-22 16:29 Arnaldo Carvalho de Melo
@ 2014-08-24 10:11 ` Ingo Molnar
  2014-08-24 11:16   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 59+ messages in thread
From: Ingo Molnar @ 2014-08-24 10:11 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Corey Ashford,
	David Ahern, Don Zickus, Frederic Weisbecker, Jean Pihet,
	Jiri Olsa, Joe Mario, Michael Ellerman, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Sukadev Bhattiprolu, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit af924aa35129edf338ebc8da6a4eae08cf7cb297:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-08-18 10:14: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
> 
> for you to fetch changes up to 141da74d2eff8de134c5a5ffaf2800a8a1b27517:
> 
>   perf hists browser: Consolidate callchain print functions in TUI (2014-08-22 13:12:15 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> o Don't try to find DSOs in SYSV maps (Don Zickus)
> 
> o Fallback to MAP__FUNCTION if daddr maps are NULL,
>   i.e. addresses get looked upon more maps (Don Zickus)
> 
> o Kernel fix to properly handle exited tasks, by returning POLLHUP values
>   on perf event file descriptors. Tooling changes will come next, but were
>   tested with this kernel fix. (Jiri Olsa)

So the signoffs are really weird (and invalid) here:

commit ce1d77c667e40631d6673717e65e72f72265bf10
Author: Jiri Olsa <jolsa@kernel.org>
Date:   Fri Aug 15 16:24:45 2014 -0300

    perf top: Use set_term_quiet() instead of open coded equivalent

...    
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/n/tip-h7n9te70flmaqfnj6l06ay6r@git.kernel.org
    [ Yanked this out of a patch containing this and some other change ]
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>


and in 7713886adc15 and f017bf0a8d92 - results of a rebase gone wrong?

Thanks,

	Ingo

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2014-08-22 16:29 Arnaldo Carvalho de Melo
  2014-08-24 10:11 ` Ingo Molnar
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-08-22 16:29 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Corey Ashford, David Ahern, Don Zickus,
	Frederic Weisbecker, Jean Pihet, Jiri Olsa, Joe Mario,
	Michael Ellerman, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian, Sukadev Bhattiprolu, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit af924aa35129edf338ebc8da6a4eae08cf7cb297:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-08-18 10:14: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

for you to fetch changes up to 141da74d2eff8de134c5a5ffaf2800a8a1b27517:

  perf hists browser: Consolidate callchain print functions in TUI (2014-08-22 13:12:15 -0300)

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

User visible:

o Don't try to find DSOs in SYSV maps (Don Zickus)

o Fallback to MAP__FUNCTION if daddr maps are NULL,
  i.e. addresses get looked upon more maps (Don Zickus)

o Kernel fix to properly handle exited tasks, by returning POLLHUP values
  on perf event file descriptors. Tooling changes will come next, but were
  tested with this kernel fix. (Jiri Olsa)

o Add +field argument support for --field option, so that one can add
  fields to the default list of fields to show, i.e. now one can just do:

   perf report --fields +pid

  And the pid will appear in addition to the default fields. (Jiri Olsa)

Developer stuff:

o More Intel PT prep stuff, including:
  - Add a 'perf test' for tracking with sched_switch
  - Add 'flush' callback to scripting API

o hists browser (used in top and report) refactorings, getting rid of unused
  variables and reducing source code size by handling similar cases in a
  fewer functions (Namhyung Kim).

o Explicitly include util/debug.h for powerpc, was being indirectly included,
  broke the build when some change made it stop being included. (Sukadev
  Bhattiprolu)

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

----------------------------------------------------------------
Adrian Hunter (4):
      perf tests: Add a test for tracking with sched_switch
      perf scripting: Add 'flush' callback to scripting API
      perf machine: Rename machine__get_kernel_start_addr() method
      perf tools: Add machine__kernel_ip()

Don Zickus (2):
      perf symbols: Don't try to find DSOs in SYSV maps
      perf machine: Fallback to MAP__FUNCTION if daddr maps are NULL

Jiri Olsa (4):
      perf: Fix perf_poll to return proper POLLHUP value
      perf: Add PERF_EVENT_STATE_EXIT state for events with exited task
      perf top: Use set_term_quiet() instead of open coded equivalent
      perf tools: Add +field argument support for --field option

Namhyung Kim (5):
      perf hists browser: Get rid of unused 'remaining' variable
      perf hists browser: Fix children overhead dump
      perf hists browser: Factor out hist_browser__show_callchain_entry()
      perf hists browser: Cleanup callchain print functions
      perf hists browser: Consolidate callchain print functions in TUI

Sukadev Bhattiprolu (1):
      perf tools powerpc: Explicitly include util/debug.h

 include/linux/perf_event.h                         |   1 +
 kernel/events/core.c                               |  12 +-
 tools/perf/Makefile.perf                           |   1 +
 tools/perf/arch/powerpc/util/skip-callchain-idx.c  |   1 +
 tools/perf/builtin-script.c                        |  13 +
 tools/perf/builtin-top.c                           |   9 +-
 tools/perf/tests/builtin-test.c                    |   4 +
 tools/perf/tests/switch-tracking.c                 | 572 +++++++++++++++++++++
 tools/perf/tests/tests.h                           |   1 +
 tools/perf/ui/browsers/hists.c                     | 343 +++++-------
 tools/perf/ui/hist.c                               |   6 +-
 tools/perf/util/event.c                            |   6 +-
 tools/perf/util/machine.c                          |  41 +-
 tools/perf/util/machine.h                          |  17 +
 tools/perf/util/map.c                              |   1 +
 .../perf/util/scripting-engines/trace-event-perl.c |   6 +
 .../util/scripting-engines/trace-event-python.c    |   6 +
 tools/perf/util/sort.c                             |  24 +-
 tools/perf/util/sort.h                             |   1 +
 tools/perf/util/trace-event-scripting.c            |   7 +
 tools/perf/util/trace-event.h                      |   1 +
 21 files changed, 827 insertions(+), 246 deletions(-)
 create mode 100644 tools/perf/tests/switch-tracking.c

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2014-03-14 21:29 Arnaldo Carvalho de Melo
@ 2014-03-18  8:24 ` Ingo Molnar
  0 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2014-03-18  8:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Aswin Chandramouleeswaran, Corey Ashford,
	Darren Hart, David Ahern, Davidlohr Bueso, Don Zickus,
	Frederic Weisbecker, Jason Low, Jiri Olsa, Joe Mario,
	Masami Hiramatsu, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Pekka Enberg, Peter Zijlstra, Ramkumar Ramachandra,
	Scott J Norton, Stephane Eranian, Thomas Gleixner, 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,
> 
> - Arnaldo
> 
> The following changes since commit 81827ed8d85e892311965dc9ec4120b2b2e745bd:
> 
>   perf/x86/uncore: Fix missing end markers for SNB/IVB/HSW IMC PMU (2014-03-14 09:25:25 +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 d75e6097ef1f7669deb500fbbdf53cfe524f1b53:
> 
>   perf machine: Factor machine__find_thread to take tid argument (2014-03-14 18:08:42 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> . Add several futex 'perf bench' microbenchmarks (Davidlohr Bueso)
> 
> . Speed up thread map generation (Don Zickus)
> 
> . Fix synthesizing mmaps for threads (Don Zickus)
> 
> . Fix invalid output on event group stdio report  (Namhyung Kim)
> 
> . Introduce 'perf kvm --list-cmds' command line option for use by
>   scripts (Ramkumar Ramachandra)
> 
> Documentation:
> 
> . Clarify load-latency information in the 'perf mem' docs (Andi Kleen)
> 
> . Clarify x86 register naming in 'perf probe' docs (Andi Kleen)
> 
> Refactorigns:
> 
> . hists browser refactorings to reuse code accross UIs (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (2):
>       perf mem: Clarify load-latency in documentation
>       perf probe: Clarify x86 register naming for perf probe
> 
> Arnaldo Carvalho de Melo (1):
>       perf symbols: Introduce thread__find_cpumode_addr_location
> 
> Davidlohr Bueso (3):
>       perf bench: Add futex-hash microbenchmark
>       perf bench: Add futex-wake microbenchmark
>       perf bench: Add futex-requeue microbenchmark
> 
> Don Zickus (3):
>       perf tools: Fix synthesizing mmaps for threads
>       perf session: Change header.misc dump from decimal to hex
>       perf tools: Speed up thread map generation
> 
> Jiri Olsa (1):
>       perf machine: Factor machine__find_thread to take tid argument
> 
> Namhyung Kim (5):
>       perf ui/stdio: Fix invalid output on event group report
>       perf ui/gtk: Reuse generic __hpp__fmt() code
>       perf ui/hists: Pass struct hpp to print functions
>       perf ui/tui: Reuse generic __hpp__fmt() code
>       perf ui hists: Pass evsel to hpp->header/width functions explicitly
> 
> Ramkumar Ramachandra (1):
>       perf kvm: introduce --list-cmds for use by scripts
> 
>  tools/perf/Documentation/perf-mem.txt   |   4 +
>  tools/perf/Documentation/perf-probe.txt |   2 +
>  tools/perf/Makefile.perf                |   3 +
>  tools/perf/bench/bench.h                |   3 +
>  tools/perf/bench/futex-hash.c           | 212 ++++++++++++++++++++++++++++++++
>  tools/perf/bench/futex-requeue.c        | 211 +++++++++++++++++++++++++++++++
>  tools/perf/bench/futex-wake.c           | 201 ++++++++++++++++++++++++++++++
>  tools/perf/bench/futex.h                |  71 +++++++++++
>  tools/perf/builtin-bench.c              |  12 +-
>  tools/perf/builtin-diff.c               |   7 +-
>  tools/perf/builtin-kvm.c                |  12 +-
>  tools/perf/perf-completion.sh           |   2 +-
>  tools/perf/perf.h                       |   6 +
>  tools/perf/tests/dwarf-unwind.c         |   2 +-
>  tools/perf/ui/browsers/hists.c          | 122 ++++++------------
>  tools/perf/ui/gtk/hists.c               |  78 ++----------
>  tools/perf/ui/hist.c                    | 138 +++++++++++++++------
>  tools/perf/ui/stdio/hist.c              |  11 +-
>  tools/perf/util/event.c                 | 156 ++++++++++++++---------
>  tools/perf/util/hist.h                  |  20 ++-
>  tools/perf/util/machine.c               |  46 +++----
>  tools/perf/util/machine.h               |   3 +-
>  tools/perf/util/parse-options.c         |  37 +++++-
>  tools/perf/util/parse-options.h         |   8 +-
>  tools/perf/util/session.c               |   2 +-
>  tools/perf/util/thread.c                |  21 ++++
>  tools/perf/util/thread.h                |   5 +
>  27 files changed, 1094 insertions(+), 301 deletions(-)
>  create mode 100644 tools/perf/bench/futex-hash.c
>  create mode 100644 tools/perf/bench/futex-requeue.c
>  create mode 100644 tools/perf/bench/futex-wake.c
>  create mode 100644 tools/perf/bench/futex.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2014-03-14 21:29 Arnaldo Carvalho de Melo
  2014-03-18  8:24 ` Ingo Molnar
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-03-14 21:29 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Aswin Chandramouleeswaran, Corey Ashford,
	Darren Hart, David Ahern, Davidlohr Bueso, Don Zickus,
	Frederic Weisbecker, Jason Low, Jiri Olsa, Joe Mario,
	Masami Hiramatsu, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Pekka Enberg, Peter Zijlstra, Ramkumar Ramachandra,
	Scott J Norton, Stephane Eranian, Thomas Gleixner, Waiman Long,
	Arnaldo Carvalho de Melo

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 81827ed8d85e892311965dc9ec4120b2b2e745bd:

  perf/x86/uncore: Fix missing end markers for SNB/IVB/HSW IMC PMU (2014-03-14 09:25:25 +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 d75e6097ef1f7669deb500fbbdf53cfe524f1b53:

  perf machine: Factor machine__find_thread to take tid argument (2014-03-14 18:08:42 -0300)

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

User visible:

. Add several futex 'perf bench' microbenchmarks (Davidlohr Bueso)

. Speed up thread map generation (Don Zickus)

. Fix synthesizing mmaps for threads (Don Zickus)

. Fix invalid output on event group stdio report  (Namhyung Kim)

. Introduce 'perf kvm --list-cmds' command line option for use by
  scripts (Ramkumar Ramachandra)

Documentation:

. Clarify load-latency information in the 'perf mem' docs (Andi Kleen)

. Clarify x86 register naming in 'perf probe' docs (Andi Kleen)

Refactorigns:

. hists browser refactorings to reuse code accross UIs (Namhyung Kim)

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

----------------------------------------------------------------
Andi Kleen (2):
      perf mem: Clarify load-latency in documentation
      perf probe: Clarify x86 register naming for perf probe

Arnaldo Carvalho de Melo (1):
      perf symbols: Introduce thread__find_cpumode_addr_location

Davidlohr Bueso (3):
      perf bench: Add futex-hash microbenchmark
      perf bench: Add futex-wake microbenchmark
      perf bench: Add futex-requeue microbenchmark

Don Zickus (3):
      perf tools: Fix synthesizing mmaps for threads
      perf session: Change header.misc dump from decimal to hex
      perf tools: Speed up thread map generation

Jiri Olsa (1):
      perf machine: Factor machine__find_thread to take tid argument

Namhyung Kim (5):
      perf ui/stdio: Fix invalid output on event group report
      perf ui/gtk: Reuse generic __hpp__fmt() code
      perf ui/hists: Pass struct hpp to print functions
      perf ui/tui: Reuse generic __hpp__fmt() code
      perf ui hists: Pass evsel to hpp->header/width functions explicitly

Ramkumar Ramachandra (1):
      perf kvm: introduce --list-cmds for use by scripts

 tools/perf/Documentation/perf-mem.txt   |   4 +
 tools/perf/Documentation/perf-probe.txt |   2 +
 tools/perf/Makefile.perf                |   3 +
 tools/perf/bench/bench.h                |   3 +
 tools/perf/bench/futex-hash.c           | 212 ++++++++++++++++++++++++++++++++
 tools/perf/bench/futex-requeue.c        | 211 +++++++++++++++++++++++++++++++
 tools/perf/bench/futex-wake.c           | 201 ++++++++++++++++++++++++++++++
 tools/perf/bench/futex.h                |  71 +++++++++++
 tools/perf/builtin-bench.c              |  12 +-
 tools/perf/builtin-diff.c               |   7 +-
 tools/perf/builtin-kvm.c                |  12 +-
 tools/perf/perf-completion.sh           |   2 +-
 tools/perf/perf.h                       |   6 +
 tools/perf/tests/dwarf-unwind.c         |   2 +-
 tools/perf/ui/browsers/hists.c          | 122 ++++++------------
 tools/perf/ui/gtk/hists.c               |  78 ++----------
 tools/perf/ui/hist.c                    | 138 +++++++++++++++------
 tools/perf/ui/stdio/hist.c              |  11 +-
 tools/perf/util/event.c                 | 156 ++++++++++++++---------
 tools/perf/util/hist.h                  |  20 ++-
 tools/perf/util/machine.c               |  46 +++----
 tools/perf/util/machine.h               |   3 +-
 tools/perf/util/parse-options.c         |  37 +++++-
 tools/perf/util/parse-options.h         |   8 +-
 tools/perf/util/session.c               |   2 +-
 tools/perf/util/thread.c                |  21 ++++
 tools/perf/util/thread.h                |   5 +
 27 files changed, 1094 insertions(+), 301 deletions(-)
 create mode 100644 tools/perf/bench/futex-hash.c
 create mode 100644 tools/perf/bench/futex-requeue.c
 create mode 100644 tools/perf/bench/futex-wake.c
 create mode 100644 tools/perf/bench/futex.h

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

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

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 89b4be142bf2491a94af325f5206fc2f2aa18960:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2013-11-15 07:35:50 +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 b4070e339cd39e4b56604eddc3e93ee355027d45:

  tools lib traceevent: Fix use of multiple options in processing field (2013-11-18 17:09:51 -0300)

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

. Make per-cpu mmaps the default, having inheritance turned on for
  all targets but --tid/-t. From Adrian Hunter.

. Make 'perf top -g' refer to callchains, not --groups, to be consistent
  with 'perf record -g'. From David Ahern.

. Tag thread comm as overriden, fix from Frederic Weisbecker.

. Fix bogus group name when processing the perf.data file header, from Namhyung Kim.

. Fix possible memory leaks in process_group_desc(), from Namhyung Kim.

. Remove 'perf trace' thread summary coloring, from Pekka Enberg.

. Generalize the bash completion scripts and make it work with zsh too, from
  Ramkumar Ramachandra.

. Fix use of multiple options in processing field in libtraceevent, from Steven Rostedt.

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

----------------------------------------------------------------
Adrian Hunter (4):
      perf record: Make per-cpu mmaps the default.
      perf tools: Allow '--inherit' as the negation of '--no-inherit'
      perf tools: Add option macro OPT_BOOLEAN_SET
      perf record: Default -t option to no inheritance

David Ahern (1):
      perf top: Make -g refer to callchains

Frederic Weisbecker (1):
      perf tools: Tag thread comm as overriden

Namhyung Kim (3):
      perf header: Fix bogus group name
      perf header: Fix possible memory leaks in process_group_desc()
      perf script: Move evname print code to process_event()

Pekka Enberg (1):
      perf trace: Remove thread summary coloring

Ramkumar Ramachandra (5):
      perf completion: introduce a layer of indirection
      perf completion: factor out compgen stuff
      perf completion: factor out call to __ltrim_colon_completions
      perf completion: introduce zsh support
      perf completion: rename file to reflect zsh support

Steven Rostedt (1):
      tools lib traceevent: Fix use of multiple options in processing field

 tools/lib/traceevent/event-parse.c                 |  23 ++++-
 tools/perf/Documentation/perf-record.txt           |  12 +--
 tools/perf/Documentation/perf-top.txt              |   5 +-
 tools/perf/Makefile.perf                           |   4 +-
 tools/perf/builtin-record.c                        |  13 ++-
 tools/perf/builtin-script.c                        |  11 ++-
 tools/perf/builtin-top.c                           |   4 +-
 tools/perf/builtin-trace.c                         |  13 +--
 tools/perf/{bash_completion => perf-completion.sh} | 100 ++++++++++++++++++---
 tools/perf/perf.h                                  |   1 +
 tools/perf/tests/attr/test-record-no-inherit       |   2 +-
 tools/perf/util/evlist.c                           |   6 +-
 tools/perf/util/evsel.c                            |   5 +-
 tools/perf/util/header.c                           |   6 +-
 tools/perf/util/parse-options.c                    |  21 +++++
 tools/perf/util/parse-options.h                    |   8 ++
 tools/perf/util/target.c                           |  11 ++-
 tools/perf/util/target.h                           |   4 +-
 tools/perf/util/thread.c                           |  11 ++-
 19 files changed, 198 insertions(+), 62 deletions(-)
 rename tools/perf/{bash_completion => perf-completion.sh} (65%)

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14 15:10               ` Joerg Roedel
@ 2012-02-14 16:11                 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-02-14 16:11 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: David Ahern, Namhyung Kim, Namhyung Kim, linux-kernel,
	Ingo Molnar, Andi Kleen, Anshuman Khandual, Arun Sharma,
	Corey Ashford, Frederic Weisbecker, Jason Wang, Jiri Olsa,
	Lin Ming, Paul Mackerras, Peter Zijlstra,
	Roberto Agostino Vitillo, Robert Richter, Stephane Eranian,
	Thomas Gleixner, Vince Weaver

Em Tue, Feb 14, 2012 at 04:10:39PM +0100, Joerg Roedel escreveu:
> On Tue, Feb 14, 2012 at 12:38:53PM -0200, Arnaldo Carvalho de Melo wrote:
> >  	bool		   sample_id_all_avail;
> > +	bool		   exclude_guest_missing;
> >  	bool		   dump_symtab;
> >  	const char	   *cpu_list;
> >  	struct hist_entry  *sym_filter_entry;
> 
> I was about to prepare a similar patch :) But anyway, this one works
> too.
> 
> Tested-by: Joerg Roedel <joerg.roedel@amd.com>
> 
> (on 2.6.32)

thanks, I'm commiting it now after testing it on a 3.0-rt kernel,

- Arnaldo

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14 14:38             ` Arnaldo Carvalho de Melo
@ 2012-02-14 15:10               ` Joerg Roedel
  2012-02-14 16:11                 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 59+ messages in thread
From: Joerg Roedel @ 2012-02-14 15:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: David Ahern, Namhyung Kim, Namhyung Kim, linux-kernel,
	Ingo Molnar, Andi Kleen, Anshuman Khandual, Arun Sharma,
	Corey Ashford, Frederic Weisbecker, Jason Wang, Jiri Olsa,
	Lin Ming, Paul Mackerras, Peter Zijlstra,
	Roberto Agostino Vitillo, Robert Richter, Stephane Eranian,
	Thomas Gleixner, Vince Weaver

On Tue, Feb 14, 2012 at 12:38:53PM -0200, Arnaldo Carvalho de Melo wrote:
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 08ed24b..d6c10e8 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -205,6 +205,9 @@ static void perf_record__open(struct perf_record *rec)
>  
>  		if (opts->group && pos != first)
>  			group_fd = first->fd;
> +fallback_missing_features:
> +		if (opts->exclude_guest_missing)
> +			attr->exclude_guest = attr->exclude_host = 0;
>  retry_sample_id:
>  		attr->sample_id_all = opts->sample_id_all_avail ? 1 : 0;
>  try_again:
> @@ -218,15 +221,23 @@ try_again:
>  			} else if (err ==  ENODEV && opts->cpu_list) {
>  				die("No such device - did you specify"
>  					" an out-of-range profile CPU?\n");
> -			} else if (err == EINVAL && opts->sample_id_all_avail) {
> -				/*
> -				 * Old kernel, no attr->sample_id_type_all field
> -				 */
> -				opts->sample_id_all_avail = false;
> -				if (!opts->sample_time && !opts->raw_samples && !time_needed)
> -					attr->sample_type &= ~PERF_SAMPLE_TIME;
> -
> -				goto retry_sample_id;
> +			} else if (err == EINVAL) {
> +				if (!opts->exclude_guest_missing &&
> +				    (attr->exclude_guest || attr->exclude_host)) {
> +					pr_debug("Old kernel, cannot exclude "
> +						 "guest or host samples.\n");
> +					opts->exclude_guest_missing = true;
> +					goto fallback_missing_features;
> +				} else if (opts->sample_id_all_avail) {
> +					/*
> +					 * Old kernel, no attr->sample_id_type_all field
> +					 */
> +					opts->sample_id_all_avail = false;
> +					if (!opts->sample_time && !opts->raw_samples && !time_needed)
> +						attr->sample_type &= ~PERF_SAMPLE_TIME;
> +
> +					goto retry_sample_id;
> +				}
>  			}
>  
>  			/*
> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> index 5a88c0d..02e11ff 100644
> --- a/tools/perf/builtin-top.c
> +++ b/tools/perf/builtin-top.c
> @@ -872,6 +872,9 @@ static void perf_top__start_counters(struct perf_top *top)
>  		attr->mmap = 1;
>  		attr->comm = 1;
>  		attr->inherit = top->inherit;
> +fallback_missing_features:
> +		if (top->exclude_guest_missing)
> +			attr->exclude_guest = attr->exclude_host = 0;
>  retry_sample_id:
>  		attr->sample_id_all = top->sample_id_all_avail ? 1 : 0;
>  try_again:
> @@ -883,12 +886,20 @@ try_again:
>  			if (err == EPERM || err == EACCES) {
>  				ui__error_paranoid();
>  				goto out_err;
> -			} else if (err == EINVAL && top->sample_id_all_avail) {
> -				/*
> -				 * Old kernel, no attr->sample_id_type_all field
> -				 */
> -				top->sample_id_all_avail = false;
> -				goto retry_sample_id;
> +			} else if (err == EINVAL) {
> +				if (!top->exclude_guest_missing &&
> +				    (attr->exclude_guest || attr->exclude_host)) {
> +					pr_debug("Old kernel, cannot exclude "
> +						 "guest or host samples.\n");
> +					top->exclude_guest_missing = true;
> +					goto fallback_missing_features;
> +				} else if (top->sample_id_all_avail) {
> +					/*
> +					 * Old kernel, no attr->sample_id_type_all field
> +					 */
> +					top->sample_id_all_avail = false;
> +					goto retry_sample_id;
> +				}
>  			}
>  			/*
>  			 * If it's cycles then fall back to hrtimer
> diff --git a/tools/perf/perf.h b/tools/perf/perf.h
> index 03a0456..8b9c436 100644
> --- a/tools/perf/perf.h
> +++ b/tools/perf/perf.h
> @@ -199,6 +199,7 @@ struct perf_record_opts {
>  	bool	     sample_address;
>  	bool	     sample_time;
>  	bool	     sample_id_all_avail;
> +	bool	     exclude_guest_missing;
>  	bool	     system_wide;
>  	bool	     period;
>  	unsigned int freq;
> diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h
> index 49eb848..7dea891 100644
> --- a/tools/perf/util/top.h
> +++ b/tools/perf/util/top.h
> @@ -35,6 +35,7 @@ struct perf_top {
>  	bool		   inherit;
>  	bool		   group;
>  	bool		   sample_id_all_avail;
> +	bool		   exclude_guest_missing;
>  	bool		   dump_symtab;
>  	const char	   *cpu_list;
>  	struct hist_entry  *sym_filter_entry;

I was about to prepare a similar patch :) But anyway, this one works
too.

Tested-by: Joerg Roedel <joerg.roedel@amd.com>

(on 2.6.32)

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14 13:10           ` Arnaldo Carvalho de Melo
@ 2012-02-14 14:38             ` Arnaldo Carvalho de Melo
  2012-02-14 15:10               ` Joerg Roedel
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-02-14 14:38 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: David Ahern, Namhyung Kim, Namhyung Kim, linux-kernel,
	Ingo Molnar, Andi Kleen, Anshuman Khandual, Arun Sharma,
	Corey Ashford, Frederic Weisbecker, Jason Wang, Jiri Olsa,
	Lin Ming, Paul Mackerras, Peter Zijlstra,
	Roberto Agostino Vitillo, Robert Richter, Stephane Eranian,
	Thomas Gleixner, Vince Weaver

Em Tue, Feb 14, 2012 at 11:10:46AM -0200, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Feb 14, 2012 at 11:50:18AM +0100, Joerg Roedel escreveu:
> > On Mon, Feb 13, 2012 at 10:23:07PM -0700, David Ahern wrote:
> > > On 2/13/12 10:10 PM, Namhyung Kim wrote:
> > > >It happened because I used old kernel version that isn't aware of the
> > > >exclude_guest bit. So the check on attr->__reserved_1 in
> > > >core.c::perf_copy_attr() failed and then ended up seeing EINVAL at
> > > >perf_evsel__open().
> 
> > > comes back to 1aed2671738785e8f5aea663a6fda91aa7ef59b5 again. See
> 
> > > https://lkml.org/lkml/2012/2/8/234
> 
> > Grr. I totally forgot that issue. Is there some way to detect the perf
> > kernel-features? Otherwise the only fix seems to be to drop the patch
> > changing the default. The crashes should be fixed by the other patch
> > already.
> 
> Well, we need to detect it like we do with sample_id_all. In this case
> we would try with exclude_guest, if it fails with EINVAL, we realise it
> is not available, clean that bit and try again.

The following patch should fix it, still untested tho, booting a machine
with an < 3.1 kernel to check...

- Arnaldo

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 08ed24b..d6c10e8 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -205,6 +205,9 @@ static void perf_record__open(struct perf_record *rec)
 
 		if (opts->group && pos != first)
 			group_fd = first->fd;
+fallback_missing_features:
+		if (opts->exclude_guest_missing)
+			attr->exclude_guest = attr->exclude_host = 0;
 retry_sample_id:
 		attr->sample_id_all = opts->sample_id_all_avail ? 1 : 0;
 try_again:
@@ -218,15 +221,23 @@ try_again:
 			} else if (err ==  ENODEV && opts->cpu_list) {
 				die("No such device - did you specify"
 					" an out-of-range profile CPU?\n");
-			} else if (err == EINVAL && opts->sample_id_all_avail) {
-				/*
-				 * Old kernel, no attr->sample_id_type_all field
-				 */
-				opts->sample_id_all_avail = false;
-				if (!opts->sample_time && !opts->raw_samples && !time_needed)
-					attr->sample_type &= ~PERF_SAMPLE_TIME;
-
-				goto retry_sample_id;
+			} else if (err == EINVAL) {
+				if (!opts->exclude_guest_missing &&
+				    (attr->exclude_guest || attr->exclude_host)) {
+					pr_debug("Old kernel, cannot exclude "
+						 "guest or host samples.\n");
+					opts->exclude_guest_missing = true;
+					goto fallback_missing_features;
+				} else if (opts->sample_id_all_avail) {
+					/*
+					 * Old kernel, no attr->sample_id_type_all field
+					 */
+					opts->sample_id_all_avail = false;
+					if (!opts->sample_time && !opts->raw_samples && !time_needed)
+						attr->sample_type &= ~PERF_SAMPLE_TIME;
+
+					goto retry_sample_id;
+				}
 			}
 
 			/*
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 5a88c0d..02e11ff 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -872,6 +872,9 @@ static void perf_top__start_counters(struct perf_top *top)
 		attr->mmap = 1;
 		attr->comm = 1;
 		attr->inherit = top->inherit;
+fallback_missing_features:
+		if (top->exclude_guest_missing)
+			attr->exclude_guest = attr->exclude_host = 0;
 retry_sample_id:
 		attr->sample_id_all = top->sample_id_all_avail ? 1 : 0;
 try_again:
@@ -883,12 +886,20 @@ try_again:
 			if (err == EPERM || err == EACCES) {
 				ui__error_paranoid();
 				goto out_err;
-			} else if (err == EINVAL && top->sample_id_all_avail) {
-				/*
-				 * Old kernel, no attr->sample_id_type_all field
-				 */
-				top->sample_id_all_avail = false;
-				goto retry_sample_id;
+			} else if (err == EINVAL) {
+				if (!top->exclude_guest_missing &&
+				    (attr->exclude_guest || attr->exclude_host)) {
+					pr_debug("Old kernel, cannot exclude "
+						 "guest or host samples.\n");
+					top->exclude_guest_missing = true;
+					goto fallback_missing_features;
+				} else if (top->sample_id_all_avail) {
+					/*
+					 * Old kernel, no attr->sample_id_type_all field
+					 */
+					top->sample_id_all_avail = false;
+					goto retry_sample_id;
+				}
 			}
 			/*
 			 * If it's cycles then fall back to hrtimer
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 03a0456..8b9c436 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -199,6 +199,7 @@ struct perf_record_opts {
 	bool	     sample_address;
 	bool	     sample_time;
 	bool	     sample_id_all_avail;
+	bool	     exclude_guest_missing;
 	bool	     system_wide;
 	bool	     period;
 	unsigned int freq;
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h
index 49eb848..7dea891 100644
--- a/tools/perf/util/top.h
+++ b/tools/perf/util/top.h
@@ -35,6 +35,7 @@ struct perf_top {
 	bool		   inherit;
 	bool		   group;
 	bool		   sample_id_all_avail;
+	bool		   exclude_guest_missing;
 	bool		   dump_symtab;
 	const char	   *cpu_list;
 	struct hist_entry  *sym_filter_entry;

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14 10:50         ` Joerg Roedel
@ 2012-02-14 13:10           ` Arnaldo Carvalho de Melo
  2012-02-14 14:38             ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-02-14 13:10 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: David Ahern, Namhyung Kim, Namhyung Kim, linux-kernel,
	Ingo Molnar, Andi Kleen, Anshuman Khandual, Arun Sharma,
	Corey Ashford, Frederic Weisbecker, Jason Wang, Jiri Olsa,
	Lin Ming, Paul Mackerras, Peter Zijlstra,
	Roberto Agostino Vitillo, Robert Richter, Stephane Eranian,
	Thomas Gleixner, Vince Weaver

Em Tue, Feb 14, 2012 at 11:50:18AM +0100, Joerg Roedel escreveu:
> On Mon, Feb 13, 2012 at 10:23:07PM -0700, David Ahern wrote:
> > On 2/13/12 10:10 PM, Namhyung Kim wrote:
> > >It happened because I used old kernel version that isn't aware of the
> > >exclude_guest bit. So the check on attr->__reserved_1 in
> > >core.c::perf_copy_attr() failed and then ended up seeing EINVAL at
> > >perf_evsel__open().

> > comes back to 1aed2671738785e8f5aea663a6fda91aa7ef59b5 again. See

> > https://lkml.org/lkml/2012/2/8/234

> Grr. I totally forgot that issue. Is there some way to detect the perf
> kernel-features? Otherwise the only fix seems to be to drop the patch
> changing the default. The crashes should be fixed by the other patch
> already.

Well, we need to detect it like we do with sample_id_all. In this case
we would try with exclude_guest, if it fails with EINVAL, we realise it
is not available, clean that bit and try again.

- Arnaldo

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14  5:23       ` David Ahern
  2012-02-14  5:48         ` Namhyung Kim
@ 2012-02-14 10:50         ` Joerg Roedel
  2012-02-14 13:10           ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 59+ messages in thread
From: Joerg Roedel @ 2012-02-14 10:50 UTC (permalink / raw)
  To: David Ahern
  Cc: Namhyung Kim, Namhyung Kim, linux-kernel, Ingo Molnar,
	Andi Kleen, Anshuman Khandual, Arun Sharma, Corey Ashford,
	Frederic Weisbecker, Jason Wang, Jiri Olsa, Lin Ming,
	Paul Mackerras, Peter Zijlstra, Roberto Agostino Vitillo,
	Robert Richter, Stephane Eranian, Thomas Gleixner, Vince Weaver,
	arnaldo.melo, Arnaldo Carvalho de Melo

On Mon, Feb 13, 2012 at 10:23:07PM -0700, David Ahern wrote:
> On 2/13/12 10:10 PM, Namhyung Kim wrote:
> >>
> >
> >It happened because I used old kernel version that isn't aware of the
> >exclude_guest bit. So the check on attr->__reserved_1 in
> >core.c::perf_copy_attr() failed and then ended up seeing EINVAL at
> >perf_evsel__open().
> 
> comes back to 1aed2671738785e8f5aea663a6fda91aa7ef59b5 again. See
> 
> https://lkml.org/lkml/2012/2/8/234

Grr. I totally forgot that issue. Is there some way to detect the perf
kernel-features? Otherwise the only fix seems to be to drop the patch
changing the default. The crashes should be fixed by the other patch
already.


	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14  5:52           ` David Ahern
@ 2012-02-14  5:58             ` Namhyung Kim
  0 siblings, 0 replies; 59+ messages in thread
From: Namhyung Kim @ 2012-02-14  5:58 UTC (permalink / raw)
  To: David Ahern
  Cc: Joerg Roedel, Namhyung Kim, linux-kernel, Ingo Molnar,
	Andi Kleen, Anshuman Khandual, Arun Sharma, Corey Ashford,
	Frederic Weisbecker, Jason Wang, Jiri Olsa, Lin Ming,
	Paul Mackerras, Peter Zijlstra, Roberto Agostino Vitillo,
	Robert Richter, Stephane Eranian, Thomas Gleixner, Vince Weaver,
	arnaldo.melo, Arnaldo Carvalho de Melo

2012-02-14 2:52 PM, David Ahern wrote:
> On 2/13/12 10:48 PM, Namhyung Kim wrote:
>> Hi,
>>
>> 2012-02-14 2:23 PM, David Ahern wrote:
>>> On 2/13/12 10:10 PM, Namhyung Kim wrote:
>>>>>
>>>>
>>>> It happened because I used old kernel version that isn't aware of the
>>>> exclude_guest bit. So the check on attr->__reserved_1 in
>>>> core.c::perf_copy_attr() failed and then ended up seeing EINVAL at
>>>> perf_evsel__open().
>>>
>>> comes back to 1aed2671738785e8f5aea663a6fda91aa7ef59b5 again. See
>>>
>>> https://lkml.org/lkml/2012/2/8/234
>>>
>>
>> Thanks for the pointer, then I'll wait until the guys figure out what
>> the correct fix is :)
>>
>> Thanks,
>> Namhyung
>
> Resetting that default was it. :-)
>
> Does reverting the entire patch fix your problem?
>
> David

Yes, of course.

OK, then I'll start to rework perf target cleanups after reverting it.

Thanks,
Namhyung

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14  5:48         ` Namhyung Kim
@ 2012-02-14  5:52           ` David Ahern
  2012-02-14  5:58             ` Namhyung Kim
  0 siblings, 1 reply; 59+ messages in thread
From: David Ahern @ 2012-02-14  5:52 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Joerg Roedel, Namhyung Kim, linux-kernel, Ingo Molnar,
	Andi Kleen, Anshuman Khandual, Arun Sharma, Corey Ashford,
	Frederic Weisbecker, Jason Wang, Jiri Olsa, Lin Ming,
	Paul Mackerras, Peter Zijlstra, Roberto Agostino Vitillo,
	Robert Richter, Stephane Eranian, Thomas Gleixner, Vince Weaver,
	arnaldo.melo, Arnaldo Carvalho de Melo

On 2/13/12 10:48 PM, Namhyung Kim wrote:
> Hi,
>
> 2012-02-14 2:23 PM, David Ahern wrote:
>> On 2/13/12 10:10 PM, Namhyung Kim wrote:
>>>>
>>>
>>> It happened because I used old kernel version that isn't aware of the
>>> exclude_guest bit. So the check on attr->__reserved_1 in
>>> core.c::perf_copy_attr() failed and then ended up seeing EINVAL at
>>> perf_evsel__open().
>>
>> comes back to 1aed2671738785e8f5aea663a6fda91aa7ef59b5 again. See
>>
>> https://lkml.org/lkml/2012/2/8/234
>>
>
> Thanks for the pointer, then I'll wait until the guys figure out what
> the correct fix is :)
>
> Thanks,
> Namhyung

Resetting that default was it. :-)

Does reverting the entire patch fix your problem?

David

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14  5:23       ` David Ahern
@ 2012-02-14  5:48         ` Namhyung Kim
  2012-02-14  5:52           ` David Ahern
  2012-02-14 10:50         ` Joerg Roedel
  1 sibling, 1 reply; 59+ messages in thread
From: Namhyung Kim @ 2012-02-14  5:48 UTC (permalink / raw)
  To: David Ahern
  Cc: Joerg Roedel, Namhyung Kim, linux-kernel, Ingo Molnar,
	Andi Kleen, Anshuman Khandual, Arun Sharma, Corey Ashford,
	Frederic Weisbecker, Jason Wang, Jiri Olsa, Lin Ming,
	Paul Mackerras, Peter Zijlstra, Roberto Agostino Vitillo,
	Robert Richter, Stephane Eranian, Thomas Gleixner, Vince Weaver,
	arnaldo.melo, Arnaldo Carvalho de Melo

Hi,

2012-02-14 2:23 PM, David Ahern wrote:
> On 2/13/12 10:10 PM, Namhyung Kim wrote:
>>>
>>
>> It happened because I used old kernel version that isn't aware of the
>> exclude_guest bit. So the check on attr->__reserved_1 in
>> core.c::perf_copy_attr() failed and then ended up seeing EINVAL at
>> perf_evsel__open().
>
> comes back to 1aed2671738785e8f5aea663a6fda91aa7ef59b5 again. See
>
> https://lkml.org/lkml/2012/2/8/234
>

Thanks for the pointer, then I'll wait until the guys figure out what the 
correct fix is :)

Thanks,
Namhyung

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14  5:10     ` Namhyung Kim
@ 2012-02-14  5:23       ` David Ahern
  2012-02-14  5:48         ` Namhyung Kim
  2012-02-14 10:50         ` Joerg Roedel
  0 siblings, 2 replies; 59+ messages in thread
From: David Ahern @ 2012-02-14  5:23 UTC (permalink / raw)
  To: Namhyung Kim, Joerg Roedel
  Cc: Namhyung Kim, linux-kernel, Ingo Molnar, Andi Kleen,
	Anshuman Khandual, Arun Sharma, Corey Ashford,
	Frederic Weisbecker, Jason Wang, Jiri Olsa, Lin Ming,
	Paul Mackerras, Peter Zijlstra, Roberto Agostino Vitillo,
	Robert Richter, Stephane Eranian, Thomas Gleixner, Vince Weaver,
	arnaldo.melo, Arnaldo Carvalho de Melo

On 2/13/12 10:10 PM, Namhyung Kim wrote:
>>
>
> It happened because I used old kernel version that isn't aware of the
> exclude_guest bit. So the check on attr->__reserved_1 in
> core.c::perf_copy_attr() failed and then ended up seeing EINVAL at
> perf_evsel__open().

comes back to 1aed2671738785e8f5aea663a6fda91aa7ef59b5 again. See

https://lkml.org/lkml/2012/2/8/234

>
> So I think it should be handled in the same way of handling
> sample_id_all bit in perf record and top if we want to set perf_guest to
> false by default. I'll send patches for them soon.
>
> Thanks,
> Namhyung


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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14  3:07   ` Namhyung Kim
@ 2012-02-14  5:10     ` Namhyung Kim
  2012-02-14  5:23       ` David Ahern
  0 siblings, 1 reply; 59+ messages in thread
From: Namhyung Kim @ 2012-02-14  5:10 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: linux-kernel, Ingo Molnar, Andi Kleen, Anshuman Khandual,
	Arun Sharma, Corey Ashford, David Ahern, Frederic Weisbecker,
	Jason Wang, Jiri Olsa, Joerg Roedel, Lin Ming, Paul Mackerras,
	Peter Zijlstra, Roberto Agostino Vitillo, Robert Richter,
	Stephane Eranian, Thomas Gleixner, Vince Weaver, arnaldo.melo,
	Arnaldo Carvalho de Melo

2012-02-14 12:07 PM, Namhyung Kim wrote:
> 2012-02-14 오전 11:50, Namhyung Kim 쓴 글:
>> Hello,
>>
>> 2012-02-14 10:52 AM, Arnaldo Carvalho de Melo wrote:
>>> The following changes since commit c98fdeaa92731308ed80386261fa2589addefa47:
>>>
>>> x86/sched/perf/AMD: Set sched_clock_stable (2012-02-07 13:12:08 +0100)
>>>
>>> are available in the git repository at:
>>>
>>> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf-core-for-mingo
>>>
>>> for you to fetch changes up to 7e1ccd3804281fc0755eb726b654469c40a96d89:
>>>
>>> perf tools: cleanup initialization of attr->size (2012-02-13 23:35:04 -0200)
>>>
>>> ----------------------------------------------------------------
>>> perf/core fixes and improvements.
>>>
>>> Signed-off-by: Arnaldo Carvalho de Melo<acme@redhat.com>
>>>
>>
>> I've got a following error during a simple test:
>>
>> $ ./perf record -- sleep 1
>>
>> Error: sys_perf_event_open() syscall returned with 22 (Invalid argument).
>> /bin/dmesg may provide additional information.
>>
>> Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?
>>
>> sleep: Terminated
>>
>>
>> Any thoughts?
>>
>> Thanks,
>> Namhyung
>>
>
> git bisect told me:
>
> c4a7dca92bbb9881a5d678720f1d0c2153499749 is the first bad commit
> commit c4a7dca92bbb9881a5d678720f1d0c2153499749
> Author: Joerg Roedel<joerg.roedel@amd.com>
> Date:   Fri Feb 10 18:05:05 2012 +0100
>
>      perf tools: Change perf_guest default back to false
>
>      Setting perf_guest to true by default makes no sense because the perf
>      subcommands can not setup guest symbol information and thus not process
>      and guest samples. The only exception is perf-kvm which changes the
>      perf_guest value on its own.  So change the default for perf_guest back
>      to false.
>
>      Cc: David Ahern<dsahern@gmail.com>
>      Cc: Ingo Molnar<mingo@elte.hu>
>      Cc: Jason Wang<jasowang@redhat.com>
>      Cc: Paul Mackerras<paulus@samba.org>
>      Cc: Peter Zijlstra<a.p.zijlstra@chello.nl>
>      Link: http://lkml.kernel.org/r/1328893505-4115-3-git-send-email-joerg.roedel@amd.com
>      Signed-off-by: Joerg Roedel<joerg.roedel@amd.com>
>      Signed-off-by: Arnaldo Carvalho de Melo<acme@redhat.com>
>
> :040000 040000 64d65944c9081dfd9ace65dbc19fca655cbdc708 4f0e86ab85314ba68f2295ae1e599f3bb5ab9484 M      tools
>
>
> Thanks,
> Namhyung
>

It happened because I used old kernel version that isn't aware of the 
exclude_guest bit. So the check on attr->__reserved_1 in 
core.c::perf_copy_attr() failed and then ended up seeing EINVAL at 
perf_evsel__open().

So I think it should be handled in the same way of handling sample_id_all bit 
in perf record and top if we want to set perf_guest to false by default. I'll 
send patches for them soon.

Thanks,
Namhyung

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14  2:50 ` Namhyung Kim
@ 2012-02-14  3:07   ` Namhyung Kim
  2012-02-14  5:10     ` Namhyung Kim
  0 siblings, 1 reply; 59+ messages in thread
From: Namhyung Kim @ 2012-02-14  3:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-kernel, Ingo Molnar, Andi Kleen, Anshuman Khandual,
	Arun Sharma, Corey Ashford, David Ahern, Frederic Weisbecker,
	Jason Wang, Jiri Olsa, Joerg Roedel, Lin Ming, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Roberto Agostino Vitillo,
	Robert Richter, Stephane Eranian, Thomas Gleixner, Vince Weaver,
	arnaldo.melo, Arnaldo Carvalho de Melo

2012-02-14 오전 11:50, Namhyung Kim 쓴 글:
> Hello,
> 
> 2012-02-14 10:52 AM, Arnaldo Carvalho de Melo wrote:
>> The following changes since commit c98fdeaa92731308ed80386261fa2589addefa47:
>>
>> x86/sched/perf/AMD: Set sched_clock_stable (2012-02-07 13:12:08 +0100)
>>
>> are available in the git repository at:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf-core-for-mingo
>>
>> for you to fetch changes up to 7e1ccd3804281fc0755eb726b654469c40a96d89:
>>
>> perf tools: cleanup initialization of attr->size (2012-02-13 23:35:04 -0200)
>>
>> ----------------------------------------------------------------
>> perf/core fixes and improvements.
>>
>> Signed-off-by: Arnaldo Carvalho de Melo<acme@redhat.com>
>>
> 
> I've got a following error during a simple test:
> 
> $ ./perf record -- sleep 1
> 
> Error: sys_perf_event_open() syscall returned with 22 (Invalid argument).
> /bin/dmesg may provide additional information.
> 
> Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?
> 
> sleep: Terminated
> 
> 
> Any thoughts?
> 
> Thanks,
> Namhyung
> 

git bisect told me:

c4a7dca92bbb9881a5d678720f1d0c2153499749 is the first bad commit
commit c4a7dca92bbb9881a5d678720f1d0c2153499749
Author: Joerg Roedel <joerg.roedel@amd.com>
Date:   Fri Feb 10 18:05:05 2012 +0100

    perf tools: Change perf_guest default back to false

    Setting perf_guest to true by default makes no sense because the perf
    subcommands can not setup guest symbol information and thus not process
    and guest samples. The only exception is perf-kvm which changes the
    perf_guest value on its own.  So change the default for perf_guest back
    to false.

    Cc: David Ahern <dsahern@gmail.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Jason Wang <jasowang@redhat.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/1328893505-4115-3-git-send-email-joerg.roedel@amd.com
    Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

:040000 040000 64d65944c9081dfd9ace65dbc19fca655cbdc708 4f0e86ab85314ba68f2295ae1e599f3bb5ab9484 M      tools


Thanks,
Namhyung



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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2012-02-14  1:52 Arnaldo Carvalho de Melo
@ 2012-02-14  2:50 ` Namhyung Kim
  2012-02-14  3:07   ` Namhyung Kim
  0 siblings, 1 reply; 59+ messages in thread
From: Namhyung Kim @ 2012-02-14  2:50 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Andi Kleen, Anshuman Khandual,
	Arun Sharma, Corey Ashford, David Ahern, Frederic Weisbecker,
	Jason Wang, Jiri Olsa, Joerg Roedel, Lin Ming, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Roberto Agostino Vitillo,
	Robert Richter, Stephane Eranian, Thomas Gleixner, Vince Weaver,
	arnaldo.melo, Arnaldo Carvalho de Melo

Hello,

2012-02-14 10:52 AM, Arnaldo Carvalho de Melo wrote:
> The following changes since commit c98fdeaa92731308ed80386261fa2589addefa47:
>
>    x86/sched/perf/AMD: Set sched_clock_stable (2012-02-07 13:12:08 +0100)
>
> are available in the git repository at:
>
>    git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf-core-for-mingo
>
> for you to fetch changes up to 7e1ccd3804281fc0755eb726b654469c40a96d89:
>
>    perf tools: cleanup initialization of attr->size (2012-02-13 23:35:04 -0200)
>
> ----------------------------------------------------------------
> perf/core fixes and improvements.
>
> Signed-off-by: Arnaldo Carvalho de Melo<acme@redhat.com>
>

I've got a following error during a simple test:

  $ ./perf record -- sleep 1

    Error: sys_perf_event_open() syscall returned with 22 (Invalid argument).
           /bin/dmesg may provide additional information.

    Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?

  sleep: Terminated


Any thoughts?

Thanks,
Namhyung


> ----------------------------------------------------------------
> David Ahern (3):
>        perf record: No build id option fails
>        perf tools: Fix out of tree compiles
>        perf tools: Allow multiple threads or processes in record, stat, top
>
> Jiri Olsa (3):
>        perf tools: Remove unused functions from debugfs object
>        perf tools: Add sysfs mountpoint interface
>        perf tools: Add bitmap_or function into bitmap object
>
> Joerg Roedel (2):
>        perf top: Don't process samples with no valid machine object
>        perf tools: Change perf_guest default back to false
>
> Namhyung Kim (4):
>        perf tools: Fix build dependency of perf python extension
>        perf tools: Implement islower/isupper macro into util.h
>        perf tools: ctype.c only wants util.h
>        perf tools: Get rid of ctype.h in symbol.c
>
> Robert Richter (2):
>        perf tools: Moving code in header.c
>        perf tools: Factor out feature op to process header sections
>
> Stephane Eranian (2):
>        perf tools: fix endianness detection in perf.data
>        perf tools: cleanup initialization of attr->size
>
>   tools/perf/Documentation/perf-record.txt |    4 +-
>   tools/perf/Documentation/perf-stat.txt   |    4 +-
>   tools/perf/Documentation/perf-top.txt    |    4 +-
>   tools/perf/MANIFEST                      |    1 +
>   tools/perf/Makefile                      |    7 +-
>   tools/perf/builtin-record.c              |   14 +-
>   tools/perf/builtin-stat.c                |   31 ++-
>   tools/perf/builtin-test.c                |    2 -
>   tools/perf/builtin-top.c                 |   18 +-
>   tools/perf/perf.h                        |    5 +-
>   tools/perf/util/bitmap.c                 |   10 +
>   tools/perf/util/ctype.c                  |    2 +-
>   tools/perf/util/debugfs.c                |  141 ----------
>   tools/perf/util/debugfs.h                |    6 -
>   tools/perf/util/evlist.c                 |   10 +-
>   tools/perf/util/evlist.h                 |    4 +-
>   tools/perf/util/evsel.c                  |    2 +-
>   tools/perf/util/header.c                 |  421 +++++++++++++++++-------------
>   tools/perf/util/hist.h                   |    1 +
>   tools/perf/util/include/linux/bitmap.h   |   11 +
>   tools/perf/util/python-ext-sources       |   19 ++
>   tools/perf/util/session.c                |   10 +
>   tools/perf/util/setup.py                 |    8 +-
>   tools/perf/util/symbol.c                 |    2 +-
>   tools/perf/util/sysfs.c                  |   60 +++++
>   tools/perf/util/sysfs.h                  |    6 +
>   tools/perf/util/thread_map.c             |  128 +++++++++
>   tools/perf/util/thread_map.h             |    4 +
>   tools/perf/util/top.c                    |   10 +-
>   tools/perf/util/top.h                    |    2 +-
>   tools/perf/util/usage.c                  |    6 +-
>   tools/perf/util/util.c                   |    4 +-
>   tools/perf/util/util.h                   |    6 +-
>   33 files changed, 571 insertions(+), 392 deletions(-)
>   create mode 100644 tools/perf/util/python-ext-sources
>   create mode 100644 tools/perf/util/sysfs.c
>   create mode 100644 tools/perf/util/sysfs.h


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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2012-02-14  1:52 Arnaldo Carvalho de Melo
  2012-02-14  2:50 ` Namhyung Kim
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-02-14  1:52 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Anshuman Khandual, Arun Sharma, Corey Ashford, David Ahern,
	Frederic Weisbecker, Jason Wang, Jiri Olsa, Joerg Roedel,
	Lin Ming, Namhyung Kim, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Roberto Agostino Vitillo, Robert Richter,
	Stephane Eranian, Thomas Gleixner, Vince Weaver, arnaldo.melo,
	Arnaldo Carvalho de Melo

The following changes since commit c98fdeaa92731308ed80386261fa2589addefa47:

  x86/sched/perf/AMD: Set sched_clock_stable (2012-02-07 13:12:08 +0100)

are available in the git repository at:

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

for you to fetch changes up to 7e1ccd3804281fc0755eb726b654469c40a96d89:

  perf tools: cleanup initialization of attr->size (2012-02-13 23:35:04 -0200)

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

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

----------------------------------------------------------------
David Ahern (3):
      perf record: No build id option fails
      perf tools: Fix out of tree compiles
      perf tools: Allow multiple threads or processes in record, stat, top

Jiri Olsa (3):
      perf tools: Remove unused functions from debugfs object
      perf tools: Add sysfs mountpoint interface
      perf tools: Add bitmap_or function into bitmap object

Joerg Roedel (2):
      perf top: Don't process samples with no valid machine object
      perf tools: Change perf_guest default back to false

Namhyung Kim (4):
      perf tools: Fix build dependency of perf python extension
      perf tools: Implement islower/isupper macro into util.h
      perf tools: ctype.c only wants util.h
      perf tools: Get rid of ctype.h in symbol.c

Robert Richter (2):
      perf tools: Moving code in header.c
      perf tools: Factor out feature op to process header sections

Stephane Eranian (2):
      perf tools: fix endianness detection in perf.data
      perf tools: cleanup initialization of attr->size

 tools/perf/Documentation/perf-record.txt |    4 +-
 tools/perf/Documentation/perf-stat.txt   |    4 +-
 tools/perf/Documentation/perf-top.txt    |    4 +-
 tools/perf/MANIFEST                      |    1 +
 tools/perf/Makefile                      |    7 +-
 tools/perf/builtin-record.c              |   14 +-
 tools/perf/builtin-stat.c                |   31 ++-
 tools/perf/builtin-test.c                |    2 -
 tools/perf/builtin-top.c                 |   18 +-
 tools/perf/perf.h                        |    5 +-
 tools/perf/util/bitmap.c                 |   10 +
 tools/perf/util/ctype.c                  |    2 +-
 tools/perf/util/debugfs.c                |  141 ----------
 tools/perf/util/debugfs.h                |    6 -
 tools/perf/util/evlist.c                 |   10 +-
 tools/perf/util/evlist.h                 |    4 +-
 tools/perf/util/evsel.c                  |    2 +-
 tools/perf/util/header.c                 |  421 +++++++++++++++++-------------
 tools/perf/util/hist.h                   |    1 +
 tools/perf/util/include/linux/bitmap.h   |   11 +
 tools/perf/util/python-ext-sources       |   19 ++
 tools/perf/util/session.c                |   10 +
 tools/perf/util/setup.py                 |    8 +-
 tools/perf/util/symbol.c                 |    2 +-
 tools/perf/util/sysfs.c                  |   60 +++++
 tools/perf/util/sysfs.h                  |    6 +
 tools/perf/util/thread_map.c             |  128 +++++++++
 tools/perf/util/thread_map.h             |    4 +
 tools/perf/util/top.c                    |   10 +-
 tools/perf/util/top.h                    |    2 +-
 tools/perf/util/usage.c                  |    6 +-
 tools/perf/util/util.c                   |    4 +-
 tools/perf/util/util.h                   |    6 +-
 33 files changed, 571 insertions(+), 392 deletions(-)
 create mode 100644 tools/perf/util/python-ext-sources
 create mode 100644 tools/perf/util/sysfs.c
 create mode 100644 tools/perf/util/sysfs.h

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

* Re: [GIT PULL 00/16] perf/core improvements and fixes
  2011-09-29 22:47 Arnaldo Carvalho de Melo
@ 2011-10-04  7:57 ` Ingo Molnar
  0 siblings, 0 replies; 59+ messages in thread
From: Ingo Molnar @ 2011-10-04  7:57 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Andi Kleen, David Ahern, Frederic Weisbecker,
	Jim Cromie, Jiri Olsa, Mike Galbraith, Neil Horman,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Thomas Gleixner, arnaldo.melo


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

> Hi Ingo,
> 
>         Please consider pulling from:
> 
> git://github.com/acmel/linux.git perf/core
> 
> 	This was rebased against your perf/core on tesla.
> 
> Regards,
> 
> - Arnaldo
> 
> Andi Kleen (2):
>   perf tools: Make stat/record print fatal signals of the target program
>   perf: Support setting the disassembler style
> 
> Arnaldo Carvalho de Melo (6):
>   perf symbols: Stop using 'self' in map_groups__ methods
>   perf buildid-list: Add option to show the running kernel build id
>   perf buildid-list: Support showing the build id in an ELF file
>   perf top browser: Fix up line width calculation
>   perf top: Improve lost events warning
>   perf report: Fix stdio event name header printing
> 
> Jim Cromie (5):
>   perf stat: Add --log-fd <N> option to redirect stderr elsewhere
>   perf stat: Fix +- nan% in --no-aggr runs
>   perf stat: Suppress printing std-dev when its 0
>   perf stat: Allow tab as cvs delimiter
>   perf stat: Fix spelling in comment
> 
> Jiri Olsa (2):
>   perf sched: Fix script command documentation
>   perf symbols: Treat all memory maps without dso file as loaded
> 
> Neil Horman (1):
>   perf script: Add drop monitor script
> 
>  tools/perf/Documentation/perf-annotate.txt         |    3 +
>  tools/perf/Documentation/perf-buildid-list.txt     |    6 +
>  tools/perf/Documentation/perf-report.txt           |    3 +
>  tools/perf/Documentation/perf-sched.txt            |    6 +-
>  tools/perf/Documentation/perf-stat.txt             |   11 ++-
>  tools/perf/builtin-annotate.c                      |    2 +
>  tools/perf/builtin-buildid-list.c                  |   52 ++++++++++-
>  tools/perf/builtin-record.c                        |   19 ++++-
>  tools/perf/builtin-report.c                        |    7 +-
>  tools/perf/builtin-stat.c                          |   35 ++++++-
>  tools/perf/builtin-top.c                           |   34 ++++----
>  .../perf/scripts/python/bin/net_dropmonitor-record |    2 +
>  .../perf/scripts/python/bin/net_dropmonitor-report |    4 +
>  tools/perf/scripts/python/net_dropmonitor.py       |   72 ++++++++++++++
>  tools/perf/util/annotate.c                         |    6 +-
>  tools/perf/util/annotate.h                         |    2 +
>  tools/perf/util/map.c                              |   98 +++++++++++---------
>  tools/perf/util/map.h                              |   42 ++++----
>  tools/perf/util/top.h                              |    3 +
>  tools/perf/util/ui/browsers/top.c                  |   28 +++++-
>  20 files changed, 333 insertions(+), 102 deletions(-)
>  create mode 100755 tools/perf/scripts/python/bin/net_dropmonitor-record
>  create mode 100755 tools/perf/scripts/python/bin/net_dropmonitor-report
>  create mode 100755 tools/perf/scripts/python/net_dropmonitor.py

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/16] perf/core improvements and fixes
@ 2011-09-29 22:47 Arnaldo Carvalho de Melo
  2011-10-04  7:57 ` Ingo Molnar
  0 siblings, 1 reply; 59+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-09-29 22:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, David Ahern,
	Frederic Weisbecker, Jim Cromie, Jiri Olsa, Mike Galbraith,
	Neil Horman, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Thomas Gleixner, arnaldo.melo

Hi Ingo,

        Please consider pulling from:

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

	This was rebased against your perf/core on tesla.

Regards,

- Arnaldo

Andi Kleen (2):
  perf tools: Make stat/record print fatal signals of the target program
  perf: Support setting the disassembler style

Arnaldo Carvalho de Melo (6):
  perf symbols: Stop using 'self' in map_groups__ methods
  perf buildid-list: Add option to show the running kernel build id
  perf buildid-list: Support showing the build id in an ELF file
  perf top browser: Fix up line width calculation
  perf top: Improve lost events warning
  perf report: Fix stdio event name header printing

Jim Cromie (5):
  perf stat: Add --log-fd <N> option to redirect stderr elsewhere
  perf stat: Fix +- nan% in --no-aggr runs
  perf stat: Suppress printing std-dev when its 0
  perf stat: Allow tab as cvs delimiter
  perf stat: Fix spelling in comment

Jiri Olsa (2):
  perf sched: Fix script command documentation
  perf symbols: Treat all memory maps without dso file as loaded

Neil Horman (1):
  perf script: Add drop monitor script

 tools/perf/Documentation/perf-annotate.txt         |    3 +
 tools/perf/Documentation/perf-buildid-list.txt     |    6 +
 tools/perf/Documentation/perf-report.txt           |    3 +
 tools/perf/Documentation/perf-sched.txt            |    6 +-
 tools/perf/Documentation/perf-stat.txt             |   11 ++-
 tools/perf/builtin-annotate.c                      |    2 +
 tools/perf/builtin-buildid-list.c                  |   52 ++++++++++-
 tools/perf/builtin-record.c                        |   19 ++++-
 tools/perf/builtin-report.c                        |    7 +-
 tools/perf/builtin-stat.c                          |   35 ++++++-
 tools/perf/builtin-top.c                           |   34 ++++----
 .../perf/scripts/python/bin/net_dropmonitor-record |    2 +
 .../perf/scripts/python/bin/net_dropmonitor-report |    4 +
 tools/perf/scripts/python/net_dropmonitor.py       |   72 ++++++++++++++
 tools/perf/util/annotate.c                         |    6 +-
 tools/perf/util/annotate.h                         |    2 +
 tools/perf/util/map.c                              |   98 +++++++++++---------
 tools/perf/util/map.h                              |   42 ++++----
 tools/perf/util/top.h                              |    3 +
 tools/perf/util/ui/browsers/top.c                  |   28 +++++-
 20 files changed, 333 insertions(+), 102 deletions(-)
 create mode 100755 tools/perf/scripts/python/bin/net_dropmonitor-record
 create mode 100755 tools/perf/scripts/python/bin/net_dropmonitor-report
 create mode 100755 tools/perf/scripts/python/net_dropmonitor.py


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

end of thread, other threads:[~2019-01-08 15:32 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-23 20:57 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 01/16] perf test: Clarify the "sample parsing" test entry Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 02/16] perf test: Consider PERF_SAMPLE_TRANSACTION in the "sample parsing" test Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 03/16] perf tools: Stop using 'self' in some more places Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 04/16] perf probe: Support "$vars" meta argument syntax for local variables Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 05/16] perf probe: Find fentry mcount fuzzed parameter location Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 06/16] perf bench: Change the procps visible command-name of invididual benchmark tests plus cleanups Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 07/16] perf sched: Make struct perf_sched sched a local variable Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 08/16] perf sched: Optimize build time Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 09/16] perf script: Make perf_script a local variable Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 10/16] perf inject: Do not repipe attributes to a perf.data file Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 11/16] perf tools: Do not accept parse_tag_value() overflow Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 12/16] perf evlist: Validate that mmap_pages is not too big Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 13/16] perf tools: Fix non-debug build Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 14/16] perf ui: Rename ui_progress to ui_progress_ops Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 15/16] perf ui progress: Per progress bar state Arnaldo Carvalho de Melo
2013-10-23 20:58 ` [PATCH 16/16] perf tools: Show progress on histogram collapsing Arnaldo Carvalho de Melo
2013-10-24  6:52 ` [GIT PULL 00/16] perf/core improvements and fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2019-01-04 18:33 Arnaldo Carvalho de Melo
2019-01-08 15:32 ` Ingo Molnar
2016-07-05  0:38 Arnaldo Carvalho de Melo
2016-07-05 10:14 ` Ingo Molnar
2016-01-29 21:17 Arnaldo Carvalho de Melo
2016-01-29 21:17 ` Arnaldo Carvalho de Melo
2016-02-03 10:02 ` Ingo Molnar
2016-02-03 10:02   ` Ingo Molnar
2015-12-14 17:44 Arnaldo Carvalho de Melo
2015-10-05 21:03 Arnaldo Carvalho de Melo
2015-10-06  7:09 ` Ingo Molnar
2015-09-30 21:54 Arnaldo Carvalho de Melo
2015-10-01  7:05 ` Ingo Molnar
2015-08-25 16:14 Arnaldo Carvalho de Melo
2015-08-26 13:39 ` Arnaldo Carvalho de Melo
2015-04-07 16:40 Arnaldo Carvalho de Melo
2015-04-07 16:40 ` Arnaldo Carvalho de Melo
2014-11-19 16:03 Arnaldo Carvalho de Melo
2014-11-20  7:33 ` Ingo Molnar
2014-08-22 16:29 Arnaldo Carvalho de Melo
2014-08-24 10:11 ` Ingo Molnar
2014-08-24 11:16   ` Arnaldo Carvalho de Melo
2014-08-24 14:47     ` Ingo Molnar
2014-03-14 21:29 Arnaldo Carvalho de Melo
2014-03-18  8:24 ` Ingo Molnar
2013-11-18 20:27 Arnaldo Carvalho de Melo
2012-02-14  1:52 Arnaldo Carvalho de Melo
2012-02-14  2:50 ` Namhyung Kim
2012-02-14  3:07   ` Namhyung Kim
2012-02-14  5:10     ` Namhyung Kim
2012-02-14  5:23       ` David Ahern
2012-02-14  5:48         ` Namhyung Kim
2012-02-14  5:52           ` David Ahern
2012-02-14  5:58             ` Namhyung Kim
2012-02-14 10:50         ` Joerg Roedel
2012-02-14 13:10           ` Arnaldo Carvalho de Melo
2012-02-14 14:38             ` Arnaldo Carvalho de Melo
2012-02-14 15:10               ` Joerg Roedel
2012-02-14 16:11                 ` Arnaldo Carvalho de Melo
2011-09-29 22:47 Arnaldo Carvalho de Melo
2011-10-04  7:57 ` 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.