* [PATCH 1/6] perf report/top TUI: Replace pr_err() with ui__error()
2019-12-05 19:32 [GIT PULL 0/6] perf/urgent fixes Arnaldo Carvalho de Melo
@ 2019-12-05 19:32 ` Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 2/6] perf report: Make -F more strict like -s Arnaldo Carvalho de Melo
` (6 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-12-05 19:32 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner
Cc: Jiri Olsa, Namhyung Kim, Clark Williams, linux-kernel,
linux-perf-users, Ravi Bangoria, Arnaldo Carvalho de Melo,
Alexander Shishkin, Andi Kleen, Jin Yao, Kan Liang, Mark Rutland
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
pr_err() in TUI mode does not print anyting on the screen and just
quits.
Replace such pr_err() with ui__error().
Before:
$ perf report -s +
$
After:
$ perf report -s +
┌─Error:────────────────┐
│Invalid --sort key: `+'│
│ │
│Press any key... │
└───────────────────────┘
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/20191114132213.5419-2-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/sort.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 345b5ccc90f6..106d795574ba 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -2681,12 +2681,12 @@ static int setup_sort_list(struct perf_hpp_list *list, char *str,
ret = sort_dimension__add(list, tok, evlist, level);
if (ret == -EINVAL) {
if (!cacheline_size() && !strncasecmp(tok, "dcacheline", strlen(tok)))
- pr_err("The \"dcacheline\" --sort key needs to know the cacheline size and it couldn't be determined on this system");
+ ui__error("The \"dcacheline\" --sort key needs to know the cacheline size and it couldn't be determined on this system");
else
- pr_err("Invalid --sort key: `%s'", tok);
+ ui__error("Invalid --sort key: `%s'", tok);
break;
} else if (ret == -ESRCH) {
- pr_err("Unknown --sort key: `%s'", tok);
+ ui__error("Unknown --sort key: `%s'", tok);
break;
}
}
@@ -2743,7 +2743,7 @@ static int setup_sort_order(struct evlist *evlist)
return 0;
if (sort_order[1] == '\0') {
- pr_err("Invalid --sort key: `+'");
+ ui__error("Invalid --sort key: `+'");
return -EINVAL;
}
@@ -3034,7 +3034,7 @@ static int __setup_output_field(void)
strp++;
if (!strlen(strp)) {
- pr_err("Invalid --fields key: `+'");
+ ui__error("Invalid --fields key: `+'");
goto out;
}
--
2.21.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/6] perf report: Make -F more strict like -s
2019-12-05 19:32 [GIT PULL 0/6] perf/urgent fixes Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 1/6] perf report/top TUI: Replace pr_err() with ui__error() Arnaldo Carvalho de Melo
@ 2019-12-05 19:32 ` Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 3/6] perf report: Bail out --mem-mode if mem info is not available Arnaldo Carvalho de Melo
` (5 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-12-05 19:32 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner
Cc: Jiri Olsa, Namhyung Kim, Clark Williams, linux-kernel,
linux-perf-users, Ravi Bangoria, Arnaldo Carvalho de Melo,
Alexander Shishkin, Andi Kleen, Jin Yao, Kan Liang, Mark Rutland,
Arnaldo Carvalho de Melo
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Currently -F allows branch-mode / mem-mode fields with -F even
when perf report is not running in that mode. Don't allow that.
Suggested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/20191114132213.5419-3-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/sort.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 106d795574ba..9fcba2872130 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -2959,6 +2959,9 @@ int output_field_add(struct perf_hpp_list *list, char *tok)
if (strncasecmp(tok, sd->name, strlen(tok)))
continue;
+ if (sort__mode != SORT_MODE__MEMORY)
+ return -EINVAL;
+
return __sort_dimension__add_output(list, sd);
}
@@ -2968,6 +2971,9 @@ int output_field_add(struct perf_hpp_list *list, char *tok)
if (strncasecmp(tok, sd->name, strlen(tok)))
continue;
+ if (sort__mode != SORT_MODE__BRANCH)
+ return -EINVAL;
+
return __sort_dimension__add_output(list, sd);
}
--
2.21.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/6] perf report: Bail out --mem-mode if mem info is not available
2019-12-05 19:32 [GIT PULL 0/6] perf/urgent fixes Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 1/6] perf report/top TUI: Replace pr_err() with ui__error() Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 2/6] perf report: Make -F more strict like -s Arnaldo Carvalho de Melo
@ 2019-12-05 19:32 ` Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 4/6] perf inject: Fix processing of ID index for injected instruction tracing Arnaldo Carvalho de Melo
` (4 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-12-05 19:32 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner
Cc: Jiri Olsa, Namhyung Kim, Clark Williams, linux-kernel,
linux-perf-users, Ravi Bangoria, Arnaldo Carvalho de Melo,
Arnaldo Carvalho de Melo, Alexander Shishkin, Andi Kleen,
Jin Yao, Kan Liang, Mark Rutland
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
If perf.data is recorded without -d, don't allow user to use --mem-mode
with 'perf report'. symbol_daddr and phys_daddr can be recorded
separately and may be present in the perf.data but at the report time
they are associated with mem-mode fields and thus this restriction
applies to them as well.
Before:
$ perf record ls
$ perf report --mem-mode --stdio
# Overhead Local Weight Memory access Symbol
# ........ ............ ............. .......................
55.56% 0 N/A [k] 0xffffffff81a00ae7
After:
$ perf report --mem-mode --stdio
Error:
Selected --mem-mode but no mem data. Did you call perf record without -d?
Suggested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/20191114132213.5419-4-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-report.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 830d563de889..387311c67264 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -388,6 +388,14 @@ static int report__setup_sample_type(struct report *rep)
}
}
+ if (sort__mode == SORT_MODE__MEMORY) {
+ if (!is_pipe && !(sample_type & PERF_SAMPLE_DATA_SRC)) {
+ ui__error("Selected --mem-mode but no mem data. "
+ "Did you call perf record without -d?\n");
+ return -1;
+ }
+ }
+
if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain) {
if ((sample_type & PERF_SAMPLE_REGS_USER) &&
(sample_type & PERF_SAMPLE_STACK_USER)) {
--
2.21.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/6] perf inject: Fix processing of ID index for injected instruction tracing
2019-12-05 19:32 [GIT PULL 0/6] perf/urgent fixes Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
2019-12-05 19:32 ` [PATCH 3/6] perf report: Bail out --mem-mode if mem info is not available Arnaldo Carvalho de Melo
@ 2019-12-05 19:32 ` Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 5/6] tools headers UAPI: Sync drm/i915_drm.h with the kernel sources Arnaldo Carvalho de Melo
` (3 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-12-05 19:32 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner
Cc: Jiri Olsa, Namhyung Kim, Clark Williams, linux-kernel,
linux-perf-users, Adrian Hunter, Jiri Olsa,
Arnaldo Carvalho de Melo
From: Adrian Hunter <adrian.hunter@intel.com>
The ID index event is used when decoding, but can result in the
following error:
$ perf record --aux-sample -e '{intel_pt//,branch-misses}:u' ls
$ perf inject -i perf.data -o perf.data.inj --itrace=be
$ perf script -i perf.data.inj
0x1020 [0x410]: failed to process type: 69 [No such file or directory]
Fix by having 'perf inject' drop the ID index event.
Fixes: c0a6de06c446 ("perf record: Add support for AUX area sampling")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20191204120800.8138-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-inject.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 9664a72a089d..7e124a7b8bfd 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -403,17 +403,6 @@ static int perf_event__repipe_tracing_data(struct perf_session *session,
return err;
}
-static int perf_event__repipe_id_index(struct perf_session *session,
- union perf_event *event)
-{
- int err;
-
- perf_event__repipe_synth(session->tool, event);
- err = perf_event__process_id_index(session, event);
-
- return err;
-}
-
static int dso__read_build_id(struct dso *dso)
{
if (dso->has_build_id)
@@ -651,7 +640,7 @@ static int __cmd_inject(struct perf_inject *inject)
inject->tool.comm = perf_event__repipe_comm;
inject->tool.namespaces = perf_event__repipe_namespaces;
inject->tool.exit = perf_event__repipe_exit;
- inject->tool.id_index = perf_event__repipe_id_index;
+ inject->tool.id_index = perf_event__process_id_index;
inject->tool.auxtrace_info = perf_event__process_auxtrace_info;
inject->tool.auxtrace = perf_event__process_auxtrace;
inject->tool.aux = perf_event__drop_aux;
--
2.21.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 5/6] tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
2019-12-05 19:32 [GIT PULL 0/6] perf/urgent fixes Arnaldo Carvalho de Melo
` (3 preceding siblings ...)
2019-12-05 19:32 ` [PATCH 4/6] perf inject: Fix processing of ID index for injected instruction tracing Arnaldo Carvalho de Melo
@ 2019-12-05 19:32 ` Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 6/6] tools headers UAPI: Update tools's copy of drm.h headers Arnaldo Carvalho de Melo
` (2 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-12-05 19:32 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner
Cc: Jiri Olsa, Namhyung Kim, Clark Williams, linux-kernel,
linux-perf-users, Arnaldo Carvalho de Melo, Adrian Hunter,
Chris Wilson, Daniele Ceraolo Spurio, Lionel Landwerlin
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To pick the change in:
a0e047156cde ("drm/i915/gem: Make context persistence optional")
9cd20ef7803c ("drm/i915/perf: allow holding preemption on filtered ctx")
7831e9a965ea ("drm/i915/perf: Allow dynamic reconfiguration of the OA stream")
4f6ccc74a85c ("drm/i915: add support for perf configuration queries")
b8d49f28aa03 ("drm/i915/perf: introduce a versioning of the i915-perf uapi")
601734f7aabd ("drm/i915/tgl: s/ss/eu fuse reading support")
That don't result in any changes in tooling, just silences this perf
build warning:
Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-qwzjrgwj55y3g6rjdf9spkpr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/include/uapi/drm/i915_drm.h | 128 +++++++++++++++++++++++++++++-
1 file changed, 125 insertions(+), 3 deletions(-)
diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h
index 469dc512cca3..5400d7e057f1 100644
--- a/tools/include/uapi/drm/i915_drm.h
+++ b/tools/include/uapi/drm/i915_drm.h
@@ -611,6 +611,13 @@ typedef struct drm_i915_irq_wait {
* See I915_EXEC_FENCE_OUT and I915_EXEC_FENCE_SUBMIT.
*/
#define I915_PARAM_HAS_EXEC_SUBMIT_FENCE 53
+
+/*
+ * Revision of the i915-perf uAPI. The value returned helps determine what
+ * i915-perf features are available. See drm_i915_perf_property_id.
+ */
+#define I915_PARAM_PERF_REVISION 54
+
/* Must be kept compact -- no holes and well documented */
typedef struct drm_i915_getparam {
@@ -1565,6 +1572,21 @@ struct drm_i915_gem_context_param {
* i915_context_engines_bond (I915_CONTEXT_ENGINES_EXT_BOND)
*/
#define I915_CONTEXT_PARAM_ENGINES 0xa
+
+/*
+ * I915_CONTEXT_PARAM_PERSISTENCE:
+ *
+ * Allow the context and active rendering to survive the process until
+ * completion. Persistence allows fire-and-forget clients to queue up a
+ * bunch of work, hand the output over to a display server and then quit.
+ * If the context is marked as not persistent, upon closing (either via
+ * an explicit DRM_I915_GEM_CONTEXT_DESTROY or implicitly from file closure
+ * or process termination), the context and any outstanding requests will be
+ * cancelled (and exported fences for cancelled requests marked as -EIO).
+ *
+ * By default, new contexts allow persistence.
+ */
+#define I915_CONTEXT_PARAM_PERSISTENCE 0xb
/* Must be kept compact -- no holes and well documented */
__u64 value;
@@ -1844,23 +1866,31 @@ enum drm_i915_perf_property_id {
* Open the stream for a specific context handle (as used with
* execbuffer2). A stream opened for a specific context this way
* won't typically require root privileges.
+ *
+ * This property is available in perf revision 1.
*/
DRM_I915_PERF_PROP_CTX_HANDLE = 1,
/**
* A value of 1 requests the inclusion of raw OA unit reports as
* part of stream samples.
+ *
+ * This property is available in perf revision 1.
*/
DRM_I915_PERF_PROP_SAMPLE_OA,
/**
* The value specifies which set of OA unit metrics should be
* be configured, defining the contents of any OA unit reports.
+ *
+ * This property is available in perf revision 1.
*/
DRM_I915_PERF_PROP_OA_METRICS_SET,
/**
* The value specifies the size and layout of OA unit reports.
+ *
+ * This property is available in perf revision 1.
*/
DRM_I915_PERF_PROP_OA_FORMAT,
@@ -1870,9 +1900,22 @@ enum drm_i915_perf_property_id {
* from this exponent as follows:
*
* 80ns * 2^(period_exponent + 1)
+ *
+ * This property is available in perf revision 1.
*/
DRM_I915_PERF_PROP_OA_EXPONENT,
+ /**
+ * Specifying this property is only valid when specify a context to
+ * filter with DRM_I915_PERF_PROP_CTX_HANDLE. Specifying this property
+ * will hold preemption of the particular context we want to gather
+ * performance data about. The execbuf2 submissions must include a
+ * drm_i915_gem_execbuffer_ext_perf parameter for this to apply.
+ *
+ * This property is available in perf revision 3.
+ */
+ DRM_I915_PERF_PROP_HOLD_PREEMPTION,
+
DRM_I915_PERF_PROP_MAX /* non-ABI */
};
@@ -1901,6 +1944,8 @@ struct drm_i915_perf_open_param {
* to close and re-open a stream with the same configuration.
*
* It's undefined whether any pending data for the stream will be lost.
+ *
+ * This ioctl is available in perf revision 1.
*/
#define I915_PERF_IOCTL_ENABLE _IO('i', 0x0)
@@ -1908,9 +1953,24 @@ struct drm_i915_perf_open_param {
* Disable data capture for a stream.
*
* It is an error to try and read a stream that is disabled.
+ *
+ * This ioctl is available in perf revision 1.
*/
#define I915_PERF_IOCTL_DISABLE _IO('i', 0x1)
+/**
+ * Change metrics_set captured by a stream.
+ *
+ * If the stream is bound to a specific context, the configuration change
+ * will performed inline with that context such that it takes effect before
+ * the next execbuf submission.
+ *
+ * Returns the previously bound metrics set id, or a negative error code.
+ *
+ * This ioctl is available in perf revision 2.
+ */
+#define I915_PERF_IOCTL_CONFIG _IO('i', 0x2)
+
/**
* Common to all i915 perf records
*/
@@ -1984,6 +2044,7 @@ struct drm_i915_query_item {
__u64 query_id;
#define DRM_I915_QUERY_TOPOLOGY_INFO 1
#define DRM_I915_QUERY_ENGINE_INFO 2
+#define DRM_I915_QUERY_PERF_CONFIG 3
/* Must be kept compact -- no holes and well documented */
/*
@@ -1995,9 +2056,18 @@ struct drm_i915_query_item {
__s32 length;
/*
- * Unused for now. Must be cleared to zero.
+ * When query_id == DRM_I915_QUERY_TOPOLOGY_INFO, must be 0.
+ *
+ * When query_id == DRM_I915_QUERY_PERF_CONFIG, must be one of the
+ * following :
+ * - DRM_I915_QUERY_PERF_CONFIG_LIST
+ * - DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID
+ * - DRM_I915_QUERY_PERF_CONFIG_FOR_UUID
*/
__u32 flags;
+#define DRM_I915_QUERY_PERF_CONFIG_LIST 1
+#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID 2
+#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID 3
/*
* Data will be written at the location pointed by data_ptr when the
@@ -2033,8 +2103,10 @@ struct drm_i915_query {
* (data[X / 8] >> (X % 8)) & 1
*
* - the subslice mask for each slice with one bit per subslice telling
- * whether a subslice is available. The availability of subslice Y in slice
- * X can be queried with the following formula :
+ * whether a subslice is available. Gen12 has dual-subslices, which are
+ * similar to two gen11 subslices. For gen12, this array represents dual-
+ * subslices. The availability of subslice Y in slice X can be queried
+ * with the following formula :
*
* (data[subslice_offset +
* X * subslice_stride +
@@ -2123,6 +2195,56 @@ struct drm_i915_query_engine_info {
struct drm_i915_engine_info engines[];
};
+/*
+ * Data written by the kernel with query DRM_I915_QUERY_PERF_CONFIG.
+ */
+struct drm_i915_query_perf_config {
+ union {
+ /*
+ * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 sets
+ * this fields to the number of configurations available.
+ */
+ __u64 n_configs;
+
+ /*
+ * When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID,
+ * i915 will use the value in this field as configuration
+ * identifier to decide what data to write into config_ptr.
+ */
+ __u64 config;
+
+ /*
+ * When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID,
+ * i915 will use the value in this field as configuration
+ * identifier to decide what data to write into config_ptr.
+ *
+ * String formatted like "%08x-%04x-%04x-%04x-%012x"
+ */
+ char uuid[36];
+ };
+
+ /*
+ * Unused for now. Must be cleared to zero.
+ */
+ __u32 flags;
+
+ /*
+ * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 will
+ * write an array of __u64 of configuration identifiers.
+ *
+ * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_DATA, i915 will
+ * write a struct drm_i915_perf_oa_config. If the following fields of
+ * drm_i915_perf_oa_config are set not set to 0, i915 will write into
+ * the associated pointers the values of submitted when the
+ * configuration was created :
+ *
+ * - n_mux_regs
+ * - n_boolean_regs
+ * - n_flex_regs
+ */
+ __u8 data[];
+};
+
#if defined(__cplusplus)
}
#endif
--
2.21.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 6/6] tools headers UAPI: Update tools's copy of drm.h headers
2019-12-05 19:32 [GIT PULL 0/6] perf/urgent fixes Arnaldo Carvalho de Melo
` (4 preceding siblings ...)
2019-12-05 19:32 ` [PATCH 5/6] tools headers UAPI: Sync drm/i915_drm.h with the kernel sources Arnaldo Carvalho de Melo
@ 2019-12-05 19:32 ` Arnaldo Carvalho de Melo
2019-12-06 7:57 ` [GIT PULL 0/6] perf/urgent fixes Ingo Molnar
2020-01-13 8:28 ` [GIT PULL 0/6] perf/urgent fixes Ravi Bangoria
7 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-12-05 19:32 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner
Cc: Jiri Olsa, Namhyung Kim, Clark Williams, linux-kernel,
linux-perf-users, Arnaldo Carvalho de Melo, Adrian Hunter,
Christian König, Chunming Zhou
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Picking the changes from:
2093dea3def9 ("drm/syncobj: extend syncobj query ability v3")
Which doesn't affect tooling, just silences this perf build warning:
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h'
diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Chunming Zhou <david1.zhou@amd.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-t1xqmjffo4rxdw395dsnu34j@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/include/uapi/drm/drm.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/drm/drm.h b/tools/include/uapi/drm/drm.h
index 8a5b2f8f8eb9..868bf7996c0f 100644
--- a/tools/include/uapi/drm/drm.h
+++ b/tools/include/uapi/drm/drm.h
@@ -778,11 +778,12 @@ struct drm_syncobj_array {
__u32 pad;
};
+#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED (1 << 0) /* last available point on timeline syncobj */
struct drm_syncobj_timeline_array {
__u64 handles;
__u64 points;
__u32 count_handles;
- __u32 pad;
+ __u32 flags;
};
--
2.21.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [GIT PULL 0/6] perf/urgent fixes
2019-12-05 19:32 [GIT PULL 0/6] perf/urgent fixes Arnaldo Carvalho de Melo
` (5 preceding siblings ...)
2019-12-05 19:32 ` [PATCH 6/6] tools headers UAPI: Update tools's copy of drm.h headers Arnaldo Carvalho de Melo
@ 2019-12-06 7:57 ` Ingo Molnar
2019-12-06 14:24 ` Arnaldo Carvalho de Melo
2019-12-06 14:25 ` Jiri Olsa
2020-01-13 8:28 ` [GIT PULL 0/6] perf/urgent fixes Ravi Bangoria
7 siblings, 2 replies; 18+ messages in thread
From: Ingo Molnar @ 2019-12-06 7:57 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Thomas Gleixner, Jiri Olsa, Namhyung Kim, Clark Williams,
linux-kernel, linux-perf-users, Adrian Hunter, Ravi Bangoria,
Arnaldo Carvalho de Melo
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo/Thomas,
>
> Please consider pulling,
>
> Best regards,
>
> - Arnaldo
>
> Test results at the end of this message, as usual.
>
> The following changes since commit 9f58c93efdffc2cba91fdcee010b3e5e8860334d:
>
> Merge tag 'perf-core-for-mingo-5.5-20191203' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2019-12-04 08:49:52 +0100)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-5.5-20191205
>
> for you to fetch changes up to fd9bee5e24141d00e23b66d1b51bc759efa7e3fe:
>
> tools headers UAPI: Update tools's copy of drm.h headers (2019-12-04 16:22:38 -0300)
>
> ----------------------------------------------------------------
> perf inject:
>
> Adrian Hunter:
>
> - Fix processing of ID index for injected instruction tracing
>
> perf report:
>
> Ravi Bangoria:
>
> - Replace pr_err() with ui__error(), so that we can see the output
> in the TUI mode instead of showing and immediately restoring the
> screen to the state before perf was started.
>
> - Don't start --mem-mode/--branch-mode mode if required samples are not
> available.
>
> tools headers UAPI:
>
> Arnaldo Carvalho de Melo:
>
> - Sync drm/i915_drm.h with the kernel sources
>
> - Update tools's copy of drm.h headers.
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Adrian Hunter (1):
> perf inject: Fix processing of ID index for injected instruction tracing
>
> Arnaldo Carvalho de Melo (2):
> tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
> tools headers UAPI: Update tools's copy of drm.h headers
>
> Ravi Bangoria (3):
> perf report/top TUI: Replace pr_err() with ui__error()
> perf report: Make -F more strict like -s
> perf report: Bail out --mem-mode if mem info is not available
>
> tools/include/uapi/drm/drm.h | 3 +-
> tools/include/uapi/drm/i915_drm.h | 128 +++++++++++++++++++++++++++++++++++++-
> tools/perf/builtin-inject.c | 13 +---
> tools/perf/builtin-report.c | 8 +++
> tools/perf/util/sort.c | 16 +++--
> 5 files changed, 147 insertions(+), 21 deletions(-)
Pulled, thanks a lot Arnaldo!
JFYI, on my system the default perf/urgent build still has this noise
generated by util/parse-events.y and util/expr.y:
util/parse-events.y:1.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
1 | %pure-parser
| ^~~~~~~~~~~~
util/parse-events.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
util/expr.y:15.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
15 | %pure-parser
| ^~~~~~~~~~~~
util/expr.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
Thanks,
Ingo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [GIT PULL 0/6] perf/urgent fixes
2019-12-06 7:57 ` [GIT PULL 0/6] perf/urgent fixes Ingo Molnar
@ 2019-12-06 14:24 ` Arnaldo Carvalho de Melo
2019-12-06 14:25 ` Jiri Olsa
1 sibling, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-12-06 14:24 UTC (permalink / raw)
To: Ingo Molnar
Cc: Thomas Gleixner, Jiri Olsa, Namhyung Kim, Clark Williams,
linux-kernel, linux-perf-users, Adrian Hunter, Ravi Bangoria,
Arnaldo Carvalho de Melo
Em Fri, Dec 06, 2019 at 08:57:01AM +0100, Ingo Molnar escreveu:
> Pulled, thanks a lot Arnaldo!
> JFYI, on my system the default perf/urgent build still has this noise
> generated by util/parse-events.y and util/expr.y:
> util/parse-events.y:1.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> 1 | %pure-parser
> | ^~~~~~~~~~~~
> util/parse-events.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
> util/expr.y:15.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> 15 | %pure-parser
> | ^~~~~~~~~~~~
> util/expr.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
I'll get to this, I've been postponing dealing with this nuisance as,
IIRC, this will make perf not build in systems with older bisons.
- Arnaldo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [GIT PULL 0/6] perf/urgent fixes
2019-12-06 7:57 ` [GIT PULL 0/6] perf/urgent fixes Ingo Molnar
2019-12-06 14:24 ` Arnaldo Carvalho de Melo
@ 2019-12-06 14:25 ` Jiri Olsa
2019-12-06 14:43 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 18+ messages in thread
From: Jiri Olsa @ 2019-12-06 14:25 UTC (permalink / raw)
To: Ingo Molnar
Cc: Arnaldo Carvalho de Melo, Thomas Gleixner, Jiri Olsa,
Namhyung Kim, Clark Williams, linux-kernel, linux-perf-users,
Adrian Hunter, Ravi Bangoria, Arnaldo Carvalho de Melo
On Fri, Dec 06, 2019 at 08:57:01AM +0100, Ingo Molnar wrote:
SNIP
> > tools/include/uapi/drm/drm.h | 3 +-
> > tools/include/uapi/drm/i915_drm.h | 128 +++++++++++++++++++++++++++++++++++++-
> > tools/perf/builtin-inject.c | 13 +---
> > tools/perf/builtin-report.c | 8 +++
> > tools/perf/util/sort.c | 16 +++--
> > 5 files changed, 147 insertions(+), 21 deletions(-)
>
> Pulled, thanks a lot Arnaldo!
>
> JFYI, on my system the default perf/urgent build still has this noise
> generated by util/parse-events.y and util/expr.y:
>
> util/parse-events.y:1.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> 1 | %pure-parser
> | ^~~~~~~~~~~~
> util/parse-events.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
> util/expr.y:15.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> 15 | %pure-parser
> | ^~~~~~~~~~~~
> util/expr.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
just saw it in fedora 31 with new bison, change below
should fix it, I'll post it with other fixes later
jirka
---
diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y
index f9a20a39b64a..4ef801334b9d 100644
--- a/tools/perf/util/expr.y
+++ b/tools/perf/util/expr.y
@@ -12,7 +12,7 @@
#define MAXIDLEN 256
%}
-%pure-parser
+%define api.pure
%parse-param { double *final_val }
%parse-param { struct parse_ctx *ctx }
%parse-param { const char **pp }
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index e2eea4e601b4..87a0d11676f0 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -1,4 +1,4 @@
-%pure-parser
+%define api.pure
%parse-param {void *_parse_state}
%parse-param {void *scanner}
%lex-param {void* scanner}
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [GIT PULL 0/6] perf/urgent fixes
2019-12-06 14:25 ` Jiri Olsa
@ 2019-12-06 14:43 ` Arnaldo Carvalho de Melo
2019-12-06 15:04 ` Jiri Olsa
0 siblings, 1 reply; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-12-06 14:43 UTC (permalink / raw)
To: Jiri Olsa
Cc: Ingo Molnar, Thomas Gleixner, Jiri Olsa, Namhyung Kim,
Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
Ravi Bangoria, Arnaldo Carvalho de Melo
Em Fri, Dec 06, 2019 at 03:25:16PM +0100, Jiri Olsa escreveu:
> On Fri, Dec 06, 2019 at 08:57:01AM +0100, Ingo Molnar wrote:
>
> SNIP
>
> > > tools/include/uapi/drm/drm.h | 3 +-
> > > tools/include/uapi/drm/i915_drm.h | 128 +++++++++++++++++++++++++++++++++++++-
> > > tools/perf/builtin-inject.c | 13 +---
> > > tools/perf/builtin-report.c | 8 +++
> > > tools/perf/util/sort.c | 16 +++--
> > > 5 files changed, 147 insertions(+), 21 deletions(-)
> >
> > Pulled, thanks a lot Arnaldo!
> >
> > JFYI, on my system the default perf/urgent build still has this noise
> > generated by util/parse-events.y and util/expr.y:
> >
> > util/parse-events.y:1.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> > 1 | %pure-parser
> > | ^~~~~~~~~~~~
> > util/parse-events.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
> > util/expr.y:15.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> > 15 | %pure-parser
> > | ^~~~~~~~~~~~
> > util/expr.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
>
> just saw it in fedora 31 with new bison, change below
> should fix it, I'll post it with other fixes later
As I explained to Ingo, this will make it fail with older systems, for
now this is just a warning, thus I've not been eager to get this merged,
Andi alredy submitted this, for instance.
Is there some way to have some sort of ifdef based on bison's version so
that we can have both?
At some point I'll just bite the bullet and stop testing on such older
systems, but while this is not strictly needed...
- Arnaldo
> jirka
>
> ---
> diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y
> index f9a20a39b64a..4ef801334b9d 100644
> --- a/tools/perf/util/expr.y
> +++ b/tools/perf/util/expr.y
> @@ -12,7 +12,7 @@
> #define MAXIDLEN 256
> %}
>
> -%pure-parser
> +%define api.pure
> %parse-param { double *final_val }
> %parse-param { struct parse_ctx *ctx }
> %parse-param { const char **pp }
> diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> index e2eea4e601b4..87a0d11676f0 100644
> --- a/tools/perf/util/parse-events.y
> +++ b/tools/perf/util/parse-events.y
> @@ -1,4 +1,4 @@
> -%pure-parser
> +%define api.pure
> %parse-param {void *_parse_state}
> %parse-param {void *scanner}
> %lex-param {void* scanner}
--
- Arnaldo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [GIT PULL 0/6] perf/urgent fixes
2019-12-06 14:43 ` Arnaldo Carvalho de Melo
@ 2019-12-06 15:04 ` Jiri Olsa
2019-12-06 15:35 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 18+ messages in thread
From: Jiri Olsa @ 2019-12-06 15:04 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Ingo Molnar, Thomas Gleixner, Jiri Olsa, Namhyung Kim,
Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
Ravi Bangoria, Arnaldo Carvalho de Melo
On Fri, Dec 06, 2019 at 11:43:54AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Dec 06, 2019 at 03:25:16PM +0100, Jiri Olsa escreveu:
> > On Fri, Dec 06, 2019 at 08:57:01AM +0100, Ingo Molnar wrote:
> >
> > SNIP
> >
> > > > tools/include/uapi/drm/drm.h | 3 +-
> > > > tools/include/uapi/drm/i915_drm.h | 128 +++++++++++++++++++++++++++++++++++++-
> > > > tools/perf/builtin-inject.c | 13 +---
> > > > tools/perf/builtin-report.c | 8 +++
> > > > tools/perf/util/sort.c | 16 +++--
> > > > 5 files changed, 147 insertions(+), 21 deletions(-)
> > >
> > > Pulled, thanks a lot Arnaldo!
> > >
> > > JFYI, on my system the default perf/urgent build still has this noise
> > > generated by util/parse-events.y and util/expr.y:
> > >
> > > util/parse-events.y:1.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> > > 1 | %pure-parser
> > > | ^~~~~~~~~~~~
> > > util/parse-events.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
> > > util/expr.y:15.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> > > 15 | %pure-parser
> > > | ^~~~~~~~~~~~
> > > util/expr.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
> >
> > just saw it in fedora 31 with new bison, change below
> > should fix it, I'll post it with other fixes later
>
> As I explained to Ingo, this will make it fail with older systems, for
> now this is just a warning, thus I've not been eager to get this merged,
> Andi alredy submitted this, for instance.
>
> Is there some way to have some sort of ifdef based on bison's version so
> that we can have both?
I see, I guess we could use one or another based on
bison version with macro
jirka
>
> At some point I'll just bite the bullet and stop testing on such older
> systems, but while this is not strictly needed...
>
> - Arnaldo
>
> > jirka
> >
> > ---
> > diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y
> > index f9a20a39b64a..4ef801334b9d 100644
> > --- a/tools/perf/util/expr.y
> > +++ b/tools/perf/util/expr.y
> > @@ -12,7 +12,7 @@
> > #define MAXIDLEN 256
> > %}
> >
> > -%pure-parser
> > +%define api.pure
> > %parse-param { double *final_val }
> > %parse-param { struct parse_ctx *ctx }
> > %parse-param { const char **pp }
> > diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> > index e2eea4e601b4..87a0d11676f0 100644
> > --- a/tools/perf/util/parse-events.y
> > +++ b/tools/perf/util/parse-events.y
> > @@ -1,4 +1,4 @@
> > -%pure-parser
> > +%define api.pure
> > %parse-param {void *_parse_state}
> > %parse-param {void *scanner}
> > %lex-param {void* scanner}
>
> --
>
> - Arnaldo
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [GIT PULL 0/6] perf/urgent fixes
2019-12-06 15:04 ` Jiri Olsa
@ 2019-12-06 15:35 ` Arnaldo Carvalho de Melo
2020-01-12 19:22 ` [PATCH] perf tools: Use %define api.pure full instead of %pure-parser Jiri Olsa
0 siblings, 1 reply; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-12-06 15:35 UTC (permalink / raw)
To: Jiri Olsa
Cc: Ingo Molnar, Thomas Gleixner, Jiri Olsa, Namhyung Kim,
Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
Ravi Bangoria, Arnaldo Carvalho de Melo
Em Fri, Dec 06, 2019 at 04:04:55PM +0100, Jiri Olsa escreveu:
> On Fri, Dec 06, 2019 at 11:43:54AM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Fri, Dec 06, 2019 at 03:25:16PM +0100, Jiri Olsa escreveu:
> > > On Fri, Dec 06, 2019 at 08:57:01AM +0100, Ingo Molnar wrote:
> > >
> > > SNIP
> > >
> > > > > tools/include/uapi/drm/drm.h | 3 +-
> > > > > tools/include/uapi/drm/i915_drm.h | 128 +++++++++++++++++++++++++++++++++++++-
> > > > > tools/perf/builtin-inject.c | 13 +---
> > > > > tools/perf/builtin-report.c | 8 +++
> > > > > tools/perf/util/sort.c | 16 +++--
> > > > > 5 files changed, 147 insertions(+), 21 deletions(-)
> > > >
> > > > Pulled, thanks a lot Arnaldo!
> > > >
> > > > JFYI, on my system the default perf/urgent build still has this noise
> > > > generated by util/parse-events.y and util/expr.y:
> > > >
> > > > util/parse-events.y:1.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> > > > 1 | %pure-parser
> > > > | ^~~~~~~~~~~~
> > > > util/parse-events.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
> > > > util/expr.y:15.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> > > > 15 | %pure-parser
> > > > | ^~~~~~~~~~~~
> > > > util/expr.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
> > >
> > > just saw it in fedora 31 with new bison, change below
> > > should fix it, I'll post it with other fixes later
> >
> > As I explained to Ingo, this will make it fail with older systems, for
> > now this is just a warning, thus I've not been eager to get this merged,
> > Andi alredy submitted this, for instance.
> >
> > Is there some way to have some sort of ifdef based on bison's version so
> > that we can have both?
>
> I see, I guess we could use one or another based on
> bison version with macro
If you could do that, that would be great, the attempt may well
enlighten us if that is possible and if not, then, oh well, I can just
update bison on these older systems and keep a note in my container
definition files :-)
- Arnaldo
> jirka
>
> >
> > At some point I'll just bite the bullet and stop testing on such older
> > systems, but while this is not strictly needed...
> >
> > - Arnaldo
> >
> > > jirka
> > >
> > > ---
> > > diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y
> > > index f9a20a39b64a..4ef801334b9d 100644
> > > --- a/tools/perf/util/expr.y
> > > +++ b/tools/perf/util/expr.y
> > > @@ -12,7 +12,7 @@
> > > #define MAXIDLEN 256
> > > %}
> > >
> > > -%pure-parser
> > > +%define api.pure
> > > %parse-param { double *final_val }
> > > %parse-param { struct parse_ctx *ctx }
> > > %parse-param { const char **pp }
> > > diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> > > index e2eea4e601b4..87a0d11676f0 100644
> > > --- a/tools/perf/util/parse-events.y
> > > +++ b/tools/perf/util/parse-events.y
> > > @@ -1,4 +1,4 @@
> > > -%pure-parser
> > > +%define api.pure
> > > %parse-param {void *_parse_state}
> > > %parse-param {void *scanner}
> > > %lex-param {void* scanner}
> >
> > --
> >
> > - Arnaldo
> >
--
- Arnaldo
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH] perf tools: Use %define api.pure full instead of %pure-parser
2019-12-06 15:35 ` Arnaldo Carvalho de Melo
@ 2020-01-12 19:22 ` Jiri Olsa
2020-01-20 8:27 ` [tip: perf/core] " tip-bot2 for Jiri Olsa
0 siblings, 1 reply; 18+ messages in thread
From: Jiri Olsa @ 2020-01-12 19:22 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Ingo Molnar, Thomas Gleixner, Jiri Olsa, Namhyung Kim,
Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
Ravi Bangoria, Arnaldo Carvalho de Melo
On Fri, Dec 06, 2019 at 12:35:09PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Dec 06, 2019 at 04:04:55PM +0100, Jiri Olsa escreveu:
> > On Fri, Dec 06, 2019 at 11:43:54AM -0300, Arnaldo Carvalho de Melo wrote:
> > > Em Fri, Dec 06, 2019 at 03:25:16PM +0100, Jiri Olsa escreveu:
> > > > On Fri, Dec 06, 2019 at 08:57:01AM +0100, Ingo Molnar wrote:
> > > >
> > > > SNIP
> > > >
> > > > > > tools/include/uapi/drm/drm.h | 3 +-
> > > > > > tools/include/uapi/drm/i915_drm.h | 128 +++++++++++++++++++++++++++++++++++++-
> > > > > > tools/perf/builtin-inject.c | 13 +---
> > > > > > tools/perf/builtin-report.c | 8 +++
> > > > > > tools/perf/util/sort.c | 16 +++--
> > > > > > 5 files changed, 147 insertions(+), 21 deletions(-)
> > > > >
> > > > > Pulled, thanks a lot Arnaldo!
> > > > >
> > > > > JFYI, on my system the default perf/urgent build still has this noise
> > > > > generated by util/parse-events.y and util/expr.y:
> > > > >
> > > > > util/parse-events.y:1.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> > > > > 1 | %pure-parser
> > > > > | ^~~~~~~~~~~~
> > > > > util/parse-events.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
> > > > > util/expr.y:15.1-12: warning: deprecated directive, use ‘%define api.pure’ [-Wdeprecated]
> > > > > 15 | %pure-parser
> > > > > | ^~~~~~~~~~~~
> > > > > util/expr.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
> > > >
> > > > just saw it in fedora 31 with new bison, change below
> > > > should fix it, I'll post it with other fixes later
> > >
> > > As I explained to Ingo, this will make it fail with older systems, for
> > > now this is just a warning, thus I've not been eager to get this merged,
> > > Andi alredy submitted this, for instance.
> > >
> > > Is there some way to have some sort of ifdef based on bison's version so
> > > that we can have both?
> >
> > I see, I guess we could use one or another based on
> > bison version with macro
>
> If you could do that, that would be great, the attempt may well
> enlighten us if that is possible and if not, then, oh well, I can just
> update bison on these older systems and keep a note in my container
> definition files :-)
hi,
so I checked and the api.pure define was introduced quite
long time ago, so perhaps we could change it as it is..
could you please run your distro check on the patch below?
thanks,
jirka
---
Bison deprecated %pure-parser directive in favor of
%define api.pure full. The api.pure got introduced
in bison 2.3 (Oct 2007), so it seems safe to use it
without any version check.
Link: https://lkml.kernel.org/n/tip-qhrf915k2ynym32vf5ii8vzy@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/util/expr.y | 3 ++-
tools/perf/util/parse-events.y | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y
index f9a20a39b64a..7d226241f1d7 100644
--- a/tools/perf/util/expr.y
+++ b/tools/perf/util/expr.y
@@ -12,7 +12,8 @@
#define MAXIDLEN 256
%}
-%pure-parser
+%define api.pure full
+
%parse-param { double *final_val }
%parse-param { struct parse_ctx *ctx }
%parse-param { const char **pp }
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index e2eea4e601b4..94f8bcd83582 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -1,4 +1,4 @@
-%pure-parser
+%define api.pure full
%parse-param {void *_parse_state}
%parse-param {void *scanner}
%lex-param {void* scanner}
--
2.24.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [tip: perf/core] perf tools: Use %define api.pure full instead of %pure-parser
2020-01-12 19:22 ` [PATCH] perf tools: Use %define api.pure full instead of %pure-parser Jiri Olsa
@ 2020-01-20 8:27 ` tip-bot2 for Jiri Olsa
0 siblings, 0 replies; 18+ messages in thread
From: tip-bot2 for Jiri Olsa @ 2020-01-20 8:27 UTC (permalink / raw)
To: linux-tip-commits
Cc: Jiri Olsa, Adrian Hunter, Clark Williams, Namhyung Kim,
Ravi Bangoria, Thomas Gleixner, Arnaldo Carvalho de Melo, x86,
LKML
The following commit has been merged into the perf/core branch of tip:
Commit-ID: fc8c0a99223367b071c83711259d754b6bb7a379
Gitweb: https://git.kernel.org/tip/fc8c0a99223367b071c83711259d754b6bb7a379
Author: Jiri Olsa <jolsa@redhat.com>
AuthorDate: Sun, 12 Jan 2020 20:22:59 +01:00
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Tue, 14 Jan 2020 12:02:19 -03:00
perf tools: Use %define api.pure full instead of %pure-parser
bison deprecated the "%pure-parser" directive in favor of "%define
api.pure full".
The api.pure got introduced in bison 2.3 (Oct 2007), so it seems safe to
use it without any version check.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Clark Williams <williams@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lore.kernel.org/lkml/20200112192259.GA35080@krava
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/expr.y | 3 ++-
tools/perf/util/parse-events.y | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y
index f9a20a3..7d22624 100644
--- a/tools/perf/util/expr.y
+++ b/tools/perf/util/expr.y
@@ -12,7 +12,8 @@
#define MAXIDLEN 256
%}
-%pure-parser
+%define api.pure full
+
%parse-param { double *final_val }
%parse-param { struct parse_ctx *ctx }
%parse-param { const char **pp }
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index e2eea4e..94f8bcd 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -1,4 +1,4 @@
-%pure-parser
+%define api.pure full
%parse-param {void *_parse_state}
%parse-param {void *scanner}
%lex-param {void* scanner}
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [GIT PULL 0/6] perf/urgent fixes
2019-12-05 19:32 [GIT PULL 0/6] perf/urgent fixes Arnaldo Carvalho de Melo
` (6 preceding siblings ...)
2019-12-06 7:57 ` [GIT PULL 0/6] perf/urgent fixes Ingo Molnar
@ 2020-01-13 8:28 ` Ravi Bangoria
2020-01-13 9:25 ` Jiri Olsa
7 siblings, 1 reply; 18+ messages in thread
From: Ravi Bangoria @ 2020-01-13 8:28 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa
Cc: Ingo Molnar, Thomas Gleixner, Namhyung Kim, Clark Williams,
linux-kernel, linux-perf-users, Adrian Hunter,
Arnaldo Carvalho de Melo, Ravi Bangoria
On 12/6/19 1:02 AM, Arnaldo Carvalho de Melo wrote:
> 39 fedora:31 : Ok gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1), clang version 9.0.0 (Fedora 9.0.0-1.fc31)
Not related to this pull request, but because we are discussing the
bison issue in this thread, I thought to report here.
On my Fedora 31, gtk2 also fails:
$ rpm -qa | grep gtk2
gtk2-2.24.32-6.fc31.x86_64
gtk2-devel-2.24.32-6.fc31.x86_64
$ make
Auto-detecting system features:
... glibc: [ on ]
... gtk2: [ OFF ]
... libaudit: [ on ]
Makefile.config:687: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
Detail logs:
$ cat tools/build/feature/test-gtk2.make.output
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:33,
from test-gtk2.c:3:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: error: ‘GTypeDebugFlags’ is deprecated [-Werror=deprecated-declarations]
236 | void gtk_type_init (GTypeDebugFlags debug_flags);
| ^~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from /usr/include/gtk-2.0/gdk/gdk.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from test-gtk2.c:3:
/usr/include/glib-2.0/gobject/gtype.h:679:1: note: declared here
679 | {
| ^
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:126,
from test-gtk2.c:3:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations]
73 | GTimeVal last_popdown;
| ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from /usr/include/glib-2.0/gobject/gbinding.h:28,
from /usr/include/glib-2.0/glib-object.h:23,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from /usr/include/gtk-2.0/gdk/gdk.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from test-gtk2.c:3:
/usr/include/glib-2.0/glib/gtypes.h:551:8: note: declared here
551 | struct _GTimeVal
| ^~~~~~~~~
cc1: all warnings being treated as errors
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [GIT PULL 0/6] perf/urgent fixes
2020-01-13 8:28 ` [GIT PULL 0/6] perf/urgent fixes Ravi Bangoria
@ 2020-01-13 9:25 ` Jiri Olsa
2020-01-13 9:44 ` Ravi Bangoria
0 siblings, 1 reply; 18+ messages in thread
From: Jiri Olsa @ 2020-01-13 9:25 UTC (permalink / raw)
To: Ravi Bangoria
Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Ingo Molnar,
Thomas Gleixner, Namhyung Kim, Clark Williams, linux-kernel,
linux-perf-users, Adrian Hunter, Arnaldo Carvalho de Melo
On Mon, Jan 13, 2020 at 01:58:59PM +0530, Ravi Bangoria wrote:
SNIP
> | ^~~~
> In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
> from /usr/include/glib-2.0/gobject/gbinding.h:29,
> from /usr/include/glib-2.0/glib-object.h:23,
> from /usr/include/glib-2.0/gio/gioenums.h:28,
> from /usr/include/glib-2.0/gio/giotypes.h:28,
> from /usr/include/glib-2.0/gio/gio.h:26,
> from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
> from /usr/include/gtk-2.0/gdk/gdk.h:32,
> from /usr/include/gtk-2.0/gtk/gtk.h:32,
> from test-gtk2.c:3:
> /usr/include/glib-2.0/gobject/gtype.h:679:1: note: declared here
> 679 | {
> | ^
> In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
> from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
> from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
> from /usr/include/gtk-2.0/gtk/gtk.h:126,
> from test-gtk2.c:3:
> /usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations]
> 73 | GTimeVal last_popdown;
> | ^~~~~~~~
> In file included from /usr/include/glib-2.0/glib/galloca.h:32,
> from /usr/include/glib-2.0/glib.h:30,
> from /usr/include/glib-2.0/gobject/gbinding.h:28,
> from /usr/include/glib-2.0/glib-object.h:23,
> from /usr/include/glib-2.0/gio/gioenums.h:28,
> from /usr/include/glib-2.0/gio/giotypes.h:28,
> from /usr/include/glib-2.0/gio/gio.h:26,
> from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
> from /usr/include/gtk-2.0/gdk/gdk.h:32,
> from /usr/include/gtk-2.0/gtk/gtk.h:32,
> from test-gtk2.c:3:
> /usr/include/glib-2.0/glib/gtypes.h:551:8: note: declared here
> 551 | struct _GTimeVal
> | ^~~~~~~~~
> cc1: all warnings being treated as errors
>
patch below fixes that for me.. please let me know
if it works for you and I'll post full patch
jirka
---
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index f30a89046aa3..7ac0d8088565 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -197,7 +197,7 @@ $(OUTPUT)test-libcrypto.bin:
$(BUILD) -lcrypto
$(OUTPUT)test-gtk2.bin:
- $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
+ $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations
$(OUTPUT)test-gtk2-infobar.bin:
$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
diff --git a/tools/perf/ui/gtk/Build b/tools/perf/ui/gtk/Build
index ec22e899a224..eef708c502f4 100644
--- a/tools/perf/ui/gtk/Build
+++ b/tools/perf/ui/gtk/Build
@@ -1,4 +1,4 @@
-CFLAGS_gtk += -fPIC $(GTK_CFLAGS)
+CFLAGS_gtk += -fPIC $(GTK_CFLAGS) -Wno-deprecated-declarations
gtk-y += browser.o
gtk-y += hists.o
@@ -7,3 +7,8 @@ gtk-y += util.o
gtk-y += helpline.o
gtk-y += progress.o
gtk-y += annotate.o
+gtk-y += zalloc.o
+
+$(OUTPUT)ui/gtk/zalloc.o: ../lib/zalloc.c FORCE
+ $(call rule_mkdir)
+ $(call if_changed_dep,cc_o_c)
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [GIT PULL 0/6] perf/urgent fixes
2020-01-13 9:25 ` Jiri Olsa
@ 2020-01-13 9:44 ` Ravi Bangoria
0 siblings, 0 replies; 18+ messages in thread
From: Ravi Bangoria @ 2020-01-13 9:44 UTC (permalink / raw)
To: Jiri Olsa
Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Ingo Molnar,
Thomas Gleixner, Namhyung Kim, Clark Williams, linux-kernel,
linux-perf-users, Adrian Hunter, Arnaldo Carvalho de Melo,
Ravi Bangoria
On 1/13/20 2:55 PM, Jiri Olsa wrote:
> On Mon, Jan 13, 2020 at 01:58:59PM +0530, Ravi Bangoria wrote:
>
> SNIP
>
>> | ^~~~
>> In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
>> from /usr/include/glib-2.0/gobject/gbinding.h:29,
>> from /usr/include/glib-2.0/glib-object.h:23,
>> from /usr/include/glib-2.0/gio/gioenums.h:28,
>> from /usr/include/glib-2.0/gio/giotypes.h:28,
>> from /usr/include/glib-2.0/gio/gio.h:26,
>> from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
>> from /usr/include/gtk-2.0/gdk/gdk.h:32,
>> from /usr/include/gtk-2.0/gtk/gtk.h:32,
>> from test-gtk2.c:3:
>> /usr/include/glib-2.0/gobject/gtype.h:679:1: note: declared here
>> 679 | {
>> | ^
>> In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
>> from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
>> from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
>> from /usr/include/gtk-2.0/gtk/gtk.h:126,
>> from test-gtk2.c:3:
>> /usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations]
>> 73 | GTimeVal last_popdown;
>> | ^~~~~~~~
>> In file included from /usr/include/glib-2.0/glib/galloca.h:32,
>> from /usr/include/glib-2.0/glib.h:30,
>> from /usr/include/glib-2.0/gobject/gbinding.h:28,
>> from /usr/include/glib-2.0/glib-object.h:23,
>> from /usr/include/glib-2.0/gio/gioenums.h:28,
>> from /usr/include/glib-2.0/gio/giotypes.h:28,
>> from /usr/include/glib-2.0/gio/gio.h:26,
>> from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
>> from /usr/include/gtk-2.0/gdk/gdk.h:32,
>> from /usr/include/gtk-2.0/gtk/gtk.h:32,
>> from test-gtk2.c:3:
>> /usr/include/glib-2.0/glib/gtypes.h:551:8: note: declared here
>> 551 | struct _GTimeVal
>> | ^~~~~~~~~
>> cc1: all warnings being treated as errors
>>
>
> patch below fixes that for me.. please let me know
> if it works for you and I'll post full patch
>
> jirka
>
LGTM. You can add:
Tested-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
^ permalink raw reply [flat|nested] 18+ messages in thread