All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 00/17] perf/core improvements and fixes
@ 2013-02-06 21:44 Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 01/17] perf hists browser: Add option for runtime switching perf data file Arnaldo Carvalho de Melo
                   ` (17 more replies)
  0 siblings, 18 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Andrew Jones,
	Borislav Petkov, Corey Ashford, David Ahern, Feng Tang,
	Frederic Weisbecker, Jiri Olsa, Joe Perches, Mike Galbraith,
	Namhyung Kim, Paul Gortmaker, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian, Arnaldo Carvalho de Melo

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 0fbdad078a70ed72248c3d30fe32e45e83be00d1:

  perf/x86: Allow for architecture specific RDPMC indexes (2013-02-06 19:45:24 +0100)

are available in the git repository at:

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

for you to fetch changes up to 88fd2b6a76264e9e14463f532caae09d82a53207:

  perf python: Link with sysfs.o (2013-02-06 18:09:28 -0300)

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

. Check for flex and bison before continuing building, from Borislav Petkov.

. Make event_copy local to mmaps, fixing buffer wrap around problems, from
  David Ahern.

. Add option for runtime switching perf data file in perf report, just press
  's' and a menu with the valid files found in the current directory will be
  presented, from Feng Tang.

. Add support to display whole group data for raw columns, from Jiri Olsa.

. Fix SIGALRM and pipe read race for the rwtop perl script. from Jiri Olsa.

. Fix perf_evsel::exclude_GH handling and add a test to catch regressions, from
  Jiri Olsa.

. Error checking fixes, from Namhyung Kim.

. Fix calloc argument ordering, from Paul Gortmaker.

. Fix set event list leader, from Stephane Eranian.

. Add per processor socket count aggregation in perf stat, from Stephane Eranian.

. Fix perf python binding breakage.

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf evlist: Pass the event_group info via perf_attr_details
      perf python: Link with sysfs.o

Borislav Petkov (1):
      perf tools: Check for flex and bison before continuing building

David Ahern (1):
      perf evlist: Make event_copy local to mmaps

Feng Tang (2):
      perf hists browser: Add option for runtime switching perf data file
      perf report: Enable the runtime switching of perf data file

Jiri Olsa (4):
      perf hists browser: Add support to display whole group data for raw columns
      perf perl scripts: Fix SIGALRM and pipe read race for rwtop
      perf tools: Fix perf_evsel::exclude_GH handling
      perf tests: Adding automated parsing tests for group :GH modifiers

Namhyung Kim (3):
      perf sort: Drop ip_[lr] arguments from _sort__sym_cmp()
      perf sort: Make setup_sorting returns an error code
      perf sort: Check return value of strdup()

Paul Gortmaker (1):
      perf tools: Fix calloc argument ordering

Stephane Eranian (3):
      perf evlist: Fix set event list leader
      perf tools: Add cpu_map processor socket level functions
      perf stat: Add per processor socket count aggregation

 tools/perf/Documentation/perf-stat.txt |   9 +-
 tools/perf/Makefile                    |  13 ++-
 tools/perf/builtin-annotate.c          |   3 +-
 tools/perf/builtin-diff.c              |   4 +-
 tools/perf/builtin-evlist.c            |   4 +-
 tools/perf/builtin-report.c            |  41 +++++---
 tools/perf/builtin-stat.c              | 126 +++++++++++++++++++++--
 tools/perf/builtin-top.c               |   3 +-
 tools/perf/perf.h                      |  26 -----
 tools/perf/scripts/perl/rwtop.pl       |   6 +-
 tools/perf/tests/hists_link.c          |   3 +-
 tools/perf/tests/parse-events.c        | 178 ++++++++++++++++++++++++++++++++-
 tools/perf/ui/browsers/hists.c         | 112 ++++++++++++++++++++-
 tools/perf/ui/hist.c                   |  53 +++++-----
 tools/perf/ui/keysyms.h                |   1 +
 tools/perf/util/callchain.c            |   2 +-
 tools/perf/util/cpumap.c               |  54 ++++++++++
 tools/perf/util/cpumap.h               |   9 ++
 tools/perf/util/evlist.c               |   7 +-
 tools/perf/util/evlist.h               |  29 +++++-
 tools/perf/util/evsel.c                |   2 +-
 tools/perf/util/evsel.h                |   1 +
 tools/perf/util/header.c               |   4 +-
 tools/perf/util/parse-events.c         |   8 --
 tools/perf/util/python-ext-sources     |   1 +
 tools/perf/util/sort.c                 |  38 ++++---
 tools/perf/util/sort.h                 |   2 +-
 27 files changed, 611 insertions(+), 128 deletions(-)

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

* [PATCH 01/17] perf hists browser: Add option for runtime switching perf data file
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 02/17] perf report: Enable the runtime switching of " Arnaldo Carvalho de Melo
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Feng Tang, Andi Kleen, Ingo Molnar, Namhyung Kim,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Feng Tang <feng.tang@intel.com>

Based on perf report/top/scripts browser integration idea from acme.

This will enable user to runtime switch the data file, when this option
is selected, it will popup all the legal data files in current working
directory, and the filename selected by user is saved in the global
variable "input_name", and a new key 'K_SWITCH_INPUT_DATA' will be
passed back to the built-in command which will perform the switch.

This initial version only enables it for 'perf report'.

v2: rebase to latest 'perf/core' branch (6e1d4dd) of acme's perf tree

Signed-off-by: Feng Tang <feng.tang@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1359873501-24541-1-git-send-email-feng.tang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/browsers/hists.c | 112 ++++++++++++++++++++++++++++++++++++++++-
 tools/perf/ui/keysyms.h        |   1 +
 2 files changed, 112 insertions(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 20ccd57..aa22704 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1241,6 +1241,96 @@ static inline bool is_report_browser(void *timer)
 	return timer == NULL;
 }
 
+/*
+ * Only runtime switching of perf data file will make "input_name" point
+ * to a malloced buffer. So add "is_input_name_malloced" flag to decide
+ * whether we need to call free() for current "input_name" during the switch.
+ */
+static bool is_input_name_malloced = false;
+
+static int switch_data_file(void)
+{
+	char *pwd, *options[32], *abs_path[32], *tmp;
+	DIR *pwd_dir;
+	int nr_options = 0, choice = -1, ret = -1;
+	struct dirent *dent;
+
+	pwd = getenv("PWD");
+	if (!pwd)
+		return ret;
+
+	pwd_dir = opendir(pwd);
+	if (!pwd_dir)
+		return ret;
+
+	memset(options, 0, sizeof(options));
+	memset(options, 0, sizeof(abs_path));
+
+	while ((dent = readdir(pwd_dir))) {
+		char path[PATH_MAX];
+		u64 magic;
+		char *name = dent->d_name;
+		FILE *file;
+
+		if (!(dent->d_type == DT_REG))
+			continue;
+
+		snprintf(path, sizeof(path), "%s/%s", pwd, name);
+
+		file = fopen(path, "r");
+		if (!file)
+			continue;
+
+		if (fread(&magic, 1, 8, file) < 8)
+			goto close_file_and_continue;
+
+		if (is_perf_magic(magic)) {
+			options[nr_options] = strdup(name);
+			if (!options[nr_options])
+				goto close_file_and_continue;
+
+			abs_path[nr_options] = strdup(path);
+			if (!abs_path[nr_options]) {
+				free(options[nr_options]);
+				ui__warning("Can't search all data files due to memory shortage.\n");
+				fclose(file);
+				break;
+			}
+
+			nr_options++;
+		}
+
+close_file_and_continue:
+		fclose(file);
+		if (nr_options >= 32) {
+			ui__warning("Too many perf data files in PWD!\n"
+				    "Only the first 32 files will be listed.\n");
+			break;
+		}
+	}
+	closedir(pwd_dir);
+
+	if (nr_options) {
+		choice = ui__popup_menu(nr_options, options);
+		if (choice < nr_options && choice >= 0) {
+			tmp = strdup(abs_path[choice]);
+			if (tmp) {
+				if (is_input_name_malloced)
+					free((void *)input_name);
+				input_name = tmp;
+				is_input_name_malloced = true;
+				ret = 0;
+			} else
+				ui__warning("Data switch failed due to memory shortage!\n");
+		}
+	}
+
+	free_popup_options(options, nr_options);
+	free_popup_options(abs_path, nr_options);
+	return ret;
+}
+
+
 static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 				    const char *helpline, const char *ev_name,
 				    bool left_exits,
@@ -1275,7 +1365,8 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 		int choice = 0,
 		    annotate = -2, zoom_dso = -2, zoom_thread = -2,
 		    annotate_f = -2, annotate_t = -2, browse_map = -2;
-		int scripts_comm = -2, scripts_symbol = -2, scripts_all = -2;
+		int scripts_comm = -2, scripts_symbol = -2,
+		    scripts_all = -2, switch_data = -2;
 
 		nr_options = 0;
 
@@ -1332,6 +1423,10 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 			if (is_report_browser(hbt))
 				goto do_scripts;
 			continue;
+		case 's':
+			if (is_report_browser(hbt))
+				goto do_data_switch;
+			continue;
 		case K_F1:
 		case 'h':
 		case '?':
@@ -1351,6 +1446,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 					"d             Zoom into current DSO\n"
 					"t             Zoom into current Thread\n"
 					"r             Run available scripts('perf report' only)\n"
+					"s             Switch to another data file in PWD ('perf report' only)\n"
 					"P             Print histograms to perf.hist.N\n"
 					"V             Verbose (DSO names in callchains, etc)\n"
 					"/             Filter symbol by name");
@@ -1458,6 +1554,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 		if (asprintf(&options[nr_options], "Run scripts for all samples") > 0)
 			scripts_all = nr_options++;
 
+		if (is_report_browser(hbt) && asprintf(&options[nr_options],
+				"Switch to another data file in PWD") > 0)
+			switch_data = nr_options++;
 add_exit_option:
 		options[nr_options++] = (char *)"Exit";
 retry_popup_menu:
@@ -1568,6 +1667,16 @@ do_scripts:
 
 			script_browse(script_opt);
 		}
+		/* Switch to another data file */
+		else if (choice == switch_data) {
+do_data_switch:
+			if (!switch_data_file()) {
+				key = K_SWITCH_INPUT_DATA;
+				break;
+			} else
+				ui__warning("Won't switch the data files due to\n"
+					"no valid data file get selected!\n");
+		}
 	}
 out_free_stack:
 	pstack__delete(fstack);
@@ -1694,6 +1803,7 @@ browse_hists:
 						"Do you really want to exit?"))
 					continue;
 				/* Fall thru */
+			case K_SWITCH_INPUT_DATA:
 			case 'q':
 			case CTRL('c'):
 				goto out;
diff --git a/tools/perf/ui/keysyms.h b/tools/perf/ui/keysyms.h
index 809eca5..65092d5 100644
--- a/tools/perf/ui/keysyms.h
+++ b/tools/perf/ui/keysyms.h
@@ -23,5 +23,6 @@
 #define K_TIMER	 -1
 #define K_ERROR	 -2
 #define K_RESIZE -3
+#define K_SWITCH_INPUT_DATA -4
 
 #endif /* _PERF_KEYSYMS_H_ */
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 02/17] perf report: Enable the runtime switching of perf data file
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 01/17] perf hists browser: Add option for runtime switching perf data file Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 03/17] perf evlist: Fix set event list leader Arnaldo Carvalho de Melo
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Feng Tang, Andi Kleen, Ingo Molnar, Namhyung Kim,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Feng Tang <feng.tang@intel.com>

This is for tui browser only. This patch will check the returned key of
tui hists browser, if it's K_SWITH_INPUT_DATA, then recreate a session
for the new selected data file.

V2: Move the setup_brower() before the "repeat" jump point.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1359873501-24541-2-git-send-email-feng.tang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-report.c | 38 +++++++++++++++++++++++++++-----------
 1 file changed, 27 insertions(+), 11 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 0d22187..91555d4 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -468,9 +468,17 @@ static int __cmd_report(struct perf_report *rep)
 
 	if (use_browser > 0) {
 		if (use_browser == 1) {
-			perf_evlist__tui_browse_hists(session->evlist, help,
-						      NULL,
-						      &session->header.env);
+			ret = perf_evlist__tui_browse_hists(session->evlist,
+							help,
+							NULL,
+							&session->header.env);
+			/*
+			 * Usually "ret" is the last pressed key, and we only
+			 * care if the key notifies us to switch data file.
+			 */
+			if (ret != K_SWITCH_INPUT_DATA)
+				ret = 0;
+
 		} else if (use_browser == 2) {
 			perf_evlist__gtk_browse_hists(session->evlist, help,
 						      NULL);
@@ -708,6 +716,16 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 		else
 			input_name = "perf.data";
 	}
+
+	if (strcmp(input_name, "-") != 0)
+		setup_browser(true);
+	else {
+		use_browser = 0;
+		perf_hpp__column_enable(PERF_HPP__OVERHEAD);
+		perf_hpp__init();
+	}
+
+repeat:
 	session = perf_session__new(input_name, O_RDONLY,
 				    report.force, false, &report.tool);
 	if (session == NULL)
@@ -733,14 +751,6 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 
 	}
 
-	if (strcmp(input_name, "-") != 0)
-		setup_browser(true);
-	else {
-		use_browser = 0;
-		perf_hpp__column_enable(PERF_HPP__OVERHEAD);
-		perf_hpp__init();
-	}
-
 	setup_sorting(report_usage, options);
 
 	/*
@@ -809,6 +819,12 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 	}
 
 	ret = __cmd_report(&report);
+	if (ret == K_SWITCH_INPUT_DATA) {
+		perf_session__delete(session);
+		goto repeat;
+	} else
+		ret = 0;
+
 error:
 	perf_session__delete(session);
 	return ret;
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 03/17] perf evlist: Fix set event list leader
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 01/17] perf hists browser: Add option for runtime switching perf data file Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 02/17] perf report: Enable the runtime switching of " Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 04/17] perf tools: Check for flex and bison before continuing building Arnaldo Carvalho de Melo
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Stephane Eranian, Ingo Molnar, Jiri Olsa,
	Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Stephane Eranian <eranian@google.com>

The __perf_evlist__set_leader() was setting the leader for all events in
the list except the first. Which means it assumed the first event
already had event->leader = event.

Seems like this should be the role of the function to also do this. This
is a requirement for an upcoming patch set.

Signed-off-by: Stephane Eranian <eranian@google.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20130131125437.GA3656@quad
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evlist.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index eddd5eb..ecf123e 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -122,8 +122,7 @@ void __perf_evlist__set_leader(struct list_head *list)
 	leader->nr_members = evsel->idx - leader->idx + 1;
 
 	list_for_each_entry(evsel, list, node) {
-		if (evsel != leader)
-			evsel->leader = leader;
+		evsel->leader = leader;
 	}
 }
 
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 04/17] perf tools: Check for flex and bison before continuing building
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 03/17] perf evlist: Fix set event list leader Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 05/17] perf sort: Drop ip_[lr] arguments from _sort__sym_cmp() Arnaldo Carvalho de Melo
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Borislav Petkov, Arnaldo Carvalho de Melo

From: Borislav Petkov <bp@suse.de>

Check whether both executables are present on the system before
continuing with the build instead of failing halfway, if either are
missing.

Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1359979554-9160-1-git-send-email-bp@alien8.de
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 4b1044c..a158309 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -149,6 +149,8 @@ RM = rm -f
 MKDIR = mkdir
 FIND = find
 INSTALL = install
+FLEX = flex
+BISON= bison
 
 # sparse is architecture-neutral, which means that we need to tell it
 # explicitly what architecture to check for. Fix this up for yours..
@@ -158,6 +160,14 @@ ifneq ($(MAKECMDGOALS),clean)
 ifneq ($(MAKECMDGOALS),tags)
 -include config/feature-tests.mak
 
+ifeq ($(call get-executable,$(FLEX)),)
+	dummy := $(error Error: $(FLEX) is missing on this system, please install it)
+endif
+
+ifeq ($(call get-executable,$(BISON)),)
+	dummy := $(error Error: $(BISON) is missing on this system, please install it)
+endif
+
 ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y)
 	CFLAGS := $(CFLAGS) -fstack-protector-all
 endif
@@ -282,9 +292,6 @@ endif
 
 export PERL_PATH
 
-FLEX = flex
-BISON= bison
-
 $(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
 	$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
 
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 05/17] perf sort: Drop ip_[lr] arguments from _sort__sym_cmp()
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 04/17] perf tools: Check for flex and bison before continuing building Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 06/17] perf sort: Make setup_sorting returns an error code Arnaldo Carvalho de Melo
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo

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

Current _sort__sym_cmp() function is used for comparing symbols between
two hist entries on symbol, symbol_from and symbol_to sort keys.  Those
functions pass addresses of symbols but it's meaningless since it gets
over-written inside of the _sort__sym_cmp function to a start address of
the symbol.  So just get rid of them.

This might cause a difference than prior output for branch stacks since
it seems not using start address of the symbol but branch address.
However AFAICS it'd be same as it gets overwritten anyway.

Also remove redundant part of code in sort__sym_cmp().

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1360130237-9963-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 8333661..03cabe5 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -160,9 +160,10 @@ struct sort_entry sort_dso = {
 
 /* --sort symbol */
 
-static int64_t _sort__sym_cmp(struct symbol *sym_l, struct symbol *sym_r,
-			      u64 ip_l, u64 ip_r)
+static int64_t _sort__sym_cmp(struct symbol *sym_l, struct symbol *sym_r)
 {
+	u64 ip_l, ip_r;
+
 	if (!sym_l || !sym_r)
 		return cmp_null(sym_l, sym_r);
 
@@ -178,21 +179,10 @@ static int64_t _sort__sym_cmp(struct symbol *sym_l, struct symbol *sym_r,
 static int64_t
 sort__sym_cmp(struct hist_entry *left, struct hist_entry *right)
 {
-	u64 ip_l, ip_r;
-
 	if (!left->ms.sym && !right->ms.sym)
 		return right->level - left->level;
 
-	if (!left->ms.sym || !right->ms.sym)
-		return cmp_null(left->ms.sym, right->ms.sym);
-
-	if (left->ms.sym == right->ms.sym)
-		return 0;
-
-	ip_l = left->ms.sym->start;
-	ip_r = right->ms.sym->start;
-
-	return _sort__sym_cmp(left->ms.sym, right->ms.sym, ip_l, ip_r);
+	return _sort__sym_cmp(left->ms.sym, right->ms.sym);
 }
 
 static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym,
@@ -383,8 +373,7 @@ sort__sym_from_cmp(struct hist_entry *left, struct hist_entry *right)
 	if (!from_l->sym && !from_r->sym)
 		return right->level - left->level;
 
-	return _sort__sym_cmp(from_l->sym, from_r->sym, from_l->addr,
-			     from_r->addr);
+	return _sort__sym_cmp(from_l->sym, from_r->sym);
 }
 
 static int64_t
@@ -396,7 +385,7 @@ sort__sym_to_cmp(struct hist_entry *left, struct hist_entry *right)
 	if (!to_l->sym && !to_r->sym)
 		return right->level - left->level;
 
-	return _sort__sym_cmp(to_l->sym, to_r->sym, to_l->addr, to_r->addr);
+	return _sort__sym_cmp(to_l->sym, to_r->sym);
 }
 
 static int hist_entry__sym_from_snprintf(struct hist_entry *self, char *bf,
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 06/17] perf sort: Make setup_sorting returns an error code
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 05/17] perf sort: Drop ip_[lr] arguments from _sort__sym_cmp() Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 07/17] perf sort: Check return value of strdup() Arnaldo Carvalho de Melo
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, Jiri Olsa,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

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

Currently the setup_sorting() is called for parsing sort keys and exits
if it failed to add the sort key.  As it's included in libperf it'd be
better returning an error code rather than exiting application inside of
the library.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Suggested-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1360130237-9963-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-annotate.c |  3 ++-
 tools/perf/builtin-diff.c     |  4 +++-
 tools/perf/builtin-report.c   |  3 ++-
 tools/perf/builtin-top.c      |  3 ++-
 tools/perf/tests/hists_link.c |  3 ++-
 tools/perf/util/sort.c        | 10 ++++++----
 tools/perf/util/sort.h        |  2 +-
 7 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index dc870cf..95a2ad3 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -309,7 +309,8 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (symbol__init() < 0)
 		return -1;
 
-	setup_sorting(annotate_usage, options);
+	if (setup_sorting() < 0)
+		usage_with_options(annotate_usage, options);
 
 	if (argc) {
 		/*
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 4af0b58..d207a97 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -605,7 +605,9 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
 
 	ui_init();
 
-	setup_sorting(diff_usage, options);
+	if (setup_sorting() < 0)
+		usage_with_options(diff_usage, options);
+
 	setup_pager();
 
 	sort_entry__setup_elide(&sort_dso, symbol_conf.dso_list, "dso", NULL);
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 91555d4..96b5a7f 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -751,7 +751,8 @@ repeat:
 
 	}
 
-	setup_sorting(report_usage, options);
+	if (setup_sorting() < 0)
+		usage_with_options(report_usage, options);
 
 	/*
 	 * Only in the newt browser we are doing integrated annotation,
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index f561757..72f6eb7 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1129,7 +1129,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (sort_order == default_sort_order)
 		sort_order = "dso,symbol";
 
-	setup_sorting(top_usage, options);
+	if (setup_sorting() < 0)
+		usage_with_options(top_usage, options);
 
 	if (top.use_stdio)
 		use_browser = 0;
diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c
index 0afd922..1be64a6 100644
--- a/tools/perf/tests/hists_link.c
+++ b/tools/perf/tests/hists_link.c
@@ -449,7 +449,8 @@ int test__hists_link(void)
 		goto out;
 
 	/* default sort order (comm,dso,sym) will be used */
-	setup_sorting(NULL, NULL);
+	if (setup_sorting() < 0)
+		goto out;
 
 	machines__init(&machines);
 
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 03cabe5..d8b4882 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -565,23 +565,25 @@ int sort_dimension__add(const char *tok)
 	return -ESRCH;
 }
 
-void setup_sorting(const char * const usagestr[], const struct option *opts)
+int setup_sorting(void)
 {
 	char *tmp, *tok, *str = strdup(sort_order);
+	int ret = 0;
 
 	for (tok = strtok_r(str, ", ", &tmp);
 			tok; tok = strtok_r(NULL, ", ", &tmp)) {
-		int ret = sort_dimension__add(tok);
+		ret = sort_dimension__add(tok);
 		if (ret == -EINVAL) {
 			error("Invalid --sort key: `%s'", tok);
