diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-01-13 14:57:51 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-01-13 14:57:51 -0500 |
commit | 6d376054b0c8dbd72156bc68e3ec75ab1167cda9 (patch) | |
tree | e2479081854227aaf54ff7ae2020b9ab300ea72b | |
parent | 87d2a344a4852a4041d12bcc06ac1d976a2ae798 (diff) |
parse-events: Round usecs for output
Testing the output of the kernel against the output of
trace-cmd extract
trace-cmd report
I found that the kernel rounds the usecs to the nearest usec
where as the report does not.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | parse-events.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-events.c b/parse-events.c index 309986d..53087d9 100644 --- a/parse-events.c +++ b/parse-events.c | |||
@@ -3373,7 +3373,7 @@ void pevent_print_event(struct pevent *pevent, struct trace_seq *s, | |||
3373 | 3373 | ||
3374 | secs = record->ts / NSECS_PER_SEC; | 3374 | secs = record->ts / NSECS_PER_SEC; |
3375 | usecs = record->ts - secs * NSECS_PER_SEC; | 3375 | usecs = record->ts - secs * NSECS_PER_SEC; |
3376 | usecs = usecs / NSECS_PER_USEC; | 3376 | usecs = (usecs + 500) / NSECS_PER_USEC; |
3377 | 3377 | ||
3378 | type = trace_parse_common_type(pevent, data); | 3378 | type = trace_parse_common_type(pevent, data); |
3379 | 3379 | ||