Message ID | 20221115153502.5253871c@gandalf.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | 83f5d28ee73784db38d02bdb64f089ea415430e9 |
Headers | show |
Series | trace-cmd record: Fix -m option | expand |
diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c index 20deb31c0897..f387091f5177 100644 --- a/lib/trace-cmd/trace-recorder.c +++ b/lib/trace-cmd/trace-recorder.c @@ -287,8 +287,8 @@ static inline void update_fd(struct tracecmd_recorder *recorder, int size) recorder->count += size; if (recorder->count >= recorder->page_size) { + recorder->pages += recorder->count / recorder->page_size; recorder->count = 0; - recorder->pages++; } if (recorder->pages < recorder->max)