From: David Ahern <dsahern@gmail.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Pawel Moll <pawel.moll@arm.com>,
Richard Cochran <richardcochran@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Paul Mackerras <paulus@samba.org>,
John Stultz <john.stultz@linaro.org>,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [RFC 2/2] perf: Marker software event and ioctl
Date: Sun, 14 Sep 2014 09:43:12 -0600 [thread overview]
Message-ID: <5415B790.5010607@gmail.com> (raw)
In-Reply-To: <20140912204444.GA11199@kernel.org>
On 9/12/14, 2:44 PM, Arnaldo Carvalho de Melo wrote:
> Em Fri, Sep 12, 2014 at 10:37:39AM -0700, David Ahern escreveu:
>> On 9/12/14, 4:48 AM, Pawel Moll wrote:
>>> This patch adds a PERF_COUNT_SW_MARKER event type, which
>>> can be requested by user and a PERF_EVENT_IOC_MARKER
>>> ioctl command which will inject an event of said type into
>>> the perf buffer. The ioctl can take a zero-terminated
>>> string argument, similar to tracing_marker in ftrace,
>>> which will be kept in the "raw" field of the sample.
>>>
>>> The main use case for this is synchronisation of
>>> performance data generated in user space with the perf
>>> stream coming from the kernel. For example, the marker
>>> can be inserted by a JIT engine after it generated
>>> portion of the code, but before the code is executed
>>> for the first time, allowing the post-processor to
>>> pick the correct debugging information. Other example
>>> is a system profiling tool taking data from other
>>> sources than just perf, which generates a marker
>>> at the beginning at at the end of the session
>>> (also possibly periodically during the session) to
>>> synchronise kernel timestamps with clock values
>>> obtained in userspace (gtod or raw_monotonic).
>>
>> Seems really similar to what I proposed in the past:
>>
>> https://lkml.org/lkml/2011/2/27/159
>>
>> Which was rejected.
>
> I took a look at that thread, but just barely, emphasis on that.
>
> Injecting something from userspace, a la ftrace, seems to be something,
> as tglx mentioned, "buried" in that patchset.
Thomas object to an ioctl buried deep in a patch -- newbie mistake.
Peter objected to the ioctl https://lkml.org/lkml/2011/3/1/229
It was not userspace injecting random data into the stream but rather
forcing the sample to be generated and added to the stream.
David
David
next prev parent reply other threads:[~2014-09-14 15:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 11:48 [RFC 0/2] Yet another take at user/kernel time correlation problem Pawel Moll
2014-09-12 11:48 ` [RFC 1/2] perf: Add sampling of the raw monotonic clock Pawel Moll
[not found] ` <1410522513-1045-1-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
2014-09-12 11:48 ` [RFC 2/2] perf: Marker software event and ioctl Pawel Moll
[not found] ` <1410522513-1045-3-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
2014-09-12 12:43 ` Christopher Covington
[not found] ` <5412EA7A.9020807-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-09-12 12:57 ` Pawel Moll
2014-09-12 13:49 ` Arnaldo Carvalho de Melo
[not found] ` <20140912134910.GG1801-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-09-12 13:58 ` Pawel Moll
2014-09-12 16:19 ` Arnaldo Carvalho de Melo
[not found] ` <20140912161934.GJ1801-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-09-15 17:27 ` Pawel Moll
2014-09-15 18:31 ` Arnaldo Carvalho de Melo
[not found] ` <20140915183101.GE11199-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-09-16 16:33 ` Pawel Moll
2014-09-12 14:00 ` Christopher Covington
2014-09-12 17:37 ` David Ahern
[not found] ` <54132F63.1010401-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-09-12 20:44 ` Arnaldo Carvalho de Melo
2014-09-14 15:43 ` David Ahern [this message]
[not found] ` <5415B790.5010607-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-09-15 17:18 ` Pawel Moll
2014-09-16 7:44 ` Ingo Molnar
[not found] ` <20140916074421.GA21295-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-09-16 16:37 ` Pawel Moll
2014-09-16 17:58 ` Ingo Molnar
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=5415B790.5010607@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=john.stultz@linaro.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=pawel.moll@arm.com \
--cc=peterz@infradead.org \
--cc=richardcochran@gmail.com \
--cc=rostedt@goodmis.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;
as well as URLs for NNTP newsgroup(s).