From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: "peterz@infradead.org" <peterz@infradead.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jolsa@kernel.org" <jolsa@kernel.org>,
"wangnan0@huawei.com" <wangnan0@huawei.com>,
"hekuang@huawei.com" <hekuang@huawei.com>,
"namhyung@kernel.org" <namhyung@kernel.org>,
"alexander.shishkin@linux.intel.com"
<alexander.shishkin@linux.intel.com>,
"Hunter, Adrian" <adrian.hunter@intel.com>,
"ak@linux.intel.com" <ak@linux.intel.com>
Subject: Re: [PATCH 01/10] perf record: new interfaces to read ring buffer to file
Date: Wed, 11 Oct 2017 11:45:06 -0300 [thread overview]
Message-ID: <20171011144506.GA3503@kernel.org> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077537D1E3D@SHSMSX103.ccr.corp.intel.com>
Em Wed, Oct 11, 2017 at 04:12:42AM +0000, Liang, Kan escreveu:
> > > /* When check_messup is true, 'end' must points to a good entry */
> > > static union perf_event * perf_mmap__read(struct perf_mmap *md, bool
> > > check_messup, u64 start, diff --git a/tools/perf/util/evlist.h
> > > b/tools/perf/util/evlist.h index b1c14f1..1ce4857 100644
> > > --- a/tools/perf/util/evlist.h
> > > +++ b/tools/perf/util/evlist.h
> > > @@ -39,6 +39,16 @@ struct perf_mmap {
> > > char event_copy[PERF_SAMPLE_MAX_SIZE] __aligned(8);
> > > };
> > >
> > > +struct perf_mmap_read {
> > > + struct perf_mmap *md;
> > > + u64 head;
> > > + u64 start;
> > > + u64 end;
> >
> > So there will be always a one-on-one association of 'struct perf_mmap_read'
> > and 'struct perf_mmap', why not go on adding more fields to 'struct
> > perf_mmap' as we need
>
> The fields in 'struct perf_mmap' needs to be recalculated before each reading.
> So I put them in a new struct.
Ok, but I still think that if there is a one on one relatioship of
perf_mmap_read with perf_mmap, then we should just extend the one we
already have for per-mmap operations, i.e. 'struct perf_mmap', I'll try
and provide a patch on top of my perf/core branch to see how it looks.
> > but not doing it all at once (backward, snapshotting,
> > overwrite, etc) but first the simple part, make the most basic mode:
> >
> > perf record -a
> >
> > perf top
> >
> > work, multithreaded, leaving the other more complicated modes fallbacking
> > to the old format, then when we have it solid, go on getting the other
> > features.
>
> Agree.
> When I did perf top optimization, I also tried Namhyung's perf top multi-thread patch.
> https://lwn.net/Articles/667469/
> I think it may be a good start point.
I have to read that to understand why we need those indexes :-\
> I didn't work on his patch. Because the root cause of bad perf top performance
> is non overwrite mode, which generate lots of samples shortly. It exceeds KNL's
> computational capability. Multi-threading doesn't help much on this case.
> So I tried to use overwrite mode then.
Right, work on the problem you have at hand, but all these efforts
should be considered to move forward.
> > In the end, having the two formats supported will be needed anyway, and
> > we can as well ask for processing with both perf.data file formats to compare
> > results, while we strenghten out the new code.
> >
> > I just think we should do this in a more fine grained way to avoid too much
> > code churn as well as having a fallback to the old code, that albeit non
> > scalable, is what we have been using and can help in certifying that the new
> > one works well, by comparing its outputs.
>
> I already extended the multithreading support for event synthesization in perf
> record.
> https://github.com/kliang2/perf.git perf_record_opt
> I will send it out for review shortly after rebasing on the latest perf/core.
>
> In the patch series, I realloc buffer for each thread to temporarily keep the
> processing result, and write them to the perf.data at the end of event
> synthesization. The number of synthesized event is not big (hundreds of
> Kilobyte). So I think it should be OK to do that.
Ok, one thing I noticed was that with the snapshotting code we
synthesize events multiple times, once per each new perf.data file, I
haven't tested that with the multithreaded synthesizing code we recently
merged, have you?
- Arnaldo
next prev parent reply other threads:[~2017-10-11 14:45 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 17:20 [PATCH 00/10] new mmap_read interfaces for ring buffer kan.liang
2017-10-10 17:20 ` [PATCH 01/10] perf record: new interfaces to read ring buffer to file kan.liang
2017-10-10 18:24 ` Arnaldo Carvalho de Melo
2017-10-10 18:30 ` Arnaldo Carvalho de Melo
2017-10-11 4:12 ` Liang, Kan
2017-10-11 14:45 ` Arnaldo Carvalho de Melo [this message]
2017-10-11 15:16 ` Liang, Kan
2017-10-10 17:20 ` [PATCH 02/10] perf tool: fix: Don't discard prev in backward mode kan.liang
2017-10-10 18:14 ` Arnaldo Carvalho de Melo
2017-10-10 18:18 ` Liang, Kan
2017-10-13 12:55 ` Liang, Kan
2017-10-13 13:13 ` Arnaldo Carvalho de Melo
2017-10-13 13:14 ` Liang, Kan
2017-10-10 18:23 ` Wangnan (F)
2017-10-10 18:50 ` Wangnan (F)
2017-10-10 19:50 ` Liang, Kan
2017-10-10 20:18 ` Wangnan (F)
2017-10-11 2:12 ` Liang, Kan
2017-10-11 14:57 ` Liang, Kan
2017-10-12 1:11 ` Wangnan (F)
2017-10-12 12:49 ` Liang, Kan
2017-10-12 14:43 ` Wangnan (F)
2017-10-10 19:36 ` Liang, Kan
2017-10-10 17:20 ` [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer kan.liang
2017-10-10 18:15 ` Arnaldo Carvalho de Melo
2017-10-10 18:28 ` Liang, Kan
2017-10-10 18:34 ` Arnaldo Carvalho de Melo
2017-10-10 18:36 ` Arnaldo Carvalho de Melo
2017-10-10 19:00 ` Arnaldo Carvalho de Melo
2017-10-10 19:10 ` Wangnan (F)
2017-10-10 19:17 ` Arnaldo Carvalho de Melo
2017-10-10 19:22 ` Wangnan (F)
2017-10-10 19:55 ` Liang, Kan
2017-10-10 19:59 ` Wangnan (F)
2017-10-10 17:20 ` [PATCH 04/10] perf tool: perf_mmap__read_init wrapper for evlist kan.liang
2017-10-10 17:20 ` [PATCH 05/10] perf top: apply new mmap_read interfaces kan.liang
2017-10-10 17:20 ` [PATCH 06/10] perf trace: " kan.liang
2017-10-10 17:20 ` [PATCH 07/10] perf kvm: " kan.liang
2017-10-10 17:20 ` [PATCH 08/10] perf python: " kan.liang
2017-10-10 17:20 ` [PATCH 09/10] perf tests: " kan.liang
2017-10-10 17:20 ` [PATCH 10/10] perf tool: remove stale " kan.liang
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=20171011144506.GA3503@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=hekuang@huawei.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.com \
/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.