-			usage_with_options(usagestr, opts);
+			break;
 		} else if (ret == -ESRCH) {
 			error("Unknown --sort key: `%s'", tok);
-			usage_with_options(usagestr, opts);
+			break;
 		}
 	}
 
 	free(str);
+	return ret;
 }
 
 void sort_entry__setup_elide(struct sort_entry *self, struct strlist *list,
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index e994ad3e..b13e56f6 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -160,7 +160,7 @@ struct sort_entry {
 extern struct sort_entry sort_thread;
 extern struct list_head hist_entry__sort_list;
 
-void setup_sorting(const char * const usagestr[], const struct option *opts);
+int setup_sorting(void);
 extern int sort_dimension__add(const char *);
 void sort_entry__setup_elide(struct sort_entry *self, struct strlist *list,
 			     const char *list_name, FILE *fp);
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 07/17] perf sort: Check return value of strdup()
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 06/17] perf sort: Make setup_sorting returns an error code Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 08/17] perf evlist: Make event_copy local to mmaps Arnaldo Carvalho de Melo
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo

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

When setup_sorting() is called, 'str' is passed to strtok_r() but it's
not checked to have a valid pointer.  As strtok_r() accepts NULL pointer
on a first argument and use the third argument in that case, it can
cause a trouble since our third argument, tmp, is not initialized.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1360130237-9963-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/sort.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index d8b4882..d41926c 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -570,6 +570,11 @@ int setup_sorting(void)
 	char *tmp, *tok, *str = strdup(sort_order);
 	int ret = 0;
 
+	if (str == NULL) {
+		error("Not enough memory to setup sort keys");
+		return -ENOMEM;
+	}
+
 	for (tok = strtok_r(str, ", ", &tmp);
 			tok; tok = strtok_r(NULL, ", ", &tmp)) {
 		ret = sort_dimension__add(tok);
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 08/17] perf evlist: Make event_copy local to mmaps
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 07/17] perf sort: Check return value of strdup() Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 09/17] perf tools: Add cpu_map processor socket level functions Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo

From: David Ahern <dsahern@gmail.com>

I am getting segfaults *after* the time sorting of perf samples where
the event type is off the charts:

(gdb) bt
\#0  0x0807b1b2 in hists__inc_nr_events (hists=0x80a99c4, type=1163281902) at util/hist.c:1225
\#1  0x08070795 in perf_session_deliver_event (session=0x80a9b90, event=0xf7a6aff8, sample=0xffffc318, tool=0xffffc520,
    file_offset=0) at util/session.c:884
\#2  0x0806f9b9 in flush_sample_queue (s=0x80a9b90, tool=0xffffc520) at util/session.c:555
\#3  0x0806fc53 in process_finished_round (tool=0xffffc520, event=0x0, session=0x80a9b90) at util/session.c:645

This is bizarre because the event has already been processed once --
before it was added to the samples queue -- and the event was found to
be sane at that time.

There seem to be 2 causes:

1. perf_evlist__mmap_read updates the read location even though there
are outstanding references to events sitting in the mmap buffers via the
ordered samples queue.

2. There is a single evlist->event_copy for all evlist entries.
event_copy is used to handle an event wrapping at the mmap buffer
boundary.

This patch addresses the second problem - making event_copy local to
each perf_mmap. With this change my highly repeatable use case no longer
fails.

The first problem is much more complicated and will be the subject of a
future patch.

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1360098762-61827-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/perf.h        | 26 --------------------------
 tools/perf/util/evlist.c |  4 ++--
 tools/perf/util/evlist.h | 29 ++++++++++++++++++++++++++++-
 3 files changed, 30 insertions(+), 29 deletions(-)

diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 8f3bf38..c2206c8 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -103,32 +103,6 @@
 #include "util/types.h"
 #include <stdbool.h>
 
-struct perf_mmap {
-	void			*base;
-	int			mask;
-	unsigned int		prev;
-};
-
-static inline unsigned int perf_mmap__read_head(struct perf_mmap *mm)
-{
-	struct perf_event_mmap_page *pc = mm->base;
-	int head = pc->data_head;
-	rmb();
-	return head;
-}
-
-static inline void perf_mmap__write_tail(struct perf_mmap *md,
-					 unsigned long tail)
-{
-	struct perf_event_mmap_page *pc = md->base;
-
-	/*
-	 * ensure all reads are done before we write the tail out.
-	 */
-	/* mb(); */
-	pc->data_tail = tail;
-}
-
 /*
  * prctl(PR_TASK_PERF_EVENTS_DISABLE) will (cheaply) disable all
  * counters in the current task.
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index ecf123e..bc4ad79 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -375,7 +375,7 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx)
 		if ((old & md->mask) + size != ((old + size) & md->mask)) {
 			unsigned int offset = old;
 			unsigned int len = min(sizeof(*event), size), cpy;
-			void *dst = &evlist->event_copy;
+			void *dst = &md->event_copy;
 
 			do {
 				cpy = min(md->mask + 1 - (offset & md->mask), len);
@@ -385,7 +385,7 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx)
 				len -= cpy;
 			} while (len);
 
-			event = &evlist->event_copy;
+			event = &md->event_copy;
 		}
 
 		old += size;
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index 73579a2..2dd07bd 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -17,6 +17,13 @@ struct perf_record_opts;
 #define PERF_EVLIST__HLIST_BITS 8
 #define PERF_EVLIST__HLIST_SIZE (1 << PERF_EVLIST__HLIST_BITS)
 
+struct perf_mmap {
+	void		 *base;
+	int		 mask;
+	unsigned int	 prev;
+	union perf_event event_copy;
+};
+
 struct perf_evlist {
 	struct list_head entries;
 	struct hlist_head heads[PERF_EVLIST__HLIST_SIZE];
@@ -30,7 +37,6 @@ struct perf_evlist {
 		pid_t	pid;
 	} workload;
 	bool		 overwrite;
-	union perf_event event_copy;
 	struct perf_mmap *mmap;
 	struct pollfd	 *pollfd;
 	struct thread_map *threads;
@@ -136,4 +142,25 @@ static inline struct perf_evsel *perf_evlist__last(struct perf_evlist *evlist)
 }
 
 size_t perf_evlist__fprintf(struct perf_evlist *evlist, FILE *fp);
+
+static inline unsigned int perf_mmap__read_head(struct perf_mmap *mm)
+{
+	struct perf_event_mmap_page *pc = mm->base;
+	int head = pc->data_head;
+	rmb();
+	return head;
+}
+
+static inline void perf_mmap__write_tail(struct perf_mmap *md,
+					 unsigned long tail)
+{
+	struct perf_event_mmap_page *pc = md->base;
+
+	/*
+	 * ensure all reads are done before we write the tail out.
+	 */
+	/* mb(); */
+	pc->data_tail = tail;
+}
+
 #endif /* __PERF_EVLIST_H */
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 09/17] perf tools: Add cpu_map processor socket level functions
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 08/17] perf evlist: Make event_copy local to mmaps Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 10/17] perf stat: Add per processor socket count aggregation Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Stephane Eranian, Andi Kleen, Ingo Molnar,
	Jiri Olsa, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Stephane Eranian <eranian@google.com>

This patch adds:
- cpu_map__get_socket: get socked id from cpu
- cpu_map__build_socket_map: build socket map
- cpu_map__socket: gets acutal socket from logical socket

Those functions are used by uncore and processor socket-level
aggregation modes.

Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1360161962-9675-2-git-send-email-eranian@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/cpumap.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/cpumap.h |  9 ++++++++
 2 files changed, 63 insertions(+)

diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 2b32ffa..f817046 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -1,4 +1,5 @@
 #include "util.h"
+#include "sysfs.h"
 #include "../perf.h"
 #include "cpumap.h"
 #include <assert.h>
@@ -201,3 +202,56 @@ void cpu_map__delete(struct cpu_map *map)
 {
 	free(map);
 }
+
+int cpu_map__get_socket(struct cpu_map *map, int idx)
+{
+	FILE *fp;
+	const char *mnt;
+	char path[PATH_MAX];
+	int cpu, ret;
+
+	if (idx > map->nr)
+		return -1;
+
+	cpu = map->map[idx];
+
+	mnt = sysfs_find_mountpoint();
+	if (!mnt)
+		return -1;
+
+	sprintf(path,
+		"%s/devices/system/cpu/cpu%d/topology/physical_package_id",
+		mnt, cpu);
+
+	fp = fopen(path, "r");
+	if (!fp)
+		return -1;
+	ret = fscanf(fp, "%d", &cpu);
+	fclose(fp);
+	return ret == 1 ? cpu : -1;
+}
+
+int cpu_map__build_socket_map(struct cpu_map *cpus, struct cpu_map **sockp)
+{
+	struct cpu_map *sock;
+	int nr = cpus->nr;
+	int cpu, s1, s2;
+
+	sock = calloc(1, sizeof(*sock) + nr * sizeof(int));
+	if (!sock)
+		return -1;
+
+	for (cpu = 0; cpu < nr; cpu++) {
+		s1 = cpu_map__get_socket(cpus, cpu);
+		for (s2 = 0; s2 < sock->nr; s2++) {
+			if (s1 == sock->map[s2])
+				break;
+		}
+		if (s2 == sock->nr) {
+			sock->map[sock->nr] = s1;
+			sock->nr++;
+		}
+	}
+	*sockp = sock;
+	return 0;
+}
diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h
index 2f68a3b..161b007 100644
--- a/tools/perf/util/cpumap.h
+++ b/tools/perf/util/cpumap.h
@@ -14,6 +14,15 @@ struct cpu_map *cpu_map__dummy_new(void);
 void cpu_map__delete(struct cpu_map *map);
 struct cpu_map *cpu_map__read(FILE *file);
 size_t cpu_map__fprintf(struct cpu_map *map, FILE *fp);
+int cpu_map__get_socket(struct cpu_map *map, int idx);
+int cpu_map__build_socket_map(struct cpu_map *cpus, struct cpu_map **sockp);
+
+static inline int cpu_map__socket(struct cpu_map *sock, int s)
+{
+	if (!sock || s > sock->nr || s < 0)
+		return 0;
+	return sock->map[s];
+}
 
 static inline int cpu_map__nr(const struct cpu_map *map)
 {
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 10/17] perf stat: Add per processor socket count aggregation
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 09/17] perf tools: Add cpu_map processor socket level functions Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 11/17] perf hists browser: Add support to display whole group data for raw columns Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Stephane Eranian, Andi Kleen, Ingo Molnar,
	Jiri Olsa, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Stephane Eranian <eranian@google.com>

This patch adds per-processor socket count aggregation for system-wide
mode measurements. This is a useful mode to detect imbalance between
sockets.

To enable this mode, use --aggr-socket in addition
to -a. (system-wide).

