linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 0/4] perf/urgent fixes
@ 2013-10-28 19:16 Arnaldo Carvalho de Melo
  2013-10-28 19:16 ` [PATCH 1/4] perf hists: Add color overhead for stdio output buffer Arnaldo Carvalho de Melo
                   ` (4 more replies)
  0 siblings, 5 replies; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-28 19:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Corey Ashford, David Ahern, Frederic Weisbecker,
	Ingo Molnar, Jiri Olsa, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Zhouyi Zhou, Arnaldo Carvalho de Melo

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit d17cccbea95933a2ab3e260fab128f5128c9371f:

  Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2013-10-28 15:56:50 +0100)

are available in the git repository at:


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

for you to fetch changes up to 8e50d384cc1d5afd2989cf0f7093756ed7164eb2:

  perf tools: Fixup mmap event consumption (2013-10-28 16:06:00 -0300)

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

. Add color overhead for stdio output buffer, which fixes
  --stdio output being chopped up on the hot (red) entries,
  fix from Jiri Olsa.

. Get 'perf record -g -a sleep 1' working again, removing the
  need for -- separating perf options from the workload, restoring
  ages old behaviour, fix from Jiri Olsa.
  More patches allowing ~/.perfconfig setting up of default
  callchain collecting method ("fp" or "dwarf") left for next
  merge window.

. Fixup mmap event consumption, where we were acking the
  consumption by writing the tail before actually accessing
  the event, which could lead to using overwritten records
  in things like 'perf record --call-graph'.  from Zhouyi Zhou.

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

----------------------------------------------------------------
Jiri Olsa (3):
      perf hists: Add color overhead for stdio output buffer
      perf record: Split -g and --call-graph
      perf top: Split -G and --call-graph

Zhouyi Zhou (1):
      perf tools: Fixup mmap event consumption

 tools/perf/Documentation/perf-record.txt  | 14 +++++-
 tools/perf/Documentation/perf-top.txt     | 18 +++-----
 tools/perf/builtin-kvm.c                  |  7 +++
 tools/perf/builtin-record.c               | 73 +++++++++++++++++++++----------
 tools/perf/builtin-top.c                  | 33 ++++++++------
 tools/perf/builtin-trace.c                |  8 ++--
 tools/perf/tests/code-reading.c           |  1 +
 tools/perf/tests/keep-tracking.c          |  1 +
 tools/perf/tests/mmap-basic.c             |  1 +
 tools/perf/tests/open-syscall-tp-fields.c |  4 +-
 tools/perf/tests/perf-record.c            |  2 +
 tools/perf/tests/perf-time-to-tsc.c       |  4 +-
 tools/perf/tests/sw-clock.c               |  4 +-
 tools/perf/tests/task-exit.c              |  6 +--
 tools/perf/ui/stdio/hist.c                |  9 ++--
 tools/perf/util/callchain.h               |  3 ++
 tools/perf/util/evlist.c                  | 13 ++++--
 tools/perf/util/evlist.h                  |  2 +
 tools/perf/util/hist.h                    | 13 ++++++
 tools/perf/util/python.c                  |  2 +
 20 files changed, 151 insertions(+), 67 deletions(-)

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

* [PATCH 1/4] perf hists: Add color overhead for stdio output buffer
  2013-10-28 19:16 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
@ 2013-10-28 19:16 ` Arnaldo Carvalho de Melo
  2013-10-28 19:16 ` [PATCH 2/4] perf record: Split -g and --call-graph Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-28 19:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Adrian Hunter, Corey Ashford,
	David Ahern, Frederic Weisbecker, Ingo Molnar, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Following commit tightened up the buffer size for output to strict width
of used format columns:

  99cf666 perf hists: Fix formatting of long symbol names

This works fine until you hit color overhead output which places extra
bytes into output buffer. We need to account for color overhead in the
output buffer. Adding maximum color byte size to the output buffer size.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1382700293-1803-1-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/stdio/hist.c |  9 ++++-----
 tools/perf/util/hist.h     | 13 +++++++++++++
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index 194e2f42ff5d..6c152686e837 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -315,8 +315,7 @@ static inline void advance_hpp(struct perf_hpp *hpp, int inc)
 }
 
 static int hist_entry__period_snprintf(struct perf_hpp *hpp,
-				       struct hist_entry *he,
-				       bool color)
+				       struct hist_entry *he)
 {
 	const char *sep = symbol_conf.field_sep;
 	struct perf_hpp_fmt *fmt;
@@ -338,7 +337,7 @@ static int hist_entry__period_snprintf(struct perf_hpp *hpp,
 		} else
 			first = false;
 
-		if (color && fmt->color)
+		if (perf_hpp__use_color() && fmt->color)
 			ret = fmt->color(fmt, hpp, he);
 		else
 			ret = fmt->entry(fmt, hpp, he);
@@ -358,12 +357,11 @@ static int hist_entry__fprintf(struct hist_entry *he, size_t size,
 		.buf		= bf,
 		.size		= size,
 	};
-	bool color = !symbol_conf.field_sep;
 
 	if (size == 0 || size > bfsz)
 		size = hpp.size = bfsz;
 
-	ret = hist_entry__period_snprintf(&hpp, he, color);
+	ret = hist_entry__period_snprintf(&hpp, he);
 	hist_entry__sort_snprintf(he, bf + ret, size - ret, hists);
 
 	ret = fprintf(fp, "%s\n", bf);
@@ -482,6 +480,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
 
 print_entries:
 	linesz = hists__sort_list_width(hists) + 3 + 1;
+	linesz += perf_hpp__color_overhead();
 	line = malloc(linesz);
 	if (line == NULL) {
 		ret = -1;
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 1329b6b6ffe6..ce8dc61ce2c3 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 "color.h"
 
 extern struct callchain_param callchain_param;
 
@@ -175,6 +176,18 @@ void perf_hpp__init(void);
 void perf_hpp__column_register(struct perf_hpp_fmt *format);
 void perf_hpp__column_enable(unsigned col);
 
+static inline size_t perf_hpp__use_color(void)
+{
+	return !symbol_conf.field_sep;
+}
+
+static inline size_t perf_hpp__color_overhead(void)
+{
+	return perf_hpp__use_color() ?
+	       (COLOR_MAXLEN + sizeof(PERF_COLOR_RESET)) * PERF_HPP__MAX_INDEX
+	       : 0;
+}
+
 struct perf_evlist;
 
 struct hist_browser_timer {
-- 
1.8.1.4


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

* [PATCH 2/4] perf record: Split -g and --call-graph
  2013-10-28 19:16 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
  2013-10-28 19:16 ` [PATCH 1/4] perf hists: Add color overhead for stdio output buffer Arnaldo Carvalho de Melo
@ 2013-10-28 19:16 ` Arnaldo Carvalho de Melo
  2013-10-28 19:16 ` [PATCH 3/4] perf top: Split -G " Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-28 19:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Adrian Hunter, Andi Kleen,
	Corey Ashford, David Ahern, Ingo Molnar, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Splitting -g and --call-graph for record command, so we could use '-g'
with no option.

The '-g' option now takes NO argument and enables the configured unwind
method, which is currently the frame pointers method.

It will be possible to configure unwind method via config file in
upcoming patches.

All current '-g' arguments is overtaken by --call-graph option.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: David Ahern <dsahern@gmail.com>
Tested-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: David Ahern <dsahern@gmail.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1382797536-32303-2-git-send-email-jolsa@redhat.com
[ reordered -g/--call-graph on --help and expanded the man page
  according to comments by David Ahern and Namhyung Kim ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-record.txt | 14 +++++-
 tools/perf/builtin-record.c              | 73 ++++++++++++++++++++++----------
 tools/perf/util/callchain.h              |  3 ++
 3 files changed, 67 insertions(+), 23 deletions(-)

diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index e297b74471b8..ca0d3d9f4bac 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -90,8 +90,20 @@ OPTIONS
 	Number of mmap data pages. Must be a power of two.
 
 -g::
+	Enables call-graph (stack chain/backtrace) recording.
+
 --call-graph::
-	Do call-graph (stack chain/backtrace) recording.
+	Setup and enable call-graph (stack chain/backtrace) recording,
+	implies -g.
+
+	Allows specifying "fp" (frame pointer) or "dwarf"
+	(DWARF's CFI - Call Frame Information) as the method to collect
+	the information used to show the call graphs.
+
+	In some systems, where binaries are build with gcc
+	--fomit-frame-pointer, using the "fp" method will produce bogus
+	call graphs, using "dwarf", if available (perf tools linked to
+	the libunwind library) should be used instead.
 
 -q::
 --quiet::
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index a41ac41546c9..d04651484640 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -712,21 +712,12 @@ static int get_stack_size(char *str, unsigned long *_size)
 }
 #endif /* LIBUNWIND_SUPPORT */
 
-int record_parse_callchain_opt(const struct option *opt,
-			       const char *arg, int unset)
+int record_parse_callchain(const char *arg, struct perf_record_opts *opts)
 {
-	struct perf_record_opts *opts = opt->value;
 	char *tok, *name, *saveptr = NULL;
 	char *buf;
 	int ret = -1;
 
-	/* --no-call-graph */
-	if (unset)
-		return 0;
-
-	/* We specified default option if none is provided. */
-	BUG_ON(!arg);
-
 	/* We need buffer that we know we can write to. */
 	buf = malloc(strlen(arg) + 1);
 	if (!buf)
@@ -764,13 +755,9 @@ int record_parse_callchain_opt(const struct option *opt,
 				ret = get_stack_size(tok, &size);
 				opts->stack_dump_size = size;
 			}
-
-			if (!ret)
-				pr_debug("callchain: stack dump size %d\n",
-					 opts->stack_dump_size);
 #endif /* LIBUNWIND_SUPPORT */
 		} else {
-			pr_err("callchain: Unknown -g option "
+			pr_err("callchain: Unknown --call-graph option "
 			       "value: %s\n", arg);
 			break;
 		}
@@ -778,13 +765,52 @@ int record_parse_callchain_opt(const struct option *opt,
 	} while (0);
 
 	free(buf);
+	return ret;
+}
+
+static void callchain_debug(struct perf_record_opts *opts)
+{
+	pr_debug("callchain: type %d\n", opts->call_graph);
 
+	if (opts->call_graph == CALLCHAIN_DWARF)
+		pr_debug("callchain: stack dump size %d\n",
+			 opts->stack_dump_size);
+}
+
+int record_parse_callchain_opt(const struct option *opt,
+			       const char *arg,
+			       int unset)
+{
+	struct perf_record_opts *opts = opt->value;
+	int ret;
+
+	/* --no-call-graph */
+	if (unset) {
+		opts->call_graph = CALLCHAIN_NONE;
+		pr_debug("callchain: disabled\n");
+		return 0;
+	}
+
+	ret = record_parse_callchain(arg, opts);
 	if (!ret)
-		pr_debug("callchain: type %d\n", opts->call_graph);
+		callchain_debug(opts);
 
 	return ret;
 }
 
+int record_callchain_opt(const struct option *opt,
+			 const char *arg __maybe_unused,
+			 int unset __maybe_unused)
+{
+	struct perf_record_opts *opts = opt->value;
+
+	if (opts->call_graph == CALLCHAIN_NONE)
+		opts->call_graph = CALLCHAIN_FP;
+
+	callchain_debug(opts);
+	return 0;
+}
+
 static const char * const record_usage[] = {
 	"perf record [<options>] [<command>]",
 	"perf record [<options>] -- <command> [<options>]",
@@ -813,12 +839,12 @@ static struct perf_record record = {
 	},
 };
 
-#define CALLCHAIN_HELP "do call-graph (stack chain/backtrace) recording: "
+#define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace) recording: "
 
 #ifdef LIBUNWIND_SUPPORT
-const char record_callchain_help[] = CALLCHAIN_HELP "[fp] dwarf";
+const char record_callchain_help[] = CALLCHAIN_HELP "fp dwarf";
 #else
-const char record_callchain_help[] = CALLCHAIN_HELP "[fp]";
+const char record_callchain_help[] = CALLCHAIN_HELP "fp";
 #endif
 
 /*
@@ -858,9 +884,12 @@ const struct option record_options[] = {
 		     "number of mmap data pages"),
 	OPT_BOOLEAN(0, "group", &record.opts.group,
 		    "put the counters into a counter group"),
-	OPT_CALLBACK_DEFAULT('g', "call-graph", &record.opts,
-			     "mode[,dump_size]", record_callchain_help,
-			     &record_parse_callchain_opt, "fp"),
+	OPT_CALLBACK_NOOPT('g', NULL, &record.opts,
+			   NULL, "enables call-graph recording" ,
+			   &record_callchain_opt),
+	OPT_CALLBACK(0, "call-graph", &record.opts,
+		     "mode[,dump_size]", record_callchain_help,
+		     &record_parse_callchain_opt),
 	OPT_INCR('v', "verbose", &verbose,
 		    "be more verbose (show counter open errors, etc)"),
 	OPT_BOOLEAN('q', "quiet", &quiet, "don't print any message"),
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index 2b585bc308cf..9e99060408ae 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -147,6 +147,9 @@ static inline void callchain_cursor_advance(struct callchain_cursor *cursor)
 
 struct option;
 
+int record_parse_callchain(const char *arg, struct perf_record_opts *opts);
 int record_parse_callchain_opt(const struct option *opt, const char *arg, int unset);
+int record_callchain_opt(const struct option *opt, const char *arg, int unset);
+
 extern const char record_callchain_help[];
 #endif	/* __PERF_CALLCHAIN_H */
-- 
1.8.1.4


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

* [PATCH 3/4] perf top: Split -G and --call-graph
  2013-10-28 19:16 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
  2013-10-28 19:16 ` [PATCH 1/4] perf hists: Add color overhead for stdio output buffer Arnaldo Carvalho de Melo
  2013-10-28 19:16 ` [PATCH 2/4] perf record: Split -g and --call-graph Arnaldo Carvalho de Melo
@ 2013-10-28 19:16 ` Arnaldo Carvalho de Melo
  2013-10-28 19:16 ` [PATCH 4/4] perf tools: Fixup mmap event consumption Arnaldo Carvalho de Melo
  2013-10-29  8:10 ` [GIT PULL 0/4] perf/urgent fixes Ingo Molnar
  4 siblings, 0 replies; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-28 19:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Adrian Hunter, Andi Kleen,
	Corey Ashford, David Ahern, Ingo Molnar, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Splitting -G and --call-graph for record command, so we could use '-G'
with no option.

The '-G' option now takes NO argument and enables the configured unwind
method, which is currently the frame pointers method.

It will be possible to configure unwind method via config file in
upcoming patches.

All current '-G' arguments is overtaken by --call-graph option.

NOTE: The documentation for top --call-graph option
      was wrongly copied from report command.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: David Ahern <dsahern@gmail.com>
Tested-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: David Ahern <dsahern@gmail.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1382797536-32303-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-top.txt | 18 +++++-------------
 tools/perf/builtin-top.c              | 23 +++++++++++++----------
 2 files changed, 18 insertions(+), 23 deletions(-)

diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index 58d6598a9686..6a118e71d003 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -140,20 +140,12 @@ Default is to monitor all CPUS.
 --asm-raw::
 	Show raw instruction encoding of assembly instructions.
 
--G [type,min,order]::
+-G::
+	Enables call-graph (stack chain/backtrace) recording.
+
 --call-graph::
-        Display call chains using type, min percent threshold and order.
-	type can be either:
-	- flat: single column, linear exposure of call chains.
-	- graph: use a graph tree, displaying absolute overhead rates.
-	- fractal: like graph, but displays relative rates. Each branch of
-		 the tree is considered as a new profiled object.
-
-	order can be either:
-	- callee: callee based call graph.
-	- caller: inverted caller based call graph.
-
-	Default: fractal,0.5,callee.
+	Setup and enable call-graph (stack chain/backtrace) recording,
+	implies -G.
 
 --ignore-callees=<regex>::
         Ignore callees of the function(s) matching the given regex.
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 212214162bb2..0df298a0e946 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1016,16 +1016,16 @@ out_delete:
 }
 
 static int
-parse_callchain_opt(const struct option *opt, const char *arg, int unset)
+callchain_opt(const struct option *opt, const char *arg, int unset)
 {
-	/*
-	 * --no-call-graph
-	 */
-	if (unset)
-		return 0;
-
 	symbol_conf.use_callchain = true;
+	return record_callchain_opt(opt, arg, unset);
+}
 
+static int
+parse_callchain_opt(const struct option *opt, const char *arg, int unset)
+{
+	symbol_conf.use_callchain = true;
 	return record_parse_callchain_opt(opt, arg, unset);
 }
 
@@ -1106,9 +1106,12 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
 		   "sort by key(s): pid, comm, dso, symbol, parent, weight, local_weight"),
 	OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples,
 		    "Show a column with the number of samples"),
