Message ID | 20210506114845.5c2cf201@gandalf.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | ef494e2973751b7ec0e815b50adcf0825f09efb3 |
Headers | show |
Series | trace-cmd report: Have --align-ts ignore empty CPU buffers | expand |
diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c index 4d5940d8..9726e994 100644 --- a/lib/trace-cmd/trace-input.c +++ b/lib/trace-cmd/trace-input.c @@ -4089,6 +4089,9 @@ unsigned long long tracecmd_get_first_ts(struct tracecmd_input *handle) int i; for (i = 0; i < handle->cpus; i++) { + /* Ignore empty buffers */ + if (!handle->cpu_data[i].size) + continue; if (first || ts > handle->cpu_data[i].first_ts) ts = handle->cpu_data[i].first_ts; first = false;