diff options
| -rw-r--r-- | trace-input.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/trace-input.c b/trace-input.c index cacc136..681da4a 100644 --- a/trace-input.c +++ b/trace-input.c | |||
| @@ -724,20 +724,14 @@ find_and_read_event(struct tracecmd_input *handle, unsigned long long offset, | |||
| 724 | /* | 724 | /* |
| 725 | * If a page already exists, then we need to reset | 725 | * If a page already exists, then we need to reset |
| 726 | * it to point to the page with the data we want. | 726 | * it to point to the page with the data we want. |
| 727 | * We update the pointers to point to the previous | ||
| 728 | * page, and call get_next_page which will mmap | ||
| 729 | * the next page after the pointer of the previous | ||
| 730 | * page we want. Which ends up mapping the page we want. | ||
| 731 | */ | 727 | */ |
| 732 | 728 | ||
| 733 | page_offset -= handle->page_size; | ||
| 734 | |||
| 735 | handle->cpu_data[cpu].offset = page_offset; | 729 | handle->cpu_data[cpu].offset = page_offset; |
| 736 | handle->cpu_data[cpu].size = (handle->cpu_data[cpu].file_offset + | 730 | handle->cpu_data[cpu].size = (handle->cpu_data[cpu].file_offset + |
| 737 | handle->cpu_data[cpu].file_size) - | 731 | handle->cpu_data[cpu].file_size) - |
| 738 | page_offset; | 732 | page_offset; |
| 739 | 733 | ||
| 740 | if (get_next_page(handle, cpu)) | 734 | if (get_page(handle, cpu, page_offset)) |
| 741 | return NULL; | 735 | return NULL; |
| 742 | } else { | 736 | } else { |
| 743 | /* | 737 | /* |
