perf session: Move ui_progress_update in __perf_session__process_events()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 30 Nov 2010 17:49:41 +0000 (17:49 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 30 Nov 2010 21:57:13 +0000 (19:57 -0200)
The progress bar is changed when the file offset changes. This happens only
when the next mmap is done. No need to call ui_progress_update() for every
event.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20101130163820.094836523@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/session.c

index 2fdbccf10770b2e75819341b841884a485e53ea4..3c140daba63a76d07865e1a1747b572c63f9e0fd 100644 (file)
@@ -773,10 +773,10 @@ remap:
                err = -errno;
                goto out_err;
        }
+       ui_progress__update(progress, file_offset);
 
 more:
        event = (event_t *)(buf + head);
-       ui_progress__update(progress, file_offset);
 
        if (session->header.needs_swap)
                perf_event_header__bswap(&event->header);