The output includes the socket number and the number of online
processors on that socket. This is useful to gauge the amount of
aggregation.

 # ./perf stat -I 1000 -a --aggr-socket -e cycles sleep 2
 #           time socket cpus             counts events
      1.000097680 S0        4          5,788,785 cycles
      2.000379943 S0        4         27,361,546 cycles
      2.001167808 S0        4            818,275 cycles

Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1360161962-9675-3-git-send-email-eranian@google.com
[ committer note: Added missing man page entry based on above comments ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-stat.txt |   9 ++-
 tools/perf/builtin-stat.c              | 126 ++++++++++++++++++++++++++++++---
 2 files changed, 123 insertions(+), 12 deletions(-)

diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index 5289da3..faf4f4f 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -116,9 +116,16 @@ perf stat --repeat 10 --null --sync --pre 'make -s O=defconfig-build/clean' -- m
 
 -I msecs::
 --interval-print msecs::
-	print count deltas every N milliseconds (minimum: 100ms)
+	Print count deltas every N milliseconds (minimum: 100ms)
 	example: perf stat -I 1000 -e cycles -a sleep 5
 
+--aggr-socket::
+Aggregate counts per processor socket for system-wide mode measurements.  This
+is a useful mode to detect imbalance between sockets.  To enable this mode,
+use --aggr-socket in addition to -a. (system-wide).  The output includes the
+socket number and the number of online processors on that socket. This is
+useful to gauge the amount of aggregation.
+
 EXAMPLES
 --------
 
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 0368a10..9984876 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -68,6 +68,7 @@
 static void print_stat(int argc, const char **argv);
 static void print_counter_aggr(struct perf_evsel *counter, char *prefix);
 static void print_counter(struct perf_evsel *counter, char *prefix);
+static void print_aggr_socket(char *prefix);
 
 static struct perf_evlist	*evsel_list;
 
@@ -79,6 +80,7 @@ static int			run_count			=  1;
 static bool			no_inherit			= false;
 static bool			scale				=  true;
 static bool			no_aggr				= false;
+static bool			aggr_socket			= false;
 static pid_t			child_pid			= -1;
 static bool			null_run			=  false;
 static int			detailed_run			=  0;
@@ -93,6 +95,7 @@ static const char		*post_cmd			= NULL;
 static bool			sync_run			= false;
 static unsigned int		interval			= 0;
 static struct timespec		ref_time;
+static struct cpu_map		*sock_map;
 
 static volatile int done = 0;
 
@@ -312,7 +315,9 @@ static void print_interval(void)
 	sprintf(prefix, "%6lu.%09lu%s", rs.tv_sec, rs.tv_nsec, csv_sep);
 
 	if (num_print_interval == 0 && !csv_output) {
-		if (no_aggr)
+		if (aggr_socket)
+			fprintf(output, "#           time socket cpus             counts events\n");
+		else if (no_aggr)
 			fprintf(output, "#           time CPU                 counts events\n");
 		else
 			fprintf(output, "#           time             counts events\n");
@@ -321,7 +326,9 @@ static void print_interval(void)
 	if (++num_print_interval == 25)
 		num_print_interval = 0;
 
-	if (no_aggr) {
+	if (aggr_socket)
+		print_aggr_socket(prefix);
+	else if (no_aggr) {
 		list_for_each_entry(counter, &evsel_list->entries, node)
 			print_counter(counter, prefix);
 	} else {
@@ -349,6 +356,12 @@ static int __run_perf_stat(int argc __maybe_unused, const char **argv)
 		ts.tv_nsec = 0;
 	}
 
+	if (aggr_socket
+	    && cpu_map__build_socket_map(evsel_list->cpus, &sock_map)) {
+		perror("cannot build socket map");
+		return -1;
+	}
+
 	if (forks && (pipe(child_ready_pipe) < 0 || pipe(go_pipe) < 0)) {
 		perror("failed to create pipes");
 		return -1;
@@ -529,13 +542,21 @@ static void print_noise(struct perf_evsel *evsel, double avg)
 	print_noise_pct(stddev_stats(&ps->res_stats[0]), avg);
 }
 
-static void nsec_printout(int cpu, struct perf_evsel *evsel, double avg)
+static void nsec_printout(int cpu, int nr, struct perf_evsel *evsel, double avg)
 {
 	double msecs = avg / 1e6;
 	char cpustr[16] = { '\0', };
 	const char *fmt = csv_output ? "%s%.6f%s%s" : "%s%18.6f%s%-25s";
 
-	if (no_aggr)
+	if (aggr_socket)
+		sprintf(cpustr, "S%*d%s%*d%s",
+			csv_output ? 0 : -5,
+			cpu,
+			csv_sep,
+			csv_output ? 0 : 4,
+			nr,
+			csv_sep);
+	else if (no_aggr)
 		sprintf(cpustr, "CPU%*d%s",
 			csv_output ? 0 : -4,
 			perf_evsel__cpus(evsel)->map[cpu], csv_sep);
@@ -734,7 +755,7 @@ static void print_ll_cache_misses(int cpu,
 	fprintf(output, " of all LL-cache hits   ");
 }
 
-static void abs_printout(int cpu, struct perf_evsel *evsel, double avg)
+static void abs_printout(int cpu, int nr, struct perf_evsel *evsel, double avg)
 {
 	double total, ratio = 0.0;
 	char cpustr[16] = { '\0', };
@@ -747,7 +768,15 @@ static void abs_printout(int cpu, struct perf_evsel *evsel, double avg)
 	else
 		fmt = "%s%18.0f%s%-25s";
 
-	if (no_aggr)
+	if (aggr_socket)
+		sprintf(cpustr, "S%*d%s%*d%s",
+			csv_output ? 0 : -5,
+			cpu,
+			csv_sep,
+			csv_output ? 0 : 4,
+			nr,
+			csv_sep);
+	else if (no_aggr)
 		sprintf(cpustr, "CPU%*d%s",
 			csv_output ? 0 : -4,
 			perf_evsel__cpus(evsel)->map[cpu], csv_sep);
@@ -853,6 +882,70 @@ static void abs_printout(int cpu, struct perf_evsel *evsel, double avg)
 	}
 }
 
+static void print_aggr_socket(char *prefix)
+{
+	struct perf_evsel *counter;
+	u64 ena, run, val;
+	int cpu, s, s2, sock, nr;
+
+	if (!sock_map)
+		return;
+
+	for (s = 0; s < sock_map->nr; s++) {
+		sock = cpu_map__socket(sock_map, s);
+		list_for_each_entry(counter, &evsel_list->entries, node) {
+			val = ena = run = 0;
+			nr = 0;
+			for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) {
+				s2 = cpu_map__get_socket(evsel_list->cpus, cpu);
+				if (s2 != sock)
+					continue;
+				val += counter->counts->cpu[cpu].val;
+				ena += counter->counts->cpu[cpu].ena;
+				run += counter->counts->cpu[cpu].run;
+				nr++;
+			}
+			if (prefix)
+				fprintf(output, "%s", prefix);
+
+			if (run == 0 || ena == 0) {
+				fprintf(output, "S%*d%s%*d%s%*s%s%*s",
+					csv_output ? 0 : -5,
+					s,
+					csv_sep,
+					csv_output ? 0 : 4,
+					nr,
+					csv_sep,
+					csv_output ? 0 : 18,
+					counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED,
+					csv_sep,
+					csv_output ? 0 : -24,
+					perf_evsel__name(counter));
+				if (counter->cgrp)
+					fprintf(output, "%s%s",
+						csv_sep, counter->cgrp->name);
+
+				fputc('\n', output);
+				continue;
+			}
+
+			if (nsec_counter(counter))
+				nsec_printout(sock, nr, counter, val);
+			else
+				abs_printout(sock, nr, counter, val);
+
+			if (!csv_output) {
+				print_noise(counter, 1.0);
+
+				if (run != ena)
+					fprintf(output, "  (%.2f%%)",
+						100.0 * run / ena);
+			}
+			fputc('\n', output);
+		}
+	}
+}
+
 /*
  * Print out the results of a single counter:
  * aggregated counts in system-wide mode
@@ -882,9 +975,9 @@ static void print_counter_aggr(struct perf_evsel *counter, char *prefix)
 	}
 
 	if (nsec_counter(counter))
-		nsec_printout(-1, counter, avg);
+		nsec_printout(-1, 0, counter, avg);
 	else
-		abs_printout(-1, counter, avg);
+		abs_printout(-1, 0, counter, avg);
 
 	print_noise(counter, avg);
 
@@ -940,9 +1033,9 @@ static void print_counter(struct perf_evsel *counter, char *prefix)
 		}
 
 		if (nsec_counter(counter))
-			nsec_printout(cpu, counter, val);
+			nsec_printout(cpu, 0, counter, val);
 		else
-			abs_printout(cpu, counter, val);
+			abs_printout(cpu, 0, counter, val);
 
 		if (!csv_output) {
 			print_noise(counter, 1.0);
@@ -980,7 +1073,9 @@ static void print_stat(int argc, const char **argv)
 		fprintf(output, ":\n\n");
 	}
 
-	if (no_aggr) {
+	if (aggr_socket)
+		print_aggr_socket(NULL);
+	else if (no_aggr) {
 		list_for_each_entry(counter, &evsel_list->entries, node)
 			print_counter(counter, NULL);
 	} else {
@@ -1228,6 +1323,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 			"command to run after to the measured command"),
 	OPT_UINTEGER('I', "interval-print", &interval,
 		    "print counts at regular interval in ms (>= 100)"),
+	OPT_BOOLEAN(0, "aggr-socket", &aggr_socket, "aggregate counts per processor socket"),
 	OPT_END()
 	};
 	const char * const stat_usage[] = {
@@ -1314,6 +1410,14 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 		usage_with_options(stat_usage, options);
 	}
 
+	if (aggr_socket) {
+		if (!perf_target__has_cpu(&target)) {
+			fprintf(stderr, "--aggr-socket only available in system-wide mode (-a)\n");
+			usage_with_options(stat_usage, options);
+		}
+		no_aggr = true;
+	}
+
 	if (add_default_attributes())
 		goto out;
 
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 11/17] perf hists browser: Add support to display whole group data for raw columns
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 10/17] perf stat: Add per processor socket count aggregation Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 12/17] perf perl scripts: Fix SIGALRM and pipe read race for rwtop Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Corey Ashford, Frederic Weisbecker,
	Ingo Molnar, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Currently we don't display group members' values for raw columns like
'Samples' and 'Period' when in group report mode.

Uniting '__hpp__percent_fmt' and '__hpp__raw_fmt' function under new
function __hpp__fmt. It's basically '__hpp__percent_fmt' code with new
'fmt_percent' bool parameter added saying whether raw number or
percentage should be printed.

This way raw columns print out all the group members when
in group report mode, like:

  $ perf record -e '{cycles,cache-misses}' ls
  ...
  $ perf report --group --show-total-period --stdio
  ...
  #         Overhead                    Period  Command      Shared Object                             Symbol
  # ................  ........................  .......  .................  .................................
  #
      23.63%  11.24%       3331335         317       ls  [kernel.kallsyms]  [k] __lock_acquire
      12.72%   0.00%       1793100           0       ls  [kernel.kallsyms]  [k] native_sched_clock
       9.72%   0.00%       1369920           0       ls  libc-2.14.90.so    [.] _nl_find_locale
       0.03%   0.07%          4476           2       ls  [kernel.kallsyms]  [k] intel_pmu_enable_all
       0.00%  11.73%             0         331       ls  ld-2.14.90.so      [.] _dl_cache_libcmp
       0.00%  11.06%             0         312       ls  [kernel.kallsyms]  [k] vma_interval_tree_insert

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.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/1359981185-16819-2-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/hist.c | 53 ++++++++++++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 27 deletions(-)

diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index a47ce98..d671e63 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -9,18 +9,24 @@
 
 typedef int (*hpp_snprint_fn)(char *buf, size_t size, const char *fmt, ...);
 
-static int __hpp__percent_fmt(struct perf_hpp *hpp, struct hist_entry *he,
-			      u64 (*get_field)(struct hist_entry *),
-			      const char *fmt, hpp_snprint_fn print_fn)
+static int __hpp__fmt(struct perf_hpp *hpp, struct hist_entry *he,
+		      u64 (*get_field)(struct hist_entry *),
+		      const char *fmt, hpp_snprint_fn print_fn,
+		      bool fmt_percent)
 {
 	int ret;
-	double percent = 0.0;
 	struct hists *hists = he->hists;
 
-	if (hists->stats.total_period)
-		percent = 100.0 * get_field(he) / hists->stats.total_period;
+	if (fmt_percent) {
+		double percent = 0.0;
+
+		if (hists->stats.total_period)
+			percent = 100.0 * get_field(he) /
+				  hists->stats.total_period;
 
-	ret = print_fn(hpp->buf, hpp->size, fmt, percent);
+		ret = print_fn(hpp->buf, hpp->size, fmt, percent);
+	} else
+		ret = print_fn(hpp->buf, hpp->size, fmt, get_field(he));
 
 	if (symbol_conf.event_group) {
 		int prev_idx, idx_delta;
@@ -49,11 +55,15 @@ static int __hpp__percent_fmt(struct perf_hpp *hpp, struct hist_entry *he,
 				 * have no sample
 				 */
 				ret += print_fn(hpp->buf + ret, hpp->size - ret,
-						fmt, 0.0);
+						fmt, 0);
 			}
 
-			ret += print_fn(hpp->buf + ret, hpp->size - ret,
-					fmt, 100.0 * period / total);
+			if (fmt_percent)
+				ret += print_fn(hpp->buf + ret, hpp->size - ret,
+						fmt, 100.0 * period / total);
+			else
+				ret += print_fn(hpp->buf + ret, hpp->size - ret,
+						fmt, period);
 
 			prev_idx = perf_evsel__group_idx(evsel);
 		}
@@ -65,23 +75,12 @@ static int __hpp__percent_fmt(struct perf_hpp *hpp, struct hist_entry *he,
 			 * zero-fill group members at last which have no sample
 			 */
 			ret += print_fn(hpp->buf + ret, hpp->size - ret,
-					fmt, 0.0);
+					fmt, 0);
 		}
 	}
 	return ret;
 }
 
-static int __hpp__raw_fmt(struct perf_hpp *hpp, struct hist_entry *he,
-			  u64 (*get_field)(struct hist_entry *),
-			  const char *fmt, hpp_snprint_fn print_fn)
-{
-	int ret;
-
-	ret = print_fn(hpp->buf, hpp->size, fmt, get_field(he));
-	return ret;
-}
-
-
 #define __HPP_HEADER_FN(_type, _str, _min_width, _unit_width) 		\
 static int hpp__header_##_type(struct perf_hpp *hpp)			\
 {									\
@@ -116,16 +115,16 @@ static u64 he_get_##_field(struct hist_entry *he)				\
 										\
 static int hpp__color_##_type(struct perf_hpp *hpp, struct hist_entry *he) 	\
 {										\
-	return __hpp__percent_fmt(hpp, he, he_get_##_field, " %6.2f%%",		\
-				  (hpp_snprint_fn)percent_color_snprintf); 	\
+	return __hpp__fmt(hpp, he, he_get_##_field, " %6.2f%%",			\
+			  (hpp_snprint_fn)percent_color_snprintf, true);	\
 }
 
 #define __HPP_ENTRY_PERCENT_FN(_type, _field)					\
 static int hpp__entry_##_type(struct perf_hpp *hpp, struct hist_entry *he) 	\
 {										\
 	const char *fmt = symbol_conf.field_sep ? " %.2f" : " %6.2f%%";		\
-	return __hpp__percent_fmt(hpp, he, he_get_##_field, fmt,		\
-				  scnprintf);					\
+	return __hpp__fmt(hpp, he, he_get_##_field, fmt,			\
+			  scnprintf, true);					\
 }
 
 #define __HPP_ENTRY_RAW_FN(_type, _field)					\
@@ -137,7 +136,7 @@ static u64 he_get_raw_##_field(struct hist_entry *he)				\
 static int hpp__entry_##_type(struct perf_hpp *hpp, struct hist_entry *he) 	\
 {										\
 	const char *fmt = symbol_conf.field_sep ? " %"PRIu64 : " %11"PRIu64;	\
-	return __hpp__raw_fmt(hpp, he, he_get_raw_##_field, fmt, scnprintf);	\
+	return __hpp__fmt(hpp, he, he_get_raw_##_field, fmt, scnprintf, false);	\
 }
 
 #define HPP_PERCENT_FNS(_type, _str, _field, _min_width, _unit_width)	\
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 12/17] perf perl scripts: Fix SIGALRM and pipe read race for rwtop
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (10 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 11/17] perf hists browser: Add support to display whole group data for raw columns Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 13/17] perf tools: Fix perf_evsel::exclude_GH handling Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Andrew Jones, Corey Ashford,
	David Ahern, Frederic Weisbecker, Ingo Molnar, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Fixing rwtop script race. The issue is caused by rwtop script triggering
SIGALRM and underneath pipe reading layer reporting error when
interrupted.

Fixing this by setting SA_RESTART for rwtop SIGALRM handler, which
avoids interruption of the pipe reading layer.

The discussion for this issue & fix is here:
https://lkml.org/lkml/2012/9/18/123

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Original-patch-by: Andrew Jones <drjones@redhat.com>
Cc: Andrew Jones <drjones@redhat.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/1360080351-3246-2-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/scripts/perl/rwtop.pl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/perf/scripts/perl/rwtop.pl b/tools/perf/scripts/perl/rwtop.pl
index 4bb3ecd..8b20787 100644
--- a/tools/perf/scripts/perl/rwtop.pl
+++ b/tools/perf/scripts/perl/rwtop.pl
@@ -17,6 +17,7 @@ use lib "$ENV{'PERF_EXEC_PATH'}/scripts/perl/Perf-Trace-Util/lib";
 use lib "./Perf-Trace-Util/lib";
 use Perf::Trace::Core;
 use Perf::Trace::Util;
+use POSIX qw/SIGALRM SA_RESTART/;
 
 my $default_interval = 3;
 my $nlines = 20;
@@ -90,7 +91,10 @@ sub syscalls::sys_enter_write
 
 sub trace_begin
 {
-    $SIG{ALRM} = \&set_print_pending;
+    my $sa = POSIX::SigAction->new(\&set_print_pending);
+    $sa->flags(SA_RESTART);
+    $sa->safe(1);
+    POSIX::sigaction(SIGALRM, $sa) or die "Can't set SIGALRM handler: $!\n";
     alarm 1;
 }
 
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 13/17] perf tools: Fix perf_evsel::exclude_GH handling
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (11 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 12/17] perf perl scripts: Fix SIGALRM and pipe read race for rwtop Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 14/17] perf tests: Adding automated parsing tests for group :GH modifiers Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Corey Ashford, Frederic Weisbecker,
	Ingo Molnar, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Let the perf_evsel::exclude_GH only prevent the reset of exclude_host
