linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 00/26] perf/core improvements and fixes
@ 2015-01-26 17:47 Arnaldo Carvalho de Melo
  2015-01-26 17:47 ` [PATCH 08/26] perf tools: Support parsing parameterized events Arnaldo Carvalho de Melo
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-26 17:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Richard Fowles, Peter Zijlstra, Frederic Weisbecker,
	Rasmus Villemoes, Stephane Eranian, Adrian Hunter, Paul Mackerras,
	Masami Hiramatsu, Jiri Olsa, Andi Kleen, Rickard Strandqvist,
	Borislav Petkov, Don Zickus, Ramkumar Ramachandra,
	Arnaldo Carvalho de Melo, Arnaldo Carvalho de Melo,
	Steven Rostedt, Joe Mario, Namhyung Kim, Sukadev Bhattiprolu,
	Kan Liang, Mike Galbraith, linux-kernel, David Ahern,
	Cody P Schafer, linuxppc-dev

Hi Ingo,

	Please consider pulling, it has my latest perf/urgent pull content,
please let me know if you don't want it to be submitted like that, i.e. if
you have any problems with my latest perf/urgent pull request and I'll try
to address it ASAP.

- Arnaldo

The following changes since commit 25dd9171f51c482eb7c4dc8618766ae733756e2d:

  perf probe: Fix probing kretprobes (2015-01-21 10:06:24 -0300)

are available in the git repository at:

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

for you to fetch changes up to 3d199b5be53348bef84883013c484b414adf0a2e:

  tools lib traceevent: Add support for IP address formats (2015-01-26 12:04:41 -0300)

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

User visible:

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

- 'perf diff' output improvements (Namhyung Kim)

- Fix error reporting for evsel pgfault constructor (Arnaldo Carvalho de Melo)

Infrastructure:

- Move debugfs sterrno like method to tools/lib/ so that it may be used by
  other tools, as 'perf probe' will be soon (Arnaldo Carvalho de Melo)

- Introduce function fro deleting/removing hist_entry to avoid code duplication
  (Arnaldo Carvalho de Melo)

- Support parsing parameterized events (Cody P Schafer)

- Add support for IP address formats in libtraceevent (David Ahern)

- Fix typo in sample-parsing.c 'perf test' entry (Rasmus Villemoes)

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

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (9):
      perf mem: Move the mem_operations global to struct perf_mem
      perf tools: Remove EOL whitespaces
      perf hists: Rename hist_entry__free to __delete
      perf hists: Introduce function for deleting/removing hist_entry
      tools lib fs: Adopt debugfs open strerrno method
      tools lib fs: Pass filename to debugfs__strerror_open
      perf trace: Fix error reporting for evsel pgfault constructor
      tools lib fs debugfs: Introduce debugfs__strerror_open_tp
      tools lib fs debugfs: Check if debugfs is mounted when handling ENOENT

Cody P Schafer (4):
      perf tools: Support parsing parameterized events
      perf tools: Extend format_alias() to include event parameters
      perf Documentation: Add event parameters
      perf tools: Document parameterized and symbolic events

David Ahern (1):
      tools lib traceevent: Add support for IP address formats

Namhyung Kim (9):
      perf report: Get rid of report__inc_stat()
      perf tools: Allow use of an exclusive option more than once
      perf diff: Get rid of hists__compute_resort()
      perf diff: Print diff result more precisely
      perf diff: Introduce fmt_to_data_file() helper
      perf tools: Pass struct perf_hpp_fmt to its callbacks
      perf diff: Fix output ordering to honor next column
      perf diff: Fix -o/--order option behavior
      perf ui/tui: Show fatal error message only if exists

Rasmus Villemoes (1):
      perf tests: Fix typo in sample-parsing.c

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

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

 .../testing/sysfs-bus-event_source-devices-events  |   6 +
 tools/lib/api/fs/debugfs.c                         |  43 +++
 tools/lib/api/fs/debugfs.h                         |   3 +
 tools/lib/traceevent/event-parse.c                 | 328 +++++++++++++++++++++
 tools/perf/Documentation/perf-buildid-cache.txt    |   2 +-
 tools/perf/Documentation/perf-list.txt             |  13 +
 tools/perf/Documentation/perf-mem.txt              |   9 +-
 tools/perf/Documentation/perf-record.txt           |  12 +
 tools/perf/Documentation/perf-script.txt           |  28 +-
 tools/perf/Documentation/perf-stat.txt             |  20 +-
 tools/perf/builtin-buildid-cache.c                 |   4 +-
 tools/perf/builtin-diff.c                          | 248 ++++++++++------
 tools/perf/builtin-mem.c                           | 131 ++++++--
 tools/perf/builtin-report.c                        |  16 +-
 tools/perf/builtin-stat.c                          |   2 +-
 tools/perf/builtin-top.c                           |   2 +-
 tools/perf/builtin-trace.c                         | 106 ++++---
 tools/perf/tests/attr.py                           |   1 -
 tools/perf/tests/hists_cumulate.c                  |   2 +-
 tools/perf/tests/hists_output.c                    |   2 +-
 tools/perf/tests/make                              |   1 -
 tools/perf/tests/parse-events.c                    |   2 +-
 tools/perf/tests/sample-parsing.c                  |   2 +-
 tools/perf/ui/browsers/annotate.c                  |   3 +-
 tools/perf/ui/hist.c                               |  12 +-
 tools/perf/ui/progress.h                           |   4 +-
 tools/perf/ui/tui/helpline.c                       |   3 +
 tools/perf/ui/tui/setup.c                          |   3 +-
 tools/perf/util/annotate.c                         |   2 +-
 tools/perf/util/color.c                            | 126 --------
 tools/perf/util/color.h                            |   2 -
 tools/perf/util/evlist.c                           |  27 --
 tools/perf/util/evlist.h                           |   1 -
 tools/perf/util/hist.c                             |  48 ++-
 tools/perf/util/hist.h                             |  11 +-
 tools/perf/util/parse-events.c                     |   6 +-
 tools/perf/util/parse-events.h                     |   1 +
 tools/perf/util/parse-options.c                    |   2 +-
 tools/perf/util/pmu.c                              | 102 ++++++-
 tools/perf/util/python.c                           |   2 +-
 .../util/scripting-engines/trace-event-python.c    |   2 +-
 tools/perf/util/session.c                          |   2 +-
 tools/perf/util/sort.c                             |  37 ++-
 tools/perf/util/symbol.c                           |   2 +-
 44 files changed, 950 insertions(+), 431 deletions(-)

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

* [PATCH 08/26] perf tools: Support parsing parameterized events
  2015-01-26 17:47 [GIT PULL 00/26] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2015-01-26 17:47 ` Arnaldo Carvalho de Melo
  2015-01-26 17:47 ` [PATCH 09/26] perf tools: Extend format_alias() to include event parameters Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-26 17:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Cody P Schafer, linuxppc-dev, linux-kernel,
	Arnaldo Carvalho de Melo, Cody P Schafer, Paul Mackerras,
	Sukadev Bhattiprolu, Jiri Olsa

From: Cody P Schafer <cody@linux.vnet.ibm.com>

Enable event specification like:

	pmu/event_name,param1=0x1,param2=0x4/

Assuming that

	/sys/bus/event_source/devices/pmu/events/event_name

Contains something like

	param2=?,bar=1,param1=?

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Cody P Schafer <dev@codyps.com>
Cc: Haren Myneni <hbabu@us.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/1420679633-28856-2-git-send-email-sukadev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/parse-events.h |  1 +
 tools/perf/util/pmu.c          | 74 +++++++++++++++++++++++++++++++++++-------
 2 files changed, 64 insertions(+), 11 deletions(-)

diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index db2cf78ff0f3..ca226cef8460 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -71,6 +71,7 @@ struct parse_events_term {
 	int type_val;
 	int type_term;
 	struct list_head list;
+	bool used;
 };
 
 struct parse_events_evlist {
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 5c9c4947cfb4..bfbecf7abd38 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -551,31 +551,68 @@ static void pmu_format_value(unsigned long *format, __u64 value, __u64 *v,
 }
 
 /*
+ * Term is a string term, and might be a param-term. Try to look up it's value
+ * in the remaining terms.
+ * - We have a term like "base-or-format-term=param-term",
+ * - We need to find the value supplied for "param-term" (with param-term named
+ *   in a config string) later on in the term list.
+ */
+static int pmu_resolve_param_term(struct parse_events_term *term,
+				  struct list_head *head_terms,
+				  __u64 *value)
+{
+	struct parse_events_term *t;
+
+	list_for_each_entry(t, head_terms, list) {
+		if (t->type_val == PARSE_EVENTS__TERM_TYPE_NUM) {
+			if (!strcmp(t->config, term->config)) {
+				t->used = true;
+				*value = t->val.num;
+				return 0;
+			}
+		}
+	}
+
+	if (verbose)
+		printf("Required parameter '%s' not specified\n", term->config);
+
+	return -1;
+}
+
+/*
  * Setup one of config[12] attr members based on the
  * user input data - term parameter.
  */
 static int pmu_config_term(struct list_head *formats,
 			   struct perf_event_attr *attr,
 			   struct parse_events_term *term,
+			   struct list_head *head_terms,
 			   bool zero)
 {
 	struct perf_pmu_format *format;
 	__u64 *vp;
+	__u64 val;
+
+	/*
+	 * If this is a parameter we've already used for parameterized-eval,
+	 * skip it in normal eval.
+	 */
+	if (term->used)
+		return 0;
 
 	/*
-	 * Support only for hardcoded and numnerial terms.
 	 * Hardcoded terms should be already in, so nothing
 	 * to be done for them.
 	 */
 	if (parse_events__is_hardcoded_term(term))
 		return 0;
 
-	if (term->type_val != PARSE_EVENTS__TERM_TYPE_NUM)
-		return -EINVAL;
-
 	format = pmu_find_format(formats, term->config);
-	if (!format)
+	if (!format) {
+		if (verbose)
+			printf("Invalid event/parameter '%s'\n", term->config);
 		return -EINVAL;
+	}
 
 	switch (format->value) {
 	case PERF_PMU_FORMAT_VALUE_CONFIG:
@@ -592,11 +629,25 @@ static int pmu_config_term(struct list_head *formats,
 	}
 
 	/*
-	 * XXX If we ever decide to go with string values for
-	 * non-hardcoded terms, here's the place to translate
-	 * them into value.
+	 * Either directly use a numeric term, or try to translate string terms
+	 * using event parameters.
 	 */
-	pmu_format_value(format->bits, term->val.num, vp, zero);
+	if (term->type_val == PARSE_EVENTS__TERM_TYPE_NUM)
+		val = term->val.num;
+	else if (term->type_val == PARSE_EVENTS__TERM_TYPE_STR) {
+		if (strcmp(term->val.str, "?")) {
+			if (verbose)
+				pr_info("Invalid sysfs entry %s=%s\n",
+						term->config, term->val.str);
+			return -EINVAL;
+		}
+
+		if (pmu_resolve_param_term(term, head_terms, &val))
+			return -EINVAL;
+	} else
+		return -EINVAL;
+
+	pmu_format_value(format->bits, val, vp, zero);
 	return 0;
 }
 
@@ -607,9 +658,10 @@ int perf_pmu__config_terms(struct list_head *formats,
 {
 	struct parse_events_term *term;
 
-	list_for_each_entry(term, head_terms, list)
-		if (pmu_config_term(formats, attr, term, zero))
+	list_for_each_entry(term, head_terms, list) {
+		if (pmu_config_term(formats, attr, term, head_terms, zero))
 			return -EINVAL;
+	}
 
 	return 0;
 }
-- 
1.9.3

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

* [PATCH 09/26] perf tools: Extend format_alias() to include event parameters
  2015-01-26 17:47 [GIT PULL 00/26] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-01-26 17:47 ` [PATCH 08/26] perf tools: Support parsing parameterized events Arnaldo Carvalho de Melo
