diff options
Diffstat (limited to 'trace-input.c')
-rw-r--r-- | trace-input.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/trace-input.c b/trace-input.c index af15634..0c7f9ad 100644 --- a/trace-input.c +++ b/trace-input.c | |||
@@ -1053,8 +1053,17 @@ tracecmd_set_cpu_to_timestamp(struct tracecmd_input *handle, int cpu, | |||
1053 | return -1; | 1053 | return -1; |
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | if (cpu_data->timestamp == ts) | 1056 | if (cpu_data->timestamp == ts) { |
1057 | /* | ||
1058 | * If a record is cached, then that record is most | ||
1059 | * likely the matching timestamp. Otherwise we need | ||
1060 | * to start from the beginning of the index; | ||
1061 | */ | ||
1062 | if (!cpu_data->next || | ||
1063 | cpu_data->next->ts != ts) | ||
1064 | update_page_info(handle, cpu); | ||
1057 | return 0; | 1065 | return 0; |
1066 | } | ||
1058 | 1067 | ||
1059 | /* Set to the first record on current page */ | 1068 | /* Set to the first record on current page */ |
1060 | update_page_info(handle, cpu); | 1069 | update_page_info(handle, cpu); |