and exclude_guest attributes in case they were already set.

We cannot reset their values to 0, because they might have other
defaults set by event_attr_init.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.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/1359971803-2343-2-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/parse-events.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 4e0f5c2..c84f48c 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -699,14 +699,6 @@ static int get_event_modifier(struct event_modifier *mod, char *str,
 	int exclude = eu | ek | eh;
 	int exclude_GH = evsel ? evsel->exclude_GH : 0;
 
-	/*
-	 * We are here for group and 'GH' was not set as event
-	 * modifier and whatever event/group modifier override
-	 * default 'GH' setup.
-	 */
-	if (evsel && !exclude_GH)
-		eH = eG = 0;
-
 	memset(mod, 0, sizeof(*mod));
 
 	while (*str) {
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 14/17] perf tests: Adding automated parsing tests for group :GH modifiers
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (12 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 13/17] perf tools: Fix perf_evsel::exclude_GH handling Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 15/17] perf tools: Fix calloc argument ordering Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Corey Ashford, Frederic Weisbecker,
	Ingo Molnar, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

The ':GH' group modifier handling was just recently fixed, adding some
autommated tests to keep it that way. Adding tests for following events:

  "{cycles,cache-misses:G}:H"
  "{cycles,cache-misses:H}:G"
  "{cycles:G,cache-misses:H}:u"
  "{cycles:G,cache-misses:H}:uG"

Plus fixing test__group2 test.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.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/1359971803-2343-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/parse-events.c | 178 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 177 insertions(+), 1 deletion(-)

diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 80a8daf..c5636f3 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -577,7 +577,7 @@ static int test__group2(struct perf_evlist *evlist)
 	TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user);
 	TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel);
 	TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
-	TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest);
+	TEST_ASSERT_VAL("wrong exclude guest", evsel->attr.exclude_guest);
 	TEST_ASSERT_VAL("wrong exclude host", !evsel->attr.exclude_host);
 	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
 	TEST_ASSERT_VAL("wrong leader", evsel->leader == leader);
@@ -811,6 +811,166 @@ static int test__group5(struct perf_evlist *evlist __maybe_unused)
 	return 0;
 }
 
+static int test__group_gh1(struct perf_evlist *evlist)
+{
+	struct perf_evsel *evsel, *leader;
+
+	TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->nr_entries);
+	TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->nr_groups);
+
+	/* cycles + :H group modifier */
+	evsel = leader = perf_evlist__first(evlist);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",
+			PERF_COUNT_HW_CPU_CYCLES == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user);
+	TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel);
+	TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv);
+	TEST_ASSERT_VAL("wrong exclude guest", evsel->attr.exclude_guest);
+	TEST_ASSERT_VAL("wrong exclude host", !evsel->attr.exclude_host);
+	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong group name", !evsel->group_name);
+	TEST_ASSERT_VAL("wrong leader", perf_evsel__is_group_leader(evsel));
+	TEST_ASSERT_VAL("wrong nr_members", evsel->nr_members == 2);
+	TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 0);
+
+	/* cache-misses:G + :H group modifier */
+	evsel = perf_evsel__next(evsel);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",
+			PERF_COUNT_HW_CACHE_MISSES == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user);
+	TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel);
+	TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv);
+	TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest);
+	TEST_ASSERT_VAL("wrong exclude host", !evsel->attr.exclude_host);
+	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong leader", evsel->leader == leader);
+	TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 1);
+
+	return 0;
+}
+
+static int test__group_gh2(struct perf_evlist *evlist)
+{
+	struct perf_evsel *evsel, *leader;
+
+	TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->nr_entries);
+	TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->nr_groups);
+
+	/* cycles + :G group modifier */
+	evsel = leader = perf_evlist__first(evlist);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",
+			PERF_COUNT_HW_CPU_CYCLES == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user);
+	TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel);
+	TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv);
+	TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest);
+	TEST_ASSERT_VAL("wrong exclude host", evsel->attr.exclude_host);
+	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong group name", !evsel->group_name);
+	TEST_ASSERT_VAL("wrong leader", perf_evsel__is_group_leader(evsel));
+	TEST_ASSERT_VAL("wrong nr_members", evsel->nr_members == 2);
+	TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 0);
+
+	/* cache-misses:H + :G group modifier */
+	evsel = perf_evsel__next(evsel);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",
+			PERF_COUNT_HW_CACHE_MISSES == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user);
+	TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel);
+	TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv);
+	TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest);
+	TEST_ASSERT_VAL("wrong exclude host", !evsel->attr.exclude_host);
+	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong leader", evsel->leader == leader);
+	TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 1);
+
+	return 0;
+}
+
+static int test__group_gh3(struct perf_evlist *evlist)
+{
+	struct perf_evsel *evsel, *leader;
+
+	TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->nr_entries);
+	TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->nr_groups);
+
+	/* cycles:G + :u group modifier */
+	evsel = leader = perf_evlist__first(evlist);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",
+			PERF_COUNT_HW_CPU_CYCLES == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user);
+	TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel);
+	TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
+	TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest);
+	TEST_ASSERT_VAL("wrong exclude host", evsel->attr.exclude_host);
+	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong group name", !evsel->group_name);
+	TEST_ASSERT_VAL("wrong leader", perf_evsel__is_group_leader(evsel));
+	TEST_ASSERT_VAL("wrong nr_members", evsel->nr_members == 2);
+	TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 0);
+
+	/* cache-misses:H + :u group modifier */
+	evsel = perf_evsel__next(evsel);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",
+			PERF_COUNT_HW_CACHE_MISSES == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user);
+	TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel);
+	TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
+	TEST_ASSERT_VAL("wrong exclude guest", evsel->attr.exclude_guest);
+	TEST_ASSERT_VAL("wrong exclude host", !evsel->attr.exclude_host);
+	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong leader", evsel->leader == leader);
+	TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 1);
+
+	return 0;
+}
+
+static int test__group_gh4(struct perf_evlist *evlist)
+{
+	struct perf_evsel *evsel, *leader;
+
+	TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->nr_entries);
+	TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->nr_groups);
+
+	/* cycles:G + :uG group modifier */
+	evsel = leader = perf_evlist__first(evlist);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",
+			PERF_COUNT_HW_CPU_CYCLES == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user);
+	TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel);
+	TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
+	TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest);
+	TEST_ASSERT_VAL("wrong exclude host", evsel->attr.exclude_host);
+	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong group name", !evsel->group_name);
+	TEST_ASSERT_VAL("wrong leader", perf_evsel__is_group_leader(evsel));
+	TEST_ASSERT_VAL("wrong nr_members", evsel->nr_members == 2);
+	TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 0);
+
+	/* cache-misses:H + :uG group modifier */
+	evsel = perf_evsel__next(evsel);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",
+			PERF_COUNT_HW_CACHE_MISSES == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user);
+	TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel);
+	TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
+	TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest);
+	TEST_ASSERT_VAL("wrong exclude host", !evsel->attr.exclude_host);
+	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong leader", evsel->leader == leader);
+	TEST_ASSERT_VAL("wrong group_idx", perf_evsel__group_idx(evsel) == 1);
+
+	return 0;
+}
+
 static int count_tracepoints(void)
 {
 	char events_path[PATH_MAX];
@@ -1011,6 +1171,22 @@ static struct evlist_test test__events[] = {
 		.name  = "*:*",
 		.check = test__all_tracepoints,
 	},
+	[34] = {
+		.name  = "{cycles,cache-misses:G}:H",
+		.check = test__group_gh1,
+	},
+	[35] = {
+		.name  = "{cycles,cache-misses:H}:G",
+		.check = test__group_gh2,
+	},
+	[36] = {
+		.name  = "{cycles:G,cache-misses:H}:u",
+		.check = test__group_gh3,
+	},
+	[37] = {
+		.name  = "{cycles:G,cache-misses:H}:uG",
+		.check = test__group_gh4,
+	},
 };
 
 static struct evlist_test test__events_pmu[] = {
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 15/17] perf tools: Fix calloc argument ordering
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (13 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 14/17] perf tests: Adding automated parsing tests for group :GH modifiers Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 16/17] perf evlist: Pass the event_group info via perf_attr_details Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Paul Gortmaker, Ingo Molnar, Joe Perches,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Paul Gortmaker <paul.gortmaker@windriver.com>