@ 2015-01-26 17:47 ` Arnaldo Carvalho de Melo
  2015-01-26 17:47 ` [PATCH 10/26] perf Documentation: Add " Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-26 17:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Cody P Schafer, linuxppc-dev, linux-kernel,
	Arnaldo Carvalho de Melo, Cody P Schafer, Paul Mackerras,
	Sukadev Bhattiprolu, Jiri Olsa

From: Cody P Schafer <cody@linux.vnet.ibm.com>

This causes `perf list pmu` to show parameters for parameterized events
like:

  pmu/event_name,param1=?,param2=?/ [Kernel PMU event]

An example:

  hv_24x7/HPM_TLBIE__PHYS_CORE,core=?/ [Kernel PMU event]

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Cody P Schafer <dev@codyps.com>
Cc: Haren Myneni <hbabu@us.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/1420679633-28856-3-git-send-email-sukadev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/pmu.c | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index bfbecf7abd38..48411674da0f 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -819,10 +819,36 @@ void perf_pmu__set_format(unsigned long *bits, long from, long to)
 		set_bit(b, bits);
 }
 
+static int sub_non_neg(int a, int b)
+{
+	if (b > a)
+		return 0;
+	return a - b;
+}
+
 static char *format_alias(char *buf, int len, struct perf_pmu *pmu,
 			  struct perf_pmu_alias *alias)
 {
-	snprintf(buf, len, "%s/%s/", pmu->name, alias->name);
+	struct parse_events_term *term;
+	int used = snprintf(buf, len, "%s/%s", pmu->name, alias->name);
+
+	list_for_each_entry(term, &alias->terms, list) {
+		if (term->type_val == PARSE_EVENTS__TERM_TYPE_STR)
+			used += snprintf(buf + used, sub_non_neg(len, used),
+					",%s=%s", term->config,
+					term->val.str);
+	}
+
+	if (sub_non_neg(len, used) > 0) {
+		buf[used] = '/';
+		used++;
+	}
+	if (sub_non_neg(len, used) > 0) {
+		buf[used] = '\0';
+		used++;
+	} else
+		buf[len - 1] = '\0';
+
 	return buf;
 }
 