-	OPT_CALLBACK_DEFAULT('G', "call-graph", &top.record_opts,
-			     "mode[,dump_size]", record_callchain_help,
-			     &parse_callchain_opt, "fp"),
+	OPT_CALLBACK_NOOPT('G', NULL, &top.record_opts,
+			   NULL, "enables call-graph recording",
+			   &callchain_opt),
+	OPT_CALLBACK(0, "call-graph", &top.record_opts,
+		     "mode[,dump_size]", record_callchain_help,
+		     &parse_callchain_opt),
 	OPT_CALLBACK(0, "ignore-callees", NULL, "regex",
 		   "ignore callees of these functions in call graphs",
 		   report_parse_ignore_callees_opt),
-- 
1.8.1.4


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

* [PATCH 4/4] perf tools: Fixup mmap event consumption
  2013-10-28 19:16 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2013-10-28 19:16 ` [PATCH 3/4] perf top: Split -G " Arnaldo Carvalho de Melo
@ 2013-10-28 19:16 ` Arnaldo Carvalho de Melo
  2013-10-29  8:10 ` [GIT PULL 0/4] perf/urgent fixes Ingo Molnar
  4 siblings, 0 replies; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-28 19:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Zhouyi Zhou, Zhouyi Zhou, David Ahern,
	Arnaldo Carvalho de Melo

From: Zhouyi Zhou <zhouzhouyi@gmail.com>

The tail position of the event buffer should only be modified after
actually use that event.

If not the event buffer could be invalid before use, and segment fault
occurs when invoking perf top -G.

Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
Cc: David Ahern <dsahern@gmail.com>
Cc: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
Link: http://lkml.kernel.org/r/1382600613-32177-1-git-send-email-zhouzhouyi@gmail.com
[ Simplified the logic using exit gotos and renamed write_tail method to mmap_consume ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-kvm.c                  |  7 +++++++
 tools/perf/builtin-top.c                  | 10 ++++++----
 tools/perf/builtin-trace.c                |  8 +++++---
 tools/perf/tests/code-reading.c           |  1 +
 tools/perf/tests/keep-tracking.c          |  1 +
 tools/perf/tests/mmap-basic.c             |  1 +
 tools/perf/tests/open-syscall-tp-fields.c |  4 +++-
 tools/perf/tests/perf-record.c            |  2 ++
 tools/perf/tests/perf-time-to-tsc.c       |  4 +++-
 tools/perf/tests/sw-clock.c               |  4 +++-
 tools/perf/tests/task-exit.c              |  6 +++---
 tools/perf/util/evlist.c                  | 13 ++++++++++---
 tools/perf/util/evlist.h                  |  2 ++
 tools/perf/util/python.c                  |  2 ++
 14 files changed, 49 insertions(+), 16 deletions(-)

diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 935d52216c89..fbc2888d6495 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -888,11 +888,18 @@ static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx,
 	while ((event = perf_evlist__mmap_read(kvm->evlist, idx)) != NULL) {
 		err = perf_evlist__parse_sample(kvm->evlist, event, &sample);
 		if (err) {
+			perf_evlist__mmap_consume(kvm->evlist, idx);
 			pr_err("Failed to parse sample\n");
 			return -1;
 		}
 
 		err = perf_session_queue_event(kvm->session, event, &sample, 0);
+		/*
+		 * FIXME: Here we can't consume the event, as perf_session_queue_event will
+		 *        point to it, and it'll get possibly overwritten by the kernel.
+		 */
+		perf_evlist__mmap_consume(kvm->evlist, idx);
+
 		if (err) {
 			pr_err("Failed to enqueue sample: %d\n", err);
 			return -1;
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 0df298a0e946..5a11f13e56f9 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -810,7 +810,7 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
 		ret = perf_evlist__parse_sample(top->evlist, event, &sample);
 		if (ret) {
 			pr_err("Can't parse sample, err = %d\n", ret);
-			continue;
+			goto next_event;
 		}
 
 		evsel = perf_evlist__id2evsel(session->evlist, sample.id);
@@ -825,13 +825,13 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
 		case PERF_RECORD_MISC_USER:
 			++top->us_samples;
 			if (top->hide_user_symbols)
-				continue;
+				goto next_event;
 			machine = &session->machines.host;
 			break;
 		case PERF_RECORD_MISC_KERNEL:
 			++top->kernel_samples;
 			if (top->hide_kernel_symbols)
-				continue;
+				goto next_event;
 			machine = &session->machines.host;
 			break;
 		case PERF_RECORD_MISC_GUEST_KERNEL:
@@ -847,7 +847,7 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
 			 */
 			/* Fall thru */
 		default:
-			continue;
+			goto next_event;
 		}
 
 
@@ -859,6 +859,8 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
 			machine__process_event(machine, event);
 		} else
 			++session->stats.nr_unknown_events;
+next_event:
+		perf_evlist__mmap_consume(top->evlist, idx);
 	}
 }
 
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 71aa3e35406b..99c8d9ad6729 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -987,7 +987,7 @@ again:
 			err = perf_evlist__parse_sample(evlist, event, &sample);
 			if (err) {
 				fprintf(trace->output, "Can't parse sample, err = %d, skipping...\n", err);
-				continue;
+				goto next_event;
 			}
 
 			if (trace->base_time == 0)
@@ -1001,18 +1001,20 @@ again:
 			evsel = perf_evlist__id2evsel(evlist, sample.id);
 			if (evsel == NULL) {
 				fprintf(trace->output, "Unknown tp ID %" PRIu64 ", skipping...\n", sample.id);
-				continue;
+				goto next_event;
 			}
 
 			if (sample.raw_data == NULL) {
 				fprintf(trace->output, "%s sample with no payload for tid: %d, cpu %d, raw_size=%d, skipping...\n",
 				       perf_evsel__name(evsel), sample.tid,
 				       sample.cpu, sample.raw_size);
-				continue;
+				goto next_event;
 			}
 
 			handler = evsel->handler.func;
 			handler(trace, evsel, &sample);
+next_event:
+			perf_evlist__mmap_consume(evlist, i);
 
 			if (done)
 				goto out_unmap_evlist;
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 6fb781d5586c..e3fedfa2906e 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -290,6 +290,7 @@ static int process_events(struct machine *machine, struct perf_evlist *evlist,
 	for (i = 0; i < evlist->nr_mmaps; i++) {
 		while ((event = perf_evlist__mmap_read(evlist, i)) != NULL) {
 			ret = process_event(machine, evlist, event, state);
+			perf_evlist__mmap_consume(evlist, i);
 			if (ret < 0)
 				return ret;
 		}
diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c
index d444ea2c47d9..376c35608534 100644
--- a/tools/perf/tests/keep-tracking.c
+++ b/tools/perf/tests/keep-tracking.c
@@ -36,6 +36,7 @@ static int find_comm(struct perf_evlist *evlist, const char *comm)
 			    (pid_t)event->comm.tid == getpid() &&
 			    strcmp(event->comm.comm, comm) == 0)
 				found += 1;
+			perf_evlist__mmap_consume(evlist, i);
 		}
 	}
 	return found;
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c
index c4185b9aeb80..a7232c204eb9 100644
--- a/tools/perf/tests/mmap-basic.c
+++ b/tools/perf/tests/mmap-basic.c
@@ -122,6 +122,7 @@ int test__basic_mmap(void)
 			goto out_munmap;
 		}
 		nr_events[evsel->idx]++;
+		perf_evlist__mmap_consume(evlist, 0);
 	}
 
 	err = 0;
diff --git a/tools/perf/tests/open-syscall-tp-fields.c b/tools/perf/tests/open-syscall-tp-fields.c
index fc5b9fca8b47..524b221b829b 100644
--- a/tools/perf/tests/open-syscall-tp-fields.c
+++ b/tools/perf/tests/open-syscall-tp-fields.c
@@ -77,8 +77,10 @@ int test__syscall_open_tp_fields(void)
 
 				++nr_events;
 
-				if (type != PERF_RECORD_SAMPLE)
+				if (type != PERF_RECORD_SAMPLE) {
+					perf_evlist__mmap_consume(evlist, i);
 					continue;
+				}
 
 				err = perf_evsel__parse_sample(evsel, event, &sample);
 				if (err) {
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c
index b8a7056519ac..7923b06ffc91 100644
--- a/tools/perf/tests/perf-record.c
+++ b/tools/perf/tests/perf-record.c
@@ -263,6 +263,8 @@ int test__PERF_RECORD(void)
 						 type);
 					++errs;
 				}
+
+				perf_evlist__mmap_consume(evlist, i);
 			}
 		}
 
diff --git a/tools/perf/tests/perf-time-to-tsc.c b/tools/perf/tests/perf-time-to-tsc.c
index 0ab61b1f408e..4ca1b938f6a6 100644
--- a/tools/perf/tests/perf-time-to-tsc.c
+++ b/tools/perf/tests/perf-time-to-tsc.c
@@ -122,7 +122,7 @@ int test__perf_time_to_tsc(void)
 			if (event->header.type != PERF_RECORD_COMM ||
 			    (pid_t)event->comm.pid != getpid() ||
 			    (pid_t)event->comm.tid != getpid())
-				continue;
+				goto next_event;
 
 			if (strcmp(event->comm.comm, comm1) == 0) {
 				CHECK__(perf_evsel__parse_sample(evsel, event,
@@ -134,6 +134,8 @@ int test__perf_time_to_tsc(void)
 								 &sample));
 				comm2_time = sample.time;
 			}
+next_event:
+			perf_evlist__mmap_consume(evlist, i);
 		}
 	}
 
diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
index 2e41e2d32ccc..6e2b44ec0749 100644
--- a/tools/perf/tests/sw-clock.c
+++ b/tools/perf/tests/sw-clock.c
@@ -78,7 +78,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 		struct perf_sample sample;
 
 		if (event->header.type != PERF_RECORD_SAMPLE)
-			continue;
+			goto next_event;
 
 		err = perf_evlist__parse_sample(evlist, event, &sample);
 		if (err < 0) {
@@ -88,6 +88,8 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 
 		total_periods += sample.period;
 		nr_samples++;
+next_event:
+		perf_evlist__mmap_consume(evlist, 0);
 	}
 
 	if ((u64) nr_samples == total_periods) {
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c
index 28fe5894b061..a3e64876e940 100644
--- a/tools/perf/tests/task-exit.c
+++ b/tools/perf/tests/task-exit.c
@@ -96,10 +96,10 @@ int test__task_exit(void)
 
 retry:
 	while ((event = perf_evlist__mmap_read(evlist, 0)) != NULL) {
-		if (event->header.type != PERF_RECORD_EXIT)
-			continue;
+		if (event->header.type == PERF_RECORD_EXIT)
+			nr_exit++;
 
-		nr_exit++;
+		perf_evlist__mmap_consume(evlist, 0);
 	}
 
 	if (!exited || !nr_exit) {
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index f9f77bee0b1b..e584cd30b0f2 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -545,12 +545,19 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx)
 
 	md->prev = old;
 
-	if (!evlist->overwrite)
-		perf_mmap__write_tail(md, old);
-
 	return event;
 }
 
+void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx)
+{
+	if (!evlist->overwrite) {
+		struct perf_mmap *md = &evlist->mmap[idx];
+		unsigned int old = md->prev;
+
+		perf_mmap__write_tail(md, old);
+	}
+}
+
 static void __perf_evlist__munmap(struct perf_evlist *evlist, int idx)
 {
 	if (evlist->mmap[idx].base != NULL) {
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index 880d7139d2fb..206d09339306 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -89,6 +89,8 @@ struct perf_sample_id *perf_evlist__id2sid(struct perf_evlist *evlist, u64 id);
 
 union perf_event *perf_evlist__mmap_read(struct perf_evlist *self, int idx);
 
+void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx);
+
 int perf_evlist__open(struct perf_evlist *evlist);
 void perf_evlist__close(struct perf_evlist *evlist);
 
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index 71b5412bbbb9..2ac4bc92bb1f 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -822,6 +822,8 @@ static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist,
 		PyObject *pyevent = pyrf_event__new(event);
 		struct pyrf_event *pevent = (struct pyrf_event *)pyevent;
 
+		perf_evlist__mmap_consume(evlist, cpu);
+
 		if (pyevent == NULL)
 			return PyErr_NoMemory();
 
-- 
1.8.1.4


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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2013-10-28 19:16 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2013-10-28 19:16 ` [PATCH 4/4] perf tools: Fixup mmap event consumption Arnaldo Carvalho de Melo
@ 2013-10-29  8:10 ` Ingo Molnar
  4 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2013-10-29  8:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Corey Ashford, David Ahern, Frederic Weisbecker,
	Ingo Molnar, Jiri Olsa, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Zhouyi Zhou, 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 d17cccbea95933a2ab3e260fab128f5128c9371f:
> 
>   Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2013-10-28 15:56:50 +0100)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to 8e50d384cc1d5afd2989cf0f7093756ed7164eb2:
> 
>   perf tools: Fixup mmap event consumption (2013-10-28 16:06:00 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> . Add color overhead for stdio output buffer, which fixes
>   --stdio output being chopped up on the hot (red) entries,
>   fix from Jiri Olsa.
> 
> . Get 'perf record -g -a sleep 1' working again, removing the
>   need for -- separating perf options from the workload, restoring
>   ages old behaviour, fix from Jiri Olsa.
>   More patches allowing ~/.perfconfig setting up of default
>   callchain collecting method ("fp" or "dwarf") left for next
>   merge window.
> 
> . Fixup mmap event consumption, where we were acking the
>   consumption by writing the tail before actually accessing
>   the event, which could lead to using overwritten records
>   in things like 'perf record --call-graph'.  from Zhouyi Zhou.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Jiri Olsa (3):
>       perf hists: Add color overhead for stdio output buffer
>       perf record: Split -g and --call-graph
>       perf top: Split -G and --call-graph
> 
> Zhouyi Zhou (1):
>       perf tools: Fixup mmap event consumption
> 
>  tools/perf/Documentation/perf-record.txt  | 14 +++++-
>  tools/perf/Documentation/perf-top.txt     | 18 +++-----
>  tools/perf/builtin-kvm.c                  |  7 +++
>  tools/perf/builtin-record.c               | 73 +++++++++++++++++++++----------
>  tools/perf/builtin-top.c                  | 33 ++++++++------
>  tools/perf/builtin-trace.c                |  8 ++--
>  tools/perf/tests/code-reading.c           |  1 +
>  tools/perf/tests/keep-tracking.c          |  1 +
>  tools/perf/tests/mmap-basic.c             |  1 +
>  tools/perf/tests/open-syscall-tp-fields.c |  4 +-
>  tools/perf/tests/perf-record.c            |  2 +
>  tools/perf/tests/perf-time-to-tsc.c       |  4 +-
>  tools/perf/tests/sw-clock.c               |  4 +-
>  tools/perf/tests/task-exit.c              |  6 +--
>  tools/perf/ui/stdio/hist.c                |  9 ++--
>  tools/perf/util/callchain.h               |  3 ++
>  tools/perf/util/evlist.c                  | 13 ++++--
>  tools/perf/util/evlist.h                  |  2 +
>  tools/perf/util/hist.h                    | 13 ++++++
>  tools/perf/util/python.c                  |  2 +
>  20 files changed, 151 insertions(+), 67 deletions(-)

Pulled, thanks Arnaldo!

	Ingo

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2018-06-02 14:59 Arnaldo Carvalho de Melo
@ 2018-06-03 17:12 ` Ingo Molnar
  0 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2018-06-03 17:12 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
	Borislav Petkov, David Ahern, Jiri Olsa, Konrad Rzeszutek Wilk,
	Masami Hiramatsu, Namhyung Kim, Thomas Gleixner, Tom Lendacky,
	Wang Nan, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 6497bbc35ac5efce3bccd31d3719bae020282da6:
