/trigger
# echo 'hist:keys=pid:latency=$new_lat:
onmatch(sched.sched_switch).wake2($latency,pid)' >
/sys/kernel/debug/tracing/events/synthetic/wake1/trigger
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 58 +---
1 fi
read throughout the kernel, except in this case the
trace_ function and its corresponding tracepoint isn't statically
generated but defined by the user at run-time.
How this can be automatically hooked up via a hist trigger 'action' is
discussed in a subsequent patch.
Signed-off-by: Tom
Add background and details on inter-event hist triggers, including
hist variables, synthetic events, and actions.
Signed-off-by: Tom Zanussi
Signed-off-by: Baohong Liu
---
Documentation/trace/histogram.txt | 381 ++
1 file changed, 381 insertions(+)
diff
additional
increment for that as well.
Signed-off-by: Tom Zanussi
---
kernel/trace/ring_buffer.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index dd35424..2375c5c 100644
--- a/kernel/trace/ring_buffer.c
+++ b
Allow tracing code outside of trace.c to access tracing_set_clock().
Some applications may require a particular clock in order to function
properly, such as latency calculations.
Also, add an accessor returning the current clock string.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace.c | 2
So that users know that inter-event tracing is supported as part of
the HIST_TRIGGERS option, include text to that effect in the help
text.
Signed-off-by: Tom Zanussi
---
kernel/trace/Kconfig | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/Kconfig b/kernel
- test inter-event histogram trigger onmax action
[PASS]
[7] event trigger - test synthetic event create remove [PASS]
Signed-off-by: Rajvi Jingar
Signed-off-by: Tom Zanussi
---
tools/testing/selftests/ftrace/test.d/functions| 7 +++
.../inter-event/trigger-extended-error
The default clock if timestamps are used in a histogram is "global".
If timestamps aren't used, the clock is irrelevant.
Use the "clock=" param only if you want to override the default
"global" clock for a histogram with timestamps.
Signed-off-by: Tom Z
s generate
another event, or compare and save a maximum.
Add a simple framework for doing that; specific actions will be
implemented on top of it in later patches.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 106 ++-
1 file changed, 104 insert
A common key to use in a histogram is the cpuid - add a new cpu
'synthetic' field named 'cpu' for that purpose.
Signed-off-by: Tom Zanussi
---
Documentation/trace/histogram.txt | 15 +++
kernel/trace/trace_events_hist.c | 28 +++-
Future support for synthetic events requires hist_field 'type'
information, so add a field for that.
Also, make other hist_field attribute usage consistent (size,
is_signed, etc).
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 33 +++
) and for combined latencies (latencies over 3
or more events).
In the process, factor out some common code from key and value
parsing.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 482 +--
1 file changed, 409 insertions(+), 73 deletions
Some accessor functions, such as for variable references, require
access to a corrsponding tracing_map_elt.
Add a tracing_map_elt param to the function signature and update the
accessor functions accordingly.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 91
o the
'unset' state, implementing read-once variables, which are also
important for event-matching uses.
Signed-off-by: Tom Zanussi
---
kernel/trace/tracing_map.c | 108 +
kernel/trace/tracing_map.h | 11 +
2 files changed, 119 insertions(+
: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 8f43f24..ba32626 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
cient).
Signed-off-by: Tom Zanussi
---
Documentation/trace/ftrace.txt | 24 +
kernel/trace/trace.c | 47 ++
2 files changed, 71 insertions(+)
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index d
This will make it easier to add variables, and makes the parsing code
cleaner regardless.
Signed-off-by: Tom Zanussi
Signed-off-by: Rajvi Jingar
---
kernel/trace/trace_events_hist.c | 72
1 file changed, 51 insertions(+), 21 deletions(-)
diff --git a
ent rather than an offset. This mode will be enabled if and only if
a histogram makes use of the "common_timestamp" field.
Signed-off-by: Tom Zanussi
Signed-off-by: Baohong Liu
[kasan use-after-free fix]
Signed-off-by: Vedang Patel
---
kernel/trace/trace_events_hist.c | 94
he threads which failed
cmpxchg() from incrementing idx. This way, they will loop
around and check if the thread which succeeded in executing cmpxchg()
had the same key.
[1] http://lkml.kernel.org/r/cover.1498510759.git.tom.zanu...@linux.intel.com
Signed-off-by: Vedang Patel
Signed-off-by: T
# echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> \
/sys/kernel/debug/tracing/events/sched/sched_waking/trigger
# echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> \
/sys/kernel/d
Hi Namhyung,
On Tue, 2017-12-12 at 23:42 +0900, Namhyung Kim wrote:
> On Wed, Dec 06, 2017 at 04:38:05PM -0600, Tom Zanussi wrote:
> > Synthetic events are user-defined events generated from hist trigger
> > variables saved from one or more other events.
> >
> > To de
Hi Namhyung,
On Tue, 2017-12-12 at 00:17 +0900, Namhyung Kim wrote:
> Hi Tom,
>
> On Wed, Dec 06, 2017 at 04:38:03PM -0600, Tom Zanussi wrote:
> > Add the necessary infrastructure to allow the variables defined on one
> > event to be referenced in another. This allo
Hi Namhyung,
On Fri, 2017-12-08 at 22:06 +0900, Namhyung Kim wrote:
> On Wed, Dec 06, 2017 at 04:38:00PM -0600, Tom Zanussi wrote:
> > Up until now, hist triggers only needed per-element support for saving
> > 'comm' data, which was saved directly as a private
Hi Namhyung,
On Fri, 2017-12-08 at 22:02 +0900, Namhyung Kim wrote:
> Hi Tom,
>
> On Wed, Dec 06, 2017 at 04:37:56PM -0600, Tom Zanussi wrote:
> > Add support for saving the value of a current event's event field by
> > assigning it to a variable that can be
Add a line for the log2 modifier, to keep it aligned with
tracing/README.
Signed-off-by: Tom Zanussi
---
Documentation/trace/histogram.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/trace/histogram.txt
b/Documentation/trace/histogram.txt
index b2145f4..a4143f04a 100644
he threads which failed
cmpxchg() from incrementing idx. This way, they will loop
around and check if the thread which succeeded in executing cmpxchg()
had the same key.
[1] http://lkml.kernel.org/r/cover.1498510759.git.tom.zanu...@linux.intel.com
Signed-off-by: Vedang Patel
Signed-off-by: T
Define a new function, tracing_set_time_stamp_abs(), which can be used
to enable or disable the use of absolute timestamps rather than time
deltas for a trace array.
Only the interface is added here; a subsequent patch will add the
underlying implementation.
Signed-off-by: Tom Zanussi
Signed
condition which might cause duplicates does not go
unnoticed.
Signed-off-by: Vedang Patel
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 11 --
kernel/trace/tracing_map.c | 83 +++-
kernel/trace/tracing_map.h | 7
3 files
ccess way, for
purposes other than serial event printing.
To set/reset this mode, use tracing_set_timestamp_abs() from the
previous interface patch.
Signed-off-by: Tom Zanussi
---
include/linux/ring_buffer.h | 12 ++---
kernel/trace/ring_buffer.c | 104 --
The ring_buffer event can provide a timestamp that may be useful to
various triggers - pass it into the handlers for that purpose.
Signed-off-by: Tom Zanussi
---
include/linux/trace_events.h| 14 ++-
kernel/trace/trace.h| 9 +++
kernel/trace
cient).
Signed-off-by: Tom Zanussi
---
Documentation/trace/ftrace.txt | 24 +
kernel/trace/trace.c | 47 ++
2 files changed, 71 insertions(+)
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index d
Some events such as timestamps require access to a ring_buffer_event
struct; add a param so that hist field functions can access that.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 39 ---
1 file changed, 24 insertions(+), 15 deletions
Allow hist_data access via hist_field. Some users of hist_fields
require or will require more access to the associated hist_data.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/kernel/trace
) and for combined latencies (latencies over 3
or more events).
In the process, factor out some common code from key and value
parsing.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 482 +--
1 file changed, 409 insertions(+), 73 deletions
ingle) variables can also be assigned at the same time
using separate assignments:
# echo 'hist:keys=pid:vals=$ts0:ts0=common_timestamp:b=field1:c=field2 ...
Variables set as above can be used by being referenced from another
event, as described in a subsequent patch.
Signed-o
: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index c385e56..10b79ec 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
s generate
another event, or compare and save a maximum.
Add a simple framework for doing that; specific actions will be
implemented on top of it in later patches.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 106 ++-
1 file changed, 104 insert
akeup_lat,next_pid,prio)
>> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 531 ++-
1 file changed, 530 insertions(+), 1 deletion(-)
diff --git a/ker
st
a matter of using the fields and new synthetic event in the
tracing/events/synthetic directory, as usual:
# echo 'hist:keys=pid,prio:sort=pid,prio' >> \
/sys/kernel/debug/tracing/events/synthetic/wakeup_new_test/trigger
Signed-off-by: Tom Zanussi
Signed-off-by: Rajvi Jing
A common key to use in a histogram is the cpuid - add a new cpu
'synthetic' field named 'cpu' for that purpose.
Signed-off-by: Tom Zanussi
---
Documentation/trace/histogram.txt | 15 +++
kernel/trace/trace_events_hist.c | 28 +++-
/trigger
# echo 'hist:keys=pid:latency=$new_lat:
onmatch(sched.sched_switch).wake2($latency,pid)' >
/sys/kernel/debug/tracing/events/synthetic/wake1/trigger
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 58 +---
1 fi
prev_prio:120 prev_comm: swapper/0
Totals:
Hits: 3493
Entries: 3
Dropped: 0
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 331 ++-
1 file changed, 296 insertions(+), 35 deletions(-)
diff --git a/k
additional
increment for that as well.
Signed-off-by: Tom Zanussi
---
kernel/trace/ring_buffer.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 763b3fb..8c862ea 100644
--- a/kernel/trace/ring_buffer.c
+++ b
The default clock if timestamps are used in a histogram is "global".
If timestamps aren't used, the clock is irrelevant.
Use the "clock=" param only if you want to override the default
"global" clock for a histogram with timestamps.
Signed-off-by: Tom Z
- test inter-event histogram trigger onmax action
[PASS]
[7] event trigger - test synthetic event create remove [PASS]
Signed-off-by: Rajvi Jingar
Signed-off-by: Tom Zanussi
---
tools/testing/selftests/ftrace/test.d/functions| 7 +++
.../inter-event/trigger-extended-error
Allow tracing code outside of trace.c to access tracing_set_clock().
Some applications may require a particular clock in order to function
properly, such as latency calculations.
Also, add an accessor returning the current clock string.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace.c | 2
# cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist
ERROR: Couldn't yyy: zzz
Last command: xxx
Also add specific error messages for variable and action errors.
Signed-off-by: Tom Zanussi
---
Documentation/trace/histogram.txt | 20 +
k
So that users know that inter-event tracing is supported as part of
the HIST_TRIGGERS option, include text to that effect in the help
text.
Signed-off-by: Tom Zanussi
---
kernel/trace/Kconfig | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/Kconfig b/kernel
Add background and details on inter-event hist triggers, including
hist variables, synthetic events, and actions.
Signed-off-by: Tom Zanussi
Signed-off-by: Baohong Liu
---
Documentation/trace/histogram.txt | 381 ++
1 file changed, 381 insertions(+)
diff
Some accessor functions, such as for variable references, require
access to a corrsponding tracing_map_elt.
Add a tracing_map_elt param to the function signature and update the
accessor functions accordingly.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 91
amp is saved into the variable
ts0. In the next line, ts0 is subtracted from the second event's
timestamp to produce the latency.
Further users of variable references will be described in subsequent
patches, such as for instance how the 'wakeup_lat' variable above can
be displaye
max) where spaces are more natural e.g. spaces after commas
in param lists.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 37 -
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/trace_events_hist.c b/ke
read throughout the kernel, except in this case the
trace_ function and its corresponding tracepoint isn't statically
generated but defined by the user at run-time.
How this can be automatically hooked up via a hist trigger 'action' is
discussed in a subsequent patch.
Signed-off-by: Tom
Future support for synthetic events requires hist_field 'type'
information, so add a field for that.
Also, make other hist_field attribute usage consistent (size,
is_signed, etc).
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 33 +++
Move get_hist_field_flags() to make it more easily accessible for new
code (and keep the move separate from new functionality).
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 44
1 file changed, 22 insertions(+), 22 deletions(-)
diff
ent rather than an offset. This mode will be enabled if and only if
a histogram makes use of the "common_timestamp" field.
Signed-off-by: Tom Zanussi
Signed-off-by: Baohong Liu
[kasan use-after-free fix]
Signed-off-by: Vedang Patel
---
kernel/trace/trace_events_hist.c | 94
This will make it easier to add variables, and makes the parsing code
cleaner regardless.
Signed-off-by: Tom Zanussi
Signed-off-by: Rajvi Jingar
---
kernel/trace/trace_events_hist.c | 72
1 file changed, 51 insertions(+), 21 deletions(-)
diff --git a
omm'-related code over to that.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 76 +++-
1 file changed, 43 insertions(+), 33 deletions(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index f75f7b
;hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0 ...
This also adds an external trace_clock_in_ns() to trace.c for the
timestamp conversion.
Signed-off-by: Tom Zanussi
---
Documentation/trace/histogram.txt | 1 +
kernel/trace/trace.c | 13 +++--
kernel/trace/trace.h
o the
'unset' state, implementing read-once variables, which are also
important for event-matching uses.
Signed-off-by: Tom Zanussi
---
kernel/trace/tracing_map.c | 108 +
kernel/trace/tracing_map.h | 11 +
2 files changed, 119 insertions(+
t:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> \
/sys/kernel/debug/tracing/events/sched/sched_waking/trigger
# echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> \
/sys/kernel/debug/tracing/
Hi Namhyung,
On Thu, 2017-11-23 at 14:25 +0900, Namhyung Kim wrote:
> On Fri, Nov 17, 2017 at 02:33:08PM -0600, Tom Zanussi wrote:
> > A common key to use in a histogram is the cpuid - add a new cpu
> > 'synthetic' field for that purpose. This field is named cp
Hi Namhyung,
Sorry for the delayed response - was out on vacation..
On Thu, 2017-11-23 at 14:09 +0900, Namhyung Kim wrote:
> On Fri, Nov 17, 2017 at 02:33:06PM -0600, Tom Zanussi wrote:
> > Add an 'onmax(var).save(field,...)' hist trigger action which is
> > invoked when
The ring_buffer event can provide a timestamp that may be useful to
various triggers - pass it into the handlers for that purpose.
Signed-off-by: Tom Zanussi
---
include/linux/trace_events.h| 14 ++-
kernel/trace/trace.h| 9 +++
kernel/trace
(or single) variables can also be assigned at the same time
using separate assignments:
# echo 'hist:keys=pid:vals=$ts0:ts0=$common_timestamp:b=field1:c=field2 ...
Variables set as above can be used by being referenced from another
event, as described in a subsequent patch.
Signed-o
Some events such as timestamps require access to a ring_buffer_event
struct; add a param so that hist field functions can access that.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 39 ---
1 file changed, 24 insertions(+), 15 deletions
This will make it easier to add variables, and makes the parsing code
cleaner regardless.
Signed-off-by: Tom Zanussi
Signed-off-by: Rajvi Jingar
---
kernel/trace/trace_events_hist.c | 72
1 file changed, 51 insertions(+), 21 deletions(-)
diff --git a
which saves the complete timestamp for each
event rather than an offset. This mode will be enabled if and only if
a histogram makes use of the "$common_timestamp" field.
Signed-off-by: Tom Zanussi
Signed-off-by: Baohong Liu
---
kernel/trace/trace_events_hist.c | 94 ++
Allow hist_data access via hist_field. Some users of hist_fields
require or will require more access to the associated hist_data.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/kernel/trace
o the
'unset' state, implementing read-once variables, which are also
important for event-matching uses.
Signed-off-by: Tom Zanussi
---
kernel/trace/tracing_map.c | 108 +
kernel/trace/tracing_map.h | 11 +
2 files changed, 119 insertions(+
;hist:keys=next_pid:wakeup_lat=$common_timestamp.usecs-$ts0 ...
This also adds an external trace_clock_in_ns() to trace.c for the
timestamp conversion.
Signed-off-by: Tom Zanussi
---
Documentation/trace/histogram.txt | 1 +
kernel/trace/trace.c | 13 +++--
kernel/trace/trace.h
Move get_hist_field_flags() to make it more easily accessible for new
code (and keep the move separate from new functionality).
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 44
1 file changed, 22 insertions(+), 22 deletions(-)
diff
: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index eccfe07..0e4f829 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
Some accessor functions, such as for variable references, require
access to a corrsponding tracing_map_elt.
Add a tracing_map_elt param to the function signature and update the
accessor functions accordingly.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 91
Future support for synthetic events requires hist_field 'type'
information, so add a field for that.
Also, make other hist_field attribute usage consistent (size,
is_signed, etc).
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 33 +++
) and for combined latencies (latencies over 3
or more events).
In the process, factor out some common code from key and value
parsing.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 513 +--
1 file changed, 440 insertions(+), 73 deletions
omm'-related code over to that.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 76 +++-
1 file changed, 43 insertions(+), 33 deletions(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index f6c59a
7;s timetamp is saved into the variable
ts0. In the next line, ts0 is subtracted from the second event's
timestamp to produce the latency.
Further users of variable references will be described in subsequent
patches, such as for instance how the 'wakeup_lat' variable above can
be displaye
Define a new function, tracing_set_time_stamp_abs(), which can be used
to enable or disable the use of absolute timestamps rather than time
deltas for a trace array.
Only the interface is added here; a subsequent patch will add the
underlying implementation.
Signed-off-by: Tom Zanussi
Signed
s generate
another event, or compare and save a maximum.
Add a simple framework for doing that; specific actions will be
implemented on top of it in later patches.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 108 +--
1 file changed, 105 insert
read throughout the kernel, except in this case the
trace_ function and its corresponding tracepoint isn't statically
generated but defined by the user at run-time.
How this can be automatically hooked up via a hist trigger 'action' is
discussed in a subsequent patch.
Signed-off-by: Tom
akeup_lat,next_pid,prio)
>> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 536 ++-
1 file changed, 535 insertions(+), 1 deletion(-)
diff --git a/ker
st
a matter of using the fields and new synthetic event in the
tracing/events/synthetic directory, as usual:
# echo 'hist:keys=pid,prio:sort=pid,prio' >> \
/sys/kernel/debug/tracing/events/synthetic/wakeup_new_test/trigger
Signed-off-by: Tom Zanussi
Signed-off-by: Rajvi Jing
max) where spaces are more natural e.g. spaces after commas
in param lists.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 37 -
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/trace_events_hist.c b/ke
additional
increment for that as well.
Signed-off-by: Tom Zanussi
---
kernel/trace/ring_buffer.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 763b3fb..8c862ea 100644
--- a/kernel/trace/ring_buffer.c
+++ b
So that users know that inter-event tracing is supported as part of
the HIST_TRIGGERS option, include text to that effect in the help
text.
Signed-off-by: Tom Zanussi
---
kernel/trace/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
- test inter-event histogram trigger onmax action
[PASS]
[7] event trigger - test synthetic event create remove [PASS]
Signed-off-by: Rajvi Jingar
Signed-off-by: Tom Zanussi
---
tools/testing/selftests/ftrace/test.d/functions| 7 +++
.../inter-event/trigger-extended-error
# cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist
ERROR: Couldn't yyy: zzz
Last command: xxx
Also add specific error messages for variable and action errors.
Signed-off-by: Tom Zanussi
---
Documentation/trace/histogram.txt | 20 +
k
The default clock if timestamps are used in a histogram is "global".
If timestamps aren't used, the clock is irrelevant.
Use the "clock=" param only if you want to override the default
"global" clock for a histogram with timestamps.
Signed-off-by: Tom Z
e for the same thing.
Signed-off-by: Tom Zanussi
---
Documentation/trace/histogram.txt | 17 +
kernel/trace/trace_events_hist.c | 28 +++-
2 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/Documentation/trace/histogram.txt
b/Documentation
0 \
prev_prio:120 prev_comm: swapper/0
Totals:
Hits: 3493
Entries: 3
Dropped: 0
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 331 ++-
1 file changed, 296 insertions(+), 35 deletions(-)
diff --git a/k
Allow tracing code outside of trace.c to access tracing_set_clock().
Some applications may require a particular clock in order to function
properly, such as latency calculations.
Also, add an accessor returning the current clock string.
Signed-off-by: Tom Zanussi
---
kernel/trace/trace.c | 2
Add background and details on inter-event hist triggers, including
hist variables, synthetic events, and actions.
Signed-off-by: Tom Zanussi
Signed-off-by: Baohong Liu
---
Documentation/trace/histogram.txt | 382 ++
1 file changed, 382 insertions(+)
diff
/trigger
# echo 'hist:keys=pid:latency=$new_lat:
onmatch(sched.sched_switch).wake2($latency,pid)' >
/sys/kernel/debug/tracing/events/synthetic/wake1/trigger
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 58 +---
1 fi
cient).
Signed-off-by: Tom Zanussi
---
Documentation/trace/ftrace.txt | 24 +
kernel/trace/trace.c | 47 ++
2 files changed, 71 insertions(+)
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index d
condition which might cause duplicates does not go
unnoticed.
Signed-off-by: Vedang Patel
Signed-off-by: Tom Zanussi
---
kernel/trace/trace_events_hist.c | 11 --
kernel/trace/tracing_map.c | 83 +++-
kernel/trace/tracing_map.h | 7
3 files
he threads which failed
cmpxchg() from incrementing idx. This way, they will loop
around and check if the thread which succeeded in executing cmpxchg()
had the same key.
[1] http://lkml.kernel.org/r/cover.1498510759.git.tom.zanu...@linux.intel.com
Signed-off-by: Vedang Patel
Signed-off-by: T
ccess way, for
purposes other than serial event printing.
To set/reset this mode, use tracing_set_timestamp_abs() from the
previous interface patch.
Signed-off-by: Tom Zanussi
---
include/linux/ring_buffer.h | 12 ++---
kernel/trace/ring_buffer.c | 104 --
Add a line for the log2 modifier, to keep it aligned with
tracing/README.
Signed-off-by: Tom Zanussi
---
Documentation/trace/histogram.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/trace/histogram.txt
b/Documentation/trace/histogram.txt
index b2145f4..a4143f04a 100644
see a message to that effect at the bottom of
the file:
# echo 'hist:keys=pid:ts0=$common_timestamp.usecs if comm=="cyclictest"' >>
\
/sys/kernel/debug/tracing/events/sched/sched_waking/trigger
# echo 'hist:keys=pid:ts0=$common_timestamp.use
701 - 800 of 1789 matches
Mail list logo