aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-12-15 12:08:22 -0500
committerSteven Rostedt <rostedt@goodmis.org>2009-12-15 12:08:22 -0500
commitb5679358c57b64ad42d29357fd95615dc1ba9f96 (patch)
tree09a72e05d896c9ab458bd2cc1b43a21a53dd7e2a
parentaa55e0cbed12e14820aa4deab7e8d006be4454dc (diff)
Set to first record in tracecmd_set_cpu_to_timestamp()
The algorithm in tracecmd_set_cpu_to_timestamp() depends on the timestamp of the page being for the page. With reading data off the page, the timestamp gets incremented. This resets the timestamp back to the first record on the current page. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--trace-input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/trace-input.c b/trace-input.c
index f967591..3cd6387 100644
--- a/trace-input.c
+++ b/trace-input.c
@@ -846,6 +846,9 @@ tracecmd_set_cpu_to_timestamp(struct tracecmd_input *handle, int cpu,
846 if (cpu_data->timestamp == ts) 846 if (cpu_data->timestamp == ts)
847 return 0; 847 return 0;
848 848
849 /* Set to the first record on current page */
850 update_page_info(handle, cpu);
851
849 if (cpu_data->timestamp < ts) { 852 if (cpu_data->timestamp < ts) {
850 start = cpu_data->offset; 853 start = cpu_data->offset;
851 end = cpu_data->file_offset + cpu_data->file_size; 854 end = cpu_data->file_offset + cpu_data->file_size;