[tip:perf/core] perf session: Move ui_progress_update in __perf_session__process_events()

From: tip-bot for Thomas Gleixner
Date: Wed Dec 01 2010 - 04:12:14 EST


Commit-ID: 85b99952ccd3d84707661d8ae103c710daca1c8a
Gitweb: http://git.kernel.org/tip/85b99952ccd3d84707661d8ae103c710daca1c8a
Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
AuthorDate: Tue, 30 Nov 2010 17:49:41 +0000
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 30 Nov 2010 19:57:13 -0200

perf session: Move ui_progress_update in __perf_session__process_events()

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@xxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
LKML-Reference: <20101130163820.094836523@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/session.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 2fdbccf..3c140da 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/