aboutsummaryrefslogtreecommitdiffstats
path: root/trace-plot-cpu.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-05-21 05:08:34 -0400
committerJohannes Berg <johannes@sipsolutions.net>2010-05-25 07:17:03 -0400
commit436458c3567f64355095e0b75474d94bdfe9646f (patch)
treeb72470571f79efdf9b3f66bf0236a8e5e024b0b9 /trace-plot-cpu.c
parentd01318f336b345e7727a711a98eda59cf9d3ba8f (diff)
trace-cmd: make records refcounted
If a callback wants to hold on to a record, it can then increase the refcount and keep it. This is most likely to happen with the upcoming python plugin. Since the underlying data pages are already refcounted, we can just add a refcount to struct record (rather than having the error checking with the 'locked' member). Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'trace-plot-cpu.c')
-rw-r--r--trace-plot-cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trace-plot-cpu.c b/trace-plot-cpu.c
index 50d720b..fdfbdf7 100644
--- a/trace-plot-cpu.c
+++ b/trace-plot-cpu.c
@@ -137,7 +137,7 @@ static int cpu_plot_display_last_event(struct graph_info *ginfo,
137 record = tracecmd_peek_data(ginfo->handle, cpu); 137 record = tracecmd_peek_data(ginfo->handle, cpu);
138 if (record) 138 if (record)
139 offset = record->offset; 139 offset = record->offset;
140 /* Don't need to free a peek */ 140 free_record(record);
141 141
142 tracecmd_set_cpu_to_timestamp(ginfo->handle, cpu, time); 142 tracecmd_set_cpu_to_timestamp(ginfo->handle, cpu, time);
143 143