-- 
1.9.3

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

* [PATCH 10/26] perf Documentation: Add event parameters
  2015-01-26 17:47 [GIT PULL 00/26] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-01-26 17:47 ` [PATCH 08/26] perf tools: Support parsing parameterized events Arnaldo Carvalho de Melo
  2015-01-26 17:47 ` [PATCH 09/26] perf tools: Extend format_alias() to include event parameters Arnaldo Carvalho de Melo
@ 2015-01-26 17:47 ` Arnaldo Carvalho de Melo
  2015-01-26 17:47 ` [PATCH 11/26] perf tools: Document parameterized and symbolic events Arnaldo Carvalho de Melo
  2015-01-28 14:50 ` [GIT PULL 00/26] perf/core improvements and fixes Ingo Molnar
  4 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-26 17:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Cody P Schafer, linuxppc-dev, linux-kernel,
	Arnaldo Carvalho de Melo, Cody P Schafer, Paul Mackerras,
	Sukadev Bhattiprolu, Jiri Olsa

From: Cody P Schafer <cody@linux.vnet.ibm.com>

Event parameters are a basic way for partial events to be specified in
sysfs with per-event names given to the fields that need to be filled in
when using a particular event.

It is intended for supporting cases where the single 'cpu' parameter is
insufficient. For example, POWER 8 has events for physical
sockets/cores/cpus that are accessible from with virtual machines. To
keep using the single 'cpu' parameter we'd need to perform a mapping
between Linux's cpus and the physical machine's cpus (in this case Linux
is running under a hypervisor). This isn't possible because bindings
between our cpus and physical cpus may not be fixed, and we probably
won't have a "cpu" on each physical cpu.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Cody P Schafer <dev@codyps.com>
Cc: Haren Myneni <hbabu@us.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/1420679633-28856-4-git-send-email-sukadev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 Documentation/ABI/testing/sysfs-bus-event_source-devices-events | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
index 20979f8b3edb..505f080d20a1 100644
--- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
@@ -52,12 +52,18 @@ Description:	Per-pmu performance monitoring events specific to the running syste
 			event=0x2abc
 			event=0x423,inv,cmask=0x3
 			domain=0x1,offset=0x8,starting_index=0xffff
+			domain=0x1,offset=0x8,core=?
 
 		Each of the assignments indicates a value to be assigned to a
 		particular set of bits (as defined by the format file
 		corresponding to the <term>) in the perf_event structure passed
 		to the perf_open syscall.
 
+		In the case of the last example, a value replacing "?" would
+		need to be provided by the user selecting the particular event.
+		This is referred to as "event parameterization". Event
+		parameters have the format 'param=?'.
+
 What: /sys/bus/event_source/devices/<pmu>/events/<event>.unit
 Date: 2014/02/24
 Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
-- 
1.9.3

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

* [PATCH 11/26] perf tools: Document parameterized and symbolic events
  2015-01-26 17:47 [GIT PULL 00/26] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2015-01-26 17:47 ` [PATCH 10/26] perf Documentation: Add " Arnaldo Carvalho de Melo
