]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - kernel/events/core.c
Merge branch 'tip/perf/urgent'
[thirdparty/linux.git] / kernel / events / core.c
index b704d83a28b29bace1741616eeff55a1cf03f413..08250981d9f4e02c425aeca018d91d63b11235f8 100644 (file)
@@ -7372,6 +7372,14 @@ void perf_output_sample(struct perf_output_handle *handle,
                        if (branch_sample_hw_index(event))
                                perf_output_put(handle, data->br_stack->hw_idx);
                        perf_output_copy(handle, data->br_stack->entries, size);
+                       /*
+                        * Add the extension space which is appended
+                        * right after the struct perf_branch_stack.
+                        */
+                       if (data->br_stack_cntr) {
+                               size = data->br_stack->nr * sizeof(u64);
+                               perf_output_copy(handle, data->br_stack_cntr, size);
+                       }
                } else {
                        /*
                         * we always store at least the value of nr