A sweep of the kernel for regex "kcalloc(sizeof" turned up 2 reversed
args, fixed in commit d3d09e18203dba16a9dbdb2b4cc673d90748cdd1 ("EDAC:
Fix kcalloc argument order") and also fixed in the networking commit
a1b1add07fa794974573d93483d68e373edfe7bd ("gro: Fix kcalloc argument
order").

I know that was the regex used, because on seeing the 1st of these
changes, I wondered "how many other instances of this are there" and I
happened to just use "calloc(sizeof" as a regex and it in turn found
these additional reversed args instances in the perf code.

In the kcalloc cases, the changes are cosmetic, since the numbers are
simply multiplied.  I had no desire to go data mining in userspace to
see if the same thing held true there, however.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Joe Perches <joe@perches.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1359594349-25912-1-git-send-email-paul.gortmaker@windriver.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/callchain.c | 2 +-
 tools/perf/util/header.c    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index d3b3f5d..42b6a63 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -444,7 +444,7 @@ int callchain_cursor_append(struct callchain_cursor *cursor,
 	struct callchain_cursor_node *node = *cursor->last;
 
 	if (!node) {
-		node = calloc(sizeof(*node), 1);
+		node = calloc(1, sizeof(*node));
 		if (!node)
 			return -ENOMEM;
 
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 8022b52..f4bfd79 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2253,7 +2253,7 @@ static int perf_header__adds_write(struct perf_header *header,
 	if (!nr_sections)
 		return 0;
 
-	feat_sec = p = calloc(sizeof(*feat_sec), nr_sections);
+	feat_sec = p = calloc(nr_sections, sizeof(*feat_sec));
 	if (feat_sec == NULL)
 		return -ENOMEM;
 
@@ -2425,7 +2425,7 @@ int perf_header__process_sections(struct perf_header *header, int fd,
 	if (!nr_sections)
 		return 0;
 
-	feat_sec = sec = calloc(sizeof(*feat_sec), nr_sections);
+	feat_sec = sec = calloc(nr_sections, sizeof(*feat_sec));
 	if (!feat_sec)
 		return -1;
 
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 16/17] perf evlist: Pass the event_group info via perf_attr_details
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (14 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 15/17] perf tools: Fix calloc argument ordering Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:44 ` [PATCH 17/17] perf python: Link with sysfs.o Arnaldo Carvalho de Melo
  2013-02-06 21:51 ` [GIT PULL 00/17] perf/core improvements and fixes Ingo Molnar
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Mike Galbraith, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian

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

So that we avoid dragging symbol.o into the python binding.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-izjubje7ltd1srji5wb0ygwi@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-evlist.c | 4 ++--
 tools/perf/util/evsel.c     | 2 +-
 tools/perf/util/evsel.h     | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c
index 85a5e35..05bd9df 100644
--- a/tools/perf/builtin-evlist.c
+++ b/tools/perf/builtin-evlist.c
@@ -39,7 +39,7 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused)
 	OPT_BOOLEAN('F', "freq", &details.freq, "Show the sample frequency"),
 	OPT_BOOLEAN('v', "verbose", &details.verbose,
 		    "Show all event attr details"),
-	OPT_BOOLEAN('g', "group", &symbol_conf.event_group,
+	OPT_BOOLEAN('g', "group", &details.event_group,
 		    "Show event group information"),
 	OPT_END()
 	};
@@ -52,7 +52,7 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (argc)
 		usage_with_options(evlist_usage, options);
 
-	if (symbol_conf.event_group && (details.verbose || details.freq)) {
+	if (details.event_group && (details.verbose || details.freq)) {
 		pr_err("--group option is not compatible with other options\n");
 		usage_with_options(evlist_usage, options);
 	}
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index a547015..9c82f98f 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1391,7 +1391,7 @@ int perf_evsel__fprintf(struct perf_evsel *evsel,
 	bool first = true;
 	int printed = 0;
 
-	if (symbol_conf.event_group) {
+	if (details->event_group) {
 		struct perf_evsel *pos;
 
 		if (!perf_evsel__is_group_leader(evsel))
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 8512f6a..52021c3 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -254,6 +254,7 @@ static inline bool perf_evsel__is_group_leader(const struct perf_evsel *evsel)
 struct perf_attr_details {
 	bool freq;
 	bool verbose;
+	bool event_group;
 };
 
 int perf_evsel__fprintf(struct perf_evsel *evsel,
-- 
1.8.1.1.361.gec3ae6e


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

* [PATCH 17/17] perf python: Link with sysfs.o
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (15 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 16/17] perf evlist: Pass the event_group info via perf_attr_details Arnaldo Carvalho de Melo
@ 2013-02-06 21:44 ` Arnaldo Carvalho de Melo
  2013-02-06 21:51 ` [GIT PULL 00/17] perf/core improvements and fixes Ingo Molnar
  17 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-02-06 21:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Mike Galbraith, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian

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

So that we fix this regression:

[root@sandy linux]# perf test -v 15
15: Try 'use perf' in python, checking link problems       :
--- start ---
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /home/acme/git/build/perf/python/perf.so: undefined symbol: sysfs_find_mountpoint
---- end ----
Try 'use perf' in python, checking link problems: FAILED!
[root@sandy linux]#

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-8pf64bsdywg1gl9m55ul77hg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/python-ext-sources | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index c40c2d3..64536a9 100644
--- a/tools/perf/util/python-ext-sources
+++ b/tools/perf/util/python-ext-sources
@@ -18,4 +18,5 @@ util/cgroup.c
 util/debugfs.c
 util/rblist.c
 util/strlist.c
+util/sysfs.c
 ../../lib/rbtree.c
-- 
1.8.1.1.361.gec3ae6e


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

* Re: [GIT PULL 00/17] perf/core improvements and fixes
  2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (16 preceding siblings ...)
  2013-02-06 21:44 ` [PATCH 17/17] perf python: Link with sysfs.o Arnaldo Carvalho de Melo
@ 2013-02-06 21:51 ` Ingo Molnar
  17 siblings, 0 replies; 32+ messages in thread
From: Ingo Molnar @ 2013-02-06 21:51 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Andrew Jones,
	Borislav Petkov, Corey Ashford, David Ahern, Feng Tang,
	Frederic Weisbecker, Jiri Olsa, Joe Perches, Mike Galbraith,
	Namhyung Kim, Paul Gortmaker, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian, Arnaldo Carvalho de Melo


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

> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 0fbdad078a70ed72248c3d30fe32e45e83be00d1:
> 
>   perf/x86: Allow for architecture specific RDPMC indexes (2013-02-06 19:45:24 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 88fd2b6a76264e9e14463f532caae09d82a53207:
> 
>   perf python: Link with sysfs.o (2013-02-06 18:09:28 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes
> 
> . Check for flex and bison before continuing building, from Borislav Petkov.
> 
> . Make event_copy local to mmaps, fixing buffer wrap around problems, from
>   David Ahern.
> 
> . Add option for runtime switching perf data file in perf report, just press
>   's' and a menu with the valid files found in the current directory will be
>   presented, from Feng Tang.
> 
> . Add support to display whole group data for raw columns, from Jiri Olsa.
> 
> . Fix SIGALRM and pipe read race for the rwtop perl script. from Jiri Olsa.
> 
> . Fix perf_evsel::exclude_GH handling and add a test to catch regressions, from
>   Jiri Olsa.
> 
> . Error checking fixes, from Namhyung Kim.
> 
> . Fix calloc argument ordering, from Paul Gortmaker.
> 
> . Fix set event list leader, from Stephane Eranian.
> 
> . Add per processor socket count aggregation in perf stat, from Stephane Eranian.
> 
> . Fix perf python binding breakage.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf evlist: Pass the event_group info via perf_attr_details
>       perf python: Link with sysfs.o
> 
> Borislav Petkov (1):
>       perf tools: Check for flex and bison before continuing building
> 
> David Ahern (1):
>       perf evlist: Make event_copy local to mmaps
> 
> Feng Tang (2):
>       perf hists browser: Add option for runtime switching perf data file
>       perf report: Enable the runtime switching of perf data file
> 
> Jiri Olsa (4):
>       perf hists browser: Add support to display whole group data for raw columns
>       perf perl scripts: Fix SIGALRM and pipe read race for rwtop
>       perf tools: Fix perf_evsel::exclude_GH handling
>       perf tests: Adding automated parsing tests for group :GH modifiers
> 
> Namhyung Kim (3):
>       perf sort: Drop ip_[lr] arguments from _sort__sym_cmp()
>       perf sort: Make setup_sorting returns an error code
>       perf sort: Check return value of strdup()
> 
> Paul Gortmaker (1):
>       perf tools: Fix calloc argument ordering
> 
> Stephane Eranian (3):
>       perf evlist: Fix set event list leader
>       perf tools: Add cpu_map processor socket level functions
>       perf stat: Add per processor socket count aggregation
> 
>  tools/perf/Documentation/perf-stat.txt |   9 +-
>  tools/perf/Makefile                    |  13 ++-
>  tools/perf/builtin-annotate.c          |   3 +-
>  tools/perf/builtin-diff.c              |   4 +-
>  tools/perf/builtin-evlist.c            |   4 +-
>  tools/perf/builtin-report.c            |  41 +++++---
>  tools/perf/builtin-stat.c              | 126 +++++++++++++++++++++--
>  tools/perf/builtin-top.c               |   3 +-
>  tools/perf/perf.h                      |  26 -----
>  tools/perf/scripts/perl/rwtop.pl       |   6 +-
>  tools/perf/tests/hists_link.c          |   3 +-
>  tools/perf/tests/parse-events.c        | 178 ++++++++++++++++++++++++++++++++-
>  tools/perf/ui/browsers/hists.c         | 112 ++++++++++++++++++++-
>  tools/perf/ui/hist.c                   |  53 +++++-----
>  tools/perf/ui/keysyms.h                |   1 +
>  tools/perf/util/callchain.c            |   2 +-
>  tools/perf/util/cpumap.c               |  54 ++++++++++
>  tools/perf/util/cpumap.h               |   9 ++
>  tools/perf/util/evlist.c               |   7 +-
>  tools/perf/util/evlist.h               |  29 +++++-
>  tools/perf/util/evsel.c                |   2 +-
>  tools/perf/util/evsel.h                |   1 +
>  tools/perf/util/header.c               |   4 +-
>  tools/perf/util/parse-events.c         |   8 --
>  tools/perf/util/python-ext-sources     |   1 +
>  tools/perf/util/sort.c                 |  38 ++++---
>  tools/perf/util/sort.h                 |   2 +-
>  27 files changed, 611 insertions(+), 128 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/17] perf/core improvements and fixes
  2019-02-21  1:25 Arnaldo Carvalho de Melo
@ 2019-02-28  7:28 ` Ingo Molnar
  0 siblings, 0 replies; 32+ messages in thread
From: Ingo Molnar @ 2019-02-28  7:28 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Clark Williams, linux-kernel,
	linux-perf-users, He Kuang, Jonas Rabenstein, Thomas Richter,
	Tommi Rantala, 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 43f4e6279f05eefac058a3524e184cecae463bfe:
> 
>   Merge tag 'perf-core-for-mingo-5.1-20190214' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2019-02-15 10:19:11 +0100)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-5.1-20190220
> 
> for you to fetch changes up to b4409ae112caa6315f6ee678e953b9fc93e6919c:
> 
>   perf tools: Make rm_rf() remove single file (2019-02-20 17:09:28 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> perf report:
> 
>   He Kuang:
> 
>   - Don't shadow inlined symbol with different addr range.
> 
> perf script:
> 
>   Jiri Olsa:
> 
>   - Allow +- operator to ask for -F to add/remove fields to
>     the default set, for instance to ask for the removal of the
>     'cpu' field in tracepoint events, adding 'period' to that
>     kind of events, etc.
> 
> perf test:
> 
>   Thomas Richter:
> 
>   - Fix scheduler tracepoint signedness of COMM fields failure of
>     'evsel-tp-sched' test on s390 and other arches.
> 
>   Tommi Rantala:
> 
>   - Skip trace+probe_vfs_getname.sh when 'perf trace' is not built.
> 
> perf trace:
> 
>   Arnaldo Carvalho de Melo:
> 
>   - Add initial BPF map dumper, initially just for the current, minimal
>     needs of the augmented_raw_syscalls BPF example used to collect
>     pointer args payloads that uses BPF maps for pid and syscall filtering,
>     but will in time have features similar to 'perf stat' --interval-print,
>     --interval-clear, ways to signal from a BPF event that a specific
>     map (or range of that map) should be printed, optionally as a
>     histogram, etc.
> 
> General:
> 
>   Jiri Olsa:
> 
>   - Add cpu and numa topologies classes for further reuse, fixing some
>     issues in the process.
> 
>   - Fixup some warnings and debug levels.
> 
>   - Make rm_rf() remove single file, not just directories.
> 
> Documentation:
> 
>   Jonas Rabenstein:
> 
>   - Fix HEADER_CMDLINE description in perf.data documentation.
> 
>   - Fix documentation of the Flags section in perf.data.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf bpf: Add bpf_map dumper
>       perf trace: Allow dumping a BPF map after setting up BPF events
> 
> He Kuang (1):
>       perf report: Don't shadow inlined symbol with different addr range
> 
> Jiri Olsa (10):
>       perf header: Fix wrong node write in NUMA_TOPOLOGY feature
>       perf tools: Add cpu_topology object
>       perf tools: Add numa_topology object
>       perf tools: Use sysfs__mountpoint() when reading cpu topology
>       perf session: Don't report zero period samples for slave events
>       perf evsel: Force sample_type for slave events
>       perf script: Allow +- operator for type specific fields option
>       perf bpf-event: Add missing new line into pr_debug call
>       perf cpumap: Increase debug level for cpu_map__snprint verbose output
>       perf tools: Make rm_rf() remove single file
> 
> Jonas Rabenstein (2):
>       perf doc: Fix HEADER_CMDLINE description in perf.data documentation
>       perf doc: Fix documentation of the Flags section in perf.data
> 
> Thomas Richter (1):
>       perf test: Fix failure of 'evsel-tp-sched' test on s390
> 
> Tommi Rantala (1):
>       perf tests shell: Skip trace+probe_vfs_getname.sh if built without trace support
> 
>  tools/perf/Documentation/perf-script.txt           |   6 +
>  tools/perf/Documentation/perf-trace.txt            |   8 +
>  tools/perf/Documentation/perf.data-file-format.txt |  11 +-
>  tools/perf/builtin-script.c                        |   8 +
>  tools/perf/builtin-trace.c                         |  19 ++
>  tools/perf/tests/evsel-tp-sched.c                  |   6 +-
>  tools/perf/tests/shell/lib/probe.sh                |   5 +
>  tools/perf/tests/shell/trace+probe_vfs_getname.sh  |   1 +
>  tools/perf/util/Build                              |   2 +
>  tools/perf/util/bpf-event.c                        |   2 +-
>  tools/perf/util/bpf_map.c                          |  72 ++++++
>  tools/perf/util/bpf_map.h                          |  22 ++
>  tools/perf/util/cpumap.c                           |   2 +-
>  tools/perf/util/cputopo.c                          | 277 +++++++++++++++++++++
>  tools/perf/util/cputopo.h                          |  33 +++
>  tools/perf/util/evsel.c                            |   8 +
>  tools/perf/util/header.c                           | 269 +++-----------------
>  tools/perf/util/session.c                          |   7 +
>  tools/perf/util/sort.c                             |  10 +-
>  tools/perf/util/srcline.c                          |   2 +-
>  tools/perf/util/util.c                             |  16 +-
>  21 files changed, 530 insertions(+), 256 deletions(-)
>  create mode 100644 tools/perf/util/bpf_map.c
>  create mode 100644 tools/perf/util/bpf_map.h
>  create mode 100644 tools/perf/util/cputopo.c
>  create mode 100644 tools/perf/util/cputopo.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/17] perf/core improvements and fixes
@ 2019-02-21  1:25 Arnaldo Carvalho de Melo
  2019-02-28  7:28 ` Ingo Molnar
  0 siblings, 1 reply; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-02-21  1:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jiri Olsa, Namhyung Kim, Clark Williams, linux-kernel,
	linux-perf-users, Arnaldo Carvalho de Melo, He Kuang,
	Jonas Rabenstein, Thomas Richter, Tommi Rantala,
	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 43f4e6279f05eefac058a3524e184cecae463bfe:

  Merge tag 'perf-core-for-mingo-5.1-20190214' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2019-02-15 10:19:11 +0100)

are available in the Git repository at:

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

for you to fetch changes up to b4409ae112caa6315f6ee678e953b9fc93e6919c:

  perf tools: Make rm_rf() remove single file (2019-02-20 17:09:28 -0300)

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

perf report:

  He Kuang:

  - Don't shadow inlined symbol with different addr range.

perf script:

  Jiri Olsa:

  - Allow +- operator to ask for -F to add/remove fields to
    the default set, for instance to ask for the removal of the
    'cpu' field in tracepoint events, adding 'period' to that
    kind of events, etc.

perf test:

  Thomas Richter:

  - Fix scheduler tracepoint signedness of COMM fields failure of
    'evsel-tp-sched' test on s390 and other arches.

  Tommi Rantala:

  - Skip trace+probe_vfs_getname.sh when 'perf trace' is not built.

perf trace:

  Arnaldo Carvalho de Melo:

  - Add initial BPF map dumper, initially just for the current, minimal
    needs of the augmented_raw_syscalls BPF example used to collect
    pointer args payloads that uses BPF maps for pid and syscall filtering,
    but will in time have features similar to 'perf stat' --interval-print,
    --interval-clear, ways to signal from a BPF event that a specific
    map (or range of that map) should be printed, optionally as a
    histogram, etc.

General:

  Jiri Olsa:

  - Add cpu and numa topologies classes for further reuse, fixing some
    issues in the process.

  - Fixup some warnings and debug levels.

  - Make rm_rf() remove single file, not just directories.

Documentation:

  Jonas Rabenstein:

  - Fix HEADER_CMDLINE description in perf.data documentation.

  - Fix documentation of the Flags section in perf.data.

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf bpf: Add bpf_map dumper
      perf trace: Allow dumping a BPF map after setting up BPF events

He Kuang (1):
      perf report: Don't shadow inlined symbol with different addr range

Jiri Olsa (10):
      perf header: Fix wrong node write in NUMA_TOPOLOGY feature
      perf tools: Add cpu_topology object
      perf tools: Add numa_topology object
      perf tools: Use sysfs__mountpoint() when reading cpu topology
      perf session: Don't report zero period samples for slave events
      perf evsel: Force sample_type for slave events
      perf script: Allow +- operator for type specific fields option
      perf bpf-event: Add missing new line into pr_debug call
      perf cpumap: Increase debug level for cpu_map__snprint verbose output
      perf tools: Make rm_rf() remove single file

Jonas Rabenstein (2):
      perf doc: Fix HEADER_CMDLINE description in perf.data documentation
      perf doc: Fix documentation of the Flags section in perf.data

Thomas Richter (1):
      perf test: Fix failure of 'evsel-tp-sched' test on s390

Tommi Rantala (1):
      perf tests shell: Skip trace+probe_vfs_getname.sh if built without trace support

 tools/perf/Documentation/perf-script.txt           |   6 +
 tools/perf/Documentation/perf-trace.txt            |   8 +
 tools/perf/Documentation/perf.data-file-format.txt |  11 +-
 tools/perf/builtin-script.c                        |   8 +
 tools/perf/builtin-trace.c                         |  19 ++
 tools/perf/tests/evsel-tp-sched.c                  |   6 +-
 tools/perf/tests/shell/lib/probe.sh                |   5 +
 tools/perf/tests/shell/trace+probe_vfs_getname.sh  |   1 +
 tools/perf/util/Build                              |   2 +
 tools/perf/util/bpf-event.c                        |   2 +-
 tools/perf/util/bpf_map.c                          |  72 ++++++
 tools/perf/util/bpf_map.h                          |  22 ++
 tools/perf/util/cpumap.c                           |   2 +-
 tools/perf/util/cputopo.c                          | 277 +++++++++++++++++++++
 tools/perf/util/cputopo.h                          |  33 +++
 tools/perf/util/evsel.c                            |   8 +
 tools/perf/util/header.c                           | 269 +++-----------------
 tools/perf/util/session.c                          |   7 +
 tools/perf/util/sort.c                             |  10 +-
 tools/perf/util/srcline.c                          |   2 +-
 tools/perf/util/util.c                             |  16 +-
 21 files changed, 530 insertions(+), 256 deletions(-)
 create mode 100644 tools/perf/util/bpf_map.c
 create mode 100644 tools/perf/util/bpf_map.h
 create mode 100644 tools/perf/util/cputopo.c
 create mode 100644 tools/perf/util/cputopo.h

Test results:

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

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

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

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

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

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

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

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

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

* Re: [GIT PULL 00/17] perf/core improvements and fixes
  2018-04-04  2:21 ` Arnaldo Carvalho de Melo
@ 2018-04-04  5:25   ` Ingo Molnar
  -1 siblings, 0 replies; 32+ messages in thread
From: Ingo Molnar @ 2018-04-04  5:25 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Changbin Du, David Ahern,
	Jin Yao, Jiri Olsa, Kan Liang, Kim Phillips, Kirill A . Shutemov,
	Linus Torvalds, Martin Liška, Maxim Kuvyrkov, Milian Wolff,
	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 1159e09476536250c2a0173d4298d15114df7a89:
> 
>   perf/x86/intel: Enable C-state residency events for Cannon Lake (2018-03-31 11:28:36 +0200)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.17-20180403
> 
> for you to fetch changes up to 51125a29a395048fdb3429b8c4ca0ada57097744:
> 
>   perf trace: Remove redundant ')' (2018-04-03 16:16:41 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Show only failing syscalls with 'perf trace --failure' (Arnaldo Carvalho de Melo)
> 
> 	e.g: See what 'openat' syscalls are failing:
> 
>   # perf trace --failure -e openat
>    762.323 ( 0.007 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video2) = -1 ENOENT No such file or directory
>    <SNIP N /dev/videoN open attempts... sigh, where is that improvised camera lid?!? 8-) >
>    790.228 ( 0.008 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video63) = -1 ENOENT No such file or directory
>   ^C#
> 
> - Show information about the event (freq, nr_samples, total period/nr_events) in
>   the annotate --tui and --stdio2 'perf annotate' output, similar to the
>   first line in the 'perf report --tui', but just for the samples for
>   the annotated symbol (Arnaldo Carvalho de Melo)
> 
> - Introduce 'perf version --build-options' to show what features were
>   linked, aliased as well as a shorter 'perf -vv' (Jin Yao)
> 
> - Add a "dso_size" sort order (Kim Phillips)
> 
> - Remove redundant ')' in the tracepoint output in 'perf trace' (Changbin Du)
> 
> - Synchronize x86's cpufeatures.h, no effect on tools (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (9):
>       tools headers: Synchronize x86's cpufeatures.h
>       perf trace: Show only failing syscalls
>       perf hists browser: Rename perf_evsel_browser_title to a more descriptive name
>       perf hists: Introduce hists__scnprint_title()
>       perf hists: Move hists__scnprintf_title() away from the TUI code
>       perf ui browser: Move the extra title lines from the hists browser
>       perf annotate: Introduce annotation__scnprintf_samples_period() method
>       perf annotate browser: Show extra title line with event information
>       perf annotate stdio2: Print more descriptive event information header
> 
> Changbin Du (1):
>       perf trace: Remove redundant ')'
> 
> Jin Yao (5):
>       perf config: Add some new -DHAVE_XXX to CFLAGS
>       perf config: Rename to HAVE_DWARF_GETLOCATIONS_SUPPORT
>       perf version: Print the compiled-in status of libraries
>       perf tools: Add 'perf -vv' as an alias to 'perf version --build-options'
>       perf version: Add man page
> 
> Jiri Olsa (1):
>       tools include: Add config.h header file
> 
> Kim Phillips (1):
>       perf tools: Add a "dso_size" sort order
> 
>  tools/arch/x86/include/asm/cpufeatures.h  |   2 +
>  tools/include/tools/config.h              |  34 ++++++++
>  tools/perf/Documentation/perf-report.txt  |   1 +
>  tools/perf/Documentation/perf-trace.txt   |   3 +
>  tools/perf/Documentation/perf-version.txt |  24 ++++++
>  tools/perf/Makefile.config                |   8 +-
>  tools/perf/builtin-trace.c                |  11 ++-
>  tools/perf/builtin-version.c              |  82 +++++++++++++++++++-
>  tools/perf/perf.c                         |   6 ++
>  tools/perf/perf.h                         |   1 +
>  tools/perf/ui/browser.c                   |   8 +-
>  tools/perf/ui/browser.h                   |   2 +
>  tools/perf/ui/browsers/annotate.c         |  31 +++++++-
>  tools/perf/ui/browsers/hists.c            | 125 +++++++-----------------------
>  tools/perf/util/annotate.c                |  48 ++++++++++--
>  tools/perf/util/annotate.h                |  12 +++
>  tools/perf/util/dwarf-aux.c               |   2 +-
>  tools/perf/util/hist.c                    |  81 +++++++++++++++++++
>  tools/perf/util/hist.h                    |   7 ++
>  tools/perf/util/map.h                     |   4 +
>  tools/perf/util/sort.c                    |  41 ++++++++++
>  tools/perf/util/sort.h                    |   1 +
>  22 files changed, 418 insertions(+), 116 deletions(-)
>  create mode 100644 tools/include/tools/config.h
>  create mode 100644 tools/perf/Documentation/perf-version.txt

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/17] perf/core improvements and fixes
@ 2018-04-04  5:25   ` Ingo Molnar
  0 siblings, 0 replies; 32+ messages in thread
From: Ingo Molnar @ 2018-04-04  5:25 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Changbin Du, David Ahern,
	Jin Yao, Jiri Olsa, Kan Liang, Kim Phillips, Kirill A . Shutemov,
	Linus Torvalds, Martin Liška, Maxim Kuvyrkov, Milian Wolff,
	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 1159e09476536250c2a0173d4298d15114df7a89:
> 
>   perf/x86/intel: Enable C-state residency events for Cannon Lake (2018-03-31 11:28:36 +0200)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.17-20180403
> 
> for you to fetch changes up to 51125a29a395048fdb3429b8c4ca0ada57097744:
> 
>   perf trace: Remove redundant ')' (2018-04-03 16:16:41 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Show only failing syscalls with 'perf trace --failure' (Arnaldo Carvalho de Melo)
> 
> 	e.g: See what 'openat' syscalls are failing:
> 
>   # perf trace --failure -e openat
>    762.323 ( 0.007 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video2) = -1 ENOENT No such file or directory
>    <SNIP N /dev/videoN open attempts... sigh, where is that improvised camera lid?!? 8-) >
>    790.228 ( 0.008 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video63) = -1 ENOENT No such file or directory
>   ^C#
> 
> - Show information about the event (freq, nr_samples, total period/nr_events) in
>   the annotate --tui and --stdio2 'perf annotate' output, similar to the
>   first line in the 'perf report --tui', but just for the samples for
>   the annotated symbol (Arnaldo Carvalho de Melo)
> 
> - Introduce 'perf version --build-options' to show what features were
>   linked, aliased as well as a shorter 'perf -vv' (Jin Yao)
> 
> - Add a "dso_size" sort order (Kim Phillips)
> 
> - Remove redundant ')' in the tracepoint output in 'perf trace' (Changbin Du)
> 
> - Synchronize x86's cpufeatures.h, no effect on tools (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (9):
>       tools headers: Synchronize x86's cpufeatures.h
>       perf trace: Show only failing syscalls
>       perf hists browser: Rename perf_evsel_browser_title to a more descriptive name
>       perf hists: Introduce hists__scnprint_title()
>       perf hists: Move hists__scnprintf_title() away from the TUI code
>       perf ui browser: Move the extra title lines from the hists browser
>       perf annotate: Introduce annotation__scnprintf_samples_period() method
>       perf annotate browser: Show extra title line with event information
>       perf annotate stdio2: Print more descriptive event information header
> 
> Changbin Du (1):
>       perf trace: Remove redundant ')'
> 
> Jin Yao (5):
>       perf config: Add some new -DHAVE_XXX to CFLAGS
>       perf config: Rename to HAVE_DWARF_GETLOCATIONS_SUPPORT
>       perf version: Print the compiled-in status of libraries
>       perf tools: Add 'perf -vv' as an alias to 'perf version --build-options'
>       perf version: Add man page
> 
> Jiri Olsa (1):
>       tools include: Add config.h header file
> 
> Kim Phillips (1):
>       perf tools: Add a "dso_size" sort order
> 
>  tools/arch/x86/include/asm/cpufeatures.h  |   2 +
>  tools/include/tools/config.h              |  34 ++++++++
>  tools/perf/Documentation/perf-report.txt  |   1 +
>  tools/perf/Documentation/perf-trace.txt   |   3 +
>  tools/perf/Documentation/perf-version.txt |  24 ++++++
>  tools/perf/Makefile.config                |   8 +-
>  tools/perf/builtin-trace.c                |  11 ++-
>  tools/perf/builtin-version.c              |  82 +++++++++++++++++++-
>  tools/perf/perf.c                         |   6 ++
>  tools/perf/perf.h                         |   1 +
>  tools/perf/ui/browser.c                   |   8 +-
>  tools/perf/ui/browser.h                   |   2 +
>  tools/perf/ui/browsers/annotate.c         |  31 +++++++-
>  tools/perf/ui/browsers/hists.c            | 125 +++++++-----------------------
>  tools/perf/util/annotate.c                |  48 ++++++++++--
>  tools/perf/util/annotate.h                |  12 +++
>  tools/perf/util/dwarf-aux.c               |   2 +-
>  tools/perf/util/hist.c                    |  81 +++++++++++++++++++
>  tools/perf/util/hist.h                    |   7 ++
>  tools/perf/util/map.h                     |   4 +
>  tools/perf/util/sort.c                    |  41 ++++++++++
>  tools/perf/util/sort.h                    |   1 +
>  22 files changed, 418 insertions(+), 116 deletions(-)
>  create mode 100644 tools/include/tools/config.h
>  create mode 100644 tools/perf/Documentation/perf-version.txt

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/17] perf/core improvements and fixes
@ 2018-04-04  2:21 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-04  2:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Andi Kleen, Changbin Du,
	David Ahern, Jin Yao, Jiri Olsa, Kan Liang, Kim Phillips,
	Kirill A . Shutemov, Linus Torvalds, Martin Liška,
	Maxim Kuvyrkov, Milian Wolff, 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 1159e09476536250c2a0173d4298d15114df7a89:

  perf/x86/intel: Enable C-state residency events for Cannon Lake (2018-03-31 11:28:36 +0200)

are available in the Git repository at:

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

for you to fetch changes up to 51125a29a395048fdb3429b8c4ca0ada57097744:

  perf trace: Remove redundant ')' (2018-04-03 16:16:41 -0300)

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

- Show only failing syscalls with 'perf trace --failure' (Arnaldo Carvalho de Melo)

	e.g: See what 'openat' syscalls are failing:

  # perf trace --failure -e openat
   762.323 ( 0.007 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video2) = -1 ENOENT No such file or directory
   <SNIP N /dev/videoN open attempts... sigh, where is that improvised camera lid?!? 8-) >
   790.228 ( 0.008 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video63) = -1 ENOENT No such file or directory
  ^C#

- Show information about the event (freq, nr_samples, total period/nr_events) in
  the annotate --tui and --stdio2 'perf annotate' output, similar to the
  first line in the 'perf report --tui', but just for the samples for
  the annotated symbol (Arnaldo Carvalho de Melo)

- Introduce 'perf version --build-options' to show what features were
  linked, aliased as well as a shorter 'perf -vv' (Jin Yao)

- Add a "dso_size" sort order (Kim Phillips)

- Remove redundant ')' in the tracepoint output in 'perf trace' (Changbin Du)

- Synchronize x86's cpufeatures.h, no effect on tools (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (9):
      tools headers: Synchronize x86's cpufeatures.h
      perf trace: Show only failing syscalls
      perf hists browser: Rename perf_evsel_browser_title to a more descriptive name
      perf hists: Introduce hists__scnprint_title()
      perf hists: Move hists__scnprintf_title() away from the TUI code
      perf ui browser: Move the extra title lines from the hists browser
      perf annotate: Introduce annotation__scnprintf_samples_period() method
      perf annotate browser: Show extra title line with event information
      perf annotate stdio2: Print more descriptive event information header

Changbin Du (1):
      perf trace: Remove redundant ')'

Jin Yao (5):
      perf config: Add some new -DHAVE_XXX to CFLAGS
      perf config: Rename to HAVE_DWARF_GETLOCATIONS_SUPPORT
      perf version: Print the compiled-in status of libraries
      perf tools: Add 'perf -vv' as an alias to 'perf version --build-options'
      perf version: Add man page

Jiri Olsa (1):
      tools include: Add config.h header file

Kim Phillips (1):
      perf tools: Add a "dso_size" sort order

 tools/arch/x86/include/asm/cpufeatures.h  |   2 +
 tools/include/tools/config.h              |  34 ++++++++
 tools/perf/Documentation/perf-report.txt  |   1 +
 tools/perf/Documentation/perf-trace.txt   |   3 +
 tools/perf/Documentation/perf-version.txt |  24 ++++++
 tools/perf/Makefile.config                |   8 +-
 tools/perf/builtin-trace.c                |  11 ++-
 tools/perf/builtin-version.c              |  82 +++++++++++++++++++-
 tools/perf/perf.c                         |   6 ++
 tools/perf/perf.h                         |   1 +
 tools/perf/ui/browser.c                   |   8 +-
 tools/perf/ui/browser.h                   |   2 +
 tools/perf/ui/browsers/annotate.c         |  31 +++++++-
 tools/perf/ui/browsers/hists.c            | 125 +++++++-----------------------
 tools/perf/util/annotate.c                |  48 ++++++++++--
 tools/perf/util/annotate.h                |  12 +++
 tools/perf/util/dwarf-aux.c               |   2 +-
 tools/perf/util/hist.c                    |  81 +++++++++++++++++++
 tools/perf/util/hist.h                    |   7 ++
 tools/perf/util/map.h                     |   4 +
 tools/perf/util/sort.c                    |  41 ++++++++++
 tools/perf/util/sort.h                    |   1 +
 22 files changed, 418 insertions(+), 116 deletions(-)
 create mode 100644 tools/include/tools/config.h
 create mode 100644 tools/perf/Documentation/perf-version.txt

Test results:

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

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

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

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

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

  # dm
   1 alpine:3.4                    : Ok   gcc (Alpine 5.3.0) 5.3.0
   2 alpine:3.5                    : Ok   gcc (Alpine 6.2.1) 6.2.1 20160822
   3 alpine:3.6                    : Ok   gcc (Alpine 6.3.0) 6.3.0
   4 alpine:3.7                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   5 alpine:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   6 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
   7 amazonlinux:2                 : Ok   gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)
   8 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
   9 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  11 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
  12 centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
  13 debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
  14 debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u1) 4.9.2
  15 debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
  16 debian:experimental           : Ok   gcc (Debian 7.3.0-14) 7.3.0
  17 debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 7.3.0-12) 7.3.0
  18 debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 7.3.0-12) 7.3.0
  19 debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 7.3.0-12) 7.3.0
  20 debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 7.3.0-12) 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.0.1 20180324 (Red Hat 8.0.1-0.20)
  31 fedora:rawhide                : Ok   gcc (GCC) 8.0.1 20180222 (Red Hat 8.0.1-0.16)
  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.0
  39 oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
  40 oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16.0.3)
  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.4-2017.05) 5.4.1 20170404
  44 ubuntu:15.04                  : Ok   gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2
  45 ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  46 ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  47 ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  48 ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  49 ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  50 ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  51 ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  52 ubuntu:16.10                  : Ok   gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
  53 ubuntu:17.04                  : Ok   gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
  53 ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
  54 ubuntu:18.04                  : Ok   gcc (Ubuntu 7.2.0-16ubuntu1) 7.2.0

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

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

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

* [GIT PULL 00/17] perf/core improvements and fixes
@ 2018-04-04  2:21 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-04  2:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Andi Kleen, Changbin Du,
	David Ahern, Jin Yao, Jiri Olsa, Kan Liang, Kim Phillips,
	Kirill A . Shutemov, Linus Torvalds, Martin Liška,
	Maxim Kuvyrkov, Milian Wolff, Namhyung Kim, Peter Zijlstra

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit 1159e09476536250c2a0173d4298d15114df7a89:

  perf/x86/intel: Enable C-state residency events for Cannon Lake (2018-03-31 11:28:36 +0200)

are available in the Git repository at:

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

for you to fetch changes up to 51125a29a395048fdb3429b8c4ca0ada57097744:

  perf trace: Remove redundant ')' (2018-04-03 16:16:41 -0300)

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

- Show only failing syscalls with 'perf trace --failure' (Arnaldo Carvalho de Melo)

	e.g: See what 'openat' syscalls are failing:

  # perf trace --failure -e openat
   762.323 ( 0.007 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video2) = -1 ENOENT No such file or directory
   <SNIP N /dev/videoN open attempts... sigh, where is that improvised camera lid?!? 8-) >
   790.228 ( 0.008 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video63) = -1 ENOENT No such file or directory
  ^C#

- Show information about the event (freq, nr_samples, total period/nr_events) in
  the annotate --tui and --stdio2 'perf annotate' output, similar to the
  first line in the 'perf report --tui', but just for the samples for
  the annotated symbol (Arnaldo Carvalho de Melo)

- Introduce 'perf version --build-options' to show what features were
  linked, aliased as well as a shorter 'perf -vv' (Jin Yao)

- Add a "dso_size" sort order (Kim Phillips)

- Remove redundant ')' in the tracepoint output in 'perf trace' (Changbin Du)

- Synchronize x86's cpufeatures.h, no effect on tools (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (9):
      tools headers: Synchronize x86's cpufeatures.h
      perf trace: Show only failing syscalls
      perf hists browser: Rename perf_evsel_browser_title to a more descriptive name
      perf hists: Introduce hists__scnprint_title()
      perf hists: Move hists__scnprintf_title() away from the TUI code
      perf ui browser: Move the extra title lines from the hists browser
      perf annotate: Introduce annotation__scnprintf_samples_period() method
      perf annotate browser: Show extra title line with event information
      perf annotate stdio2: Print more descriptive event information header

Changbin Du (1):
      perf trace: Remove redundant ')'

Jin Yao (5):
      perf config: Add some new -DHAVE_XXX to CFLAGS
      perf config: Rename to HAVE_DWARF_GETLOCATIONS_SUPPORT
      perf version: Print the compiled-in status of libraries
      perf tools: Add 'perf -vv' as an alias to 'perf version --build-options'
      perf version: Add man page

Jiri Olsa (1):
      tools include: Add config.h header file

Kim Phillips (1):
      perf tools: Add a "dso_size" sort order

 tools/arch/x86/include/asm/cpufeatures.h  |   2 +
 tools/include/tools/config.h              |  34 ++++++++
 tools/perf/Documentation/perf-report.txt  |   1 +
 tools/perf/Documentation/perf-trace.txt   |   3 +
 tools/perf/Documentation/perf-version.txt |  24 ++++++
 tools/perf/Makefile.config                |   8 +-
 tools/perf/builtin-trace.c                |  11 ++-
 tools/perf/builtin-version.c              |  82 +++++++++++++++++++-
 tools/perf/perf.c                         |   6 ++
 tools/perf/perf.h                         |   1 +
 tools/perf/ui/browser.c                   |   8 +-
 tools/perf/ui/browser.h                   |   2 +
 tools/perf/ui/browsers/annotate.c         |  31 +++++++-
 tools/perf/ui/browsers/hists.c            | 125 +++++++-----------------------
 tools/perf/util/annotate.c                |  48 ++++++++++--
 tools/perf/util/annotate.h                |  12 +++
 tools/perf/util/dwarf-aux.c               |   2 +-
 tools/perf/util/hist.c                    |  81 +++++++++++++++++++
 tools/perf/util/hist.h                    |   7 ++
 tools/perf/util/map.h                     |   4 +
 tools/perf/util/sort.c                    |  41 ++++++++++
 tools/perf/util/sort.h                    |   1 +
 22 files changed, 418 insertions(+), 116 deletions(-)
 create mode 100644 tools/include/tools/config.h
 create mode 100644 tools/perf/Documentation/perf-version.txt

Test results:

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

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

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

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

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

  # dm
   1 alpine:3.4                    : Ok   gcc (Alpine 5.3.0) 5.3.0
   2 alpine:3.5                    : Ok   gcc (Alpine 6.2.1) 6.2.1 20160822
   3 alpine:3.6                    : Ok   gcc (Alpine 6.3.0) 6.3.0
   4 alpine:3.7                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   5 alpine:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   6 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
   7 amazonlinux:2                 : Ok   gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)
   8 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
   9 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  11 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
  12 centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
  13 debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
  14 debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u1) 4.9.2
  15 debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
  16 debian:experimental           : Ok   gcc (Debian 7.3.0-14) 7.3.0
  17 debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 7.3.0-12) 7.3.0
  18 debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 7.3.0-12) 7.3.0
  19 debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 7.3.0-12) 7.3.0
  20 debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 7.3.0-12) 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.0.1 20180324 (Red Hat 8.0.1-0.20)
  31 fedora:rawhide                : Ok   gcc (GCC) 8.0.1 20180222 (Red Hat 8.0.1-0.16)
  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.0
  39 oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
  40 oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16.0.3)
  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.4-2017.05) 5.4.1 20170404
  44 ubuntu:15.04                  : Ok   gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2
  45 ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  46 ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  47 ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  48 ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  49 ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  50 ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  51 ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  52 ubuntu:16.10                  : Ok   gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
  53 ubuntu:17.04                  : Ok   gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
  53 ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
  54 ubuntu:18.04                  : Ok   gcc (Ubuntu 7.2.0-16ubuntu1) 7.2.0

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

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

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

* Re: [GIT PULL 00/17] perf/core improvements and fixes
  2016-08-04  0:49 Arnaldo Carvalho de Melo
@ 2016-08-04  9:04 ` Ingo Molnar
  0 siblings, 0 replies; 32+ messages in thread
From: Ingo Molnar @ 2016-08-04  9:04 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jan Stancek, Jiri Olsa,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Steven Rostedt,
	Wang Nan, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 674d2d69b14f677a771ceec4b48bfade94a0c5f1:
> 
>   Merge tag 'perf-core-for-mingo-20160725' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-07-25 19:48:41 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160803
> 
> for you to fetch changes up to c369e0a1a8fa6ca80e6c37c8735d9427b623ae62:
> 
>   perf tests bpf: Use SyS_epoll_wait alias (2016-08-03 19:40:48 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Add --sample-cpu to 'perf record', to explicitely ask for sampling
>   the CPU (Jiri Olsa)
> 
> Fixes:
> 
> - Fix processing of multi byte chunks in objdump output, fixing
>   disassemble processing for annotation on at least ARM64 (Jan Stancek)
> 
> - Use SyS_epoll_wait in a BPF 'perf test' entry instead of sys_epoll_wait, that
>   is not present in the DWARF info in vmlinux files (Arnaldo Carvalho de Melo)
> 
> - Add -wno-shadow when processing files using perl headers, fixing
>   the build on Fedora Rawhide and Arch Linux (Namhyung Kim)
> 
> Infrastructure:
> 
> - Annotate prep work to better catch and report errors related to
>   using objdump to disassemble DSOs (Arnaldo Carvalho de Melo)
> 
> - Add 'alloc', 'scnprintf' and 'and' methods for bitmap processing (Jiri Olsa)
> 
> - Add nested output resorting callback in hists processing (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (7):
>       perf evsel: Introduce constructor for cycles event
>       perf annotate: Use pipe + fork instead of popen
>       perf target: str_error_r() always returns the buffer it receives
>       perf annotate: Rename symbol__annotate() to symbol__disassemble()
>       perf annotate: Introduce strerror for handling symbol__disassemble() errors
>       perf annotate: Plug filename string leak
>       perf tests bpf: Use SyS_epoll_wait alias
> 
> Jan Stancek (1):
>       perf tests: objdump output can contain multi byte chunks
> 
> Jiri Olsa (7):
>       tools lib: Add bitmap_alloc function
>       tools lib: Add bitmap_scnprintf function
>       tools lib: Add bitmap_and function
>       perf tests: Add test for bitmap_scnprintf function
>       perf tools: Move config/Makefile into Makefile.config
>       perf hists: Introduce output_resort_cb method
>       perf record: Add --sample-cpu option
> 
> Namhyung Kim (2):
>       perf tools: Fix build failure on perl script context
>       tools lib traceevent: Ignore generated library files
> 
>  tools/include/linux/bitmap.h                    |  37 ++++++++
>  tools/lib/bitmap.c                              |  44 +++++++++
>  tools/lib/traceevent/.gitignore                 |   1 +
>  tools/perf/Documentation/perf-record.txt        |   3 +
>  tools/perf/{config/Makefile => Makefile.config} |   0
>  tools/perf/Makefile.perf                        |   6 +-
>  tools/perf/builtin-record.c                     |   1 +
>  tools/perf/builtin-top.c                        |   6 +-
>  tools/perf/perf.h                               |   1 +
>  tools/perf/scripts/perl/Perf-Trace-Util/Build   |   4 +-
>  tools/perf/tests/Build                          |   1 +
>  tools/perf/tests/bitmap.c                       |  53 +++++++++++
>  tools/perf/tests/bpf-script-example.c           |   4 +-
>  tools/perf/tests/builtin-test.c                 |   4 +
>  tools/perf/tests/code-reading.c                 | 100 ++++++++++++++------
>  tools/perf/tests/tests.h                        |   1 +
>  tools/perf/ui/browsers/annotate.c               |   9 +-
>  tools/perf/ui/gtk/annotate.c                    |   8 +-
>  tools/perf/util/annotate.c                      | 116 +++++++++++++++++-------
>  tools/perf/util/annotate.h                      |  22 ++++-
>  tools/perf/util/evlist.c                        |  22 +----
>  tools/perf/util/evsel.c                         |  30 +++++-
>  tools/perf/util/evsel.h                         |   2 +
>  tools/perf/util/hist.c                          |  15 ++-
>  tools/perf/util/hist.h                          |   4 +
>  tools/perf/util/target.c                        |   6 +-
>  26 files changed, 394 insertions(+), 106 deletions(-)
>  rename tools/perf/{config/Makefile => Makefile.config} (100%)
>  create mode 100644 tools/perf/tests/bitmap.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/17] perf/core improvements and fixes
@ 2016-08-04  0:49 Arnaldo Carvalho de Melo
  2016-08-04  9:04 ` Ingo Molnar
  0 siblings, 1 reply; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-08-04  0:49 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Corey Ashford, David Ahern,
	Frederic Weisbecker, Jan Stancek, Jiri Olsa, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Steven Rostedt, Wang Nan,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 674d2d69b14f677a771ceec4b48bfade94a0c5f1:

  Merge tag 'perf-core-for-mingo-20160725' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-07-25 19:48:41 +0200)

are available in the git repository at:

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

for you to fetch changes up to c369e0a1a8fa6ca80e6c37c8735d9427b623ae62:

  perf tests bpf: Use SyS_epoll_wait alias (2016-08-03 19:40:48 -0300)

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

New features:

- Add --sample-cpu to 'perf record', to explicitely ask for sampling
  the CPU (Jiri Olsa)

Fixes:

- Fix processing of multi byte chunks in objdump output, fixing
  disassemble processing for annotation on at least ARM64 (Jan Stancek)

- Use SyS_epoll_wait in a BPF 'perf test' entry instead of sys_epoll_wait, that
  is not present in the DWARF info in vmlinux files (Arnaldo Carvalho de Melo)

- Add -wno-shadow when processing files using perl headers, fixing
  the build on Fedora Rawhide and Arch Linux (Namhyung Kim)

Infrastructure:

- Annotate prep work to better catch and report errors related to
  using objdump to disassemble DSOs (Arnaldo Carvalho de Melo)

- Add 'alloc', 'scnprintf' and 'and' methods for bitmap processing (Jiri Olsa)

- Add nested output resorting callback in hists processing (Jiri Olsa)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (7):
      perf evsel: Introduce constructor for cycles event
      perf annotate: Use pipe + fork instead of popen
      perf target: str_error_r() always returns the buffer it receives
      perf annotate: Rename symbol__annotate() to symbol__disassemble()
      perf annotate: Introduce strerror for handling symbol__disassemble() errors
      perf annotate: Plug filename string leak
      perf tests bpf: Use SyS_epoll_wait alias

Jan Stancek (1):
      perf tests: objdump output can contain multi byte chunks

Jiri Olsa (7):
      tools lib: Add bitmap_alloc function
      tools lib: Add bitmap_scnprintf function
      tools lib: Add bitmap_and function
      perf tests: Add test for bitmap_scnprintf function
      perf tools: Move config/Makefile into Makefile.config
      perf hists: Introduce output_resort_cb method
      perf record: Add --sample-cpu option

Namhyung Kim (2):
      perf tools: Fix build failure on perl script context
      tools lib traceevent: Ignore generated library files

 tools/include/linux/bitmap.h                    |  37 ++++++++
 tools/lib/bitmap.c                              |  44 +++++++++
 tools/lib/traceevent/.gitignore                 |   1 +
 tools/perf/Documentation/perf-record.txt        |   3 +
 tools/perf/{config/Makefile => Makefile.config} |   0
 tools/perf/Makefile.perf                        |   6 +-
 tools/perf/builtin-record.c                     |   1 +
 tools/perf/builtin-top.c                        |   6 +-
 tools/perf/perf.h                               |   1 +
 tools/perf/scripts/perl/Perf-Trace-Util/Build   |   4 +-
 tools/perf/tests/Build                          |   1 +
 tools/perf/tests/bitmap.c                       |  53 +++++++++++
 tools/perf/tests/bpf-script-example.c           |   4 +-
 tools/perf/tests/builtin-test.c                 |   4 +
 tools/perf/tests/code-reading.c                 | 100 ++++++++++++++------
 tools/perf/tests/tests.h                        |   1 +
 tools/perf/ui/browsers/annotate.c               |   9 +-
 tools/perf/ui/gtk/annotate.c                    |   8 +-
 tools/perf/util/annotate.c                      | 116 +++++++++++++++++-------
 tools/perf/util/annotate.h                      |  22 ++++-
 tools/perf/util/evlist.c                        |  22 +----
 tools/perf/util/evsel.c                         |  30 +++++-
 tools/perf/util/evsel.h                         |   2 +
 tools/perf/util/hist.c                          |  15 ++-
 tools/perf/util/hist.h                          |   4 +
 tools/perf/util/target.c                        |   6 +-
 26 files changed, 394 insertions(+), 106 deletions(-)
 rename tools/perf/{config/Makefile => Makefile.config} (100%)
 create mode 100644 tools/perf/tests/bitmap.c

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

* Re: [GIT PULL 00/17] perf/core improvements and fixes
  2016-05-06  0:29 Arnaldo Carvalho de Melo
@ 2016-05-06  6:36 ` Ingo Molnar
  0 siblings, 0 replies; 32+ messages in thread
From: Ingo Molnar @ 2016-05-06  6:36 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Ananth N Mavinakayanahalli,
	Balbir Singh, David Ahern, Ian Munsie, Jiri Olsa, linuxppc-dev,
	Mark Wielaard, Masami Hiramatsu, Michael Ellerman, Milian Wolff,
	Namhyung Kim, Naveen N . Rao, Peter Zijlstra, pi3orama,
	Thiago Jung Bauermann, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> 
> The following changes since commit 1b6de5917172967acd8db4d222df4225d23a8a60:
> 
>   perf/x86/intel/pt: Convert ACCESS_ONCE()s (2016-05-05 10:16:29 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160505
> 
> for you to fetch changes up to b6b85dad30ad7e7394990e2317a780577974a4e6:
> 
>   perf evlist: Rename variable in perf_mmap__read() (2016-05-05 21:04:04 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Order output of 'perf trace --summary' better, now the threads will
>   appear ascending order of number of events, and then, for each, in
>   descending order of syscalls by the time spent in the syscalls, so
>   that the last page produced can be the one about the most interesting
>   thread straced, suggested by Milian Wolff (Arnaldo Carvalho de Melo)
> 
> - Do not show the runtime_ms for a thread when not collecting it, that
>   is done so far only with 'perf trace --sched' (Arnaldo Carvalho de Melo)
> 
> - Fix kallsyms perf test on ppc64le (Naveen N. Rao)
> 
> Infrastructure:
> 
> - Move global variables related to presence of some keys in the sort order to a
>   per hist struct, to allow code like the hists browser to work with multiple
>   hists with different lists of columns (Jiri Olsa)
> 
> - Add support for generating bpf prologue in powerpc (Naveen N. Rao)
> 
> - Fix kprobe and kretprobe handling with kallsyms on ppc64le (Naveen N. Rao)
> 
> - evlist mmap changes, prep work for supporting reading backwards (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (5):
>       perf machine: Introduce number of threads member
>       perf tools: Add template for generating rbtree resort class
>       perf trace: Sort summary output by number of events
>       perf trace: Sort syscalls stats by msecs in --summary
>       perf trace: Do not show the runtime_ms for a thread when not collecting it
> 
> Jiri Olsa (7):
>       perf hists: Move sort__need_collapse into struct perf_hpp_list
>       perf hists: Move sort__has_parent into struct perf_hpp_list
>       perf hists: Move sort__has_sym into struct perf_hpp_list
>       perf hists: Move sort__has_dso into struct perf_hpp_list
>       perf hists: Move sort__has_socket into struct perf_hpp_list
>       perf hists: Move sort__has_thread into struct perf_hpp_list
>       perf hists: Move sort__has_comm into struct perf_hpp_list
> 
> Naveen N. Rao (3):
>       perf tools powerpc: Add support for generating bpf prologue
>       perf powerpc: Fix kprobe and kretprobe handling with kallsyms on ppc64le
>       perf symbols: Fix kallsyms perf test on ppc64le
> 
> Wang Nan (2):
>       perf evlist: Extract perf_mmap__read()
>       perf evlist: Rename variable in perf_mmap__read()
> 
>  tools/perf/arch/powerpc/Makefile            |   1 +
>  tools/perf/arch/powerpc/util/dwarf-regs.c   |  40 +++++---
>  tools/perf/arch/powerpc/util/sym-handling.c |  43 ++++++--
>  tools/perf/builtin-diff.c                   |   4 +-
>  tools/perf/builtin-report.c                 |   4 +-
>  tools/perf/builtin-top.c                    |   8 +-
>  tools/perf/builtin-trace.c                  |  87 ++++++++++------
>  tools/perf/tests/hists_common.c             |   2 +-
>  tools/perf/tests/hists_cumulate.c           |   2 +-
>  tools/perf/tests/hists_link.c               |   4 +-
>  tools/perf/tests/hists_output.c             |   2 +-
>  tools/perf/ui/browsers/hists.c              |  32 +++---
>  tools/perf/ui/gtk/hists.c                   |   2 +-
>  tools/perf/ui/hist.c                        |   2 +-
>  tools/perf/util/annotate.c                  |   2 +-
>  tools/perf/util/callchain.c                 |   2 +-
>  tools/perf/util/evlist.c                    |  56 ++++++-----
>  tools/perf/util/hist.c                      |  14 +--
>  tools/perf/util/hist.h                      |  10 ++
>  tools/perf/util/machine.c                   |   9 +-
>  tools/perf/util/machine.h                   |   1 +
>  tools/perf/util/probe-event.c               |   5 +-
>  tools/perf/util/probe-event.h               |   3 +-
>  tools/perf/util/rb_resort.h                 | 149 ++++++++++++++++++++++++++++
>  tools/perf/util/sort.c                      |  35 +++----
>  tools/perf/util/sort.h                      |   7 --
>  tools/perf/util/symbol-elf.c                |   7 +-
>  tools/perf/util/symbol.h                    |   3 +-
>  28 files changed, 382 insertions(+), 154 deletions(-)
>  create mode 100644 tools/perf/util/rb_resort.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/17] perf/core improvements and fixes
@ 2016-05-06  0:29 Arnaldo Carvalho de Melo
  2016-05-06  6:36 ` Ingo Molnar
  0 siblings, 1 reply; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-05-06  0:29 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Ananth N Mavinakayanahalli, Balbir Singh, David Ahern,
	Ian Munsie, Jiri Olsa, linuxppc-dev, Mark Wielaard,
	Masami Hiramatsu, Michael Ellerman, Milian Wolff, Namhyung Kim,
	Naveen N . Rao, Peter Zijlstra, pi3orama, Thiago Jung Bauermann,
	Wang Nan, Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo


The following changes since commit 1b6de5917172967acd8db4d222df4225d23a8a60:

  perf/x86/intel/pt: Convert ACCESS_ONCE()s (2016-05-05 10:16:29 +0200)

are available in the git repository at:

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

for you to fetch changes up to b6b85dad30ad7e7394990e2317a780577974a4e6:

  perf evlist: Rename variable in perf_mmap__read() (2016-05-05 21:04:04 -0300)

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

User visible:

- Order output of 'perf trace --summary' better, now the threads will
  appear ascending order of number of events, and then, for each, in
  descending order of syscalls by the time spent in the syscalls, so
  that the last page produced can be the one about the most interesting
  thread straced, suggested by Milian Wolff (Arnaldo Carvalho de Melo)

- Do not show the runtime_ms for a thread when not collecting it, that
  is done so far only with 'perf trace --sched' (Arnaldo Carvalho de Melo)

- Fix kallsyms perf test on ppc64le (Naveen N. Rao)

Infrastructure:

- Move global variables related to presence of some keys in the sort order to a
  per hist struct, to allow code like the hists browser to work with multiple
  hists with different lists of columns (Jiri Olsa)

- Add support for generating bpf prologue in powerpc (Naveen N. Rao)

- Fix kprobe and kretprobe handling with kallsyms on ppc64le (Naveen N. Rao)

- evlist mmap changes, prep work for supporting reading backwards (Wang Nan)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (5):
      perf machine: Introduce number of threads member
      perf tools: Add template for generating rbtree resort class
      perf trace: Sort summary output by number of events
      perf trace: Sort syscalls stats by msecs in --summary
      perf trace: Do not show the runtime_ms for a thread when not collecting it

Jiri Olsa (7):
      perf hists: Move sort__need_collapse into struct perf_hpp_list
      perf hists: Move sort__has_parent into struct perf_hpp_list
      perf hists: Move sort__has_sym into struct perf_hpp_list
      perf hists: Move sort__has_dso into struct perf_hpp_list
      perf hists: Move sort__has_socket into struct perf_hpp_list
      perf hists: Move sort__has_thread into struct perf_hpp_list
      perf hists: Move sort__has_comm into struct perf_hpp_list

Naveen N. Rao (3):
      perf tools powerpc: Add support for generating bpf prologue
      perf powerpc: Fix kprobe and kretprobe handling with kallsyms on ppc64le
      perf symbols: Fix kallsyms perf test on ppc64le

Wang Nan (2):
      perf evlist: Extract perf_mmap__read()
      perf evlist: Rename variable in perf_mmap__read()

 tools/perf/arch/powerpc/Makefile            |   1 +
 tools/perf/arch/powerpc/util/dwarf-regs.c   |  40 +++++---
 tools/perf/arch/powerpc/util/sym-handling.c |  43 ++++++--
 tools/perf/builtin-diff.c                   |   4 +-
 tools/perf/builtin-report.c                 |   4 +-
 tools/perf/builtin-top.c                    |   8 +-
 tools/perf/builtin-trace.c                  |  87 ++++++++++------
 tools/perf/tests/hists_common.c             |   2 +-
 tools/perf/tests/hists_cumulate.c           |   2 +-
 tools/perf/tests/hists_link.c               |   4 +-
 tools/perf/tests/hists_output.c             |   2 +-
 tools/perf/ui/browsers/hists.c              |  32 +++---
 tools/perf/ui/gtk/hists.c                   |   2 +-
 tools/perf/ui/hist.c                        |   2 +-
 tools/perf/util/annotate.c                  |   2 +-
 tools/perf/util/callchain.c                 |   2 +-
 tools/perf/util/evlist.c                    |  56 ++++++-----
 tools/perf/util/hist.c                      |  14 +--
 tools/perf/util/hist.h                      |  10 ++
 tools/perf/util/machine.c                   |   9 +-
 tools/perf/util/machine.h                   |   1 +
 tools/perf/util/probe-event.c               |   5 +-
 tools/perf/util/probe-event.h               |   3 +-
 tools/perf/util/rb_resort.h                 | 149 ++++++++++++++++++++++++++++
 tools/perf/util/sort.c                      |  35 +++----
 tools/perf/util/sort.h                      |   7 --
 tools/perf/util/symbol-elf.c                |   7 +-
 tools/perf/util/symbol.h                    |   3 +-
 28 files changed, 382 insertions(+), 154 deletions(-)
 create mode 100644 tools/perf/util/rb_resort.h

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

* Re: [GIT PULL 00/17] perf/core improvements and fixes
  2015-05-14 22:37 Arnaldo Carvalho de Melo
@ 2015-05-15  6:39 ` Ingo Molnar
  0 siblings, 0 replies; 32+ messages in thread
From: Ingo Molnar @ 2015-05-15  6:39 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, David Ahern,
	Don Zickus, Frederic Weisbecker, He Kuang, Jiri Olsa,
	Masami Hiramatsu, Namhyung Kim, Naveen N . Rao, Peter Zijlstra,
	Stephane Eranian, Steven Rostedt, Taeung Song, Vinson Lee,
	Wang Nan, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit a41f3c8cd4e28dcbebd8ec27a9602c86cfa5f009:
> 
>   perf/x86/intel/uncore: Add Broadwell-U uncore IMC PMU support (2015-05-11 11:57:47 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to 70923bd26c732ac2d9e248d80214df6dfd75f78c:
> 
>   perf tools: Make flex/bison calls honour V=1 (2015-05-14 19:27:47 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Add --range option to show a variable's location range in 'perf probe',
>   helping in collecting variables in probes when there is a mismatch
>   between assembly and source code (He Kuang)
> 
> - Show better error message when failed to find variable in 'perf probe' (He Kuang)
> 
> - Fix 'perf report --thread' handling and document it better (Namhyung Kim)
> 
> Infrastructure:
> 
> - Fix to get negative exit codes in 'perf test' test routines (He Kuang)
> 
> - Make flex/bison calls honour V=1 (Jiri Olsa)
> 
> - Ignore tail calls to probed functions in 'perf probe' (Naveen N. Rao)
> 
> - Fix refcount expectations in map_group share 'perf test' (Arnaldo Carvalho de Melo)
> 
> Build Fixes:
> 
> - Fix 'perf kmem' build due to compiler thinking uninitialized var is
>   being accessed (Arnaldo Carvalho de Melo)
> 
> - Provide le16toh if not defined, to fix the libtraceevent build on
>   older distros (Arnaldo Carvalho de Melo)
> 
> - Fix 'perf trace' build on older distros by providing some CLOEXEC, NONBLOCK
>   defines (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (6):
>       perf kmem: Fix compiler warning about may be accessing uninitialized variable
>       perf tests: Show refcounting broken expectations in thread-mg-share test
>       perf machine: No need to keep a refcnt for last_match
>       perf tests: Fix map_groups refcount test
>       tools lib traceevent: Provide le16toh define for older systems
>       perf trace: Fix the build on older distros
> 
> He Kuang (5):
>       perf trace: Removed duplicated NULL test
>       perf probe: Remove length limitation for showing available variables
>       perf probe: Add --range option to show a variable's location range
>       perf probe: Show better error message when failed to find variable
>       perf tests: Fix to get negative exit codes
> 
> Jiri Olsa (1):
>       perf tools: Make flex/bison calls honour V=1
> 
> Namhyung Kim (4):
>       perf tools: Document relation of per-thread event count feature
>       perf report: Force tty output if -T/--thread option is given
>       perf report: Do not restrict -T option by other options
>       perf report: Fix some option handling on --stdio
> 
> Naveen N. Rao (1):
>       perf probe: Ignore tail calls to probed functions
> 
>  tools/lib/traceevent/plugin_cfg80211.c   |  13 ++
>  tools/perf/Documentation/perf-record.txt |   3 +-
>  tools/perf/Documentation/perf-report.txt |   3 +-
>  tools/perf/builtin-kmem.c                |   2 +-
>  tools/perf/builtin-probe.c               |   2 +
>  tools/perf/builtin-report.c              |  17 ++-
>  tools/perf/builtin-trace.c               |  32 ++++-
>  tools/perf/tests/builtin-test.c          |   2 +-
>  tools/perf/tests/tests.h                 |   9 ++
>  tools/perf/tests/thread-mg-share.c       |  29 +++--
>  tools/perf/util/Build                    |   8 +-
>  tools/perf/util/cache.h                  |   1 -
>  tools/perf/util/dwarf-aux.c              | 204 +++++++++++++++++++++++++++----
>  tools/perf/util/dwarf-aux.h              |  10 +-
>  tools/perf/util/environment.c            |   1 -
>  tools/perf/util/machine.c                |   8 +-
>  tools/perf/util/pager.c                  |   5 -
>  tools/perf/util/probe-event.h            |   1 +
>  tools/perf/util/probe-finder.c           |  90 ++++++++++----
>  19 files changed, 346 insertions(+), 94 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/17] perf/core improvements and fixes
@ 2015-05-14 22:37 Arnaldo Carvalho de Melo
  2015-05-15  6:39 ` Ingo Molnar
  0 siblings, 1 reply; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-14 22:37 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	He Kuang, Jiri Olsa, Masami Hiramatsu, Namhyung Kim,
	Naveen N . Rao, Peter Zijlstra, Stephane Eranian, Steven Rostedt,
	Taeung Song, Vinson Lee, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit a41f3c8cd4e28dcbebd8ec27a9602c86cfa5f009:

  perf/x86/intel/uncore: Add Broadwell-U uncore IMC PMU support (2015-05-11 11:57:47 +0200)

are available in the git repository at:

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

for you to fetch changes up to 70923bd26c732ac2d9e248d80214df6dfd75f78c:

  perf tools: Make flex/bison calls honour V=1 (2015-05-14 19:27:47 -0300)

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

User visible:

- Add --range option to show a variable's location range in 'perf probe',
  helping in collecting variables in probes when there is a mismatch
  between assembly and source code (He Kuang)

- Show better error message when failed to find variable in 'perf probe' (He Kuang)

- Fix 'perf report --thread' handling and document it better (Namhyung Kim)

Infrastructure:

- Fix to get negative exit codes in 'perf test' test routines (He Kuang)

- Make flex/bison calls honour V=1 (Jiri Olsa)

- Ignore tail calls to probed functions in 'perf probe' (Naveen N. Rao)

- Fix refcount expectations in map_group share 'perf test' (Arnaldo Carvalho de Melo)

Build Fixes:

- Fix 'perf kmem' build due to compiler thinking uninitialized var is
  being accessed (Arnaldo Carvalho de Melo)

- Provide le16toh if not defined, to fix the libtraceevent build on
  older distros (Arnaldo Carvalho de Melo)

- Fix 'perf trace' build on older distros by providing some CLOEXEC, NONBLOCK
  defines (Arnaldo Carvalho de Melo)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (6):
      perf kmem: Fix compiler warning about may be accessing uninitialized variable
      perf tests: Show refcounting broken expectations in thread-mg-share test
      perf machine: No need to keep a refcnt for last_match
      perf tests: Fix map_groups refcount test
      tools lib traceevent: Provide le16toh define for older systems
      perf trace: Fix the build on older distros

He Kuang (5):
      perf trace: Removed duplicated NULL test
      perf probe: Remove length limitation for showing available variables
      perf probe: Add --range option to show a variable's location range
      perf probe: Show better error message when failed to find variable
      perf tests: Fix to get negative exit codes

Jiri Olsa (1):
      perf tools: Make flex/bison calls honour V=1

Namhyung Kim (4):
      perf tools: Document relation of per-thread event count feature
      perf report: Force tty output if -T/--thread option is given
      perf report: Do not restrict -T option by other options
      perf report: Fix some option handling on --stdio

Naveen N. Rao (1):
      perf probe: Ignore tail calls to probed functions

 tools/lib/traceevent/plugin_cfg80211.c   |  13 ++
 tools/perf/Documentation/perf-record.txt |   3 +-
 tools/perf/Documentation/perf-report.txt |   3 +-
 tools/perf/builtin-kmem.c                |   2 +-
 tools/perf/builtin-probe.c               |   2 +
 tools/perf/builtin-report.c              |  17 ++-
 tools/perf/builtin-trace.c               |  32 ++++-
 tools/perf/tests/builtin-test.c          |   2 +-
 tools/perf/tests/tests.h                 |   9 ++
 tools/perf/tests/thread-mg-share.c       |  29 +++--
 tools/perf/util/Build                    |   8 +-
 tools/perf/util/cache.h                  |   1 -
 tools/perf/util/dwarf-aux.c              | 204 +++++++++++++++++++++++++++----
 tools/perf/util/dwarf-aux.h              |  10 +-
 tools/perf/util/environment.c            |   1 -
 tools/perf/util/machine.c                |   8 +-
 tools/perf/util/pager.c                  |   5 -
 tools/perf/util/probe-event.h            |   1 +
 tools/perf/util/probe-finder.c           |  90 ++++++++++----
 19 files changed, 346 insertions(+), 94 deletions(-)

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

* [GIT PULL 00/17] perf/core improvements and fixes
@ 2012-09-05 23:08 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 32+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-09-05 23:08 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo,
	Ananth N. Mavinakayanahalli, David Ahern, Frederic Weisbecker,
	Irina Tirdea, Jiri Olsa, Maciek Borzecki, Namhyung Kim,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Robert Richter,
	Steven Rostedt, Suzuki K. Poulose, Arnaldo Carvalho de Melo

The following changes since commit bab57e994d6311298b4e3915d2c75296cd81638c:

  Merge branch 'core' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/core (2012-09-05 08:29:56 +0200)

are available in the git repository at:


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

for you to fetch changes up to 7a4ec938857cf534270b23545495300fbac7f5de:

  perf tools: Allow user to indicate path to objdump in command line (2012-09-05 19:41:55 -0300)

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

1) Rename libtraceevent 'private' struct member to 'priv' so that it works
   in C++, from Steven Rostedt

2) Remove lots of exit()/die() calls from tools so that the main perf exit
   routine can take place, from David Ahern

3) Fix x86 build on x86-64, from David Ahern.

4) Remove some headers that prevented perf from building on Android,
   from David Ahern

5) {int,str,rb}list fixes from Suzuki K Poulose

6) perf.data header fixes from Namhyung Kim

7) Replace needless mempcpy with memcpy, to allow build on Android, from Irina Tirdea

8) Allow user to indicate objdump path, needed in cross environments, from
   Maciek Borzecki

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

----------------------------------------------------------------
David Ahern (9):
      perf session: flush_sample_queue needs to handle errors from handlers
      perf tool: handle errors in synthesized event functions
      perf lock: Remove use of die and handle errors
      perf stat: Remove use of die/exit and handle errors
      perf help: Remove use of die and handle errors
      perf script: Remove use of die/exit
      perf record: Remove use of die/exit
      perf tools: Fix x86 builds with ARCH specified on the command line
      perf tools: remove unneeded include of network header files

Irina Tirdea (1):
      perf tools: Replace mempcpy with memcpy

Maciek Borzecki (1):
      perf tools: Allow user to indicate path to objdump in command line

Namhyung Kim (3):
      perf header: Use evlist->nr_entries on write_event_desc()
      perf header: Set tracepoint event name only if not set
      perf header: Swap pmu mapping numbers if needed

Steven Rostedt (1):
      tools lib traceevent: Modify header to work in C++ programs

Suzuki K. Poulose (2):
      perf tools: Fix intlist node removal
      perf tools: Remove the node from rblist in strlist__remove

 tools/lib/traceevent/event-parse.h                 |    4 +-
 tools/perf/Documentation/perf-annotate.txt         |    3 +
 tools/perf/Documentation/perf-report.txt           |    3 +
 tools/perf/Makefile                                |    4 +-
 tools/perf/builtin-annotate.c                      |    2 +
 tools/perf/builtin-help.c                          |   48 ++++--
 tools/perf/builtin-lock.c                          |  181 ++++++++++++++------
 tools/perf/builtin-record.c                        |  158 +++++++++++------
 tools/perf/builtin-report.c                        |    2 +
 tools/perf/builtin-script.c                        |   60 +++++--
 tools/perf/builtin-stat.c                          |    7 +-
 tools/perf/util/annotate.c                         |    4 +-
 tools/perf/util/annotate.h                         |    1 +
 tools/perf/util/event.c                            |   35 +++-
 tools/perf/util/header.c                           |   13 +-
 tools/perf/util/intlist.c                          |    4 +-
 .../perf/util/scripting-engines/trace-event-perl.c |    8 +-
 tools/perf/util/session.c                          |   24 ++-
 tools/perf/util/strlist.c                          |    2 +-
 tools/perf/util/target.c                           |    4 +-
 tools/perf/util/util.h                             |    5 -
 21 files changed, 389 insertions(+), 183 deletions(-)

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

end of thread, other threads:[~2019-02-28  7:28 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 21:44 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 01/17] perf hists browser: Add option for runtime switching perf data file Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 02/17] perf report: Enable the runtime switching of " Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 03/17] perf evlist: Fix set event list leader Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 04/17] perf tools: Check for flex and bison before continuing building Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 05/17] perf sort: Drop ip_[lr] arguments from _sort__sym_cmp() Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 06/17] perf sort: Make setup_sorting returns an error code Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 07/17] perf sort: Check return value of strdup() Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 08/17] perf evlist: Make event_copy local to mmaps Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 09/17] perf tools: Add cpu_map processor socket level functions Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 10/17] perf stat: Add per processor socket count aggregation Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 11/17] perf hists browser: Add support to display whole group data for raw columns Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 12/17] perf perl scripts: Fix SIGALRM and pipe read race for rwtop Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 13/17] perf tools: Fix perf_evsel::exclude_GH handling Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 14/17] perf tests: Adding automated parsing tests for group :GH modifiers Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 15/17] perf tools: Fix calloc argument ordering Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 16/17] perf evlist: Pass the event_group info via perf_attr_details Arnaldo Carvalho de Melo
2013-02-06 21:44 ` [PATCH 17/17] perf python: Link with sysfs.o Arnaldo Carvalho de Melo
2013-02-06 21:51 ` [GIT PULL 00/17] perf/core improvements and fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2019-02-21  1:25 Arnaldo Carvalho de Melo
2019-02-28  7:28 ` Ingo Molnar
2018-04-04  2:21 Arnaldo Carvalho de Melo
2018-04-04  2:21 ` Arnaldo Carvalho de Melo
2018-04-04  5:25 ` Ingo Molnar
2018-04-04  5:25   ` Ingo Molnar
2016-08-04  0:49 Arnaldo Carvalho de Melo
2016-08-04  9:04 ` Ingo Molnar
2016-05-06  0:29 Arnaldo Carvalho de Melo
2016-05-06  6:36 ` Ingo Molnar
2015-05-14 22:37 Arnaldo Carvalho de Melo
2015-05-15  6:39 ` Ingo Molnar
2012-09-05 23:08 Arnaldo Carvalho de Melo

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