diff options
| -rw-r--r-- | trace-input.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/trace-input.c b/trace-input.c index 3747680..feddf83 100644 --- a/trace-input.c +++ b/trace-input.c | |||
| @@ -885,6 +885,10 @@ tracecmd_set_cpu_to_timestamp(struct tracecmd_input *handle, int cpu, | |||
| 885 | 885 | ||
| 886 | next = start + (end - start) / 2; | 886 | next = start + (end - start) / 2; |
| 887 | next &= ~(handle->page_size - 1); | 887 | next &= ~(handle->page_size - 1); |
| 888 | |||
| 889 | /* Prevent an infinite loop if start and end are a page off */ | ||
| 890 | if (next == start) | ||
| 891 | start = next += handle->page_size; | ||
| 888 | } | 892 | } |
| 889 | 893 | ||
| 890 | /* | 894 | /* |
