2018-07-16 11:24:15

by Andreas Ziegler

[permalink] [raw]
Subject: [PATCH 0/2] Documentation: trace: improve probe documentation

This series improves the documentation for uprobes and
kprobes.

The filename for enabling/disabling single events is 'enable',
not 'enabled'. kprobetrace.rst lists the files present in the
per-event directories but missed 'trigger' so far.

Andreas Ziegler (2):
Documentation: {u,k}probes: fix filename for event enabling
Documentation: kprobetrace: document 'trigger' file

Documentation/trace/kprobetrace.rst | 9 ++++++---
Documentation/trace/uprobetracer.rst | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)

--
2.7.4



2018-07-16 11:24:20

by Andreas Ziegler

[permalink] [raw]
Subject: [PATCH 1/2] Documentation: {u,k}probes: fix filename for event enabling

The per-event files to enable or disable kprobes and uprobes
are named 'enable', not 'enabled'. Fix the corresponding
documentation.

Signed-off-by: Andreas Ziegler <[email protected]>
---
Documentation/trace/kprobetrace.rst | 6 +++---
Documentation/trace/uprobetracer.rst | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst
index 3e0f971..c4aaef7d 100644
--- a/Documentation/trace/kprobetrace.rst
+++ b/Documentation/trace/kprobetrace.rst
@@ -18,7 +18,7 @@ To enable this feature, build your kernel with CONFIG_KPROBE_EVENTS=y.
Similar to the events tracer, this doesn't need to be activated via
current_tracer. Instead of that, add probe points via
/sys/kernel/debug/tracing/kprobe_events, and enable it via
-/sys/kernel/debug/tracing/events/kprobes/<EVENT>/enabled.
+/sys/kernel/debug/tracing/events/kprobes/<EVENT>/enable.


Synopsis of kprobe_events
@@ -81,9 +81,9 @@ Per-probe event filtering feature allows you to set different filter on each
probe and gives you what arguments will be shown in trace buffer. If an event
name is specified right after 'p:' or 'r:' in kprobe_events, it adds an event
under tracing/events/kprobes/<EVENT>, at the directory you can see 'id',
-'enabled', 'format' and 'filter'.
+'enable', 'format' and 'filter'.

-enabled:
+enable:
You can enable/disable the probe by writing 1 or 0 on it.

format:
diff --git a/Documentation/trace/uprobetracer.rst b/Documentation/trace/uprobetracer.rst
index 98d3f69..d082281 100644
--- a/Documentation/trace/uprobetracer.rst
+++ b/Documentation/trace/uprobetracer.rst
@@ -13,7 +13,7 @@ To enable this feature, build your kernel with CONFIG_UPROBE_EVENTS=y.
Similar to the kprobe-event tracer, this doesn't need to be activated via
current_tracer. Instead of that, add probe points via
/sys/kernel/debug/tracing/uprobe_events, and enable it via
-/sys/kernel/debug/tracing/events/uprobes/<EVENT>/enabled.
+/sys/kernel/debug/tracing/events/uprobes/<EVENT>/enable.

However unlike kprobe-event tracer, the uprobe event interface expects the
user to calculate the offset of the probepoint in the object.
--
2.7.4


2018-07-16 11:24:32

by Andreas Ziegler

[permalink] [raw]
Subject: [PATCH 2/2] Documentation: kprobetrace: document 'trigger' file

As the other files are documented explicitly, let's add a
short description for 'trigger' as well.

Signed-off-by: Andreas Ziegler <[email protected]>
---
Documentation/trace/kprobetrace.rst | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst
index c4aaef7d..8bfc75c 100644
--- a/Documentation/trace/kprobetrace.rst
+++ b/Documentation/trace/kprobetrace.rst
@@ -81,7 +81,7 @@ Per-probe event filtering feature allows you to set different filter on each
probe and gives you what arguments will be shown in trace buffer. If an event
name is specified right after 'p:' or 'r:' in kprobe_events, it adds an event
under tracing/events/kprobes/<EVENT>, at the directory you can see 'id',
-'enable', 'format' and 'filter'.
+'enable', 'format', 'filter' and 'trigger'.

enable:
You can enable/disable the probe by writing 1 or 0 on it.
@@ -95,6 +95,9 @@ filter:
id:
This shows the id of this probe event.

+trigger:
+ This allows to install trigger commands which are executed when the event is
+ hit (for details, see Documentation/trace/events.rst, section 6).

Event Profiling
---------------
--
2.7.4


2018-07-23 15:29:05

by Jonathan Corbet

[permalink] [raw]
Subject: Re: [PATCH 0/2] Documentation: trace: improve probe documentation

On Mon, 16 Jul 2018 13:05:56 +0200
Andreas Ziegler <[email protected]> wrote:

> This series improves the documentation for uprobes and
> kprobes.
>
> The filename for enabling/disabling single events is 'enable',
> not 'enabled'. kprobetrace.rst lists the files present in the
> per-event directories but missed 'trigger' so far.

I've applied the pair, thanks.

jon

2018-07-23 15:53:41

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH 0/2] Documentation: trace: improve probe documentation

On Mon, 23 Jul 2018 09:26:56 -0600
Jonathan Corbet <[email protected]> wrote:

> On Mon, 16 Jul 2018 13:05:56 +0200
> Andreas Ziegler <[email protected]> wrote:
>
> > This series improves the documentation for uprobes and
> > kprobes.
> >
> > The filename for enabling/disabling single events is 'enable',
> > not 'enabled'. kprobetrace.rst lists the files present in the
> > per-event directories but missed 'trigger' so far.
>
> I've applied the pair, thanks.
>

Thanks Jon. I was on vacation last week. Feel free to add:

Acked-by: Steven Rostedt (VMware) <[email protected]>

-- Steve