diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-05-17 21:15:19 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-05-17 21:15:19 -0400 |
commit | b9a540b8a13b52fae2c245a7eb14be037c2cf9ed (patch) | |
tree | 1808394121199303117723ad35b777123fb78d87 | |
parent | 80f70292b2e74533ac56a20433ec0296a6e4b537 (diff) |
trace-cmd/split: Fix page counting
The page counter for counting the number of pages to split is off.
It must add the page counter before the compare. Since the count starts
at zero, and does a "greater than" compare and not a "greater than or
equals".
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-split.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trace-split.c b/trace-split.c index c569524..9e74554 100644 --- a/trace-split.c +++ b/trace-split.c | |||
@@ -228,7 +228,7 @@ static int parse_cpu(struct tracecmd_input *handle, | |||
228 | while (record && (!end || record->ts <= end)) { | 228 | while (record && (!end || record->ts <= end)) { |
229 | if (cpu_data[cpu].index + record->record_size > page_size) { | 229 | if (cpu_data[cpu].index + record->record_size > page_size) { |
230 | 230 | ||
231 | if (type == SPLIT_PAGES && pages++ > count_limit) | 231 | if (type == SPLIT_PAGES && ++pages > count_limit) |
232 | break; | 232 | break; |
233 | 233 | ||
234 | if (cpu_data[cpu].page) | 234 | if (cpu_data[cpu].page) |