|
@@ -976,6 +976,9 @@ static void perf_event__header_size(struct perf_event *event)
|
|
|
if (sample_type & PERF_SAMPLE_PERIOD)
|
|
|
size += sizeof(data->period);
|
|
|
|
|
|
+ if (sample_type & PERF_SAMPLE_WEIGHT)
|
|
|
+ size += sizeof(data->weight);
|
|
|
+
|
|
|
if (sample_type & PERF_SAMPLE_READ)
|
|
|
size += event->read_size;
|
|
|
|
|
@@ -4193,6 +4196,9 @@ void perf_output_sample(struct perf_output_handle *handle,
|
|
|
perf_output_sample_ustack(handle,
|
|
|
data->stack_user_size,
|
|
|
data->regs_user.regs);
|
|
|
+
|
|
|
+ if (sample_type & PERF_SAMPLE_WEIGHT)
|
|
|
+ perf_output_put(handle, data->weight);
|
|
|
}
|
|
|
|
|
|
void perf_prepare_sample(struct perf_event_header *header,
|