From: David Ahern <dsahern@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@ghostprotocols.net, linux-kernel@vger.kernel.org,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@kernel.org>, Mike Galbraith <efault@gmx.de>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH] perf session: Add option to copy events when queueing
Date: Wed, 02 Oct 2013 06:52:57 -0600 [thread overview]
Message-ID: <524C1729.4010904@gmail.com> (raw)
In-Reply-To: <20131002123808.GA20396@krava.brq.redhat.com>
On 10/2/13 6:38 AM, Jiri Olsa wrote:
>>> Examples hitting this problem are 'perf kvm stat live', especially with nested
>>> VMs which generate 100,000+ traces per second, and a command processing
>>> scheduling events with a high rate of context switching -- e.g., running
>>> 'perf bench sched pipe'.
>>>
>>> This patch offers live commands an option to copy the event when it is
>>> placed in
>>> the ordered samples queue.
>
> So I guess you have some other patch that actually sets
> session::copy_on_queue?
Yes, with this patch commands have to set session->copy_on_queue to true.
My latest perf-sched-daemon code actually solves this another way:
rather than asking perf-session to copy the events, the command itself
does and passes the copied event to the perf-session processing code.
I like this design better because the command itself controls the
allocation and free which the daemon needs because the events are added
to another queue so the flow is:
read from mmmap --> copy event --> pass to session code for time
ordering --> process time ordered events
The daemon puts the time ordered events into a time-limited queue and
only processes the event when requested.
If that is too confusing take a look at:
https://github.com/dsahern/linux/blob/perf-sched-timehist-3.11/tools/perf/schedmon.c
process_event is the handler for sample events coming out of the mmaps.
It allocates memory, copies the event and then calls
perf_session_queue_event on the copy.
David
prev parent reply other threads:[~2013-10-02 12:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 19:37 [PATCH] perf session: Add option to copy events when queueing David Ahern
2013-09-14 16:16 ` Frederic Weisbecker
2013-09-14 17:25 ` David Ahern
2013-09-16 16:40 ` Frederic Weisbecker
2013-09-17 4:14 ` David Ahern
2013-10-24 9:30 ` Frederic Weisbecker
2013-10-24 10:23 ` David Ahern
2013-10-24 12:27 ` Arnaldo Melo
2013-10-24 13:12 ` David Ahern
2013-10-24 14:07 ` Arnaldo Melo
2013-10-25 16:04 ` David Ahern
2013-10-02 12:18 ` Jiri Olsa
2013-10-02 12:38 ` Jiri Olsa
2013-10-02 12:52 ` David Ahern [this message]
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=524C1729.4010904@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=efault@gmx.de \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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.