@ 2015-01-26 17:47 ` Arnaldo Carvalho de Melo
  2015-01-28 14:50 ` [GIT PULL 00/26] perf/core improvements and fixes Ingo Molnar
  4 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-26 17:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Cody P Schafer, linuxppc-dev, linux-kernel,
	Arnaldo Carvalho de Melo, Cody P Schafer, Paul Mackerras,
	Sukadev Bhattiprolu, Jiri Olsa

From: Cody P Schafer <cody@linux.vnet.ibm.com>

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Cody P Schafer <dev@codyps.com>
Cc: Haren Myneni <hbabu@us.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/1420679633-28856-5-git-send-email-sukadev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-list.txt   | 13 +++++++++++++
 tools/perf/Documentation/perf-record.txt | 12 ++++++++++++
 tools/perf/Documentation/perf-stat.txt   | 20 ++++++++++++++++----
 3 files changed, 41 insertions(+), 4 deletions(-)

diff --git a/tools/perf/Documentation/perf-list.txt b/tools/perf/Documentation/perf-list.txt
index cbb4f743d921..3e2aec94f806 100644
--- a/tools/perf/Documentation/perf-list.txt
+++ b/tools/perf/Documentation/perf-list.txt
@@ -89,6 +89,19 @@ raw encoding of 0x1A8 can be used:
 You should refer to the processor specific documentation for getting these
 details. Some of them are referenced in the SEE ALSO section below.
 
