aboutsummaryrefslogtreecommitdiffstats
path: root/trace-cmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'trace-cmd.h')
-rw-r--r--trace-cmd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/trace-cmd.h b/trace-cmd.h
index 83e7a34..22b45cc 100644
--- a/trace-cmd.h
+++ b/trace-cmd.h
@@ -87,6 +87,15 @@ int tracecmd_init_data(struct tracecmd_input *handle);
87struct record * 87struct record *
88tracecmd_peek_data(struct tracecmd_input *handle, int cpu); 88tracecmd_peek_data(struct tracecmd_input *handle, int cpu);
89 89
90static inline struct record *
91tracecmd_peek_data_ref(struct tracecmd_input *handle, int cpu)
92{
93 struct record *rec = tracecmd_peek_data(handle, cpu);
94 if (rec)
95 rec->ref_count++;
96 return rec;
97}
98
90struct record * 99struct record *
91tracecmd_read_data(struct tracecmd_input *handle, int cpu); 100tracecmd_read_data(struct tracecmd_input *handle, int cpu);
92 101