perf: Provide generic perf_sample_data initialization
[safe/jmp/linux-2.6] / include / linux / perf_event.h
index 90e0521..6f8cd7d 100644 (file)
@@ -801,6 +801,13 @@ struct perf_sample_data {
        struct perf_raw_record          *raw;
 };
 
+static inline
+void perf_sample_data_init(struct perf_sample_data *data, u64 addr)
+{
+       data->addr = addr;
+       data->raw  = NULL;
+}
+
 extern void perf_output_sample(struct perf_output_handle *handle,
                               struct perf_event_header *header,
                               struct perf_sample_data *data,