> 
>   Merge tag 'perf-urgent-for-mingo-4.17-20180531' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2018-05-31 12:37:07 +0200)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-4.17-20180602
> 
> for you to fetch changes up to 0b3a18387f3e5cdcfaaf884860a4688280d09c9d:
> 
>   perf tools intel-pt-decoder: Update insn.h from the kernel sources (2018-06-01 16:13:18 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> - Update prctl and cpufeatures.h tools/ copies with the kernel sources
>   originals, which makes 'perf trace' know about the new prctl options
>   for speculation control and silences the build warnings (Arnaldo Carvalho de Melo)
> 
> - Update insn.h in Intel-PT instruction decoder with its original from from the
>   kernel sources, to silence build warnings, no effect on the actual tools this
>   time around (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
>       perf trace beauty prctl: Default header_dir to cwd to work without parms
>       tools headers: Synchronize prctl.h ABI header
>       tools headers: Sync x86 cpufeatures.h with the kernel sources
>       perf tools intel-pt-decoder: Update insn.h from the kernel sources
> 
>  tools/arch/x86/include/asm/cpufeatures.h | 20 ++++++++++++++------
>  tools/include/uapi/linux/prctl.h         | 12 ++++++++++++
>  tools/perf/trace/beauty/prctl_option.sh  |  2 +-
>  tools/perf/util/intel-pt-decoder/insn.h  | 18 ++++++++++++++++++
>  4 files changed, 45 insertions(+), 7 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2018-06-02 14:59 Arnaldo Carvalho de Melo
  2018-06-03 17:12 ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-02 14:59 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter, Borislav Petkov,
	David Ahern, Jiri Olsa, Konrad Rzeszutek Wilk, Masami Hiramatsu,
	Namhyung Kim, Thomas Gleixner, Tom Lendacky, Wang Nan,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit 6497bbc35ac5efce3bccd31d3719bae020282da6:

  Merge tag 'perf-urgent-for-mingo-4.17-20180531' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2018-05-31 12:37:07 +0200)

are available in the Git repository at:

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

for you to fetch changes up to 0b3a18387f3e5cdcfaaf884860a4688280d09c9d:

  perf tools intel-pt-decoder: Update insn.h from the kernel sources (2018-06-01 16:13:18 -0300)

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

- Update prctl and cpufeatures.h tools/ copies with the kernel sources
  originals, which makes 'perf trace' know about the new prctl options
  for speculation control and silences the build warnings (Arnaldo Carvalho de Melo)

- Update insn.h in Intel-PT instruction decoder with its original from from the
  kernel sources, to silence build warnings, no effect on the actual tools this
  time around (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
      perf trace beauty prctl: Default header_dir to cwd to work without parms
      tools headers: Synchronize prctl.h ABI header
      tools headers: Sync x86 cpufeatures.h with the kernel sources
      perf tools intel-pt-decoder: Update insn.h from the kernel sources

 tools/arch/x86/include/asm/cpufeatures.h | 20 ++++++++++++++------
 tools/include/uapi/linux/prctl.h         | 12 ++++++++++++
 tools/perf/trace/beauty/prctl_option.sh  |  2 +-
 tools/perf/util/intel-pt-decoder/insn.h  | 18 ++++++++++++++++++
 4 files changed, 45 insertions(+), 7 deletions(-)

Test results:

The first ones are container (docker) based builds of tools/perf with
and without libelf support.  Where clang is available, it is also used
to build perf with/without libelf, 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:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
     6 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
     7 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
     8 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
     9 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
    10 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
    11 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
    12 centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
    13 debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
    14 debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u1) 4.9.2
    15 debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
    16 debian:experimental           : Ok   gcc (Debian 7.3.0-19) 7.3.0
    17 debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
    18 debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
    19 debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 7.3.0-18) 7.3.0
    20 debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
    21 fedora:20                     : Ok   gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
    22 fedora:21                     : Ok   gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
    23 fedora:22                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
    24 fedora:23                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
    25 fedora:24                     : Ok   gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
    26 fedora:24-x-ARC-uClibc        : Ok   arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
    27 fedora:25                     : Ok   gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
    28 fedora:26                     : Ok   gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
    29 fedora:27                     : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
    30 fedora:28                     : Ok   gcc (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)
    31 fedora:rawhide                : Ok   gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
    32 gentoo-stage3-amd64:latest    : Ok   gcc (Gentoo 6.4.0-r1 p1.3) 6.4.0
    33 mageia:5                      : Ok   gcc (GCC) 4.9.2
    34 mageia:6                      : Ok   gcc (Mageia 5.5.0-1.mga6) 5.5.0
    35 opensuse:42.1                 : Ok   gcc (SUSE Linux) 4.8.5
    36 opensuse:42.2                 : Ok   gcc (SUSE Linux) 4.8.5
    37 opensuse:42.3                 : Ok   gcc (SUSE Linux) 4.8.5
    38 opensuse:tumbleweed           : Ok   gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
    39 oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18.0.7)
    40 oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)
    41 ubuntu:12.04.5                : Ok   gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
    42 ubuntu:14.04.4                : Ok   gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
    43 ubuntu:14.04.4-x-linaro-arm64 : Ok   aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0
    44 ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
    45 ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
    46 ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
    47 ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
    48 ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
    49 ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
    50 ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
    51 ubuntu:16.10                  : Ok   gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
    52 ubuntu:17.04                  : Ok   gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
    53 ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
    54 ubuntu:18.04                  : Ok   gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  # 

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

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2017-05-04 17:23 Arnaldo Carvalho de Melo
@ 2017-05-04 17:44 ` Ingo Molnar
  0 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2017-05-04 17:44 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin, Chris Riyder,
	David Ahern, Jiri Olsa, Kim Phillips, Namhyung Kim,
	Peter Zijlstra, Wang Nan, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 12c1c2fd780a9a5581105fcb6f251466cf35af2a:
> 
>   Merge tag 'perf-core-for-mingo-4.12-20170503' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2017-05-03 19:28:27 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-4.12-20170504
> 
> for you to fetch changes up to 1e6e7eae8a3a66f5fee4f44ef165ffcf31f0c40e:
> 
>   tools build: Fixup sched_getcpu feature test (2017-05-04 10:30:40 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> User visible:
> 
> - Fix AArch64 objdump disasm comment char in 'perf annotate' (Kim Phillips)
> 
> - Fix documentation spelling mistakes (Kim Phillips)
> 
> - Don't fail 'perf test kmod-path' if compressed modules aren't
>   supported (Kim Phillips)
> 
> Infrastructure:
> 
> - Fix sched_getcpu feature test when included in test-all.c redefining
>   _GNU_SOURCE (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (1):
>       tools build: Fixup sched_getcpu feature test
> 
> Kim Phillips (3):
>       perf tools: Fix spelling mistakes
>       perf annotate: Fix AArch64 comment char
>       perf tests kmod-path: Don't fail if compressed modules aren't supported
> 
>  tools/build/feature/test-sched_getcpu.c            | 2 ++
>  tools/perf/Documentation/perf-c2c.txt              | 4 ++--
>  tools/perf/Documentation/perf-record.txt           | 2 +-
>  tools/perf/Documentation/perf-report.txt           | 6 +++---
>  tools/perf/Documentation/perf.data-file-format.txt | 4 ++--
>  tools/perf/Documentation/tips.txt                  | 2 +-
>  tools/perf/arch/arm64/annotate/instructions.c      | 2 +-
>  tools/perf/tests/kmod-path.c                       | 2 ++
>  tools/perf/util/event.h                            | 2 +-
>  9 files changed, 15 insertions(+), 11 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2017-05-04 17:23 Arnaldo Carvalho de Melo
  2017-05-04 17:44 ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-05-04 17:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Chris Riyder, David Ahern, Jiri Olsa,
	Kim Phillips, Namhyung Kim, Peter Zijlstra, Wang Nan,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit 12c1c2fd780a9a5581105fcb6f251466cf35af2a:

  Merge tag 'perf-core-for-mingo-4.12-20170503' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2017-05-03 19:28:27 +0200)

are available in the git repository at:

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

for you to fetch changes up to 1e6e7eae8a3a66f5fee4f44ef165ffcf31f0c40e:

  tools build: Fixup sched_getcpu feature test (2017-05-04 10:30:40 -0300)

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

User visible:

- Fix AArch64 objdump disasm comment char in 'perf annotate' (Kim Phillips)

- Fix documentation spelling mistakes (Kim Phillips)

- Don't fail 'perf test kmod-path' if compressed modules aren't
  supported (Kim Phillips)

Infrastructure:

- Fix sched_getcpu feature test when included in test-all.c redefining
  _GNU_SOURCE (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (1):
      tools build: Fixup sched_getcpu feature test

Kim Phillips (3):
      perf tools: Fix spelling mistakes
      perf annotate: Fix AArch64 comment char
      perf tests kmod-path: Don't fail if compressed modules aren't supported

 tools/build/feature/test-sched_getcpu.c            | 2 ++
 tools/perf/Documentation/perf-c2c.txt              | 4 ++--
 tools/perf/Documentation/perf-record.txt           | 2 +-
 tools/perf/Documentation/perf-report.txt           | 6 +++---
 tools/perf/Documentation/perf.data-file-format.txt | 4 ++--
 tools/perf/Documentation/tips.txt                  | 2 +-
 tools/perf/arch/arm64/annotate/instructions.c      | 2 +-
 tools/perf/tests/kmod-path.c                       | 2 ++
 tools/perf/util/event.h                            | 2 +-
 9 files changed, 15 insertions(+), 11 deletions(-)

Test results:

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

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

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

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

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

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

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2016-01-26 14:32 Arnaldo Carvalho de Melo
@ 2016-01-30  8:16 ` Ingo Molnar
  0 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2016-01-30  8:16 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Ben Hutchings, David Ahern, Don Zickus, Jiri Olsa,
	Markus Trippelsdorf, Matt Fleming, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 45c815f06b80031659c63d7b93e580015d6024dd:
