From: Juri Lelli <juri.lelli@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Tom Zanussi <tom.zanussi@linux.intel.com>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
linux-trace-users <linux-trace-users@vger.kernel.org>,
acme <acme@kernel.org>, Clark Williams <williams@redhat.com>,
Jiri Olsa <jolsa@redhat.com>, bristot <bristot@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
Namhyung Kim <namhyung@kernel.org>,
Dietmar Eggemann <dietmar.eggemann@arm.co
Subject: Re: [PATCH 00/18] [ANNOUNCE] Dynamically created function based events
Date: Mon, 5 Feb 2018 14:53:55 +0100 [thread overview]
Message-ID: <20180205135355.GX19535@localhost.localdomain> (raw)
In-Reply-To: <20180203161732.4a65c66b@gandalf.local.home>
Hi Steve,
On 03/02/18 16:17, Steven Rostedt wrote:
> On Sat, 3 Feb 2018 12:52:08 -0800
> Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
>
> > It's a user space job.
>
> BTW, I asked around at DevConf.cz, and nobody I talked with (besides
> Arnaldo), have used eBPF. The "path to hello world" is quite high. This
> interface is extremely simple to use, and one doesn't need to install
> LLVM or other tools to interface with it.
Yep. Managed to get this working in less than an hour. :)
With something like
# echo 'replenish_dl_entity(u64 dl_runtime[3] | u64 dl_deadline[4] | u64 dl_period[5] | s64 runtime[8] | u64 deadline[9])' > function_events
# echo 'sched:*' > set_event
# echo replenish_dl_entity >> set_event
you can get something like
--->8---
[...]
cpuhog-3556 [002] d..3 727.101815: sched_switch: prev_comm=cpuhog prev_pid=3556 prev_prio=-1 prev_state=S ==> next_comm=swapper/2 next_pid=0 next_prio=120
<idle>-0 [002] d.s4 727.128139: sched_waking: comm=kworker/2:1 pid=53 prio=120 target_cpu=002
<idle>-0 [002] dNs5 727.128150: sched_wakeup: comm=kworker/2:1 pid=53 prio=120 target_cpu=002
<idle>-0 [002] d..3 727.128184: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=S ==> next_comm=kworker/2:1 next_pid=53 next_prio=120
kworker/2:1-53 [002] d..3 727.128280: sched_stat_runtime: comm=kworker/2:1 pid=53 runtime=123827 [ns] vruntime=12389788162 [ns]
kworker/2:1-53 [002] d..3 727.128288: sched_switch: prev_comm=kworker/2:1 prev_pid=53 prev_prio=120 prev_state=R+ ==> next_comm=swapper/2 next_pid=0 next_prio=120
<idle>-0 [002] d.h5 727.191609: enqueue_task_dl->replenish_dl_entity(dl_runtime=10000000, dl_deadline=100000000, dl_period=100000000, runtime=-218339, deadline=726823680456)
<idle>-0 [002] d..3 727.191676: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=S ==> next_comm=cpuhog next_pid=3556 next_prio=-1
[...]
--->8---
Which is quite nice already IMHO.
> I used the analogy, that eBPF is like C, and this is like Bash. One is
> much easier to get "Hello World!" out than the other.
>
> So personally, this is something I know I would use (note, I have
> never used eBPF either). But if I'm the only one to use this
> interface then I'll stop here (and not bother with the function graph
> return interface). If others think this would be helpful, I would ask
> them to speak up now.
First impression is that this is going to be definitely useful if
- it's possibile to hook at function end (e.g., replenish_dl_entity above
carries more useful information _after_ it did its job)
- inside functions? not really sure it's actually going to be needed, but I
was wondering if it's possible at all :); with tracepoints it's for example
easy to collect detailed information about which branches has been taken etc.
I'm going to play with this more. Just wanted to give back a quick positive
feedback.
I'm also adding Arm folks to the discussion, as they (and I :) have been
asking to add tracepoints to scheduler code in the past [1].
Best,
- Juri
[1] https://marc.info/?l=linux-kernel&m=149068303518607
WARNING: multiple messages have this Message-ID (diff)
From: Juri Lelli <juri.lelli@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Tom Zanussi <tom.zanussi@linux.intel.com>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
linux-trace-users <linux-trace-users@vger.kernel.org>,
acme <acme@kernel.org>, Clark Williams <williams@redhat.com>,
Jiri Olsa <jolsa@redhat.com>, bristot <bristot@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
Namhyung Kim <namhyung@kernel.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Patrick Bellasi <patrick.bellasi@arm.com>,
Morten Rasmussen <morten.rasmussen@arm.com>
Subject: Re: [PATCH 00/18] [ANNOUNCE] Dynamically created function based events
Date: Mon, 5 Feb 2018 14:53:55 +0100 [thread overview]
Message-ID: <20180205135355.GX19535@localhost.localdomain> (raw)
In-Reply-To: <20180203161732.4a65c66b@gandalf.local.home>
Hi Steve,
On 03/02/18 16:17, Steven Rostedt wrote:
> On Sat, 3 Feb 2018 12:52:08 -0800
> Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
>
> > It's a user space job.
>
> BTW, I asked around at DevConf.cz, and nobody I talked with (besides
> Arnaldo), have used eBPF. The "path to hello world" is quite high. This
> interface is extremely simple to use, and one doesn't need to install
> LLVM or other tools to interface with it.
Yep. Managed to get this working in less than an hour. :)
With something like
# echo 'replenish_dl_entity(u64 dl_runtime[3] | u64 dl_deadline[4] | u64 dl_period[5] | s64 runtime[8] | u64 deadline[9])' > function_events
# echo 'sched:*' > set_event
# echo replenish_dl_entity >> set_event
you can get something like
--->8---
[...]
cpuhog-3556 [002] d..3 727.101815: sched_switch: prev_comm=cpuhog prev_pid=3556 prev_prio=-1 prev_state=S ==> next_comm=swapper/2 next_pid=0 next_prio=120
<idle>-0 [002] d.s4 727.128139: sched_waking: comm=kworker/2:1 pid=53 prio=120 target_cpu=002
<idle>-0 [002] dNs5 727.128150: sched_wakeup: comm=kworker/2:1 pid=53 prio=120 target_cpu=002
<idle>-0 [002] d..3 727.128184: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=S ==> next_comm=kworker/2:1 next_pid=53 next_prio=120
kworker/2:1-53 [002] d..3 727.128280: sched_stat_runtime: comm=kworker/2:1 pid=53 runtime=123827 [ns] vruntime=12389788162 [ns]
kworker/2:1-53 [002] d..3 727.128288: sched_switch: prev_comm=kworker/2:1 prev_pid=53 prev_prio=120 prev_state=R+ ==> next_comm=swapper/2 next_pid=0 next_prio=120
<idle>-0 [002] d.h5 727.191609: enqueue_task_dl->replenish_dl_entity(dl_runtime=10000000, dl_deadline=100000000, dl_period=100000000, runtime=-218339, deadline=726823680456)
<idle>-0 [002] d..3 727.191676: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=S ==> next_comm=cpuhog next_pid=3556 next_prio=-1
[...]
--->8---
Which is quite nice already IMHO.
> I used the analogy, that eBPF is like C, and this is like Bash. One is
> much easier to get "Hello World!" out than the other.
>
> So personally, this is something I know I would use (note, I have
> never used eBPF either). But if I'm the only one to use this
> interface then I'll stop here (and not bother with the function graph
> return interface). If others think this would be helpful, I would ask
> them to speak up now.
First impression is that this is going to be definitely useful if
- it's possibile to hook at function end (e.g., replenish_dl_entity above
carries more useful information _after_ it did its job)
- inside functions? not really sure it's actually going to be needed, but I
was wondering if it's possible at all :); with tracepoints it's for example
easy to collect detailed information about which branches has been taken etc.
I'm going to play with this more. Just wanted to give back a quick positive
feedback.
I'm also adding Arm folks to the discussion, as they (and I :) have been
asking to add tracepoints to scheduler code in the past [1].
Best,
- Juri
[1] https://marc.info/?l=linux-kernel&m=149068303518607
next prev parent reply other threads:[~2018-02-05 13:54 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 23:04 [PATCH 00/18] [ANNOUNCE] Dynamically created function based events Steven Rostedt
2018-02-02 23:04 ` [PATCH 01/18] tracing: Add " Steven Rostedt
2018-02-05 8:24 ` Jiri Olsa
2018-02-05 15:00 ` Steven Rostedt
2018-02-07 3:09 ` Steven Rostedt
2018-02-07 12:06 ` Jiri Olsa
2018-02-02 23:05 ` [PATCH 02/18] tracing: Add documentation for " Steven Rostedt
2018-02-02 23:05 ` [PATCH 03/18] tracing: Add simple arguments to " Steven Rostedt
2018-02-08 10:18 ` Namhyung Kim
2018-02-08 15:37 ` Steven Rostedt
2018-02-02 23:05 ` [PATCH 04/18] tracing/x86: Add arch_get_func_args() function Steven Rostedt
2018-02-05 16:33 ` Masami Hiramatsu
2018-02-05 17:06 ` Steven Rostedt
2018-02-08 5:28 ` Namhyung Kim
2018-02-08 15:29 ` Steven Rostedt
2018-02-02 23:05 ` [PATCH 05/18] tracing: Add hex print for dynamic ftrace based events Steven Rostedt
2018-02-02 23:05 ` [PATCH 06/18] tracing: Add indirect offset to args of " Steven Rostedt
2018-02-02 23:05 ` [PATCH 07/18] tracing: Add dereferencing multiple fields per arg Steven Rostedt
2018-02-02 23:05 ` [PATCH 08/18] tracing: Add "unsigned" to function based events Steven Rostedt
2018-02-02 23:05 ` [PATCH 09/18] tracing: Add indexing of arguments for " Steven Rostedt
2018-02-08 10:59 ` Namhyung Kim
2018-02-08 15:43 ` Steven Rostedt
2018-02-08 23:56 ` Namhyung Kim
2018-02-09 0:19 ` Steven Rostedt
2018-02-02 23:05 ` [PATCH 10/18] tracing: Make func_type enums for easier comparing of arg types Steven Rostedt
2018-02-02 23:05 ` [PATCH 11/18] tracing: Add symbol type to function based events Steven Rostedt
2018-02-08 11:03 ` Namhyung Kim
2018-02-08 15:48 ` Steven Rostedt
2018-02-02 23:05 ` [PATCH 12/18] tracing: Add accessing direct address from " Steven Rostedt
2018-02-09 0:34 ` Namhyung Kim
2018-02-09 1:10 ` Steven Rostedt
2018-02-09 22:07 ` Steven Rostedt
2018-02-12 2:06 ` Namhyung Kim
2018-02-12 15:47 ` Masami Hiramatsu
2018-02-12 15:47 ` Masami Hiramatsu
2018-02-12 16:47 ` Steven Rostedt
2018-02-02 23:05 ` [PATCH 13/18] tracing: Add array type to " Steven Rostedt
2018-02-03 13:56 ` Masami Hiramatsu
2018-02-03 15:29 ` Steven Rostedt
2018-02-04 3:50 ` Masami Hiramatsu
2018-02-09 1:17 ` Namhyung Kim
2018-02-09 1:54 ` Steven Rostedt
2018-02-02 23:05 ` [PATCH 14/18] tracing: Have char arrays be strings for " Steven Rostedt
2018-02-02 23:05 ` [PATCH 15/18] tracing: Add string type for dynamic strings in " Steven Rostedt
2018-02-09 3:15 ` Namhyung Kim
2018-02-09 3:31 ` Steven Rostedt
2018-02-02 23:05 ` [PATCH 16/18] tracing: Add NULL to skip args for " Steven Rostedt
2018-02-02 23:05 ` [PATCH 17/18] tracing: Add indirect to indirect access " Steven Rostedt
2018-02-09 5:13 ` Namhyung Kim
2018-02-09 15:47 ` Steven Rostedt
2018-02-09 17:18 ` Steven Rostedt
2018-02-12 2:15 ` Namhyung Kim
2018-02-12 17:23 ` Steven Rostedt
2018-02-13 9:27 ` Namhyung Kim
2018-02-13 15:28 ` Steven Rostedt
2018-02-02 23:05 ` [PATCH 18/18] tracing/perf: Allow perf to use " Steven Rostedt
2018-02-03 13:38 ` [PATCH 00/18] [ANNOUNCE] Dynamically created " Masami Hiramatsu
2018-02-03 15:27 ` Steven Rostedt
2018-02-04 3:57 ` Masami Hiramatsu
2018-02-04 17:21 ` Alexei Starovoitov
2018-02-05 14:39 ` Masami Hiramatsu
2018-02-03 17:04 ` Mathieu Desnoyers
2018-02-03 19:02 ` Steven Rostedt
2018-02-03 20:52 ` Alexei Starovoitov
2018-02-03 21:08 ` Steven Rostedt
2018-02-03 21:30 ` Alexei Starovoitov
2018-02-04 2:37 ` Namhyung Kim
2018-02-04 15:50 ` Mathieu Desnoyers
2018-02-03 21:17 ` Steven Rostedt
2018-02-03 21:38 ` Alexei Starovoitov
2018-02-04 2:25 ` Namhyung Kim
2018-02-05 15:02 ` Steven Rostedt
2018-02-05 13:53 ` Juri Lelli [this message]
2018-02-05 13:53 ` Juri Lelli
2018-02-05 15:07 ` Steven Rostedt
2018-02-05 15:07 ` Steven Rostedt
2018-02-03 21:43 ` Linus Torvalds
2018-02-04 15:30 ` Mathieu Desnoyers
2018-02-04 15:47 ` Steven Rostedt
2018-02-04 19:39 ` Linus Torvalds
2018-02-05 10:09 ` Peter Zijlstra
2018-02-05 15:10 ` Steven Rostedt
2018-02-05 15:14 ` Masami Hiramatsu
2018-02-03 18:52 ` Steven Rostedt
2018-02-05 10:23 ` Juri Lelli
2018-02-05 10:49 ` Daniel Bristot de Oliveira
2018-02-05 15:11 ` Steven Rostedt
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=20180205135355.GX19535@localhost.localdomain \
--to=juri.lelli@redhat.com \
--cc=acme@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alexei.starovoitov@gmail.com \
--cc=bristot@redhat.com \
--cc=corbet@lwn.net \
--cc=dietmar.eggemann@arm.co \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=linux-trace-users@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tom.zanussi@linux.intel.com \
--cc=torvalds@linux-foundation.org \
--cc=williams@redhat.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.