public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: namhyung@kernel.org
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Stephane Eranian <eranian@google.com>,
	Ian Rogers <irogers@google.com>, Al Grant <al.grant@foss.arm.com>,
	Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: [PATCH] perf inject: Flush ordered events on FINISHED_ROUND
Date: Tue, 6 Oct 2020 11:39:49 +0900	[thread overview]
Message-ID: <20201006023949.GA1682192@google.com> (raw)
In-Reply-To: <CAM9d7cgsxkefHAgyMf-GoP4-OdSsaRmhSGLwPMoYn=-c9YXxDw@mail.gmail.com>

> > On Fri, Oct 02, 2020 at 10:03:17PM +0900, Namhyung Kim wrote:
> > > Below measures time and memory usage during the perf inject and
> > > report using ~190MB data file.
> > >
> > > Before:
> > >   perf inject:  11.09 s,  382148 KB
> > >   perf report:   8.05 s,  397440 KB
> > >
> > > After:
> > >   perf inject:  16.24 s,   83376 KB
> > >   perf report:   7.96 s,  216184 KB
> > >
> > > As you can see, it used 2x memory of the input size.  I guess it's
> > > because it needs to keep the copy for the whole input.  But I don't
> > > understand why processing time of perf inject increased..

Measuring it with time shows:

           before       after
  real    11.309s     17.040s
  user     8.084s     13.940s
  sys      6.535s      6.732s

So it's user space to make the difference.  I've run perf record on
both (with cycles:U) and the dominant function is same: queue_event.
(46.98% vs 65.87%)

It seems the flushing the queue makes more overhead on sorting.

Thanks
Namhyung

  reply	other threads:[~2020-10-06  2:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 13:03 [PATCH] perf inject: Flush ordered events on FINISHED_ROUND Namhyung Kim
2020-10-04 19:52 ` Jiri Olsa
2020-10-06  1:28   ` Namhyung Kim
2020-10-06  2:39     ` namhyung [this message]
2020-10-06  5:40       ` namhyung
2020-10-08  9:06         ` Jiri Olsa
2020-10-12  5:04           ` Namhyung Kim

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=20201006023949.GA1682192@google.com \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=al.grant@foss.arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox