All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Namhyung Kim <namhyung@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH] perf tools: Separate progress bar update when processing events
Date: Wed, 04 Sep 2013 10:47:22 -0600	[thread overview]
Message-ID: <5227641A.40500@gmail.com> (raw)
In-Reply-To: <1378312077-28374-1-git-send-email-jolsa@redhat.com>

On 9/4/13 10:27 AM, Jiri Olsa wrote:
> Currently when processing events in __perf_session__process_events
> function we we update progress based on the file_size. During the
> same processing we update progress bar from within flush_sample_queue
> which is based on number of samples count.
>
> Having 2 different based updates is causing the progress bar to
> jump heavily back and forth giving not much useful info.
>
> Fixing this by keeping only __perf_session__process_events
> based progress bar update. And turning on flush_sample_queue
> progress bar update only for final flushing.
>
> This reduces the number of times the progress bar update
> function is called and it significantly reduces the loading
> time for TUI, where the progress bar update takes quite a lot
> of time.
>
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: David Ahern <dsahern@gmail.com>
> ---
>   tools/perf/util/session.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
> index 1fc0c62..4df449c 100644
> --- a/tools/perf/util/session.c
> +++ b/tools/perf/util/session.c
> @@ -495,7 +495,7 @@ static int perf_session_deliver_event(struct perf_session *session,
>   				      u64 file_offset);
>
>   static int flush_sample_queue(struct perf_session *s,
> -		       struct perf_tool *tool)
> +		       struct perf_tool *tool, bool final)

Why not base it on next_flush = ULLONG_MAX? Then you don't need the 
extra arg.

David

  reply	other threads:[~2013-09-04 16:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 16:27 [PATCH] perf tools: Separate progress bar update when processing events Jiri Olsa
2013-09-04 16:47 ` David Ahern [this message]
2013-09-05  9:14   ` [PATCHv2] " Jiri Olsa
2013-09-06 12:14     ` [tip:perf/urgent] perf session: " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5227641A.40500@gmail.com \
    --to=dsahern@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.