Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Thomas Gleixner: - Prevent a division by zero in the perf aux buffer handling - Sync kernel headers with perf tool headers - Fix a build failure in the syscalltbl code - Make the debug messages of perf report --call-graph work correctly - Make sure that all required perf files are in the MANIFEST for container builds - Fix the atrr.exclude kernel handling so it respects the perf_event_paranoid and the user permissions - Make perf test on s390x work correctly * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/aux: Only update ->aux_wakeup in non-overwrite mode perf test: Fix vmlinux failure on s390x part 2 perf test: Fix vmlinux failure on s390x perf tools: Fix syscalltbl build failure perf report: Fix debug messages with --call-graph option perf evsel: Fix attr.exclude_kernel setting for default cycles:p tools include: Sync kernel ABI headers with tooling headers perf tools: Get all of tools/{arch,include}/ in the MANIFEST
This commit is contained in:
@@ -412,6 +412,19 @@ err:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool __always_inline rb_need_aux_wakeup(struct ring_buffer *rb)
|
||||
{
|
||||
if (rb->aux_overwrite)
|
||||
return false;
|
||||
|
||||
if (rb->aux_head - rb->aux_wakeup >= rb->aux_watermark) {
|
||||
rb->aux_wakeup = rounddown(rb->aux_head, rb->aux_watermark);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Commit the data written by hardware into the ring buffer by adjusting
|
||||
* aux_head and posting a PERF_RECORD_AUX into the perf buffer. It is the
|
||||
@@ -451,10 +464,8 @@ void perf_aux_output_end(struct perf_output_handle *handle, unsigned long size)
|
||||
}
|
||||
|
||||
rb->user_page->aux_head = rb->aux_head;
|
||||
if (rb->aux_head - rb->aux_wakeup >= rb->aux_watermark) {
|
||||
if (rb_need_aux_wakeup(rb))
|
||||
wakeup = true;
|
||||
rb->aux_wakeup = rounddown(rb->aux_head, rb->aux_watermark);
|
||||
}
|
||||
|
||||
if (wakeup) {
|
||||
if (handle->aux_flags & PERF_AUX_FLAG_TRUNCATED)
|
||||
@@ -484,9 +495,8 @@ int perf_aux_output_skip(struct perf_output_handle *handle, unsigned long size)
|
||||
rb->aux_head += size;
|
||||
|
||||
rb->user_page->aux_head = rb->aux_head;
|
||||
if (rb->aux_head - rb->aux_wakeup >= rb->aux_watermark) {
|
||||
if (rb_need_aux_wakeup(rb)) {
|
||||
perf_output_wakeup(handle);
|
||||
rb->aux_wakeup = rounddown(rb->aux_head, rb->aux_watermark);
|
||||
handle->wakeup = rb->aux_wakeup + rb->aux_watermark;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user