aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--trace-cmd.h1
-rw-r--r--trace-input.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/trace-cmd.h b/trace-cmd.h
index b2586bf..b77b8e6 100644
--- a/trace-cmd.h
+++ b/trace-cmd.h
@@ -54,6 +54,7 @@ enum {
54#define TS_SHIFT 27 54#define TS_SHIFT 27
55#endif 55#endif
56 56
57void tracecmd_record_ref(struct record *record);
57void free_record(struct record *record); 58void free_record(struct record *record);
58 59
59struct tracecmd_input; 60struct tracecmd_input;
diff --git a/trace-input.c b/trace-input.c
index 7db5577..1c79843 100644
--- a/trace-input.c
+++ b/trace-input.c
@@ -675,6 +675,11 @@ void free_record(struct record *record)
675 __free_record(record); 675 __free_record(record);
676} 676}
677 677
678void tracecmd_record_ref(struct record *record)
679{
680 record->ref_count++;
681}
682
678static void free_next(struct tracecmd_input *handle, int cpu) 683static void free_next(struct tracecmd_input *handle, int cpu)
679{ 684{
680 struct record *record = handle->cpu_data[cpu].next; 685 struct record *record = handle->cpu_data[cpu].next;