[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171027074311.2648-1-jolsa@kernel.org>
Date: Fri, 27 Oct 2017 09:43:11 +0200
From: Jiri Olsa <jolsa@...nel.org>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Hari Bathini <hbathini@...ux.vnet.ibm.com>,
lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Subject: [PATCH] perf: Fix header.size for namespace events
Reset header size for namespace events, otherwise
it only gets bigger in ctx iterations.
Cc: Hari Bathini <hbathini@...ux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-nlo4gonz9d4guyb8153ukzt0@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
kernel/events/core.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 04989fb769f0..4e6aa3f7d018 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6717,6 +6717,7 @@ static void perf_event_namespaces_output(struct perf_event *event,
struct perf_namespaces_event *namespaces_event = data;
struct perf_output_handle handle;
struct perf_sample_data sample;
+ u16 header_size = namespaces_event->event_id.header.size;
int ret;
if (!perf_event_namespaces_match(event))
@@ -6727,7 +6728,7 @@ static void perf_event_namespaces_output(struct perf_event *event,
ret = perf_output_begin(&handle, event,
namespaces_event->event_id.header.size);
if (ret)
- return;
+ goto out;
namespaces_event->event_id.pid = perf_event_pid(event,
namespaces_event->task);
@@ -6739,6 +6740,8 @@ static void perf_event_namespaces_output(struct perf_event *event,
perf_event__output_id_sample(event, &handle, &sample);
perf_output_end(&handle);
+out:
+ namespaces_event->event_id.header.size = header_size;
}
static void perf_fill_ns_link_info(struct perf_ns_link_info *ns_link_info,
--
2.13.6
Powered by blists - more mailing lists