]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/perf_event.h
perf: Provide generic perf_sample_data initialization
[net-next-2.6.git] / include / linux / perf_event.h
index 90e0521b1690df66feb2dcb5f5ec537044be67a2..6f8cd7da1a012da2760e0e251f8d1792a99cfcd7 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,