+PARAMETERIZED EVENTS
+--------------------
+
+Some pmu events listed by 'perf-list' will be displayed with '?' in them. For
+example:
+
+  hv_gpci/dtbp_ptitc,phys_processor_idx=?/
+
+This means that when provided as an event, a value for '?' must
+also be supplied. For example:
+
+  perf stat -C 0 -e 'hv_gpci/dtbp_ptitc,phys_processor_idx=0x2/' ...
+
 OPTIONS
 -------
 
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index af9a54ece024..7d8df2e5edd8 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -33,6 +33,18 @@ OPTIONS
         - a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a
 	  hexadecimal event descriptor.
 
+	- a symbolically formed PMU event like 'pmu/param1=0x3,param2/' where
+	  'param1', 'param2', etc are defined as formats for the PMU in
+	  /sys/bus/event_sources/devices/<pmu>/format/*.
+
+	- a symbolically formed event like 'pmu/config=M,config1=N,config3=K/'
+
+          where M, N, K are numbers (in decimal, hex, octal format). Acceptable
+          values for each of 'config', 'config1' and 'config2' are defined by
+          corresponding entries in /sys/bus/event_sources/devices/<pmu>/format/*
+          param1 and param2 are defined as formats for the PMU in:
+          /sys/bus/event_sources/devices/<pmu>/format/*
+
         - a hardware breakpoint event in the form of '\mem:addr[:access]'
           where addr is the address in memory you want to break in.
           Access is the memory access type (read, write, execute) it can
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index 29ee857c09c6..04e150d83e7d 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -25,10 +25,22 @@ OPTIONS
 
 -e::
 --event=::
-	Select the PMU event. Selection can be a symbolic event name
-	(use 'perf list' to list all events) or a raw PMU
-	event (eventsel+umask) in the form of rNNN where NNN is a
-	 hexadecimal event descriptor.
+	Select the PMU event. Selection can be:
+
+	- a symbolic event name (use 'perf list' to list all events)
+
+	- a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a
+	  hexadecimal event descriptor.
+
+	- a symbolically formed event like 'pmu/param1=0x3,param2/' where
+	  param1 and param2 are defined as formats for the PMU in
+	  /sys/bus/event_sources/devices/<pmu>/format/*
+
+	- a symbolically formed event like 'pmu/config=M,config1=N,config2=K/'
+	  where M, N, K are numbers (in decimal, hex, octal format).
+	  Acceptable values for each of 'config', 'config1' and 'config2'
+	  parameters are defined by corresponding entries in
+	  /sys/bus/event_sources/devices/<pmu>/format/*
 
 -i::
 --no-inherit::
-- 
1.9.3

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

* Re: [GIT PULL 00/26] perf/core improvements and fixes
  2015-01-26 17:47 [GIT PULL 00/26] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2015-01-26 17:47 ` [PATCH 11/26] perf tools: Document parameterized and symbolic events Arnaldo Carvalho de Melo
@ 2015-01-28 14:50 ` Ingo Molnar
  2015-01-28 14:55   ` Arnaldo Carvalho de Melo
  4 siblings, 1 reply; 7+ messages in thread
From: Ingo Molnar @ 2015-01-28 14:50 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Frédéric Weisbecker
  Cc: Richard Fowles, Peter Zijlstra, Frederic Weisbecker,
	Rasmus Villemoes, Stephane Eranian, Adrian Hunter, Paul Mackerras,
	Masami Hiramatsu, Jiri Olsa, Rickard Strandqvist, Borislav Petkov,
	Don Zickus, Ramkumar Ramachandra, Steven Rostedt,
	Arnaldo Carvalho de Melo, Joe Mario, Namhyung Kim,
	Sukadev Bhattiprolu, Kan Liang, Mike Galbraith, linux-kernel,
	David Ahern, Cody P Schafer, linuxppc-dev


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

> Hi Ingo,
> 
> 	Please consider pulling, it has my latest perf/urgent pull content,
> please let me know if you don't want it to be submitted like that, i.e. if
> you have any problems with my latest perf/urgent pull request and I'll try
> to address it ASAP.
> 
> - Arnaldo
> 
> The following changes since commit 25dd9171f51c482eb7c4dc8618766ae733756e2d:
> 
>   perf probe: Fix probing kretprobes (2015-01-21 10:06:24 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to 3d199b5be53348bef84883013c484b414adf0a2e:
> 
>   tools lib traceevent: Add support for IP address formats (2015-01-26 12:04:41 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Enable sampling loads and stores simultaneously in 'perf mem' (Stephane Eranian)
> 
> - 'perf diff' output improvements (Namhyung Kim)
> 
> - Fix error reporting for evsel pgfault constructor (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Move debugfs sterrno like method to tools/lib/ so that it may be used by
>   other tools, as 'perf probe' will be soon (Arnaldo Carvalho de Melo)
> 
> - Introduce function fro deleting/removing hist_entry to avoid code duplication
>   (Arnaldo Carvalho de Melo)
> 
> - Support parsing parameterized events (Cody P Schafer)
> 
> - Add support for IP address formats in libtraceevent (David Ahern)
> 
> - Fix typo in sample-parsing.c 'perf test' entry (Rasmus Villemoes)
> 
> - Remove some unused functions from color.c (Rickard Strandqvist)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (9):
>       perf mem: Move the mem_operations global to struct perf_mem
>       perf tools: Remove EOL whitespaces
>       perf hists: Rename hist_entry__free to __delete
>       perf hists: Introduce function for deleting/removing hist_entry
>       tools lib fs: Adopt debugfs open strerrno method
>       tools lib fs: Pass filename to debugfs__strerror_open
>       perf trace: Fix error reporting for evsel pgfault constructor
>       tools lib fs debugfs: Introduce debugfs__strerror_open_tp
>       tools lib fs debugfs: Check if debugfs is mounted when handling ENOENT
> 
> Cody P Schafer (4):
>       perf tools: Support parsing parameterized events
>       perf tools: Extend format_alias() to include event parameters
>       perf Documentation: Add event parameters
>       perf tools: Document parameterized and symbolic events
> 
> David Ahern (1):
>       tools lib traceevent: Add support for IP address formats
> 
> Namhyung Kim (9):
>       perf report: Get rid of report__inc_stat()
>       perf tools: Allow use of an exclusive option more than once
>       perf diff: Get rid of hists__compute_resort()
>       perf diff: Print diff result more precisely
>       perf diff: Introduce fmt_to_data_file() helper
>       perf tools: Pass struct perf_hpp_fmt to its callbacks
>       perf diff: Fix output ordering to honor next column
>       perf diff: Fix -o/--order option behavior
>       perf ui/tui: Show fatal error message only if exists
> 
> Rasmus Villemoes (1):
>       perf tests: Fix typo in sample-parsing.c
> 
> Rickard Strandqvist (1):
>       perf tools: Remove some unused functions from color.c
> 
> Stephane Eranian (1):
>       perf mem: Enable sampling loads and stores simultaneously
> 
>  .../testing/sysfs-bus-event_source-devices-events  |   6 +
>  tools/lib/api/fs/debugfs.c                         |  43 +++
>  tools/lib/api/fs/debugfs.h                         |   3 +
>  tools/lib/traceevent/event-parse.c                 | 328 +++++++++++++++++++++
>  tools/perf/Documentation/perf-buildid-cache.txt    |   2 +-
>  tools/perf/Documentation/perf-list.txt             |  13 +
>  tools/perf/Documentation/perf-mem.txt              |   9 +-
>  tools/perf/Documentation/perf-record.txt           |  12 +
>  tools/perf/Documentation/perf-script.txt           |  28 +-
>  tools/perf/Documentation/perf-stat.txt             |  20 +-
>  tools/perf/builtin-buildid-cache.c                 |   4 +-
>  tools/perf/builtin-diff.c                          | 248 ++++++++++------
>  tools/perf/builtin-mem.c                           | 131 ++++++--
>  tools/perf/builtin-report.c                        |  16 +-
>  tools/perf/builtin-stat.c                          |   2 +-
>  tools/perf/builtin-top.c                           |   2 +-
>  tools/perf/builtin-trace.c                         | 106 ++++---
>  tools/perf/tests/attr.py                           |   1 -
>  tools/perf/tests/hists_cumulate.c                  |   2 +-
>  tools/perf/tests/hists_output.c                    |   2 +-
>  tools/perf/tests/make                              |   1 -
>  tools/perf/tests/parse-events.c                    |   2 +-
>  tools/perf/tests/sample-parsing.c                  |   2 +-
>  tools/perf/ui/browsers/annotate.c                  |   3 +-
>  tools/perf/ui/hist.c                               |  12 +-
>  tools/perf/ui/progress.h                           |   4 +-
>  tools/perf/ui/tui/helpline.c                       |   3 +
>  tools/perf/ui/tui/setup.c                          |   3 +-
>  tools/perf/util/annotate.c                         |   2 +-
>  tools/perf/util/color.c                            | 126 --------
>  tools/perf/util/color.h                            |   2 -
>  tools/perf/util/evlist.c                           |  27 --
>  tools/perf/util/evlist.h                           |   1 -
>  tools/perf/util/hist.c                             |  48 ++-
>  tools/perf/util/hist.h                             |  11 +-
>  tools/perf/util/parse-events.c                     |   6 +-
>  tools/perf/util/parse-events.h                     |   1 +
>  tools/perf/util/parse-options.c                    |   2 +-
>  tools/perf/util/pmu.c                              | 102 ++++++-
>  tools/perf/util/python.c                           |   2 +-
>  .../util/scripting-engines/trace-event-python.c    |   2 +-
>  tools/perf/util/session.c                          |   2 +-
>  tools/perf/util/sort.c                             |  37 ++-
>  tools/perf/util/symbol.c                           |   2 +-
>  44 files changed, 950 insertions(+), 431 deletions(-)

Pulled, thanks a lot Arnaldo!

Note that there was some minimal interaction with Frederic's 
pending perf/hw_breakpoint work, in tools/perf/Documentation/perf-record.txt.

I resolved the conflict and merged perf/hw_breakpoint into 
perf/core as well, to avoid future complications. (Once I've 
pushed it all out you guys might want to double check what I did 
there though, just to make sure.)

Thanks,

	Ingo

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

* Re: [GIT PULL 00/26] perf/core improvements and fixes
  2015-01-28 14:50 ` [GIT PULL 00/26] perf/core improvements and fixes Ingo Molnar
@ 2015-01-28 14:55   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-28 14:55 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Richard Fowles, Peter Zijlstra, Frédéric Weisbecker,
	Rasmus Villemoes, Stephane Eranian, Adrian Hunter, Paul Mackerras,
	Masami Hiramatsu, Jiri Olsa, Rickard Strandqvist, Borislav Petkov,
	Don Zickus, Ramkumar Ramachandra, Steven Rostedt, Joe Mario,
	Namhyung Kim, Sukadev Bhattiprolu, Kan Liang, Mike Galbraith,
	linux-kernel, David Ahern, Cody P Schafer, linuxppc-dev

Em Wed, Jan 28, 2015 at 03:50:15PM +0100, Ingo Molnar escreveu:
> Pulled, thanks a lot Arnaldo!

Thanks!
 
> Note that there was some minimal interaction with Frederic's 
> pending perf/hw_breakpoint work, in tools/perf/Documentation/perf-record.txt.
> 
> I resolved the conflict and merged perf/hw_breakpoint into 
> perf/core as well, to avoid future complications. (Once I've 
> pushed it all out you guys might want to double check what I did 
> there though, just to make sure.)

As soon as 'git remote update tip' gets this stuff, I'll check it!

- Arnaldo

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

end of thread, other threads:[~2015-01-28 14:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-26 17:47 [GIT PULL 00/26] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-01-26 17:47 ` [PATCH 08/26] perf tools: Support parsing parameterized events Arnaldo Carvalho de Melo
2015-01-26 17:47 ` [PATCH 09/26] perf tools: Extend format_alias() to include event parameters Arnaldo Carvalho de Melo
2015-01-26 17:47 ` [PATCH 10/26] perf Documentation: Add " Arnaldo Carvalho de Melo
2015-01-26 17:47 ` [PATCH 11/26] perf tools: Document parameterized and symbolic events Arnaldo Carvalho de Melo
2015-01-28 14:50 ` [GIT PULL 00/26] perf/core improvements and fixes Ingo Molnar
2015-01-28 14:55   ` Arnaldo Carvalho de Melo

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