> 
>   perf: Synchronously free aux pages in case of allocation failure (2016-01-21 18:54:27 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to 3f416f22d1e21709a631189ba169f76fd267b374:
> 
>   perf stat: Do not clean event's private stats (2016-01-26 11:15:11 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> User visible:
> 
> - Fix 'perf stat' stddev reporting due to mistakenly cleaning event
>   private stats (Jiri Olsa)
> 
> - Fix 'perf test CQM' endless loop detected by 'gcc6 -Wmisleading-indentation'
>   (Markus Trippelsdorf)
> 
> - Fix behaviour of Shift-Tab when nothing is focussed in the annotate TUI browser,
>   detected with gcc6 -Wmisleading-indentation (Markus Trippelsdorf)
> 
> - Fix mem data cacheline hists browser width setting for unresolved
>   addresses (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Jiri Olsa (2):
>       perf hists: Fix HISTC_MEM_DCACHELINE width setting
>       perf stat: Do not clean event's private stats
> 
> Markus Trippelsdorf (2):
>       perf tests: Remove wrong semicolon in while loop in CQM test
>       perf annotate browser: Fix behaviour of Shift-Tab with nothing focussed
> 
>  tools/perf/arch/x86/tests/intel-cqm.c | 2 +-
>  tools/perf/ui/browsers/annotate.c     | 4 ++--
>  tools/perf/util/hist.c                | 2 ++
>  tools/perf/util/stat.c                | 1 -
>  4 files changed, 5 insertions(+), 4 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2016-01-26 14:32 Arnaldo Carvalho de Melo
  2016-01-30  8:16 ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-01-26 14:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Ben Hutchings,
	David Ahern, Don Zickus, Jiri Olsa, Markus Trippelsdorf,
	Matt Fleming, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 45c815f06b80031659c63d7b93e580015d6024dd:

  perf: Synchronously free aux pages in case of allocation failure (2016-01-21 18:54:27 +0100)

are available in the git repository at:

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

for you to fetch changes up to 3f416f22d1e21709a631189ba169f76fd267b374:

  perf stat: Do not clean event's private stats (2016-01-26 11:15:11 -0300)

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

User visible:

- Fix 'perf stat' stddev reporting due to mistakenly cleaning event
  private stats (Jiri Olsa)

- Fix 'perf test CQM' endless loop detected by 'gcc6 -Wmisleading-indentation'
  (Markus Trippelsdorf)

- Fix behaviour of Shift-Tab when nothing is focussed in the annotate TUI browser,
  detected with gcc6 -Wmisleading-indentation (Markus Trippelsdorf)

- Fix mem data cacheline hists browser width setting for unresolved
  addresses (Jiri Olsa)

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

----------------------------------------------------------------
Jiri Olsa (2):
      perf hists: Fix HISTC_MEM_DCACHELINE width setting
      perf stat: Do not clean event's private stats

Markus Trippelsdorf (2):
      perf tests: Remove wrong semicolon in while loop in CQM test
      perf annotate browser: Fix behaviour of Shift-Tab with nothing focussed

 tools/perf/arch/x86/tests/intel-cqm.c | 2 +-
 tools/perf/ui/browsers/annotate.c     | 4 ++--
 tools/perf/util/hist.c                | 2 ++
 tools/perf/util/stat.c                | 1 -
 4 files changed, 5 insertions(+), 4 deletions(-)

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2015-08-19 19:40 Arnaldo Carvalho de Melo
@ 2015-08-20  9:48 ` Ingo Molnar
  0 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2015-08-20  9:48 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Linus Torvalds, Namhyung Kim,
	Stephane Eranian, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit d7a702f0b1033cf402fef65bd6395072738f0844:
> 
>   perf/x86/intel/cqm: Do not access cpu_data() from CPU_UP_PREPARE handler (2015-08-12 11:37:23 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to 09f4d78ab0af0973e1a49c10eb7bf977c68cc3aa:
> 
>   perf top: Show backtrace when handling a SIGSEGV on --stdio mode (2015-08-19 15:16:08 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> User visible:
> 
> - Fix buildid processing done at the end of a 'perf record' session, a
>   problem that happened in workloads involving lots of small short-lived
>   processes.  That code was not asking the perf_session layer to order
>   the events.
> 
>   Make the code more robust to handle some of the problems with such
>   out-of-order events and fix 'perf record' to ask for ordered events
>   on systems where we have perf_event_attr.sample_id_all.  (Adrian Hunter)
> 
> - Show backtrace when handling a SIGSEGV in 'perf top --stdio' (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (3):
>       perf tools: Avoid deadlock when map_groups are broken
>       perf tools: Make fork event processing more resilient
>       perf tools: Fix buildid processing
> 
> Arnaldo Carvalho de Melo (1):
>       perf top: Show backtrace when handling a SIGSEGV on --stdio mode
> 
>  tools/perf/builtin-record.c | 11 +++++++++++
>  tools/perf/builtin-top.c    |  4 ++--
>  tools/perf/util/machine.c   | 20 ++++++++++++++++++--
>  tools/perf/util/thread.c    |  6 ++++++
>  4 files changed, 37 insertions(+), 4 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2015-08-19 19:40 Arnaldo Carvalho de Melo
  2015-08-20  9:48 ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-08-19 19:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Linus Torvalds, Namhyung Kim, Stephane Eranian,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit d7a702f0b1033cf402fef65bd6395072738f0844:

  perf/x86/intel/cqm: Do not access cpu_data() from CPU_UP_PREPARE handler (2015-08-12 11:37:23 +0200)

are available in the git repository at:

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

for you to fetch changes up to 09f4d78ab0af0973e1a49c10eb7bf977c68cc3aa:

  perf top: Show backtrace when handling a SIGSEGV on --stdio mode (2015-08-19 15:16:08 -0300)

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

User visible:

- Fix buildid processing done at the end of a 'perf record' session, a
  problem that happened in workloads involving lots of small short-lived
  processes.  That code was not asking the perf_session layer to order
  the events.

  Make the code more robust to handle some of the problems with such
  out-of-order events and fix 'perf record' to ask for ordered events
  on systems where we have perf_event_attr.sample_id_all.  (Adrian Hunter)

- Show backtrace when handling a SIGSEGV in 'perf top --stdio' (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Adrian Hunter (3):
      perf tools: Avoid deadlock when map_groups are broken
      perf tools: Make fork event processing more resilient
      perf tools: Fix buildid processing

Arnaldo Carvalho de Melo (1):
      perf top: Show backtrace when handling a SIGSEGV on --stdio mode

 tools/perf/builtin-record.c | 11 +++++++++++
 tools/perf/builtin-top.c    |  4 ++--
 tools/perf/util/machine.c   | 20 ++++++++++++++++++--
 tools/perf/util/thread.c    |  6 ++++++
 4 files changed, 37 insertions(+), 4 deletions(-)

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2015-07-09 15:45 Arnaldo Carvalho de Melo
@ 2015-07-10  8:04 ` Ingo Molnar
  0 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2015-07-10  8:04 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, David Ahern,
	Frederic Weisbecker, Jiri Olsa, linux-kbuild, Namhyung Kim,
	Peter Zijlstra, Riku Voipio, Stephane Eranian, Vinson Lee,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit ebf2d2689de551d90965090bb991fc640a0c0d41:
> 
>   perf/x86: Fix copy_from_user_nmi() return if range is not ok (2015-07-06 14:09:27 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to 08ae217b8d44986062fe3648c5bb83816d5bc00f:
> 
>   perf thread_map: Fix the sizeof() calculation for map entries (2015-07-09 12:28:53 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> User visible:
> 
> - Fix 'perf top -u username', where not enough memory per thread_map
>   entry was being allocated nor was being initialized, causing a
>   segfault (Arnaldo Carvalho de Melo)
> 
> - Fix locking lockup using 32-bit compat vdso (Adrian Hunter)
> 
> Developer stuff:
> 
> - Fix shadow declaration of close with older build environments (Jiri Olsa)
> 
> - Make the 'clean' target do a better job, removing some more
>   temp files (Riku Voipio)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf tools: Fix lockup using 32-bit compat vdso
> 
> Arnaldo Carvalho de Melo (1):
>       perf thread_map: Fix the sizeof() calculation for map entries
> 
> Jiri Olsa (1):
>       perf stat: Fix shadow declaration of close
> 
> Riku Voipio (1):
>       tools lib: Improve clean target
> 
>  tools/lib/api/Makefile        | 2 +-
>  tools/lib/traceevent/Makefile | 2 +-
>  tools/perf/builtin-stat.c     | 4 ++--
>  tools/perf/util/thread_map.c  | 3 +--
>  tools/perf/util/vdso.c        | 8 +++-----
>  5 files changed, 8 insertions(+), 11 deletions(-)

Pulled this and the second round of fixes, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2015-07-09 15:45 Arnaldo Carvalho de Melo
  2015-07-10  8:04 ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-07-09 15:45 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Frederic Weisbecker, Jiri Olsa,
	linux-kbuild, Namhyung Kim, Peter Zijlstra, Riku Voipio,
	Stephane Eranian, Vinson Lee, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit ebf2d2689de551d90965090bb991fc640a0c0d41:

  perf/x86: Fix copy_from_user_nmi() return if range is not ok (2015-07-06 14:09:27 +0200)

are available in the git repository at:

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

for you to fetch changes up to 08ae217b8d44986062fe3648c5bb83816d5bc00f:

  perf thread_map: Fix the sizeof() calculation for map entries (2015-07-09 12:28:53 -0300)

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

User visible:

- Fix 'perf top -u username', where not enough memory per thread_map
  entry was being allocated nor was being initialized, causing a
  segfault (Arnaldo Carvalho de Melo)

- Fix locking lockup using 32-bit compat vdso (Adrian Hunter)

Developer stuff:

- Fix shadow declaration of close with older build environments (Jiri Olsa)

- Make the 'clean' target do a better job, removing some more
  temp files (Riku Voipio)

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

----------------------------------------------------------------
Adrian Hunter (1):
      perf tools: Fix lockup using 32-bit compat vdso

Arnaldo Carvalho de Melo (1):
      perf thread_map: Fix the sizeof() calculation for map entries

Jiri Olsa (1):
      perf stat: Fix shadow declaration of close

Riku Voipio (1):
      tools lib: Improve clean target

 tools/lib/api/Makefile        | 2 +-
 tools/lib/traceevent/Makefile | 2 +-
 tools/perf/builtin-stat.c     | 4 ++--
 tools/perf/util/thread_map.c  | 3 +--
 tools/perf/util/vdso.c        | 8 +++-----
 5 files changed, 8 insertions(+), 11 deletions(-)

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2015-04-24 16:02     ` Arnaldo Carvalho de Melo
@ 2015-04-24 16:05       ` Will Deacon
  0 siblings, 0 replies; 46+ messages in thread
From: Will Deacon @ 2015-04-24 16:05 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Javi Merino, Namhyung Kim, Ingo Molnar, linux-kernel,
	Adrian Hunter, Bobby Powers, Borislav Petkov, David Ahern,
	Dirk Gouders, Don Zickus, Frederic Weisbecker, Jiri Olsa,
	Joonsoo Kim, linux-kbuild, Michael Petlan, Michal Marek,
	Minchan Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Steven Rostedt

On Fri, Apr 24, 2015 at 05:02:17PM +0100, Arnaldo Carvalho de Melo wrote:
> Em Fri, Apr 24, 2015 at 09:59:18AM +0100, Javi Merino escreveu:
> > On Fri, Apr 24, 2015 at 03:02:18AM +0100, Namhyung Kim wrote:
> > > Hi Arnaldo,
> > > 
> > > I've set up some docker containers for build test, and found a couple
> > > of failures..  It seems David's kmem build fix ("perf kmem: Fix
> > > compiles on RHEL6/OL6") which is in your perf/core branch also needs
> > > to be in perf/urgent.  Sorry about the kmem breakages..
> > > 
> > > And I also found this..
> 
> Applied both, some more?

The only issue remaining for arm/arm64 is the /proc/cpuinfo parsing, which
ends up with us passing -jN to Make, where N is 5 or 6 times the number of
CPUs in the system.

  http://permalink.gmane.org/gmane.linux.kernel/1936575

Will

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2015-04-24  8:59   ` Javi Merino
@ 2015-04-24 16:02     ` Arnaldo Carvalho de Melo
  2015-04-24 16:05       ` Will Deacon
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-24 16:02 UTC (permalink / raw)
  To: Javi Merino
  Cc: Namhyung Kim, Ingo Molnar, linux-kernel, Adrian Hunter,
	Bobby Powers, Borislav Petkov, David Ahern, Dirk Gouders,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Joonsoo Kim,
	linux-kbuild, Michael Petlan, Michal Marek, Minchan Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian, Will Deacon,
	Steven Rostedt

Em Fri, Apr 24, 2015 at 09:59:18AM +0100, Javi Merino escreveu:
> On Fri, Apr 24, 2015 at 03:02:18AM +0100, Namhyung Kim wrote:
> > Hi Arnaldo,
> > 
> > I've set up some docker containers for build test, and found a couple
> > of failures..  It seems David's kmem build fix ("perf kmem: Fix
> > compiles on RHEL6/OL6") which is in your perf/core branch also needs
> > to be in perf/urgent.  Sorry about the kmem breakages..
> > 
> > And I also found this..

Applied both, some more?

- Arnaldo

> > 
> > From 581ae7f48c89377755391c3f95637a1d48eefc73 Mon Sep 17 00:00:00 2001
> > From: Namhyung Kim <namhyung@kernel.org>
> > Date: Fri, 24 Apr 2015 10:45:16 +0900
> > Subject: [PATCH] tools lib traceevent: Fix build failure on 32-bit arch
> > 
> > In my i386 build, it failed like this:
> > 
> >     CC       event-parse.o
> >   event-parse.c: In function 'print_str_arg':
> >   event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
> >                         but argument 3 has type 'uint64_t' [-Wformat]
> > 
> > Cc: Javi Merino <javi.merino@arm.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> >  tools/lib/traceevent/event-parse.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> > index 12a7e2a40c89..aa21bd55bd8a 100644
> > --- a/tools/lib/traceevent/event-parse.c
> > +++ b/tools/lib/traceevent/event-parse.c
> > @@ -3865,7 +3865,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
> >  			} else if (el_size == 4) {
> >  				trace_seq_printf(s, "%u", *(uint32_t *)num);
> >  			} else if (el_size == 8) {
> > -				trace_seq_printf(s, "%lu", *(uint64_t *)num);
> > +				trace_seq_printf(s, "%"PRIu64, *(uint64_t *)num);
> 
> Didn't know about PRIu64 and friends.  FWIW,
> 
> Acked-by: Javi Merino <javi.merino@arm.com>
> 
> While you are at it, you could also fix the previous "%u" to "%"PRIu32
> 
> >  			} else {
> >  				trace_seq_printf(s, "BAD SIZE:%d 0x%x",
> >  						 el_size, *(uint8_t *)num);
> > -- 
> > 2.3.4
> > 
> > 
> > Thanks,
> > Namhyung
> > 
> > 
> > On Thu, Apr 23, 2015 at 07:03:06PM -0300, Arnaldo Carvalho de Melo wrote:
> > > Hi Ingo,
> > > 
> > > 	Please consider pulling,
> > > 
> > > - Arnaldo
> > > 
> > > The following changes since commit 0140e6141e4f1d4b15fb469e6912b0e71b7d1cc2:
> > > 
> > >   perf/x86/intel/uncore: Move PCI IDs for IMC to uncore driver (2015-04-22 08:29:19 +0200)
> > > 
> > > are available in the git repository at:
> > > 
> > >   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> > > 
> > > for you to fetch changes up to de28c15daf60e9625bece22f13a091fac8d05f1d:
> > > 
> > >   tools lib api: Undefine _FORTIFY_SOURCE before setting it (2015-04-23 17:08:23 -0300)
> > > 
> > > ----------------------------------------------------------------
> > > perf/urgent fixes:
> > > 
> > > User visible:
> > > 
> > > - Enable events when doing system wide 'trace' and starting a
> > >   workload, e.g:
> > > 
> > >    # trace -a sleep 1
> > > 
> > >   now it matches the pattern in 'record' and will show envents
> > >   instead of sitting doing nothing while waiting for the started
> > >   workload to finish (Arnaldo Carvalho de Melo)
> > > 
> > > - Disable and drain events when forked 'trace' workload ends
> > >   making sure we notice the end of the workload instead of
> > >   trying to keep up with the seemingly neverending flux of
> > >   system wide events (Arnaldo Carvalho de Melo)
> > > 
> > > Infrastructure:
> > > 
> > > - Fix the build on 32-bit ARM by consistently use PRIu64 for printing u64
> > >   values in 'perf kmem' (Will Deacon)
> > > 
> > > - Undefine _FORTIFY_SOURCE before setting it in tools/perf/api, fixing the build on
> > >   Hardened Gentoo systems (Bobby Powers)
> > > 
> > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > 
> > > ----------------------------------------------------------------
> > > Arnaldo Carvalho de Melo (2):
> > >       perf trace: Enable events when doing system wide tracing and starting a workload
> > >       perf trace: Disable events and drain events when forked workload ends
> > > 
> > > Bobby Powers (1):
> > >       tools lib api: Undefine _FORTIFY_SOURCE before setting it
> > > 
> > > Will Deacon (1):
> > >       perf kmem: Consistently use PRIu64 for printing u64 values
> > > 
> > >  tools/lib/api/Makefile     |  2 +-
> > >  tools/perf/builtin-kmem.c  |  4 ++--
> > >  tools/perf/builtin-trace.c | 10 ++++++++--
> > >  3 files changed, 11 insertions(+), 5 deletions(-)
> > > --
> > > 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] 46+ messages in thread

* Re: [GIT PULL 0/4] perf/urgent fixes
  2015-04-24  2:02 ` Namhyung Kim
  2015-04-24  2:09   ` Arnaldo Carvalho de Melo
@ 2015-04-24  8:59   ` Javi Merino
  2015-04-24 16:02     ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 46+ messages in thread
From: Javi Merino @ 2015-04-24  8:59 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel,
	Adrian Hunter, Bobby Powers, Borislav Petkov, David Ahern,
	Dirk Gouders, Don Zickus, Frederic Weisbecker, Jiri Olsa,
	Joonsoo Kim, linux-kbuild, Michael Petlan, Michal Marek,
	Minchan Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Will Deacon, Arnaldo Carvalho de Melo, Steven Rostedt

On Fri, Apr 24, 2015 at 03:02:18AM +0100, Namhyung Kim wrote:
> Hi Arnaldo,
> 
> I've set up some docker containers for build test, and found a couple
> of failures..  It seems David's kmem build fix ("perf kmem: Fix
> compiles on RHEL6/OL6") which is in your perf/core branch also needs
> to be in perf/urgent.  Sorry about the kmem breakages..
> 
> And I also found this..
> 
> 
> From 581ae7f48c89377755391c3f95637a1d48eefc73 Mon Sep 17 00:00:00 2001
> From: Namhyung Kim <namhyung@kernel.org>
> Date: Fri, 24 Apr 2015 10:45:16 +0900
> Subject: [PATCH] tools lib traceevent: Fix build failure on 32-bit arch
> 
> In my i386 build, it failed like this:
> 
>     CC       event-parse.o
>   event-parse.c: In function 'print_str_arg':
>   event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
>                         but argument 3 has type 'uint64_t' [-Wformat]
> 
> Cc: Javi Merino <javi.merino@arm.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  tools/lib/traceevent/event-parse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index 12a7e2a40c89..aa21bd55bd8a 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -3865,7 +3865,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
>  			} else if (el_size == 4) {
>  				trace_seq_printf(s, "%u", *(uint32_t *)num);
>  			} else if (el_size == 8) {
> -				trace_seq_printf(s, "%lu", *(uint64_t *)num);
> +				trace_seq_printf(s, "%"PRIu64, *(uint64_t *)num);

Didn't know about PRIu64 and friends.  FWIW,

Acked-by: Javi Merino <javi.merino@arm.com>

While you are at it, you could also fix the previous "%u" to "%"PRIu32

>  			} else {
>  				trace_seq_printf(s, "BAD SIZE:%d 0x%x",
>  						 el_size, *(uint8_t *)num);
> -- 
> 2.3.4
> 
> 
> Thanks,
> Namhyung
> 
> 
> On Thu, Apr 23, 2015 at 07:03:06PM -0300, Arnaldo Carvalho de Melo wrote:
> > Hi Ingo,
> > 
> > 	Please consider pulling,
> > 
> > - Arnaldo
> > 
> > The following changes since commit 0140e6141e4f1d4b15fb469e6912b0e71b7d1cc2:
> > 
> >   perf/x86/intel/uncore: Move PCI IDs for IMC to uncore driver (2015-04-22 08:29:19 +0200)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> > 
> > for you to fetch changes up to de28c15daf60e9625bece22f13a091fac8d05f1d:
> > 
> >   tools lib api: Undefine _FORTIFY_SOURCE before setting it (2015-04-23 17:08:23 -0300)
> > 
> > ----------------------------------------------------------------
> > perf/urgent fixes:
> > 
> > User visible:
> > 
> > - Enable events when doing system wide 'trace' and starting a
> >   workload, e.g:
> > 
> >    # trace -a sleep 1
> > 
> >   now it matches the pattern in 'record' and will show envents
> >   instead of sitting doing nothing while waiting for the started
> >   workload to finish (Arnaldo Carvalho de Melo)
> > 
> > - Disable and drain events when forked 'trace' workload ends
> >   making sure we notice the end of the workload instead of
> >   trying to keep up with the seemingly neverending flux of
> >   system wide events (Arnaldo Carvalho de Melo)
> > 
> > Infrastructure:
> > 
> > - Fix the build on 32-bit ARM by consistently use PRIu64 for printing u64
> >   values in 'perf kmem' (Will Deacon)
> > 
> > - Undefine _FORTIFY_SOURCE before setting it in tools/perf/api, fixing the build on
> >   Hardened Gentoo systems (Bobby Powers)
> > 
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > ----------------------------------------------------------------
> > Arnaldo Carvalho de Melo (2):
> >       perf trace: Enable events when doing system wide tracing and starting a workload
> >       perf trace: Disable events and drain events when forked workload ends
> > 
> > Bobby Powers (1):
> >       tools lib api: Undefine _FORTIFY_SOURCE before setting it
> > 
> > Will Deacon (1):
> >       perf kmem: Consistently use PRIu64 for printing u64 values
> > 
> >  tools/lib/api/Makefile     |  2 +-
> >  tools/perf/builtin-kmem.c  |  4 ++--
> >  tools/perf/builtin-trace.c | 10 ++++++++--
> >  3 files changed, 11 insertions(+), 5 deletions(-)
> > --
> > 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] 46+ messages in thread

* Re: [GIT PULL 0/4] perf/urgent fixes
  2015-04-24  2:02 ` Namhyung Kim
@ 2015-04-24  2:09   ` Arnaldo Carvalho de Melo
  2015-04-24  8:59   ` Javi Merino
  1 sibling, 0 replies; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-24  2:09 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Ingo Molnar, linux-kernel, Adrian Hunter, Bobby Powers,
	Borislav Petkov, David Ahern, Dirk Gouders, Don Zickus,
	Frederic Weisbecker, Jiri Olsa, Joonsoo Kim, linux-kbuild,
	Michael Petlan, Michal Marek, Minchan Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Will Deacon, Javi Merino,
	Steven Rostedt

Em Fri, Apr 24, 2015 at 11:02:18AM +0900, Namhyung Kim escreveu:
> Hi Arnaldo,
> 
> I've set up some docker containers for build test, and found a couple
> of failures..  It seems David's kmem build fix ("perf kmem: Fix
> compiles on RHEL6/OL6") which is in your perf/core branch also needs
> to be in perf/urgent.  Sorry about the kmem breakages..
> 
> And I also found this..

I can send those tomorrow, in another pull request to Ingo. I noticed a
few on a RHEL5 machine I tested today, in libtraceevent even, I guess
you was on the CC list for that bug report.

- Arnaldo
 
> 
> >From 581ae7f48c89377755391c3f95637a1d48eefc73 Mon Sep 17 00:00:00 2001
> From: Namhyung Kim <namhyung@kernel.org>
> Date: Fri, 24 Apr 2015 10:45:16 +0900
> Subject: [PATCH] tools lib traceevent: Fix build failure on 32-bit arch
> 
> In my i386 build, it failed like this:
> 
>     CC       event-parse.o
>   event-parse.c: In function 'print_str_arg':
>   event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
>                         but argument 3 has type 'uint64_t' [-Wformat]
> 
> Cc: Javi Merino <javi.merino@arm.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  tools/lib/traceevent/event-parse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index 12a7e2a40c89..aa21bd55bd8a 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -3865,7 +3865,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
>  			} else if (el_size == 4) {
>  				trace_seq_printf(s, "%u", *(uint32_t *)num);
>  			} else if (el_size == 8) {
> -				trace_seq_printf(s, "%lu", *(uint64_t *)num);
> +				trace_seq_printf(s, "%"PRIu64, *(uint64_t *)num);
>  			} else {
>  				trace_seq_printf(s, "BAD SIZE:%d 0x%x",
>  						 el_size, *(uint8_t *)num);
> -- 
> 2.3.4
> 
> 
> Thanks,
> Namhyung
> 
> 
> On Thu, Apr 23, 2015 at 07:03:06PM -0300, Arnaldo Carvalho de Melo wrote:
> > Hi Ingo,
> > 
> > 	Please consider pulling,
> > 
> > - Arnaldo
> > 
> > The following changes since commit 0140e6141e4f1d4b15fb469e6912b0e71b7d1cc2:
> > 
> >   perf/x86/intel/uncore: Move PCI IDs for IMC to uncore driver (2015-04-22 08:29:19 +0200)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> > 
> > for you to fetch changes up to de28c15daf60e9625bece22f13a091fac8d05f1d:
> > 
> >   tools lib api: Undefine _FORTIFY_SOURCE before setting it (2015-04-23 17:08:23 -0300)
> > 
> > ----------------------------------------------------------------
> > perf/urgent fixes:
> > 
> > User visible:
> > 
> > - Enable events when doing system wide 'trace' and starting a
> >   workload, e.g:
> > 
> >    # trace -a sleep 1
> > 
> >   now it matches the pattern in 'record' and will show envents
> >   instead of sitting doing nothing while waiting for the started
> >   workload to finish (Arnaldo Carvalho de Melo)
> > 
> > - Disable and drain events when forked 'trace' workload ends
> >   making sure we notice the end of the workload instead of
> >   trying to keep up with the seemingly neverending flux of
> >   system wide events (Arnaldo Carvalho de Melo)
> > 
> > Infrastructure:
> > 
> > - Fix the build on 32-bit ARM by consistently use PRIu64 for printing u64
> >   values in 'perf kmem' (Will Deacon)
> > 
> > - Undefine _FORTIFY_SOURCE before setting it in tools/perf/api, fixing the build on
> >   Hardened Gentoo systems (Bobby Powers)
> > 
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > ----------------------------------------------------------------
> > Arnaldo Carvalho de Melo (2):
> >       perf trace: Enable events when doing system wide tracing and starting a workload
> >       perf trace: Disable events and drain events when forked workload ends
> > 
> > Bobby Powers (1):
> >       tools lib api: Undefine _FORTIFY_SOURCE before setting it
> > 
> > Will Deacon (1):
> >       perf kmem: Consistently use PRIu64 for printing u64 values
> > 
> >  tools/lib/api/Makefile     |  2 +-
> >  tools/perf/builtin-kmem.c  |  4 ++--
> >  tools/perf/builtin-trace.c | 10 ++++++++--
> >  3 files changed, 11 insertions(+), 5 deletions(-)
> > --
> > 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] 46+ messages in thread

* Re: [GIT PULL 0/4] perf/urgent fixes
  2015-04-23 22:03 Arnaldo Carvalho de Melo
@ 2015-04-24  2:02 ` Namhyung Kim
  2015-04-24  2:09   ` Arnaldo Carvalho de Melo
  2015-04-24  8:59   ` Javi Merino
  0 siblings, 2 replies; 46+ messages in thread
From: Namhyung Kim @ 2015-04-24  2:02 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Adrian Hunter, Bobby Powers,
	Borislav Petkov, David Ahern, Dirk Gouders, Don Zickus,
	Frederic Weisbecker, Jiri Olsa, Joonsoo Kim, linux-kbuild,
	Michael Petlan, Michal Marek, Minchan Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Will Deacon,
	Arnaldo Carvalho de Melo, Javi Merino, Steven Rostedt

Hi Arnaldo,

I've set up some docker containers for build test, and found a couple
of failures..  It seems David's kmem build fix ("perf kmem: Fix
compiles on RHEL6/OL6") which is in your perf/core branch also needs
to be in perf/urgent.  Sorry about the kmem breakages..

And I also found this..


>From 581ae7f48c89377755391c3f95637a1d48eefc73 Mon Sep 17 00:00:00 2001
From: Namhyung Kim <namhyung@kernel.org>
Date: Fri, 24 Apr 2015 10:45:16 +0900
Subject: [PATCH] tools lib traceevent: Fix build failure on 32-bit arch

In my i386 build, it failed like this:

    CC       event-parse.o
  event-parse.c: In function 'print_str_arg':
  event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
                        but argument 3 has type 'uint64_t' [-Wformat]

Cc: Javi Merino <javi.merino@arm.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/lib/traceevent/event-parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 12a7e2a40c89..aa21bd55bd8a 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -3865,7 +3865,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
 			} else if (el_size == 4) {
 				trace_seq_printf(s, "%u", *(uint32_t *)num);
 			} else if (el_size == 8) {
-				trace_seq_printf(s, "%lu", *(uint64_t *)num);
+				trace_seq_printf(s, "%"PRIu64, *(uint64_t *)num);
 			} else {
 				trace_seq_printf(s, "BAD SIZE:%d 0x%x",
 						 el_size, *(uint8_t *)num);
-- 
2.3.4


Thanks,
Namhyung


On Thu, Apr 23, 2015 at 07:03:06PM -0300, Arnaldo Carvalho de Melo wrote:
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 0140e6141e4f1d4b15fb469e6912b0e71b7d1cc2:
> 
>   perf/x86/intel/uncore: Move PCI IDs for IMC to uncore driver (2015-04-22 08:29:19 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to de28c15daf60e9625bece22f13a091fac8d05f1d:
> 
>   tools lib api: Undefine _FORTIFY_SOURCE before setting it (2015-04-23 17:08:23 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> User visible:
> 
> - Enable events when doing system wide 'trace' and starting a
>   workload, e.g:
> 
>    # trace -a sleep 1
> 
>   now it matches the pattern in 'record' and will show envents
>   instead of sitting doing nothing while waiting for the started
>   workload to finish (Arnaldo Carvalho de Melo)
> 
> - Disable and drain events when forked 'trace' workload ends
>   making sure we notice the end of the workload instead of
>   trying to keep up with the seemingly neverending flux of
>   system wide events (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Fix the build on 32-bit ARM by consistently use PRIu64 for printing u64
>   values in 'perf kmem' (Will Deacon)
> 
> - Undefine _FORTIFY_SOURCE before setting it in tools/perf/api, fixing the build on
>   Hardened Gentoo systems (Bobby Powers)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf trace: Enable events when doing system wide tracing and starting a workload
>       perf trace: Disable events and drain events when forked workload ends
> 
> Bobby Powers (1):
>       tools lib api: Undefine _FORTIFY_SOURCE before setting it
> 
> Will Deacon (1):
>       perf kmem: Consistently use PRIu64 for printing u64 values
> 
>  tools/lib/api/Makefile     |  2 +-
>  tools/perf/builtin-kmem.c  |  4 ++--
>  tools/perf/builtin-trace.c | 10 ++++++++--
>  3 files changed, 11 insertions(+), 5 deletions(-)
> --
> 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 related	[flat|nested] 46+ messages in thread

* [GIT PULL 0/4] perf/urgent fixes
@ 2015-04-23 22:03 Arnaldo Carvalho de Melo
  2015-04-24  2:02 ` Namhyung Kim
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-23 22:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Bobby Powers, Borislav Petkov, David Ahern, Dirk Gouders,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Joonsoo Kim,
	linux-kbuild, Michael Petlan, Michal Marek, Minchan Kim,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Will Deacon, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 0140e6141e4f1d4b15fb469e6912b0e71b7d1cc2:

  perf/x86/intel/uncore: Move PCI IDs for IMC to uncore driver (2015-04-22 08:29:19 +0200)

are available in the git repository at:

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

for you to fetch changes up to de28c15daf60e9625bece22f13a091fac8d05f1d:

  tools lib api: Undefine _FORTIFY_SOURCE before setting it (2015-04-23 17:08:23 -0300)

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

User visible:

- Enable events when doing system wide 'trace' and starting a
  workload, e.g:

   # trace -a sleep 1

  now it matches the pattern in 'record' and will show envents
  instead of sitting doing nothing while waiting for the started
  workload to finish (Arnaldo Carvalho de Melo)

- Disable and drain events when forked 'trace' workload ends
  making sure we notice the end of the workload instead of
  trying to keep up with the seemingly neverending flux of
  system wide events (Arnaldo Carvalho de Melo)

Infrastructure:

- Fix the build on 32-bit ARM by consistently use PRIu64 for printing u64
  values in 'perf kmem' (Will Deacon)

- Undefine _FORTIFY_SOURCE before setting it in tools/perf/api, fixing the build on
  Hardened Gentoo systems (Bobby Powers)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf trace: Enable events when doing system wide tracing and starting a workload
      perf trace: Disable events and drain events when forked workload ends

Bobby Powers (1):
      tools lib api: Undefine _FORTIFY_SOURCE before setting it

Will Deacon (1):
      perf kmem: Consistently use PRIu64 for printing u64 values

 tools/lib/api/Makefile     |  2 +-
 tools/perf/builtin-kmem.c  |  4 ++--
 tools/perf/builtin-trace.c | 10 ++++++++--
 3 files changed, 11 insertions(+), 5 deletions(-)

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2015-01-03  2:55 Arnaldo Carvalho de Melo
@ 2015-01-08  8:00 ` Ingo Molnar
  0 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2015-01-08  8:00 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, David Ahern, Jiri Olsa, Mark Wielaard,
	Masami Hiramatsu, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Taesoo kim, yrl.pp-manager.tt, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 5b5e76218fbdbb71a01d5480f289ead624232876:
> 
>   Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2015-01-01 22:24:36 +0100)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to e7024fc3783317608b8e07048116a72a7d1cd26d:
> 
>   perf diff: Fix to sort by baseline field by default (2015-01-02 23:27:18 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> - 'perf probe' should fall back to find probe point in symbols when failing
>   to do so in a debuginfo file (Masami Hiramatsu)
> 
> - Fix 'perf probe' crash in dwarf_getcfi_elf (Namhyung Kim)
> 
> - Fix shell completion with 'perf list' --raw-dump option (Taesoo Kim)
> 
> - Fix 'perf diff' to sort by baseline field by default (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Masami Hiramatsu (1):
>       perf probe: Fix to fall back to find probe point in symbols
> 
> Namhyung Kim (2):
>       perf probe: Fix crash in dwarf_getcfi_elf
>       perf diff: Fix to sort by baseline field by default
> 
> Taesoo Kim (1):
>       perf list: Fix --raw-dump option
> 
>  tools/perf/builtin-diff.c      | 44 ++++++++++++++++++++++++++++++++++++++++++
>  tools/perf/builtin-list.c      | 13 ++++++++++---
>  tools/perf/util/probe-event.c  |  6 ++++--
>  tools/perf/util/probe-finder.c | 18 ++++++++++++++++-
>  4 files changed, 75 insertions(+), 6 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2015-01-03  2:55 Arnaldo Carvalho de Melo
  2015-01-08  8:00 ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-03  2:55 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern, Jiri Olsa,
	Mark Wielaard, Masami Hiramatsu, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Taesoo kim, yrl.pp-manager.tt,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 5b5e76218fbdbb71a01d5480f289ead624232876:

  Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2015-01-01 22:24:36 +0100)

are available in the git repository at:


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

for you to fetch changes up to e7024fc3783317608b8e07048116a72a7d1cd26d:

  perf diff: Fix to sort by baseline field by default (2015-01-02 23:27:18 -0300)

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

- 'perf probe' should fall back to find probe point in symbols when failing
  to do so in a debuginfo file (Masami Hiramatsu)

- Fix 'perf probe' crash in dwarf_getcfi_elf (Namhyung Kim)

- Fix shell completion with 'perf list' --raw-dump option (Taesoo Kim)

- Fix 'perf diff' to sort by baseline field by default (Namhyung Kim)

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

----------------------------------------------------------------
Masami Hiramatsu (1):
      perf probe: Fix to fall back to find probe point in symbols

Namhyung Kim (2):
      perf probe: Fix crash in dwarf_getcfi_elf
      perf diff: Fix to sort by baseline field by default

Taesoo Kim (1):
      perf list: Fix --raw-dump option

 tools/perf/builtin-diff.c      | 44 ++++++++++++++++++++++++++++++++++++++++++
 tools/perf/builtin-list.c      | 13 ++++++++++---
 tools/perf/util/probe-event.c  |  6 ++++--
 tools/perf/util/probe-finder.c | 18 ++++++++++++++++-
 4 files changed, 75 insertions(+), 6 deletions(-)

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2014-04-23 14:53   ` Jiri Olsa
  2014-04-24  6:47     ` Ingo Molnar
@ 2014-04-25 17:50     ` Andi Kleen
  1 sibling, 0 replies; 46+ messages in thread
From: Andi Kleen @ 2014-04-25 17:50 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Ingo Molnar, linux-kernel, Arnaldo Carvalho de Melo,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jean Pihet,
	Josh Boyer, Masanari Iida, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Steven Rostedt

> Andi,
> could you please try that on opensuse?

Works on opensuse 13.1. I don't have the old version
I tested on previously anymore.

-Andi

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2014-04-24 11:47       ` Jiri Olsa
@ 2014-04-25  8:12         ` Ingo Molnar
  0 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2014-04-25  8:12 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Josh Boyer,
	Masanari Iida, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Steven Rostedt


* Jiri Olsa <jolsa@redhat.com> wrote:

> SNIP
> 
> > 
> > Okay, so the problem is that we don't have a simple binary-state 
> > feature in this case, but three possible states: 'libunwind', or 
> > 'libdw-dwarf-unwind', or 'OFF', right?
> > 
> > If so then the solution would be to replace those 3 last lines with 
> > just this line:
> > 
> >      ...        DWARF unwind library: [ libunwind ]
> > 
> > Where 'libunwind' is printed in green (like the 'on' lines are 
> > printed). If there's no suitable library available then output:
> > 
> >      ...        DWARF unwind library: [ OFF ]
> > 
> > Because the user looking at the output is really only interested in 
> > 'is an unwind library available', and maybe in 'which one'.
> > 
> > Is there preference between library choices? I.e. is 'libunwind' 
> > preferred over 'libdw-dwarf-unwind', or the other way around? If yes 
> > then if we pick an inferior library we could print it in yellow color 
> > - and only use green if it's the 'best' choice.
> > 
> > That way the color codes also still keep working: red means problem, 
> > green means OK, yellow something inbetween.
> 
> sounds good.. TODO list updated ;-)
> 
> > 
> > But in any case we should try to keep the 'one feature, one line' 
> > fundamental output concept.
> > 
> > ( Under V=1 we can output whatever details might be useful to
> >   developers, there's no restriction on what to output there. )
> 
> thats what we put VF for.. maybe we should for verbose
> features code detection output for V=1 as well

Yeah, I think it's only rarely needed, so might make sense to merge it 
into V=1.

Thanks,

	Ingo

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2014-04-24  6:36     ` Ingo Molnar
@ 2014-04-24 11:47       ` Jiri Olsa
  2014-04-25  8:12         ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Jiri Olsa @ 2014-04-24 11:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Josh Boyer,
	Masanari Iida, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Steven Rostedt

SNIP

> 
> Okay, so the problem is that we don't have a simple binary-state 
> feature in this case, but three possible states: 'libunwind', or 
> 'libdw-dwarf-unwind', or 'OFF', right?
> 
> If so then the solution would be to replace those 3 last lines with 
> just this line:
> 
>      ...        DWARF unwind library: [ libunwind ]
> 
> Where 'libunwind' is printed in green (like the 'on' lines are 
> printed). If there's no suitable library available then output:
> 
>      ...        DWARF unwind library: [ OFF ]
> 
> Because the user looking at the output is really only interested in 
> 'is an unwind library available', and maybe in 'which one'.
> 
> Is there preference between library choices? I.e. is 'libunwind' 
> preferred over 'libdw-dwarf-unwind', or the other way around? If yes 
> then if we pick an inferior library we could print it in yellow color 
> - and only use green if it's the 'best' choice.
> 
> That way the color codes also still keep working: red means problem, 
> green means OK, yellow something inbetween.

sounds good.. TODO list updated ;-)

> 
> But in any case we should try to keep the 'one feature, one line' 
> fundamental output concept.
> 
> ( Under V=1 we can output whatever details might be useful to
>   developers, there's no restriction on what to output there. )

thats what we put VF for.. maybe we should for verbose
features code detection output for V=1 as well

jirka

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2014-04-24  6:47     ` Ingo Molnar
@ 2014-04-24 11:43       ` Jiri Olsa
  0 siblings, 0 replies; 46+ messages in thread
From: Jiri Olsa @ 2014-04-24 11:43 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Josh Boyer,
	Masanari Iida, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Steven Rostedt, Andi Kleen

On Thu, Apr 24, 2014 at 08:47:18AM +0200, Ingo Molnar wrote:

SNIP

> 
> In any case, your patch fixes the bug. With VF=1 I get this output:
> 
> Auto-detecting system features:
> ...                         dwarf: [ on  ]
> ...                         glibc: [ on  ]
> ...                          gtk2: [ on  ]
> ...                      libaudit: [ on  ]
> ...                        libbfd: [ on  ]
> ...                        libelf: [ on  ]
> ...                       libnuma: [ on  ]
> ...                       libperl: [ on  ]
> ...                     libpython: [ on  ]
> ...                      libslang: [ on  ]
> ...                     libunwind: [ on  ]
> ...            libdw-dwarf-unwind: [ on  ]
> ...     DWARF post unwind library: libunwind
> ...                     backtrace: [ on  ]
> ...                fortify-source: [ on  ]
> ...                  gtk2-infobar: [ on  ]
> ...             libelf-getphdrnum: [ on  ]
> ...                   libelf-mmap: [ on  ]
> ...             libpython-version: [ on  ]
> ...                       on-exit: [ on  ]
> ...            stackprotector-all: [ on  ]
> ...                       timerfd: [ on  ]
> ...         libunwind-debug-frame: [ OFF ]
> ...                        bionic: [ OFF ]
> ...                       liberty: [ OFF ]
> ...                     liberty-z: [ OFF ]
> ...                cplus-demangle: [ OFF ]
> 
> So yes, your obervation that it's the -liberty +libbfd combination is 
> correct.
> 
> Tested-by: Ingo Molnar <mingo@kernel.org>
> 
> Btw., when reading the patch and the Makefile it was not obvious to me 
> what 'VF' stood for. It's pretty clear what CORE_FEATURE_TESTS and 

VF - Verbose for Features ;-)

> LIB_FEATURE_TESTS means, but there's no comment for VF_FEATURE_TESTS 
> and the name is not self-explanatory.
> 
> I figured it out from a bit of git log digging that its purpose is to 
> generate the 'verbose feature check' output. But the variable is not 
> commented and the features it lists overlaps CORE_FEATURE_TESTS and 
> LIB_FEATURE_TESTS - so perhaps a bit more explanation (and possible 
> reduction in duplication) might be useful?
> 
> If it said ALL_FEATURE_TESTS and used $(CORE_FEATURE_TESTS) as a 
> baseline then that would be self-explanatory.
> 
> (In a separate patch from the fix.)

ok, will add something along those lines ;-)

thanks,
jirka

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2014-04-23 14:53   ` Jiri Olsa
@ 2014-04-24  6:47     ` Ingo Molnar
  2014-04-24 11:43       ` Jiri Olsa
  2014-04-25 17:50     ` Andi Kleen
  1 sibling, 1 reply; 46+ messages in thread
From: Ingo Molnar @ 2014-04-24  6:47 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Josh Boyer,
	Masanari Iida, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Steven Rostedt, Andi Kleen


* Jiri Olsa <jolsa@redhat.com> wrote:

> On Wed, Apr 23, 2014 at 03:14:33PM +0200, Ingo Molnar wrote:
> > 
> > (Just reporting two bugs I found today - unrelated to your the 
> > perf/urgent pull request.)
> > 
> > 1)
> > 
> > Even when the most modern unwind library is found, the autodetection 
> > is spammy:
> > 
> > 
> >  Auto-detecting system features:
> >  ...                         dwarf: [ on  ]
> >  ...                         glibc: [ on  ]
> >  ...                          gtk2: [ on  ]
> >  ...                      libaudit: [ on  ]
> >  ...                        libbfd: [ on  ]
> >  ...                        libelf: [ on  ]
> >  ...                       libnuma: [ on  ]
> >  ...                       libperl: [ on  ]
> >  ...                     libpython: [ on  ]
> >  ...                      libslang: [ on  ]
> >  ...                     libunwind: [ on  ]
> >  ...            libdw-dwarf-unwind: [ on  ]
> >  ...     DWARF post unwind library: libunwind
> > 
> > The 'DWARF post unwind library' line is somewhat superfluous. I 
> > realize that it prints out the library selected - but that's obvious 
> > from the 'libdw-dwarf-unwind' line above it already, right?
> > 
> > Furthermore, it breaks the autodetection output format.
> > 
> > 2)
> > 
> > On latest Ubuntu (14.04) the tip:master build fails with:
> > 
> >  /usr/bin/ld: cannot find -liberty
> >  collect2: error: ld returned 1 exit status
> > 
> > The autodetection sequence reports all green entries, so something's 
> > funky going on there.
> 
> we add -liberty once -lbfd is detected, I guess we
> assumed that was common case
> 
>   perf tools: fix BFD detection on opensuse
>   commit 280e7c48c3b873e4987a63da276ecab25383f494
>   Author: Andi Kleen <ak@linux.intel.com>
>   Date:   Sat Jan 11 11:42:51 2014 -0800
> 
> could you please try patch below? it adds that only
> if thats detected
> 
> 'make VF=1' should display more status now
> 
> Andi,
> could you please try that on opensuse?
> 
> thanks,
> jirka
> 
> 
> ---
> diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
> index ee21fa9..f511658 100644
> --- a/tools/perf/config/Makefile
> +++ b/tools/perf/config/Makefile
> @@ -186,7 +186,10 @@ VF_FEATURE_TESTS =			\
>  	stackprotector-all		\
>  	timerfd				\
>  	libunwind-debug-frame		\
> -	bionic
> +	bionic				\
> +	liberty				\
> +	liberty-z			\
> +	cplus-demangle

In any case, your patch fixes the bug. With VF=1 I get this output:

Auto-detecting system features:
...                         dwarf: [ on  ]
...                         glibc: [ on  ]
...                          gtk2: [ on  ]
...                      libaudit: [ on  ]
...                        libbfd: [ on  ]
...                        libelf: [ on  ]
...                       libnuma: [ on  ]
...                       libperl: [ on  ]
...                     libpython: [ on  ]
...                      libslang: [ on  ]
...                     libunwind: [ on  ]
...            libdw-dwarf-unwind: [ on  ]
...     DWARF post unwind library: libunwind
...                     backtrace: [ on  ]
...                fortify-source: [ on  ]
...                  gtk2-infobar: [ on  ]
...             libelf-getphdrnum: [ on  ]
...                   libelf-mmap: [ on  ]
...             libpython-version: [ on  ]
...                       on-exit: [ on  ]
...            stackprotector-all: [ on  ]
...                       timerfd: [ on  ]
...         libunwind-debug-frame: [ OFF ]
...                        bionic: [ OFF ]
...                       liberty: [ OFF ]
...                     liberty-z: [ OFF ]
...                cplus-demangle: [ OFF ]

So yes, your obervation that it's the -liberty +libbfd combination is 
correct.

Tested-by: Ingo Molnar <mingo@kernel.org>

Btw., when reading the patch and the Makefile it was not obvious to me 
what 'VF' stood for. It's pretty clear what CORE_FEATURE_TESTS and 
LIB_FEATURE_TESTS means, but there's no comment for VF_FEATURE_TESTS 
and the name is not self-explanatory.

I figured it out from a bit of git log digging that its purpose is to 
generate the 'verbose feature check' output. But the variable is not 
commented and the features it lists overlaps CORE_FEATURE_TESTS and 
LIB_FEATURE_TESTS - so perhaps a bit more explanation (and possible 
reduction in duplication) might be useful?

If it said ALL_FEATURE_TESTS and used $(CORE_FEATURE_TESTS) as a 
baseline then that would be self-explanatory.

(In a separate patch from the fix.)

Thanks,

	Ingo

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2014-04-23 13:49   ` Jiri Olsa
@ 2014-04-24  6:36     ` Ingo Molnar
  2014-04-24 11:47       ` Jiri Olsa
  0 siblings, 1 reply; 46+ messages in thread
From: Ingo Molnar @ 2014-04-24  6:36 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Josh Boyer,
	Masanari Iida, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Steven Rostedt


* Jiri Olsa <jolsa@redhat.com> wrote:

> On Wed, Apr 23, 2014 at 03:14:33PM +0200, Ingo Molnar wrote:
> > 
> > (Just reporting two bugs I found today - unrelated to your the 
> > perf/urgent pull request.)
> > 
> > 1)
> > 
> > Even when the most modern unwind library is found, the autodetection 
> > is spammy:
> > 
> > 
> >  Auto-detecting system features:
> >  ...                         dwarf: [ on  ]
> >  ...                         glibc: [ on  ]
> >  ...                          gtk2: [ on  ]
> >  ...                      libaudit: [ on  ]
> >  ...                        libbfd: [ on  ]
> >  ...                        libelf: [ on  ]
> >  ...                       libnuma: [ on  ]
> >  ...                       libperl: [ on  ]
> >  ...                     libpython: [ on  ]
> >  ...                      libslang: [ on  ]
> >  ...                     libunwind: [ on  ]
> >  ...            libdw-dwarf-unwind: [ on  ]
> >  ...     DWARF post unwind library: libunwind
> > 
> > The 'DWARF post unwind library' line is somewhat superfluous. I 
> > realize that it prints out the library selected - but that's obvious 
> > from the 'libdw-dwarf-unwind' line above it already, right?
> 
> nope, the on/off output is only whats detected in system,
> you've got both libunwind and libdw-dwarf-unwind detected
> 
> libunwind is default unless you use NO_LIBUNWIND=1

Okay, so the problem is that we don't have a simple binary-state 
feature in this case, but three possible states: 'libunwind', or 
'libdw-dwarf-unwind', or 'OFF', right?

If so then the solution would be to replace those 3 last lines with 
just this line:

     ...        DWARF unwind library: [ libunwind ]

Where 'libunwind' is printed in green (like the 'on' lines are 
printed). If there's no suitable library available then output:

     ...        DWARF unwind library: [ OFF ]

Because the user looking at the output is really only interested in 
'is an unwind library available', and maybe in 'which one'.

Is there preference between library choices? I.e. is 'libunwind' 
preferred over 'libdw-dwarf-unwind', or the other way around? If yes 
then if we pick an inferior library we could print it in yellow color 
- and only use green if it's the 'best' choice.

That way the color codes also still keep working: red means problem, 
green means OK, yellow something inbetween.

But in any case we should try to keep the 'one feature, one line' 
fundamental output concept.

( Under V=1 we can output whatever details might be useful to
  developers, there's no restriction on what to output there. )

Thanks,

	Ingo

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2014-04-23 13:14 ` Ingo Molnar
  2014-04-23 13:49   ` Jiri Olsa
@ 2014-04-23 14:53   ` Jiri Olsa
  2014-04-24  6:47     ` Ingo Molnar
  2014-04-25 17:50     ` Andi Kleen
  1 sibling, 2 replies; 46+ messages in thread
From: Jiri Olsa @ 2014-04-23 14:53 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Josh Boyer,
	Masanari Iida, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Steven Rostedt, Andi Kleen

On Wed, Apr 23, 2014 at 03:14:33PM +0200, Ingo Molnar wrote:
> 
> (Just reporting two bugs I found today - unrelated to your the 
> perf/urgent pull request.)
> 
> 1)
> 
> Even when the most modern unwind library is found, the autodetection 
> is spammy:
> 
> 
>  Auto-detecting system features:
>  ...                         dwarf: [ on  ]
>  ...                         glibc: [ on  ]
>  ...                          gtk2: [ on  ]
>  ...                      libaudit: [ on  ]
>  ...                        libbfd: [ on  ]
>  ...                        libelf: [ on  ]
>  ...                       libnuma: [ on  ]
>  ...                       libperl: [ on  ]
>  ...                     libpython: [ on  ]
>  ...                      libslang: [ on  ]
>  ...                     libunwind: [ on  ]
>  ...            libdw-dwarf-unwind: [ on  ]
>  ...     DWARF post unwind library: libunwind
> 
> The 'DWARF post unwind library' line is somewhat superfluous. I 
> realize that it prints out the library selected - but that's obvious 
> from the 'libdw-dwarf-unwind' line above it already, right?
> 
> Furthermore, it breaks the autodetection output format.
> 
> 2)
> 
> On latest Ubuntu (14.04) the tip:master build fails with:
> 
>  /usr/bin/ld: cannot find -liberty
>  collect2: error: ld returned 1 exit status
> 
> The autodetection sequence reports all green entries, so something's 
> funky going on there.

we add -liberty once -lbfd is detected, I guess we
assumed that was common case

  perf tools: fix BFD detection on opensuse
  commit 280e7c48c3b873e4987a63da276ecab25383f494
  Author: Andi Kleen <ak@linux.intel.com>
  Date:   Sat Jan 11 11:42:51 2014 -0800

could you please try patch below? it adds that only
if thats detected

'make VF=1' should display more status now

Andi,
could you please try that on opensuse?

thanks,
jirka


---
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index ee21fa9..f511658 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -186,7 +186,10 @@ VF_FEATURE_TESTS =			\
 	stackprotector-all		\
 	timerfd				\
 	libunwind-debug-frame		\
-	bionic
+	bionic				\
+	liberty				\
+	liberty-z			\
+	cplus-demangle
 
 # Set FEATURE_CHECK_(C|LD)FLAGS-all for all CORE_FEATURE_TESTS features.
 # If in the future we need per-feature checks/flags for features not
@@ -504,7 +507,21 @@ else
 endif
 
 ifeq ($(feature-libbfd), 1)
-  EXTLIBS += -lbfd -lz -liberty
+  EXTLIBS += -lbfd
+
+  # call all detections now so we get correct
+  # status in VF output
+  $(call feature_check,liberty)
+  $(call feature_check,liberty-z)
+  $(call feature_check,cplus-demangle)
+
+  ifeq ($(feature-liberty), 1)
+    EXTLIBS += -lbfd -liberty
+  else
+    ifeq ($(feature-liberty-z), 1)
+      EXTLIBS += -lbfd -liberty -lz
+    endif
+  endif
 endif
 
 ifdef NO_DEMANGLE
@@ -515,15 +532,10 @@ else
     CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
   else
     ifneq ($(feature-libbfd), 1)
-      $(call feature_check,liberty)
-      ifeq ($(feature-liberty), 1)
-        EXTLIBS += -lbfd -liberty
-      else
-        $(call feature_check,liberty-z)
-        ifeq ($(feature-liberty-z), 1)
-          EXTLIBS += -lbfd -liberty -lz
-        else
-          $(call feature_check,cplus-demangle)
+      ifneq ($(feature-liberty), 1)
+        ifneq ($(feature-liberty-z), 1)
+          # we dont have neither HAVE_CPLUS_DEMANGLE_SUPPORT
+          # or any of 'bfd iberty z' trinity
           ifeq ($(feature-cplus-demangle), 1)
             EXTLIBS += -liberty
             CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2014-04-23 13:14 ` Ingo Molnar
@ 2014-04-23 13:49   ` Jiri Olsa
  2014-04-24  6:36     ` Ingo Molnar
  2014-04-23 14:53   ` Jiri Olsa
  1 sibling, 1 reply; 46+ messages in thread
From: Jiri Olsa @ 2014-04-23 13:49 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Josh Boyer,
	Masanari Iida, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Steven Rostedt

On Wed, Apr 23, 2014 at 03:14:33PM +0200, Ingo Molnar wrote:
> 
> (Just reporting two bugs I found today - unrelated to your the 
> perf/urgent pull request.)
> 
> 1)
> 
> Even when the most modern unwind library is found, the autodetection 
> is spammy:
> 
> 
>  Auto-detecting system features:
>  ...                         dwarf: [ on  ]
>  ...                         glibc: [ on  ]
>  ...                          gtk2: [ on  ]
>  ...                      libaudit: [ on  ]
>  ...                        libbfd: [ on  ]
>  ...                        libelf: [ on  ]
>  ...                       libnuma: [ on  ]
>  ...                       libperl: [ on  ]
>  ...                     libpython: [ on  ]
>  ...                      libslang: [ on  ]
>  ...                     libunwind: [ on  ]
>  ...            libdw-dwarf-unwind: [ on  ]
>  ...     DWARF post unwind library: libunwind
> 
> The 'DWARF post unwind library' line is somewhat superfluous. I 
> realize that it prints out the library selected - but that's obvious 
> from the 'libdw-dwarf-unwind' line above it already, right?

nope, the on/off output is only whats detected in system,
you've got both libunwind and libdw-dwarf-unwind detected

libunwind is default unless you use NO_LIBUNWIND=1

> 
> Furthermore, it breaks the autodetection output format.

we could move it to the 'make VF=1' output ;-) like:

Auto-detecting system features:
...                         dwarf: [ on  ]
...                         glibc: [ on  ]
...                          gtk2: [ on  ]
...                      libaudit: [ on  ]
...                        libbfd: [ on  ]
...                        libelf: [ on  ]
...                       libnuma: [ on  ]
...                       libperl: [ on  ]
...                     libpython: [ on  ]
...                      libslang: [ on  ]
...                     libunwind: [ on  ]
...            libdw-dwarf-unwind: [ on  ]
...                     backtrace: [ on  ]
...                fortify-source: [ on  ]
...                  gtk2-infobar: [ on  ]
...             libelf-getphdrnum: [ on  ]
...                   libelf-mmap: [ on  ]
...             libpython-version: [ on  ]
...                       on-exit: [ on  ]
...            stackprotector-all: [ on  ]
...                       timerfd: [ on  ]
...         libunwind-debug-frame: [ OFF ]
...                        bionic: [ OFF ]

...                        prefix: /home/jolsa
...                        bindir: /home/jolsa/bin
...                        libdir: /home/jolsa/lib64
...                    sysconfdir: /home/jolsa/etc
...                 LIBUNWIND_DIR: 
...                     LIBDW_DIR: 

...     DWARF post unwind library: libunwind


jirka

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2014-04-23 11:31 Jiri Olsa
  2014-04-23 13:09 ` Ingo Molnar
@ 2014-04-23 13:14 ` Ingo Molnar
  2014-04-23 13:49   ` Jiri Olsa
  2014-04-23 14:53   ` Jiri Olsa
  1 sibling, 2 replies; 46+ messages in thread
From: Ingo Molnar @ 2014-04-23 13:14 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Josh Boyer,
	Masanari Iida, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Steven Rostedt


(Just reporting two bugs I found today - unrelated to your the 
perf/urgent pull request.)

1)

Even when the most modern unwind library is found, the autodetection 
is spammy:


 Auto-detecting system features:
 ...                         dwarf: [ on  ]
 ...                         glibc: [ on  ]
 ...                          gtk2: [ on  ]
 ...                      libaudit: [ on  ]
 ...                        libbfd: [ on  ]
 ...                        libelf: [ on  ]
 ...                       libnuma: [ on  ]
 ...                       libperl: [ on  ]
 ...                     libpython: [ on  ]
 ...                      libslang: [ on  ]
 ...                     libunwind: [ on  ]
 ...            libdw-dwarf-unwind: [ on  ]
 ...     DWARF post unwind library: libunwind

The 'DWARF post unwind library' line is somewhat superfluous. I 
realize that it prints out the library selected - but that's obvious 
from the 'libdw-dwarf-unwind' line above it already, right?

Furthermore, it breaks the autodetection output format.

2)

On latest Ubuntu (14.04) the tip:master build fails with:

 /usr/bin/ld: cannot find -liberty
 collect2: error: ld returned 1 exit status

The autodetection sequence reports all green entries, so something's 
funky going on there.

Thanks,

	Ingo

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2014-04-23 11:31 Jiri Olsa
@ 2014-04-23 13:09 ` Ingo Molnar
  2014-04-23 13:14 ` Ingo Molnar
  1 sibling, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2014-04-23 13:09 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Josh Boyer,
	Masanari Iida, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Steven Rostedt, stable


* Jiri Olsa <jolsa@redhat.com> wrote:

> hi Ingo,
> please consider pulling
> 
> thanks,
> jirka
> 
> 
> The following changes since commit fd741edc25600e1660abd00b5c1bbe967018c6a0:
> 
>   Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/urgent (2014-04-20 09:53:55 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to de04f8657de9d3351a2d5880f1f7080b23b798cf:
> 
>   tools lib traceevent: Fix memory leak in pretty_print() (2014-04-23 13:19:30 +0200)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> Developer stuff:
> . Fix memory leak and backward compatibility macros for pevent
>   filter enums in traceevent library (Steven Rostedt)
> 
> . Disable libdw unwind for all but x86 arch (Jiri Olsa)
> 
> . Fix memory leak in sample_ustack (Masanari Iida)
> 
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
> 
> ----------------------------------------------------------------
> Jiri Olsa (1):
>       perf tools: Disable libdw unwind for all but x86 arch
> 
> Masanari Iida (1):
>       perf tests x86: Fix memory leak in sample_ustack()
> 
> Steven Rostedt (2):
>       tools lib traceevent: Fix backward compatibility macros for pevent filter enums
>       tools lib traceevent: Fix memory leak in pretty_print()
> 
>  tools/lib/traceevent/event-parse.c       | 1 +
>  tools/lib/traceevent/event-parse.h       | 4 ++--
>  tools/perf/arch/x86/tests/dwarf-unwind.c | 1 +
>  tools/perf/config/Makefile               | 8 ++++++++
>  4 files changed, 12 insertions(+), 2 deletions(-)

Pulled, thanks a lot Jiri!

	Ingo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2014-04-23 11:31 Jiri Olsa
  2014-04-23 13:09 ` Ingo Molnar
  2014-04-23 13:14 ` Ingo Molnar
  0 siblings, 2 replies; 46+ messages in thread
From: Jiri Olsa @ 2014-04-23 11:31 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Jiri Olsa,
	Josh Boyer, Masanari Iida, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Steven Rostedt, stable

hi Ingo,
please consider pulling

thanks,
jirka


The following changes since commit fd741edc25600e1660abd00b5c1bbe967018c6a0:

  Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/urgent (2014-04-20 09:53:55 +0200)

are available in the git repository at:


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

for you to fetch changes up to de04f8657de9d3351a2d5880f1f7080b23b798cf:

  tools lib traceevent: Fix memory leak in pretty_print() (2014-04-23 13:19:30 +0200)

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

Developer stuff:
. Fix memory leak and backward compatibility macros for pevent
  filter enums in traceevent library (Steven Rostedt)

. Disable libdw unwind for all but x86 arch (Jiri Olsa)

. Fix memory leak in sample_ustack (Masanari Iida)

Signed-off-by: Jiri Olsa <jolsa@redhat.com>

----------------------------------------------------------------
Jiri Olsa (1):
      perf tools: Disable libdw unwind for all but x86 arch

Masanari Iida (1):
      perf tests x86: Fix memory leak in sample_ustack()

Steven Rostedt (2):
      tools lib traceevent: Fix backward compatibility macros for pevent filter enums
      tools lib traceevent: Fix memory leak in pretty_print()

 tools/lib/traceevent/event-parse.c       | 1 +
 tools/lib/traceevent/event-parse.h       | 4 ++--
 tools/perf/arch/x86/tests/dwarf-unwind.c | 1 +
 tools/perf/config/Makefile               | 8 ++++++++
 4 files changed, 12 insertions(+), 2 deletions(-)

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2012-05-30  0:11 Arnaldo Carvalho de Melo
@ 2012-05-30  7:00 ` Ingo Molnar
  0 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2012-05-30  7:00 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Frederic Weisbecker, Mike Galbraith, Namhyung Kim,
	Paul Mackerras, Pekka Enberg, Peter Zijlstra, Stephane Eranian,
	Steven Rostedt


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

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling.
> 
> 	There are 5 other fixes in this repo, that went on my previous
> perf/urgent pull request.
> 
> Thanks,
> 
> - Arnaldo
> 
> 
> The following changes since commit a00dc319e98161949aa87f71a17db32e925c3257:
> 
>   perf record: Fix branch_stack type in perf_record_opts (2012-05-25 18:32:44 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to a44b45f236dd1c1a8caccf9a078adf2941a20267:
> 
>   perf annotate browser: The idx_asm field should be used in asm only view (2012-05-29 20:52:38 -0300)
> 
> ----------------------------------------------------------------
> Fixes for perf/urgent
> 
> . Fix fallback to --stdio when TUI not supported, from Namhyung Kim.
> 
> . Use right cast for pointers/long in libtraceevent, from Namhyung Kim.
> 
> . Be consistent on using the right error reporting interface for fatal errors,
>   from Namhyung Kim.
> 
> . Fix fallback to --stdio when TUI not supported, from Namhyung Kim.
> 
> . Use the right index in asm only view in the annotate browser.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (1):
>       perf annotate browser: The idx_asm field should be used in asm only view
> 
> Namhyung Kim (3):
>       tools lib traceevent: Silence compiler warning on 32bit build
>       perf ui: Make --stdio default when TUI is not supported
>       perf tools: Convert critical messages to ui__error()
> 
>  tools/lib/traceevent/parse-filter.c |    2 +-
>  tools/perf/builtin-annotate.c       |    2 +-
>  tools/perf/builtin-record.c         |   14 +++++++-------
>  tools/perf/builtin-report.c         |   14 ++++++--------
>  tools/perf/builtin-top.c            |   22 +++++++++++-----------
>  tools/perf/ui/browsers/annotate.c   |    6 +++++-
>  tools/perf/ui/setup.c               |    1 +
>  7 files changed, 32 insertions(+), 29 deletions(-)

Pulled, thanks Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2012-05-30  0:11 Arnaldo Carvalho de Melo
  2012-05-30  7:00 ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-05-30  0:11 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Frederic Weisbecker, Mike Galbraith, Namhyung Kim,
	Paul Mackerras, Pekka Enberg, Peter Zijlstra, Stephane Eranian,
	Steven Rostedt

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

Hi Ingo,

	Please consider pulling.

	There are 5 other fixes in this repo, that went on my previous
perf/urgent pull request.

Thanks,

- Arnaldo


The following changes since commit a00dc319e98161949aa87f71a17db32e925c3257:

  perf record: Fix branch_stack type in perf_record_opts (2012-05-25 18:32:44 -0300)

are available in the git repository at:

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

for you to fetch changes up to a44b45f236dd1c1a8caccf9a078adf2941a20267:

  perf annotate browser: The idx_asm field should be used in asm only view (2012-05-29 20:52:38 -0300)

----------------------------------------------------------------
Fixes for perf/urgent

. Fix fallback to --stdio when TUI not supported, from Namhyung Kim.

. Use right cast for pointers/long in libtraceevent, from Namhyung Kim.

. Be consistent on using the right error reporting interface for fatal errors,
  from Namhyung Kim.

. Fix fallback to --stdio when TUI not supported, from Namhyung Kim.

. Use the right index in asm only view in the annotate browser.

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (1):
      perf annotate browser: The idx_asm field should be used in asm only view

Namhyung Kim (3):
      tools lib traceevent: Silence compiler warning on 32bit build
      perf ui: Make --stdio default when TUI is not supported
      perf tools: Convert critical messages to ui__error()

 tools/lib/traceevent/parse-filter.c |    2 +-
 tools/perf/builtin-annotate.c       |    2 +-
 tools/perf/builtin-record.c         |   14 +++++++-------
 tools/perf/builtin-report.c         |   14 ++++++--------
 tools/perf/builtin-top.c            |   22 +++++++++++-----------
 tools/perf/ui/browsers/annotate.c   |    6 +++++-
 tools/perf/ui/setup.c               |    1 +
 7 files changed, 32 insertions(+), 29 deletions(-)

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2012-05-25 19:59 Arnaldo Carvalho de Melo
@ 2012-05-25 21:46 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-05-25 21:46 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Franck Bui-Huu, Frederic Weisbecker,
	Mike Galbraith, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian

Em Fri, May 25, 2012 at 04:59:14PM -0300, Arnaldo Carvalho de Melo escreveu:
> Hi Ingo,
> 
> 	Please consider pulling,

Please disregard this one, a new one is coming marked v2,

- Arnaldo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2012-05-25 19:59 Arnaldo Carvalho de Melo
  2012-05-25 21:46 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-05-25 19:59 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Franck Bui-Huu, Frederic Weisbecker, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit eaec12d7f526694f24d581a4ad23de6ce0315cd2:

  tools lib traceevent: Fix signature of create_arg_item() (2012-05-24 11:36:05 -0300)

are available in the git repository at:

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

for you to fetch changes up to a44fa3fa69d2f5023b85d4d86faa9ab8945df260:

  perf top: Fix counter name fixup when fallbacking to cpu-clock (2012-05-25 14:49:51 -0300)

----------------------------------------------------------------
Fixes for perf/urgent.

. Fix build on newer distros where _FORTIFY_SOURCE needs optimization enable.

. Fix event name caching when fallbacking to cpu-clock

. Event name reconstruction from perf_event_attr now include modifiers.

. Elliminate leak on error path when parsing pid/tid list, From Franck Bui-Huu.

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
      perf tools: Do not use _FORTIFY_SOURCE when DEBUG=1 is specified
      perf evsel: Adopt the hardware event names
      perf top: Fix counter name fixup when fallbacking to cpu-clock

Franck Bui-Huu (1):
      perf tools: fix thread_map__new_by_pid_str() memory leak in error path

 tools/perf/Makefile            |    4 ++--
 tools/perf/builtin-top.c       |    2 +-
 tools/perf/util/evsel.c        |   21 +++++++++++++++++++++
 tools/perf/util/evsel.h        |    2 ++
 tools/perf/util/parse-events.c |   17 +----------------
 tools/perf/util/thread_map.c   |   21 ++++++++++-----------
 6 files changed, 37 insertions(+), 30 deletions(-)

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2012-04-20 16:53 Arnaldo Carvalho de Melo
@ 2012-04-25  7:08 ` Ingo Molnar
  0 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2012-04-25  7:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Avi Kivity, Corey Ashford, David Ahern,
	Frederic Weisbecker, Gleb Natapov, Jiri Olsa, Namhyung Kim,
	Otavio Salvador, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian, arnaldo.melo, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> Regards,
> 
> - Arnaldo
> 
> The following changes since commit 7ea6411f4ceb62e5e53170d59d10996dca20c599:
> 
>   Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2012-04-15 08:02:36 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf/urgent
> 
> for you to fetch changes up to 33ff581eddf744ea91a50d46c2f0961b375a9595:
> 
>   perf symbols: Read plt symbols from proper symtab_type binary (2012-04-20 13:34:49 -0300)
> 
> ----------------------------------------------------------------
> Fixes for perf/urgent
> 
> . Read PLT symbols from the same DSO as the main symtab, fix from Jiri Olsa.
> 
> . Add back the 'g' and 'h' event modifiers, they were dropped during the
>   conversion to use bison. Fix from Gleb Natapov
> 
> . Drop CROSS_COMPILE from flex and bison calls, not really needed. From
>   Otavio Salvador
> 
> . A kernel map variable can be NULL, but was being used despite the earlier
>   check. Fix from David Ahern
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> David Ahern (1):
>       perf report: Fix crash showing warning related to kernel maps
> 
> Gleb Natapov (1):
>       perf tools: Add 'G' and 'H' modifiers to event parsing
> 
> Jiri Olsa (1):
>       perf symbols: Read plt symbols from proper symtab_type binary
> 
> Otavio Salvador (1):
>       perf tools: Drop CROSS_COMPILE from flex and bison calls
> 
>  tools/perf/Makefile            |    4 ++--
>  tools/perf/builtin-report.c    |   17 ++++++++++++-----
>  tools/perf/builtin-test.c      |   30 ++++++++++++++++++++++++++++++
>  tools/perf/util/parse-events.l |    2 +-
>  tools/perf/util/symbol.c       |   13 ++++++-------
>  5 files changed, 51 insertions(+), 15 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2012-04-20 16:53 Arnaldo Carvalho de Melo
  2012-04-25  7:08 ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-20 16:53 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Avi Kivity,
	Corey Ashford, David Ahern, Frederic Weisbecker, Gleb Natapov,
	Jiri Olsa, Namhyung Kim, Otavio Salvador, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, arnaldo.melo,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

Regards,

- Arnaldo

The following changes since commit 7ea6411f4ceb62e5e53170d59d10996dca20c599:

  Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2012-04-15 08:02:36 +0200)

are available in the git repository at:


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

for you to fetch changes up to 33ff581eddf744ea91a50d46c2f0961b375a9595:

  perf symbols: Read plt symbols from proper symtab_type binary (2012-04-20 13:34:49 -0300)

----------------------------------------------------------------
Fixes for perf/urgent

. Read PLT symbols from the same DSO as the main symtab, fix from Jiri Olsa.

. Add back the 'g' and 'h' event modifiers, they were dropped during the
  conversion to use bison. Fix from Gleb Natapov

. Drop CROSS_COMPILE from flex and bison calls, not really needed. From
  Otavio Salvador

. A kernel map variable can be NULL, but was being used despite the earlier
  check. Fix from David Ahern

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

----------------------------------------------------------------
David Ahern (1):
      perf report: Fix crash showing warning related to kernel maps

Gleb Natapov (1):
      perf tools: Add 'G' and 'H' modifiers to event parsing

Jiri Olsa (1):
      perf symbols: Read plt symbols from proper symtab_type binary

Otavio Salvador (1):
      perf tools: Drop CROSS_COMPILE from flex and bison calls

 tools/perf/Makefile            |    4 ++--
 tools/perf/builtin-report.c    |   17 ++++++++++++-----
 tools/perf/builtin-test.c      |   30 ++++++++++++++++++++++++++++++
 tools/perf/util/parse-events.l |    2 +-
 tools/perf/util/symbol.c       |   13 ++++++-------
 5 files changed, 51 insertions(+), 15 deletions(-)

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2012-03-01 17:25 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-03-01 17:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo,
	Ananth N Mavinakayanahalli, Andrew Morton,
	Arnaldo Carvalho de Melo, David Ahern, Frederic Weisbecker,
	Jason Baron, Masami Hiramatsu, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Prashanth Nageshappa, Srikar Dronamraju,
	Steven Rostedt, Thomas Gleixner

The following changes since commit 30ce2f7eef095d1b8d070740f1948629814fe3c7:

  perf/hwbp: Fix a possible memory leak (2012-02-28 09:52:54 +0100)

are available in the git repository at:

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

for you to fetch changes up to 1c1bc9223387dacc48eb2b61b0baabe7e9cf47f6:

  perf probe: Ensure offset provided is not greater than function length without DWARF info too (2012-02-29 18:29:46 -0300)

----------------------------------------------------------------
perf/urgent fixes.

----------------------------------------------------------------
David Ahern (1):
      perf tools: Ensure comm string is properly terminated

Namhyung Kim (1):
      perf evlist: Return first evsel for non-sample event on old kernel

Prashanth Nageshappa (2):
      perf probe: Ensure offset provided is not greater than function length
      perf probe: Ensure offset provided is not greater than function length without DWARF info too

 tools/perf/util/event.c        |    1 +
 tools/perf/util/evlist.c       |    4 ++++
 tools/perf/util/probe-event.c  |    6 ++++++
 tools/perf/util/probe-finder.c |   12 +++++++++++-
 4 files changed, 22 insertions(+), 1 deletions(-)

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2011-06-04 10:13 ` Ingo Molnar
@ 2011-06-04 10:29   ` Ingo Molnar
  0 siblings, 0 replies; 46+ messages in thread
From: Ingo Molnar @ 2011-06-04 10:29 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, David Ahern, Frederic Weisbecker, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian, Tom Zanussi,
	Arnaldo Carvalho de Melo


* Ingo Molnar <mingo@elte.hu> wrote:

> One suggestion: please merge perf/urgent into perf/core before 
> queueing up more changes which would conflict.

i've done this as i've run into a conflict straight away.

Thanks,

	Ingo

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

* Re: [GIT PULL 0/4] perf/urgent fixes
  2011-06-03 16:25 Arnaldo Carvalho de Melo
@ 2011-06-04 10:13 ` Ingo Molnar
  2011-06-04 10:29   ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Ingo Molnar @ 2011-06-04 10:13 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, David Ahern, Frederic Weisbecker, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian, Tom Zanussi,
	Arnaldo Carvalho de Melo


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

> 
> Hi Ingo,
> 
> 	As we discussed, here are just the fixes from my last perf/core pull
> request, all related to having the python binding usable again, please consider
> pulling from:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf/urgent
> 
> Regards,
> 
> - Arnaldo
> 
> Arnaldo Carvalho de Melo (3):
>   perf evlist: Remove dependency on debug routines
>   perf python: Use exception to propagate errors
>   perf evlist: Don't die if sample_{id_all|type} is invalid
> 
> Frederic Weisbecker (1):
>   perf python: Fix argument name list of read_on_cpu()
> 
>  tools/perf/builtin-test.c |    2 +-
>  tools/perf/util/event.c   |   16 ----------
>  tools/perf/util/event.h   |    2 -
>  tools/perf/util/evlist.c  |   68 +++++++++++++++++++++++++--------------------
>  tools/perf/util/evlist.h  |    6 ++-
>  tools/perf/util/evsel.c   |   16 ++++++++++
>  tools/perf/util/evsel.h   |    7 ++++
>  tools/perf/util/python.c  |   14 ++++-----
>  tools/perf/util/session.c |   12 +++++++-
>  9 files changed, 83 insertions(+), 60 deletions(-)

Pulled, thanks a lot Arnaldo!

One suggestion: please merge perf/urgent into perf/core before 
queueing up more changes which would conflict.

Thanks,

	Ingo

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

* [GIT PULL 0/4] perf/urgent fixes
@ 2011-06-03 16:25 Arnaldo Carvalho de Melo
  2011-06-04 10:13 ` Ingo Molnar
  0 siblings, 1 reply; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-06-03 16:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Frederic Weisbecker, Ingo Molnar, Mike Galbraith, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Tom Zanussi,
	Arnaldo Carvalho de Melo


Hi Ingo,

	As we discussed, here are just the fixes from my last perf/core pull
request, all related to having the python binding usable again, please consider
pulling from:

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

Regards,

- Arnaldo

Arnaldo Carvalho de Melo (3):
  perf evlist: Remove dependency on debug routines
  perf python: Use exception to propagate errors
  perf evlist: Don't die if sample_{id_all|type} is invalid

Frederic Weisbecker (1):
  perf python: Fix argument name list of read_on_cpu()

 tools/perf/builtin-test.c |    2 +-
 tools/perf/util/event.c   |   16 ----------
 tools/perf/util/event.h   |    2 -
 tools/perf/util/evlist.c  |   68 +++++++++++++++++++++++++--------------------
 tools/perf/util/evlist.h  |    6 ++-
 tools/perf/util/evsel.c   |   16 ++++++++++
 tools/perf/util/evsel.h   |    7 ++++
 tools/perf/util/python.c  |   14 ++++-----
 tools/perf/util/session.c |   12 +++++++-
 9 files changed, 83 insertions(+), 60 deletions(-)


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

* [GIT PULL 0/4] perf/urgent fixes
@ 2010-12-16 12:00 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 46+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-12-16 12:00 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, 2nddept-manager,
	Francis Moreau, Franck Bui-Huu, Franck Bui-Huu,
	Frederic Weisbecker, Han Pingtian, Ingo Molnar, Masami Hiramatsu,
	Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Tom Zanussi, Arnaldo Carvalho de Melo

Hi Ingo,

        Please consider pulling from:

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

Regards,

- Arnaldo

Arnaldo Carvalho de Melo (1):
  perf buildid-list: Fix error return for success

Franck Bui-Huu (3):
  perf probe: Fix use of kernel image path given by 'k' option
  perf symbols: Stop using vmlinux files with no symbols
  perf buildid-cache: Fix symbolic link handling

 tools/perf/builtin-buildid-list.c |    3 +--
 tools/perf/builtin-probe.c        |    5 +++++
 tools/perf/util/header.c          |   10 ++++++----
 tools/perf/util/probe-event.c     |   15 ++++++++++++---
 tools/perf/util/symbol.c          |    4 ++--
 tools/perf/util/symbol.h          |    2 ++
 6 files changed, 28 insertions(+), 11 deletions(-)


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

end of thread, other threads:[~2018-06-03 17:12 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-28 19:16 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
2013-10-28 19:16 ` [PATCH 1/4] perf hists: Add color overhead for stdio output buffer Arnaldo Carvalho de Melo
2013-10-28 19:16 ` [PATCH 2/4] perf record: Split -g and --call-graph Arnaldo Carvalho de Melo
2013-10-28 19:16 ` [PATCH 3/4] perf top: Split -G " Arnaldo Carvalho de Melo
2013-10-28 19:16 ` [PATCH 4/4] perf tools: Fixup mmap event consumption Arnaldo Carvalho de Melo
2013-10-29  8:10 ` [GIT PULL 0/4] perf/urgent fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2018-06-02 14:59 Arnaldo Carvalho de Melo
2018-06-03 17:12 ` Ingo Molnar
2017-05-04 17:23 Arnaldo Carvalho de Melo
2017-05-04 17:44 ` Ingo Molnar
2016-01-26 14:32 Arnaldo Carvalho de Melo
2016-01-30  8:16 ` Ingo Molnar
2015-08-19 19:40 Arnaldo Carvalho de Melo
2015-08-20  9:48 ` Ingo Molnar
2015-07-09 15:45 Arnaldo Carvalho de Melo
2015-07-10  8:04 ` Ingo Molnar
2015-04-23 22:03 Arnaldo Carvalho de Melo
2015-04-24  2:02 ` Namhyung Kim
2015-04-24  2:09   ` Arnaldo Carvalho de Melo
2015-04-24  8:59   ` Javi Merino
2015-04-24 16:02     ` Arnaldo Carvalho de Melo
2015-04-24 16:05       ` Will Deacon
2015-01-03  2:55 Arnaldo Carvalho de Melo
2015-01-08  8:00 ` Ingo Molnar
2014-04-23 11:31 Jiri Olsa
2014-04-23 13:09 ` Ingo Molnar
2014-04-23 13:14 ` Ingo Molnar
2014-04-23 13:49   ` Jiri Olsa
2014-04-24  6:36     ` Ingo Molnar
2014-04-24 11:47       ` Jiri Olsa
2014-04-25  8:12         ` Ingo Molnar
2014-04-23 14:53   ` Jiri Olsa
2014-04-24  6:47     ` Ingo Molnar
2014-04-24 11:43       ` Jiri Olsa
2014-04-25 17:50     ` Andi Kleen
2012-05-30  0:11 Arnaldo Carvalho de Melo
2012-05-30  7:00 ` Ingo Molnar
2012-05-25 19:59 Arnaldo Carvalho de Melo
2012-05-25 21:46 ` Arnaldo Carvalho de Melo
2012-04-20 16:53 Arnaldo Carvalho de Melo
2012-04-25  7:08 ` Ingo Molnar
2012-03-01 17:25 Arnaldo Carvalho de Melo
2011-06-03 16:25 Arnaldo Carvalho de Melo
2011-06-04 10:13 ` Ingo Molnar
2011-06-04 10:29   ` Ingo Molnar
2010-12-16 12:00 Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).