* [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-08 1:13 ` Sukadev Bhattiprolu
0 siblings, 0 replies; 38+ messages in thread
From: Sukadev Bhattiprolu @ 2015-01-08 1:13 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa, Michael Ellerman, Paul Mackerras
Cc: peterz, linuxppc-dev, dev, linux-kernel
Description of "event parameters" from the documentation patch:
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.
Description of the sysfs contents when events are parameterized (copied from an
included patch):
Examples:
domain=0x1,offset=0x8,core=?
In the case of the last example, a value replacing "?" would need
to be provided by the user selecting the particular event. This is
refered to as "event parameterization". All non-numerical values
indicate an event parameter.
Notes on how perf-list displays parameterized events
PARAMETERIZED EVENTS
--------------------
Some pmu events listed by 'perf list' will be displayed with '$xyz' in
them. For example:
hv_24x7/HPM_THREAD_NAP_CCYC__PHYS_CORE,core=?/
This means that when provided as an event, a value for ? must also
be supplied. For example:
perf stat -e \
'hv_24x7/HPM_THREAD_NAP_CCYC__PHYS_CORE,core=2' ...
Changelog[v7]
[Jiri Olsa] Nit: Add braces for clarity.
[Jiri Olsa] Add a check to make sure that sysfs entries have with
parameters exactly match '=?'.
Changelog[v6]
[Jiri Olsa, Sukadev Bhattiprolu] Rather than display
'starting_index=$core' in perf.list and sysfs and expect user to
specify a value for 'starting_index', replace 'starting_index' with
what it really means for the event. i.e for an event, if starting_index
refers to 'core' then display 'core=?' in both perf list and sysfs (see
examples above).
Changelog[v5]
- [Jiri Olsa, Peter Zijlstra] Use '$arg' notation rather than ?
to indicate event parameters.
- [Michael Ellerman] Separate the kernel and tool patches in the
patchset into different patchsets.
Changelog[v4]
- [Jiri Olsa] Rebase to perf/core tree (fix small merge conflict)
Changelog[v3]
- [Jiri Olsa] Changed the event parameters are specified. If
event file specifes 'param=val' make the usage 'param=123'
rather than 'val=123'. (patch 1,2/10)
- Shortened event names using "PHYS" and "VCPU" (patch 4/10)
- Print help message if invalid parameter is specified or required
parameter is missing.
- Moved 3 patches that are unrelated to parametrized events into
a separate patchset.
- Reordered patches so code changes come first.
Changelog[v2]
- [Joe Perches, David Laight] Use beNN_to_cpu() instead of guessing
the size from type.
- Use kmem_cache_free() to free page allocated with kmem_cache_alloc().
- Rebase to recent kernel
Cody P Schafer (4):
tools/perf: support parsing parameterized events
tools/perf: extend format_alias() to include event parameters
perf Documentation: add event parameters
tools/perf: Document parameterized and symbolic events
.../testing/sysfs-bus-event_source-devices-events | 6 ++
tools/perf/Documentation/perf-list.txt | 13 +++
tools/perf/Documentation/perf-record.txt | 12 +++
tools/perf/Documentation/perf-stat.txt | 20 ++++-
tools/perf/util/parse-events.h | 1 +
tools/perf/util/pmu.c | 92 +++++++++++++++++++---
6 files changed, 128 insertions(+), 16 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCH v7 1/4] tools/perf: support parsing parameterized events
2015-01-08 1:13 ` Sukadev Bhattiprolu
@ 2015-01-08 1:13 ` Sukadev Bhattiprolu
-1 siblings, 0 replies; 38+ messages in thread
From: Sukadev Bhattiprolu @ 2015-01-08 1:13 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa, Michael Ellerman, Paul Mackerras
Cc: dev, peterz, hbabu, linux-kernel, linuxppc-dev
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=?
CC: Haren Myneni <hbabu@us.ibm.com>
CC: Cody P Schafer <dev@codyps.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
Changelog[v6]:
[Jiri Olsa] Add a check to make sure that sysfs entries have with
parameters exactly match '=?'.
Changelog[v4]:
[Jiri Olsa] Merge to recent perf-core and fix a small conflict.
Changelog[v3]:
[Jiri Olsa] If the sysfs event file specifies 'param=val', make the
usage 'hv_24x7/event,param=123/' rather than 'hv_24x7/event,val=123/'.
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 db2cf78..ca226ce 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 5c9c494..bfbecf7 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.8.3.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v7 1/4] tools/perf: support parsing parameterized events
@ 2015-01-08 1:13 ` Sukadev Bhattiprolu
0 siblings, 0 replies; 38+ messages in thread
From: Sukadev Bhattiprolu @ 2015-01-08 1:13 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa, Michael Ellerman, Paul Mackerras
Cc: peterz, linuxppc-dev, dev, linux-kernel
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=?
CC: Haren Myneni <hbabu@us.ibm.com>
CC: Cody P Schafer <dev@codyps.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
Changelog[v6]:
[Jiri Olsa] Add a check to make sure that sysfs entries have with
parameters exactly match '=?'.
Changelog[v4]:
[Jiri Olsa] Merge to recent perf-core and fix a small conflict.
Changelog[v3]:
[Jiri Olsa] If the sysfs event file specifies 'param=val', make the
usage 'hv_24x7/event,param=123/' rather than 'hv_24x7/event,val=123/'.
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 db2cf78..ca226ce 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 5c9c494..bfbecf7 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.8.3.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [tip:perf/core] perf tools: Support parsing parameterized events
2015-01-08 1:13 ` Sukadev Bhattiprolu
(?)
@ 2015-01-28 15:05 ` tip-bot for Cody P Schafer
-1 siblings, 0 replies; 38+ messages in thread
From: tip-bot for Cody P Schafer @ 2015-01-28 15:05 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, linux-kernel, mpe, peterz, hbabu, cody, hpa, dev, jolsa,
jolsa, acme, sukadev, tglx, paulus
Commit-ID: 688d4dfcdd624192cbf03c08402e444d1d11f294
Gitweb: http://git.kernel.org/tip/688d4dfcdd624192cbf03c08402e444d1d11f294
Author: Cody P Schafer <cody@linux.vnet.ibm.com>
AuthorDate: Wed, 7 Jan 2015 17:13:50 -0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 21 Jan 2015 13:24:32 -0300
perf tools: Support parsing parameterized events
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 db2cf78..ca226ce 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 5c9c494..bfbecf7 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;
}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v7 2/4] tools/perf: extend format_alias() to include event parameters
2015-01-08 1:13 ` Sukadev Bhattiprolu
@ 2015-01-08 1:13 ` Sukadev Bhattiprolu
-1 siblings, 0 replies; 38+ messages in thread
From: Sukadev Bhattiprolu @ 2015-01-08 1:13 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa, Michael Ellerman, Paul Mackerras
Cc: dev, peterz, hbabu, linux-kernel, linuxppc-dev
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]
CC: Haren Myneni <hbabu@us.ibm.com>
CC: Cody P Schafer <dev@codyps.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
Changelog[v7]
[Jiri Olsa] Nit: Add braces for clarity.
Changelog[v6]
[Jiri Olsa, Sukadev Bhattiprolu] Drop the '$' sign and go back to
just printing whatevever sysfs provides (which is '=?') to identify
required parameters. sysfs also now uses parameters like 'core'
and 'vcpu' rather than 'starting_index'.
Changelog[v5]
[Jiri Olsa, Peter Zijlstra] Use '$' to prefix parameterized events.
Changelog[v4]
[Jiri Olsa] If the parameter for an event in sysfs is 'param=val',
have perf-list show the event as 'param=?' rather than 'val=?'.
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 bfbecf7..4841167 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.8.3.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v7 2/4] tools/perf: extend format_alias() to include event parameters
@ 2015-01-08 1:13 ` Sukadev Bhattiprolu
0 siblings, 0 replies; 38+ messages in thread
From: Sukadev Bhattiprolu @ 2015-01-08 1:13 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa, Michael Ellerman, Paul Mackerras
Cc: peterz, linuxppc-dev, dev, linux-kernel
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]
CC: Haren Myneni <hbabu@us.ibm.com>
CC: Cody P Schafer <dev@codyps.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
Changelog[v7]
[Jiri Olsa] Nit: Add braces for clarity.
Changelog[v6]
[Jiri Olsa, Sukadev Bhattiprolu] Drop the '$' sign and go back to
just printing whatevever sysfs provides (which is '=?') to identify
required parameters. sysfs also now uses parameters like 'core'
and 'vcpu' rather than 'starting_index'.
Changelog[v5]
[Jiri Olsa, Peter Zijlstra] Use '$' to prefix parameterized events.
Changelog[v4]
[Jiri Olsa] If the parameter for an event in sysfs is 'param=val',
have perf-list show the event as 'param=?' rather than 'val=?'.
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 bfbecf7..4841167 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.8.3.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [tip:perf/core] perf tools: Extend format_alias() to include event parameters
2015-01-08 1:13 ` Sukadev Bhattiprolu
(?)
@ 2015-01-28 15:05 ` tip-bot for Cody P Schafer
-1 siblings, 0 replies; 38+ messages in thread
From: tip-bot for Cody P Schafer @ 2015-01-28 15:05 UTC (permalink / raw)
To: linux-tip-commits
Cc: mpe, tglx, hbabu, paulus, hpa, jolsa, sukadev, peterz, acme,
cody, mingo, dev, jolsa, linux-kernel
Commit-ID: aaea36174991ff39c7a18044660db86527100c55
Gitweb: http://git.kernel.org/tip/aaea36174991ff39c7a18044660db86527100c55
Author: Cody P Schafer <cody@linux.vnet.ibm.com>
AuthorDate: Wed, 7 Jan 2015 17:13:51 -0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 21 Jan 2015 13:24:33 -0300
perf tools: Extend format_alias() to include event parameters
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 bfbecf7..4841167 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;
}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v7 3/4] perf Documentation: add event parameters
2015-01-08 1:13 ` Sukadev Bhattiprolu
@ 2015-01-08 1:13 ` Sukadev Bhattiprolu
-1 siblings, 0 replies; 38+ messages in thread
From: Sukadev Bhattiprolu @ 2015-01-08 1:13 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa, Michael Ellerman, Paul Mackerras
Cc: dev, peterz, hbabu, linux-kernel, linuxppc-dev
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.
CC: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
CC: Haren Myneni <hbabu@us.ibm.com>
CC: Cody P Schafer <dev@codyps.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
Changelog[v6]
Update event description to explain how required parameters
are displayed.
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 20979f8..505f080 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.8.3.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v7 3/4] perf Documentation: add event parameters
@ 2015-01-08 1:13 ` Sukadev Bhattiprolu
0 siblings, 0 replies; 38+ messages in thread
From: Sukadev Bhattiprolu @ 2015-01-08 1:13 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa, Michael Ellerman, Paul Mackerras
Cc: peterz, linuxppc-dev, dev, linux-kernel
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.
CC: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
CC: Haren Myneni <hbabu@us.ibm.com>
CC: Cody P Schafer <dev@codyps.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
Changelog[v6]
Update event description to explain how required parameters
are displayed.
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 20979f8..505f080 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.8.3.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [tip:perf/core] perf Documentation: Add event parameters
2015-01-08 1:13 ` Sukadev Bhattiprolu
(?)
@ 2015-01-28 15:05 ` tip-bot for Cody P Schafer
-1 siblings, 0 replies; 38+ messages in thread
From: tip-bot for Cody P Schafer @ 2015-01-28 15:05 UTC (permalink / raw)
To: linux-tip-commits
Cc: sukadev, dev, peterz, mingo, acme, tglx, jolsa, linux-kernel,
paulus, mpe, cody, jolsa, hbabu, hpa
Commit-ID: 98a43e0e9917059da32db89829b0eb95453a11ee
Gitweb: http://git.kernel.org/tip/98a43e0e9917059da32db89829b0eb95453a11ee
Author: Cody P Schafer <cody@linux.vnet.ibm.com>
AuthorDate: Wed, 7 Jan 2015 17:13:52 -0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 21 Jan 2015 13:24:33 -0300
perf Documentation: Add event parameters
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 20979f8..505f080 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>
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v7 4/4] tools/perf: Document parameterized and symbolic events
2015-01-08 1:13 ` Sukadev Bhattiprolu
@ 2015-01-08 1:13 ` Sukadev Bhattiprolu
-1 siblings, 0 replies; 38+ messages in thread
From: Sukadev Bhattiprolu @ 2015-01-08 1:13 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa, Michael Ellerman, Paul Mackerras
Cc: dev, peterz, hbabu, linux-kernel, linuxppc-dev
From: Cody P Schafer <cody@linux.vnet.ibm.com>
CC: Haren Myneni <hbabu@us.ibm.com>
CC: Cody P Schafer <dev@codyps.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
Changelog[v6]:
- [Sukadev Bhattiprolu]: Update documentation of perf-list and
perf-record; Added documentation for perf-stat.
- [Jiri Olsa] Fix some typos/formatting
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 cbb4f74..3e2aec9 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 af9a54e..7d8df2e 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 29ee857..04e150d 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.8.3.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v7 4/4] tools/perf: Document parameterized and symbolic events
@ 2015-01-08 1:13 ` Sukadev Bhattiprolu
0 siblings, 0 replies; 38+ messages in thread
From: Sukadev Bhattiprolu @ 2015-01-08 1:13 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa, Michael Ellerman, Paul Mackerras
Cc: peterz, linuxppc-dev, dev, linux-kernel
From: Cody P Schafer <cody@linux.vnet.ibm.com>
CC: Haren Myneni <hbabu@us.ibm.com>
CC: Cody P Schafer <dev@codyps.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
Changelog[v6]:
- [Sukadev Bhattiprolu]: Update documentation of perf-list and
perf-record; Added documentation for perf-stat.
- [Jiri Olsa] Fix some typos/formatting
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 cbb4f74..3e2aec9 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 af9a54e..7d8df2e 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 29ee857..04e150d 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.8.3.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [tip:perf/core] perf tools: Document parameterized and symbolic events
2015-01-08 1:13 ` Sukadev Bhattiprolu
(?)
@ 2015-01-28 15:06 ` tip-bot for Cody P Schafer
-1 siblings, 0 replies; 38+ messages in thread
From: tip-bot for Cody P Schafer @ 2015-01-28 15:06 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, jolsa, peterz, sukadev, hbabu, paulus, mpe, dev,
linux-kernel, cody, mingo, jolsa, acme, hpa
Commit-ID: f9ab9c196d015f3bd8f6bd1c30785c5a49542323
Gitweb: http://git.kernel.org/tip/f9ab9c196d015f3bd8f6bd1c30785c5a49542323
Author: Cody P Schafer <cody@linux.vnet.ibm.com>
AuthorDate: Wed, 7 Jan 2015 17:13:53 -0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 21 Jan 2015 13:24:33 -0300
perf tools: Document parameterized and symbolic events
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 cbb4f74..3e2aec9 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 af9a54e..7d8df2e 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 29ee857..04e150d 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::
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
2015-01-08 1:13 ` Sukadev Bhattiprolu
@ 2015-01-08 9:54 ` Jiri Olsa
-1 siblings, 0 replies; 38+ messages in thread
From: Jiri Olsa @ 2015-01-08 9:54 UTC (permalink / raw)
To: Sukadev Bhattiprolu
Cc: Arnaldo Carvalho de Melo, Michael Ellerman, Paul Mackerras, dev,
peterz, hbabu, linux-kernel, linuxppc-dev
On Wed, Jan 07, 2015 at 05:13:49PM -0800, Sukadev Bhattiprolu wrote:
> Description of "event parameters" from the documentation patch:
>
> 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.
>
> Description of the sysfs contents when events are parameterized (copied from an
> included patch):
>
> Examples:
>
> domain=0x1,offset=0x8,core=?
>
> In the case of the last example, a value replacing "?" would need
> to be provided by the user selecting the particular event. This is
> refered to as "event parameterization". All non-numerical values
> indicate an event parameter.
>
> Notes on how perf-list displays parameterized events
>
> PARAMETERIZED EVENTS
> --------------------
>
> Some pmu events listed by 'perf list' will be displayed with '$xyz' in
> them. For example:
>
> hv_24x7/HPM_THREAD_NAP_CCYC__PHYS_CORE,core=?/
>
> This means that when provided as an event, a value for ? must also
> be supplied. For example:
>
> perf stat -e \
> 'hv_24x7/HPM_THREAD_NAP_CCYC__PHYS_CORE,core=2' ...
>
> Changelog[v7]
> [Jiri Olsa] Nit: Add braces for clarity.
> [Jiri Olsa] Add a check to make sure that sysfs entries have with
> parameters exactly match '=?'.
for the patchset:
Acked-by: Jiri Olsa <jolsa@kernel.org>
thanks,
jirka
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-08 9:54 ` Jiri Olsa
0 siblings, 0 replies; 38+ messages in thread
From: Jiri Olsa @ 2015-01-08 9:54 UTC (permalink / raw)
To: Sukadev Bhattiprolu
Cc: peterz, linux-kernel, Arnaldo Carvalho de Melo, dev,
Paul Mackerras, linuxppc-dev
On Wed, Jan 07, 2015 at 05:13:49PM -0800, Sukadev Bhattiprolu wrote:
> Description of "event parameters" from the documentation patch:
>
> 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.
>
> Description of the sysfs contents when events are parameterized (copied from an
> included patch):
>
> Examples:
>
> domain=0x1,offset=0x8,core=?
>
> In the case of the last example, a value replacing "?" would need
> to be provided by the user selecting the particular event. This is
> refered to as "event parameterization". All non-numerical values
> indicate an event parameter.
>
> Notes on how perf-list displays parameterized events
>
> PARAMETERIZED EVENTS
> --------------------
>
> Some pmu events listed by 'perf list' will be displayed with '$xyz' in
> them. For example:
>
> hv_24x7/HPM_THREAD_NAP_CCYC__PHYS_CORE,core=?/
>
> This means that when provided as an event, a value for ? must also
> be supplied. For example:
>
> perf stat -e \
> 'hv_24x7/HPM_THREAD_NAP_CCYC__PHYS_CORE,core=2' ...
>
> Changelog[v7]
> [Jiri Olsa] Nit: Add braces for clarity.
> [Jiri Olsa] Add a check to make sure that sysfs entries have with
> parameters exactly match '=?'.
for the patchset:
Acked-by: Jiri Olsa <jolsa@kernel.org>
thanks,
jirka
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
2015-01-08 9:54 ` Jiri Olsa
@ 2015-01-12 14:18 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-12 14:18 UTC (permalink / raw)
To: Jiri Olsa
Cc: Sukadev Bhattiprolu, Michael Ellerman, Paul Mackerras, dev,
peterz, hbabu, linux-kernel, linuxppc-dev
Em Thu, Jan 08, 2015 at 10:54:34AM +0100, Jiri Olsa escreveu:
> for the patchset:
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Applied to perf/core
Thanks,
- Arnaldo
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-12 14:18 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-12 14:18 UTC (permalink / raw)
To: Jiri Olsa
Cc: peterz, linux-kernel, Paul Mackerras, dev, Sukadev Bhattiprolu,
linuxppc-dev
Em Thu, Jan 08, 2015 at 10:54:34AM +0100, Jiri Olsa escreveu:
> for the patchset:
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Applied to perf/core
Thanks,
- Arnaldo
^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-27 1:43 ` Sukadev Bhattiprolu
0 siblings, 0 replies; 38+ messages in thread
From: Sukadev Bhattiprolu @ 2015-01-27 1:43 UTC (permalink / raw)
To: Michael Ellerman, Jiri Olsa, Paul Mackerras, Arnaldo Carvalho de Melo
Cc: peterz, linuxppc-dev, dev, linux-kernel
Description of "event parameters" from the documentation patch:
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.
Description of the sysfs contents when events are parameterized (copied from an
included patch):
Examples:
domain=0x1,offset=0x8,core=?
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".
Notes on how perf-list displays parameterized events
PARAMETERIZED EVENTS
--------------------
Some pmu events listed by 'perf list' will be displayed with '=?' in
them. For example:
hv_24x7/HPM_THREAD_NAP_CCYC__PHYS_CORE,core=?/
This means that when provided as an event, a value for ? must also
be supplied. For example:
perf stat -e \
'hv_24x7/HPM_THREAD_NAP_CCYC__PHYS_CORE,core=2' ...
Cody P Schafer (6):
perf: provide sysfs_show for struct perf_pmu_events_attr
perf: add PMU_EVENT_ATTR_STRING() helper
powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
annotated
powerpc/perf/hv-gpci: add the remaining gpci requests
powerpc/perf/hv-24x7: Document sysfs event description entries
Sukadev Bhattiprolu (1):
perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
.../testing/sysfs-bus-event_source-devices-hv_24x7 | 22 +
arch/powerpc/perf/hv-24x7-catalog.h | 25 +
arch/powerpc/perf/hv-24x7-domains.h | 28 +
arch/powerpc/perf/hv-24x7.c | 793 ++++++++++++++++++++-
arch/powerpc/perf/hv-24x7.h | 12 +-
arch/powerpc/perf/hv-common.c | 10 +-
arch/powerpc/perf/hv-common.h | 10 +
arch/powerpc/perf/hv-gpci-requests.h | 261 +++++++
arch/powerpc/perf/hv-gpci.c | 23 +
arch/powerpc/perf/hv-gpci.h | 37 +-
arch/powerpc/perf/req-gen/_begin.h | 13 +
arch/powerpc/perf/req-gen/_clear.h | 5 +
arch/powerpc/perf/req-gen/_end.h | 4 +
arch/powerpc/perf/req-gen/_request-begin.h | 15 +
arch/powerpc/perf/req-gen/_request-end.h | 8 +
arch/powerpc/perf/req-gen/perf.h | 155 ++++
include/linux/perf_event.h | 10 +
kernel/events/core.c | 12 +
18 files changed, 1396 insertions(+), 47 deletions(-)
create mode 100644 arch/powerpc/perf/hv-24x7-domains.h
create mode 100644 arch/powerpc/perf/hv-gpci-requests.h
create mode 100644 arch/powerpc/perf/req-gen/_begin.h
create mode 100644 arch/powerpc/perf/req-gen/_clear.h
create mode 100644 arch/powerpc/perf/req-gen/_end.h
create mode 100644 arch/powerpc/perf/req-gen/_request-begin.h
create mode 100644 arch/powerpc/perf/req-gen/_request-end.h
create mode 100644 arch/powerpc/perf/req-gen/perf.h
--
1.8.3.1
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
2015-01-27 1:43 ` Sukadev Bhattiprolu
@ 2015-01-27 10:02 ` Jiri Olsa
-1 siblings, 0 replies; 38+ messages in thread
From: Jiri Olsa @ 2015-01-27 10:02 UTC (permalink / raw)
To: Sukadev Bhattiprolu
Cc: Michael Ellerman, Paul Mackerras, Arnaldo Carvalho de Melo, dev,
peterz, hbabu, linux-kernel, linuxppc-dev
On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
SNIP
>
>
> Cody P Schafer (6):
> perf: provide sysfs_show for struct perf_pmu_events_attr
> perf: add PMU_EVENT_ATTR_STRING() helper
> powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> annotated
> powerpc/perf/hv-gpci: add the remaining gpci requests
> powerpc/perf/hv-24x7: Document sysfs event description entries
>
> Sukadev Bhattiprolu (1):
> perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
generic 'perf: *' patches look good to me.. cant say much about
the rest of the patchset though
jitka
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-27 10:02 ` Jiri Olsa
0 siblings, 0 replies; 38+ messages in thread
From: Jiri Olsa @ 2015-01-27 10:02 UTC (permalink / raw)
To: Sukadev Bhattiprolu
Cc: peterz, linux-kernel, Arnaldo Carvalho de Melo, dev,
Paul Mackerras, linuxppc-dev
On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
SNIP
>
>
> Cody P Schafer (6):
> perf: provide sysfs_show for struct perf_pmu_events_attr
> perf: add PMU_EVENT_ATTR_STRING() helper
> powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> annotated
> powerpc/perf/hv-gpci: add the remaining gpci requests
> powerpc/perf/hv-24x7: Document sysfs event description entries
>
> Sukadev Bhattiprolu (1):
> perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
generic 'perf: *' patches look good to me.. cant say much about
the rest of the patchset though
jitka
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
2015-01-27 10:02 ` Jiri Olsa
@ 2015-01-28 0:54 ` Michael Ellerman
-1 siblings, 0 replies; 38+ messages in thread
From: Michael Ellerman @ 2015-01-28 0:54 UTC (permalink / raw)
To: Jiri Olsa
Cc: Sukadev Bhattiprolu, Paul Mackerras, Arnaldo Carvalho de Melo,
dev, peterz, hbabu, linux-kernel, linuxppc-dev
On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
> On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
>
> SNIP
>
> >
> >
> > Cody P Schafer (6):
> > perf: provide sysfs_show for struct perf_pmu_events_attr
> > perf: add PMU_EVENT_ATTR_STRING() helper
> > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > annotated
> > powerpc/perf/hv-gpci: add the remaining gpci requests
> > powerpc/perf/hv-24x7: Document sysfs event description entries
> >
> > Sukadev Bhattiprolu (1):
> > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
>
> generic 'perf: *' patches look good to me.. cant say much about
> the rest of the patchset though
Is that an ACK ?
I'm happy to merge the rest through the powerpc tree, but I'd like an ACK on
the first two from someone in perf land.
cheers
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-28 0:54 ` Michael Ellerman
0 siblings, 0 replies; 38+ messages in thread
From: Michael Ellerman @ 2015-01-28 0:54 UTC (permalink / raw)
To: Jiri Olsa
Cc: peterz, linux-kernel, Arnaldo Carvalho de Melo, dev,
Paul Mackerras, Sukadev Bhattiprolu, linuxppc-dev
On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
> On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
>
> SNIP
>
> >
> >
> > Cody P Schafer (6):
> > perf: provide sysfs_show for struct perf_pmu_events_attr
> > perf: add PMU_EVENT_ATTR_STRING() helper
> > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > annotated
> > powerpc/perf/hv-gpci: add the remaining gpci requests
> > powerpc/perf/hv-24x7: Document sysfs event description entries
> >
> > Sukadev Bhattiprolu (1):
> > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
>
> generic 'perf: *' patches look good to me.. cant say much about
> the rest of the patchset though
Is that an ACK ?
I'm happy to merge the rest through the powerpc tree, but I'd like an ACK on
the first two from someone in perf land.
cheers
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
2015-01-28 0:54 ` Michael Ellerman
@ 2015-01-28 10:37 ` Jiri Olsa
-1 siblings, 0 replies; 38+ messages in thread
From: Jiri Olsa @ 2015-01-28 10:37 UTC (permalink / raw)
To: Michael Ellerman
Cc: Sukadev Bhattiprolu, Paul Mackerras, Arnaldo Carvalho de Melo,
dev, peterz, hbabu, linux-kernel, linuxppc-dev
On Wed, Jan 28, 2015 at 11:54:38AM +1100, Michael Ellerman wrote:
> On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
> > On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
> >
> > SNIP
> >
> > >
> > >
> > > Cody P Schafer (6):
> > > perf: provide sysfs_show for struct perf_pmu_events_attr
> > > perf: add PMU_EVENT_ATTR_STRING() helper
> > > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > > annotated
> > > powerpc/perf/hv-gpci: add the remaining gpci requests
> > > powerpc/perf/hv-24x7: Document sysfs event description entries
> > >
> > > Sukadev Bhattiprolu (1):
> > > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
> >
> > generic 'perf: *' patches look good to me.. cant say much about
> > the rest of the patchset though
>
> Is that an ACK ?
ah right, sry ;-)
Acked-by: Jiri Olsa <jolsa@kernel.org>
jirka
>
> I'm happy to merge the rest through the powerpc tree, but I'd like an ACK on
> the first two from someone in perf land.
>
> cheers
>
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-28 10:37 ` Jiri Olsa
0 siblings, 0 replies; 38+ messages in thread
From: Jiri Olsa @ 2015-01-28 10:37 UTC (permalink / raw)
To: Michael Ellerman
Cc: peterz, linux-kernel, Arnaldo Carvalho de Melo, dev,
Paul Mackerras, Sukadev Bhattiprolu, linuxppc-dev
On Wed, Jan 28, 2015 at 11:54:38AM +1100, Michael Ellerman wrote:
> On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
> > On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
> >
> > SNIP
> >
> > >
> > >
> > > Cody P Schafer (6):
> > > perf: provide sysfs_show for struct perf_pmu_events_attr
> > > perf: add PMU_EVENT_ATTR_STRING() helper
> > > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > > annotated
> > > powerpc/perf/hv-gpci: add the remaining gpci requests
> > > powerpc/perf/hv-24x7: Document sysfs event description entries
> > >
> > > Sukadev Bhattiprolu (1):
> > > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
> >
> > generic 'perf: *' patches look good to me.. cant say much about
> > the rest of the patchset though
>
> Is that an ACK ?
ah right, sry ;-)
Acked-by: Jiri Olsa <jolsa@kernel.org>
jirka
>
> I'm happy to merge the rest through the powerpc tree, but I'd like an ACK on
> the first two from someone in perf land.
>
> cheers
>
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
2015-01-28 10:37 ` Jiri Olsa
@ 2015-01-28 15:29 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-28 15:29 UTC (permalink / raw)
To: Jiri Olsa
Cc: Michael Ellerman, Sukadev Bhattiprolu, Paul Mackerras, dev,
peterz, hbabu, linux-kernel, linuxppc-dev
Em Wed, Jan 28, 2015 at 11:37:53AM +0100, Jiri Olsa escreveu:
> On Wed, Jan 28, 2015 at 11:54:38AM +1100, Michael Ellerman wrote:
> > On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
> > > On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
> > >
> > > SNIP
> > >
> > > >
> > > >
> > > > Cody P Schafer (6):
> > > > perf: provide sysfs_show for struct perf_pmu_events_attr
> > > > perf: add PMU_EVENT_ATTR_STRING() helper
> > > > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > > > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > > > annotated
> > > > powerpc/perf/hv-gpci: add the remaining gpci requests
> > > > powerpc/perf/hv-24x7: Document sysfs event description entries
> > > >
> > > > Sukadev Bhattiprolu (1):
> > > > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
> > >
> > > generic 'perf: *' patches look good to me.. cant say much about
> > > the rest of the patchset though
> >
> > Is that an ACK ?
>
> ah right, sry ;-)
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Thanks, I'll try and collect the tools/ bits since Michael already took
the other bits, right?
- Arnaldo
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-28 15:29 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-28 15:29 UTC (permalink / raw)
To: Jiri Olsa
Cc: peterz, linux-kernel, Paul Mackerras, dev, Sukadev Bhattiprolu,
linuxppc-dev
Em Wed, Jan 28, 2015 at 11:37:53AM +0100, Jiri Olsa escreveu:
> On Wed, Jan 28, 2015 at 11:54:38AM +1100, Michael Ellerman wrote:
> > On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
> > > On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
> > >
> > > SNIP
> > >
> > > >
> > > >
> > > > Cody P Schafer (6):
> > > > perf: provide sysfs_show for struct perf_pmu_events_attr
> > > > perf: add PMU_EVENT_ATTR_STRING() helper
> > > > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > > > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > > > annotated
> > > > powerpc/perf/hv-gpci: add the remaining gpci requests
> > > > powerpc/perf/hv-24x7: Document sysfs event description entries
> > > >
> > > > Sukadev Bhattiprolu (1):
> > > > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
> > >
> > > generic 'perf: *' patches look good to me.. cant say much about
> > > the rest of the patchset though
> >
> > Is that an ACK ?
>
> ah right, sry ;-)
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Thanks, I'll try and collect the tools/ bits since Michael already took
the other bits, right?
- Arnaldo
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
2015-01-28 10:37 ` Jiri Olsa
@ 2015-01-29 4:24 ` Michael Ellerman
-1 siblings, 0 replies; 38+ messages in thread
From: Michael Ellerman @ 2015-01-29 4:24 UTC (permalink / raw)
To: Jiri Olsa
Cc: Sukadev Bhattiprolu, Paul Mackerras, Arnaldo Carvalho de Melo,
dev, peterz, hbabu, linux-kernel, linuxppc-dev
On Wed, 2015-01-28 at 11:37 +0100, Jiri Olsa wrote:
> On Wed, Jan 28, 2015 at 11:54:38AM +1100, Michael Ellerman wrote:
> > On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
> > > On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
> > >
> > > SNIP
> > >
> > > >
> > > >
> > > > Cody P Schafer (6):
> > > > perf: provide sysfs_show for struct perf_pmu_events_attr
> > > > perf: add PMU_EVENT_ATTR_STRING() helper
> > > > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > > > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > > > annotated
> > > > powerpc/perf/hv-gpci: add the remaining gpci requests
> > > > powerpc/perf/hv-24x7: Document sysfs event description entries
> > > >
> > > > Sukadev Bhattiprolu (1):
> > > > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
> > >
> > > generic 'perf: *' patches look good to me.. cant say much about
> > > the rest of the patchset though
> >
> > Is that an ACK ?
>
> ah right, sry ;-)
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Thanks. I'll add it to the first two patches.
cheers
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-29 4:24 ` Michael Ellerman
0 siblings, 0 replies; 38+ messages in thread
From: Michael Ellerman @ 2015-01-29 4:24 UTC (permalink / raw)
To: Jiri Olsa
Cc: peterz, linux-kernel, Arnaldo Carvalho de Melo, dev,
Paul Mackerras, Sukadev Bhattiprolu, linuxppc-dev
On Wed, 2015-01-28 at 11:37 +0100, Jiri Olsa wrote:
> On Wed, Jan 28, 2015 at 11:54:38AM +1100, Michael Ellerman wrote:
> > On Tue, 2015-01-27 at 11:02 +0100, Jiri Olsa wrote:
> > > On Mon, Jan 26, 2015 at 05:43:03PM -0800, Sukadev Bhattiprolu wrote:
> > >
> > > SNIP
> > >
> > > >
> > > >
> > > > Cody P Schafer (6):
> > > > perf: provide sysfs_show for struct perf_pmu_events_attr
> > > > perf: add PMU_EVENT_ATTR_STRING() helper
> > > > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > > > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > > > annotated
> > > > powerpc/perf/hv-gpci: add the remaining gpci requests
> > > > powerpc/perf/hv-24x7: Document sysfs event description entries
> > > >
> > > > Sukadev Bhattiprolu (1):
> > > > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
> > >
> > > generic 'perf: *' patches look good to me.. cant say much about
> > > the rest of the patchset though
> >
> > Is that an ACK ?
>
> ah right, sry ;-)
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Thanks. I'll add it to the first two patches.
cheers
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
2015-01-27 1:43 ` Sukadev Bhattiprolu
@ 2015-01-29 4:28 ` Michael Ellerman
-1 siblings, 0 replies; 38+ messages in thread
From: Michael Ellerman @ 2015-01-29 4:28 UTC (permalink / raw)
To: Sukadev Bhattiprolu
Cc: Jiri Olsa, Paul Mackerras, Arnaldo Carvalho de Melo, dev, peterz,
hbabu, linux-kernel, linuxppc-dev
On Mon, 2015-01-26 at 17:43 -0800, Sukadev Bhattiprolu wrote:
> Description of "event parameters" from the documentation patch:
>
> Cody P Schafer (6):
> perf: provide sysfs_show for struct perf_pmu_events_attr
> perf: add PMU_EVENT_ATTR_STRING() helper
> powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> annotated
> powerpc/perf/hv-gpci: add the remaining gpci requests
> powerpc/perf/hv-24x7: Document sysfs event description entries
>
> Sukadev Bhattiprolu (1):
> perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
Hi Sukadev,
I realise Cody wrote most of these and you are just getting them merged, but
they still need to be Signed-off-by you. Most of them aren't.
So please resend with them all signed off by you.
While you're at it, please drop all the CC lines, and move the changelog
annotations below the --- line so they are dropped when I apply them.
Also add Jiri's ack to the first two patches.
You can probably trim the CC list when you repost, I think everyone's seen this
series enough times.
cheers
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-29 4:28 ` Michael Ellerman
0 siblings, 0 replies; 38+ messages in thread
From: Michael Ellerman @ 2015-01-29 4:28 UTC (permalink / raw)
To: Sukadev Bhattiprolu
Cc: peterz, linuxppc-dev, linux-kernel, Arnaldo Carvalho de Melo,
Paul Mackerras, dev, Jiri Olsa
On Mon, 2015-01-26 at 17:43 -0800, Sukadev Bhattiprolu wrote:
> Description of "event parameters" from the documentation patch:
>
> Cody P Schafer (6):
> perf: provide sysfs_show for struct perf_pmu_events_attr
> perf: add PMU_EVENT_ATTR_STRING() helper
> powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> annotated
> powerpc/perf/hv-gpci: add the remaining gpci requests
> powerpc/perf/hv-24x7: Document sysfs event description entries
>
> Sukadev Bhattiprolu (1):
> perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
Hi Sukadev,
I realise Cody wrote most of these and you are just getting them merged, but
they still need to be Signed-off-by you. Most of them aren't.
So please resend with them all signed off by you.
While you're at it, please drop all the CC lines, and move the changelog
annotations below the --- line so they are dropped when I apply them.
Also add Jiri's ack to the first two patches.
You can probably trim the CC list when you repost, I think everyone's seen this
series enough times.
cheers
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
2015-01-29 4:28 ` Michael Ellerman
@ 2015-01-30 14:52 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-30 14:52 UTC (permalink / raw)
To: Michael Ellerman
Cc: Sukadev Bhattiprolu, Jiri Olsa, Paul Mackerras, dev, peterz,
hbabu, linux-kernel, linuxppc-dev
Em Thu, Jan 29, 2015 at 03:28:43PM +1100, Michael Ellerman escreveu:
> On Mon, 2015-01-26 at 17:43 -0800, Sukadev Bhattiprolu wrote:
> > Description of "event parameters" from the documentation patch:
> >
> > Cody P Schafer (6):
> > perf: provide sysfs_show for struct perf_pmu_events_attr
> > perf: add PMU_EVENT_ATTR_STRING() helper
> > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > annotated
> > powerpc/perf/hv-gpci: add the remaining gpci requests
> > powerpc/perf/hv-24x7: Document sysfs event description entries
> >
> > Sukadev Bhattiprolu (1):
> > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
>
>
> Hi Sukadev,
>
> I realise Cody wrote most of these and you are just getting them merged, but
> they still need to be Signed-off-by you. Most of them aren't.
>
> So please resend with them all signed off by you.
>
> While you're at it, please drop all the CC lines, and move the changelog
> annotations below the --- line so they are dropped when I apply them.
>
> Also add Jiri's ack to the first two patches.
I'm ok taking Jiri's Ack for these and merge them, Suka, may I add your
signed-off-by on those? (question for the record...).
- Arnaldo
> You can probably trim the CC list when you repost, I think everyone's seen this
> series enough times.
>
> cheers
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
@ 2015-01-30 14:52 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 38+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-30 14:52 UTC (permalink / raw)
To: Michael Ellerman
Cc: peterz, linuxppc-dev, linux-kernel, Paul Mackerras, dev,
Sukadev Bhattiprolu, Jiri Olsa
Em Thu, Jan 29, 2015 at 03:28:43PM +1100, Michael Ellerman escreveu:
> On Mon, 2015-01-26 at 17:43 -0800, Sukadev Bhattiprolu wrote:
> > Description of "event parameters" from the documentation patch:
> >
> > Cody P Schafer (6):
> > perf: provide sysfs_show for struct perf_pmu_events_attr
> > perf: add PMU_EVENT_ATTR_STRING() helper
> > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > annotated
> > powerpc/perf/hv-gpci: add the remaining gpci requests
> > powerpc/perf/hv-24x7: Document sysfs event description entries
> >
> > Sukadev Bhattiprolu (1):
> > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
>
>
> Hi Sukadev,
>
> I realise Cody wrote most of these and you are just getting them merged, but
> they still need to be Signed-off-by you. Most of them aren't.
>
> So please resend with them all signed off by you.
>
> While you're at it, please drop all the CC lines, and move the changelog
> annotations below the --- line so they are dropped when I apply them.
>
> Also add Jiri's ack to the first two patches.
I'm ok taking Jiri's Ack for these and merge them, Suka, may I add your
signed-off-by on those? (question for the record...).
- Arnaldo
> You can probably trim the CC list when you repost, I think everyone's seen this
> series enough times.
>
> cheers
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
2015-01-30 14:52 ` Arnaldo Carvalho de Melo
@ 2015-02-02 1:15 ` Michael Ellerman
-1 siblings, 0 replies; 38+ messages in thread
From: Michael Ellerman @ 2015-02-02 1:15 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Sukadev Bhattiprolu, Jiri Olsa, Paul Mackerras, dev, peterz,
hbabu, linux-kernel, linuxppc-dev
On Fri, 2015-01-30 at 11:52 -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jan 29, 2015 at 03:28:43PM +1100, Michael Ellerman escreveu:
> > On Mon, 2015-01-26 at 17:43 -0800, Sukadev Bhattiprolu wrote:
> > > Description of "event parameters" from the documentation patch:
> > >
> > > Cody P Schafer (6):
> > > perf: provide sysfs_show for struct perf_pmu_events_attr
> > > perf: add PMU_EVENT_ATTR_STRING() helper
> > > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > > annotated
> > > powerpc/perf/hv-gpci: add the remaining gpci requests
> > > powerpc/perf/hv-24x7: Document sysfs event description entries
> > >
> > > Sukadev Bhattiprolu (1):
> > > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
> >
> > Hi Sukadev,
> >
> > I realise Cody wrote most of these and you are just getting them merged, but
> > they still need to be Signed-off-by you. Most of them aren't.
> >
> > So please resend with them all signed off by you.
> >
> > While you're at it, please drop all the CC lines, and move the changelog
> > annotations below the --- line so they are dropped when I apply them.
> >
> > Also add Jiri's ack to the first two patches.
>
> I'm ok taking Jiri's Ack for these and merge them, Suka, may I add your
> signed-off-by on those? (question for the record...).
Five of the seven are powerpc patches, so I'd rather they go via the powerpc
tree. Though if you really want to take them that's fine.
cheers
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v7 0/4] Add support for parametrized events
@ 2015-02-02 1:15 ` Michael Ellerman
0 siblings, 0 replies; 38+ messages in thread
From: Michael Ellerman @ 2015-02-02 1:15 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: peterz, linuxppc-dev, linux-kernel, Paul Mackerras, dev,
Sukadev Bhattiprolu, Jiri Olsa
On Fri, 2015-01-30 at 11:52 -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jan 29, 2015 at 03:28:43PM +1100, Michael Ellerman escreveu:
> > On Mon, 2015-01-26 at 17:43 -0800, Sukadev Bhattiprolu wrote:
> > > Description of "event parameters" from the documentation patch:
> > >
> > > Cody P Schafer (6):
> > > perf: provide sysfs_show for struct perf_pmu_events_attr
> > > perf: add PMU_EVENT_ATTR_STRING() helper
> > > powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
> > > powerpc/perf/{hv-gpci, hv-common}: generate requests with counters
> > > annotated
> > > powerpc/perf/hv-gpci: add the remaining gpci requests
> > > powerpc/perf/hv-24x7: Document sysfs event description entries
> > >
> > > Sukadev Bhattiprolu (1):
> > > perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
> >
> > Hi Sukadev,
> >
> > I realise Cody wrote most of these and you are just getting them merged, but
> > they still need to be Signed-off-by you. Most of them aren't.
> >
> > So please resend with them all signed off by you.
> >
> > While you're at it, please drop all the CC lines, and move the changelog
> > annotations below the --- line so they are dropped when I apply them.
> >
> > Also add Jiri's ack to the first two patches.
>
> I'm ok taking Jiri's Ack for these and merge them, Suka, may I add your
> signed-off-by on those? (question for the record...).
Five of the seven are powerpc patches, so I'd rather they go via the powerpc
tree. Though if you really want to take them that's fine.
cheers
^ permalink raw reply [flat|nested] 38+ messages in thread