summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-09-25 12:20:01 +0300
committerIngo Molnar <mingo@kernel.org>2018-09-25 12:20:01 +0300
commit9835bf7ff813cc7f5390dc221e0c9455ed81689e (patch)
treedd0617487c1d8f93bebe8ac101ab457fba4e5adc /kernel
parentfb437bc8fe36c964d9bf2f4b568e6c77c235c5e3 (diff)
parent24ef0fd0a1f389b156e6ef0edd71072728831bd9 (diff)
downloadlinux-9835bf7ff813cc7f5390dc221e0c9455ed81689e.tar.xz
Merge tag 'perf-core-for-mingo-4.20-20180919' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf test improvements: - Add watchpoint entry (Ravi Bangoria) Build fixes: - Initialize perf_data_file fd field to fix building the CTF (trace format) converter with with gcc 4.8.4 on Ubuntu 14.04 (Jérémie Galarneau) - Use -Wno-redundant-decls to build with PYTHON=python3 to build the python binding, fixing the build in systems such as Clear Linux (Arnaldo Carvalho de Melo) Hardware tracing improvements: - Suppress AUX/OVERWRITE records (Alexander Shishkin) Infrastructure changes: - Adopt PTR_ERR_OR_ZERO from the kernel and use it in the bpf-loader instead of open coded equivalent (Ding Xiang) - Improve the event ordering code to make it clear and fix a bug related to freeing of events when using pipe mode from 'record' to 'inject' (Jiri Olsa) - Some prep work to facilitate per-cpu threads to write record data to per-cpu files (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/ring_buffer.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 5d3cf407e374..4a9937076331 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -459,10 +459,20 @@ void perf_aux_output_end(struct perf_output_handle *handle, unsigned long size)
if (size || handle->aux_flags) {
/*
* Only send RECORD_AUX if we have something useful to communicate
+ *
+ * Note: the OVERWRITE records by themselves are not considered
+ * useful, as they don't communicate any *new* information,
+ * aside from the short-lived offset, that becomes history at
+ * the next event sched-in and therefore isn't useful.
+ * The userspace that needs to copy out AUX data in overwrite
+ * mode should know to use user_page::aux_head for the actual
+ * offset. So, from now on we don't output AUX records that
+ * have *only* OVERWRITE flag set.
*/
- perf_event_aux_event(handle->event, aux_head, size,
- handle->aux_flags);
+ if (handle->aux_flags & ~(u64)PERF_AUX_FLAG_OVERWRITE)
+ perf_event_aux_event(handle->event, aux_head, size,
+ handle->aux_flags);
}
rb->user_page->aux_head = rb->aux_head;