diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/events/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 9e3edb272b3e..77c96d18c23a 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
| @@ -982,6 +982,9 @@ static void perf_event__header_size(struct perf_event *event) | |||
| 982 | if (sample_type & PERF_SAMPLE_READ) | 982 | if (sample_type & PERF_SAMPLE_READ) |
| 983 | size += event->read_size; | 983 | size += event->read_size; |
| 984 | 984 | ||
| 985 | if (sample_type & PERF_SAMPLE_DATA_SRC) | ||
| 986 | size += sizeof(data->data_src.val); | ||
| 987 | |||
| 985 | event->header_size = size; | 988 | event->header_size = size; |
| 986 | } | 989 | } |
| 987 | 990 | ||
| @@ -4199,6 +4202,9 @@ void perf_output_sample(struct perf_output_handle *handle, | |||
| 4199 | 4202 | ||
| 4200 | if (sample_type & PERF_SAMPLE_WEIGHT) | 4203 | if (sample_type & PERF_SAMPLE_WEIGHT) |
| 4201 | perf_output_put(handle, data->weight); | 4204 | perf_output_put(handle, data->weight); |
| 4205 | |||
| 4206 | if (sample_type & PERF_SAMPLE_DATA_SRC) | ||
| 4207 | perf_output_put(handle, data->data_src.val); | ||
| 4202 | } | 4208 | } |
| 4203 | 4209 | ||
| 4204 | void perf_prepare_sample(struct perf_event_header *header, | 4210 | void perf_prepare_sample(struct perf_event_header *header, |
