Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1630515 > unrolled thread

[for-next][PATCH 0/5] selftests: ftrace: Tracing updates to allow instance testing

Started bySteven Rostedt <rostedt@goodmis.org>
First post2017-04-25 15:30 +0200
Last post2017-04-26 15:00 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to allow instance testing Steven Rostedt <rostedt@goodmis.org> - 2017-04-25 15:30 +0200
    [for-next][PATCH 3/5] selftests: ftrace: Have event tests also run in an tracing instance Steven Rostedt <rostedt@goodmis.org> - 2017-04-25 15:30 +0200
    Re: [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to  allow instance testing Masami Hiramatsu <mhiramat@kernel.org> - 2017-04-25 18:10 +0200
    Re: [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to  allow instance testing Namhyung Kim <namhyung@kernel.org> - 2017-04-26 04:10 +0200
      Re: [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to  allow instance testing Steven Rostedt <rostedt@goodmis.org> - 2017-04-26 15:00 +0200

#1630515 — [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to allow instance testing

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-04-25 15:30 +0200
Subject[for-next][PATCH 0/5] selftests: ftrace: Tracing updates to allow instance testing
Message-ID<tA8Hv-5gk-9@gated-at.bofh.it>
  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next

Head SHA1: d6322f6cc483bd512efd3360fa76d0286a5b528b


Steven Rostedt (VMware) (5):
      selftests: ftrace: Allow some tests to be run in a tracing instance
      selftests: ftrace: Make func_event_triggers and func_traceonoff_triggers tests do instances
      selftests: ftrace: Have event tests also run in an tracing instance
      selftests: ftrace: Have some basic tests run in a tracing instance too
      selftests: ftrace: Allow some event trigger tests to run in an instance

----
 tools/testing/selftests/ftrace/ftracetest              | 18 +++++++++++++++++-
 .../testing/selftests/ftrace/test.d/00basic/basic2.tc  |  1 +
 .../testing/selftests/ftrace/test.d/00basic/basic3.tc  |  1 +
 .../selftests/ftrace/test.d/event/event-enable.tc      |  1 +
 .../testing/selftests/ftrace/test.d/event/event-pid.tc |  1 +
 .../selftests/ftrace/test.d/event/subsystem-enable.tc  |  1 +
 .../ftrace/test.d/ftrace/func_event_triggers.tc        |  1 +
 .../ftrace/test.d/ftrace/func_traceonoff_triggers.tc   |  1 +
 .../ftrace/test.d/trigger/trigger-eventonoff.tc        |  1 +
 .../selftests/ftrace/test.d/trigger/trigger-filter.tc  |  1 +
 .../ftrace/test.d/trigger/trigger-hist-mod.tc          |  1 +
 .../selftests/ftrace/test.d/trigger/trigger-hist.tc    |  1 +
 .../ftrace/test.d/trigger/trigger-multihist.tc         |  1 +
 13 files changed, 29 insertions(+), 1 deletion(-)

[toc] | [next] | [standalone]


#1630517 — [for-next][PATCH 3/5] selftests: ftrace: Have event tests also run in an tracing instance

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-04-25 15:30 +0200
Subject[for-next][PATCH 3/5] selftests: ftrace: Have event tests also run in an tracing instance
Message-ID<tA8Hx-5gk-47@gated-at.bofh.it>
In reply to#1630515
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

The ftrace selftests of events: event-enable, event-pid, and
subsystem-enable can all be run inside an instance. Change their tests to do
both a toplevel run an an instance run.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 tools/testing/selftests/ftrace/test.d/event/event-enable.tc     | 1 +
 tools/testing/selftests/ftrace/test.d/event/event-pid.tc        | 1 +
 tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc | 1 +
 3 files changed, 3 insertions(+)

diff --git a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
index 87eb9d6dd4ca..283b45ecb199 100644
--- a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
@@ -1,5 +1,6 @@
 #!/bin/sh
 # description: event tracing - enable/disable with event level files
+# flags: instance
 
 do_reset() {
     echo > set_event
diff --git a/tools/testing/selftests/ftrace/test.d/event/event-pid.tc b/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
index d4ab27b522f8..96c1a95be4f7 100644
--- a/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
@@ -1,5 +1,6 @@
 #!/bin/sh
 # description: event tracing - restricts events based on pid
+# flags: instance
 
 do_reset() {
     echo > set_event
diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
index ced27ef0638f..b8fe2e5b9e67 100644
--- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
@@ -1,5 +1,6 @@
 #!/bin/sh
 # description: event tracing - enable/disable with subsystem level files
+# flags: instance
 
 do_reset() {
     echo > set_event
-- 
2.10.2

[toc] | [prev] | [next] | [standalone]


#1630731 — Re: [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to allow instance testing

FromMasami Hiramatsu <mhiramat@kernel.org>
Date2017-04-25 18:10 +0200
SubjectRe: [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to allow instance testing
Message-ID<tAbcl-6XE-5@gated-at.bofh.it>
In reply to#1630515
On Tue, 25 Apr 2017 09:24:40 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
> for-next
> 
> Head SHA1: d6322f6cc483bd512efd3360fa76d0286a5b528b
> 
> 
> Steven Rostedt (VMware) (5):
>       selftests: ftrace: Allow some tests to be run in a tracing instance
>       selftests: ftrace: Make func_event_triggers and func_traceonoff_triggers tests do instances
>       selftests: ftrace: Have event tests also run in an tracing instance
>       selftests: ftrace: Have some basic tests run in a tracing instance too
>       selftests: ftrace: Allow some event trigger tests to run in an instance
> 
> ----
>  tools/testing/selftests/ftrace/ftracetest              | 18 +++++++++++++++++-
>  .../testing/selftests/ftrace/test.d/00basic/basic2.tc  |  1 +
>  .../testing/selftests/ftrace/test.d/00basic/basic3.tc  |  1 +
>  .../selftests/ftrace/test.d/event/event-enable.tc      |  1 +
>  .../testing/selftests/ftrace/test.d/event/event-pid.tc |  1 +
>  .../selftests/ftrace/test.d/event/subsystem-enable.tc  |  1 +
>  .../ftrace/test.d/ftrace/func_event_triggers.tc        |  1 +
>  .../ftrace/test.d/ftrace/func_traceonoff_triggers.tc   |  1 +
>  .../ftrace/test.d/trigger/trigger-eventonoff.tc        |  1 +
>  .../selftests/ftrace/test.d/trigger/trigger-filter.tc  |  1 +
>  .../ftrace/test.d/trigger/trigger-hist-mod.tc          |  1 +
>  .../selftests/ftrace/test.d/trigger/trigger-hist.tc    |  1 +
>  .../ftrace/test.d/trigger/trigger-multihist.tc         |  1 +
>  13 files changed, 29 insertions(+), 1 deletion(-)

I've reviewed & tested the series. Looks good to me.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

for the series.

Tue Apr 25 16:02:40 UTC 2017
=== Ftrace unit tests ===
[1] Basic trace file check	[PASS]
[2] Basic test for tracers	[PASS]
[3] Basic trace clock test	[PASS]
[4] Basic event tracing check	[PASS]
[5] event tracing - enable/disable with event level files	[PASS]
[6] event tracing - restricts events based on pid	[PASS]
[7] event tracing - enable/disable with subsystem level files	[PASS]
[8] event tracing - enable/disable with top level files	[PASS]
[9] ftrace - function graph filters with stack tracer	[PASS]
[10] ftrace - function graph filters	[PASS]
[11] ftrace - function glob filters	[PASS]
[12] ftrace - function pid filters	[PASS]
[13] ftrace - test for function event triggers	[PASS]
[14] ftrace - function profiler with function tracing	[PASS]
[15] ftrace - test reading of set_ftrace_filter	[PASS]
[16] ftrace - test for function traceon/off triggers	[PASS]
[17] Test creation and deletion of trace instances while setting an event	[PASS]
[18] Test creation and deletion of trace instances	[PASS]
[19] Kprobe dynamic event - adding and removing	[PASS]
[20] Kprobe dynamic event - busy event check	[PASS]
[21] Kprobe dynamic event with arguments	[PASS]
[22] Kprobes event arguments with types	[PASS]
[23] Kprobe dynamic event with function tracer	[PASS]
[24] Kretprobe dynamic event with arguments	[PASS]
[25] Kretprobe dynamic event with maxactive	[PASS]
[26] event trigger - test event enable/disable trigger	[PASS]
[27] event trigger - test trigger filter	[PASS]
[28] event trigger - test histogram modifiers	[PASS]
[29] event trigger - test histogram trigger	[PASS]
[30] event trigger - test multiple histogram triggers	[PASS]
[31] event trigger - test snapshot-trigger	[PASS]
[32] event trigger - test stacktrace-trigger	[PASS]
[33] event trigger - test traceon/off trigger	[PASS]
[34] (instance)  Basic test for tracers	[PASS]
[35] (instance)  Basic trace clock test	[PASS]
[36] (instance)  event tracing - enable/disable with event level files	[PASS]
[37] (instance)  event tracing - restricts events based on pid	[PASS]
[38] (instance)  event tracing - enable/disable with subsystem level files	[PASS]
[39] (instance)  ftrace - test for function event triggers	[PASS]
[40] (instance)  ftrace - test for function traceon/off triggers	[PASS]
[41] (instance)  event trigger - test event enable/disable trigger	[PASS]
[42] (instance)  event trigger - test trigger filter	[PASS]
[43] (instance)  event trigger - test histogram modifiers	[PASS]
[44] (instance)  event trigger - test histogram trigger	[PASS]
[45] (instance)  event trigger - test multiple histogram triggers	[PASS]

# of passed:  45
# of failed:  0
# of unresolved:  0
# of untested:  0
# of unsupported:  0
# of xfailed:  0
# of undefined(test bug):  0

Thank you,

-- 
Masami Hiramatsu <mhiramat@kernel.org>

[toc] | [prev] | [next] | [standalone]


#1631102 — Re: [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to allow instance testing

FromNamhyung Kim <namhyung@kernel.org>
Date2017-04-26 04:10 +0200
SubjectRe: [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to allow instance testing
Message-ID<tAkyZ-4lo-5@gated-at.bofh.it>
In reply to#1630515
Hi Steve,

On Tue, Apr 25, 2017 at 09:24:40AM -0400, Steven Rostedt wrote:
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
> for-next
> 
> Head SHA1: d6322f6cc483bd512efd3360fa76d0286a5b528b
> 
> 
> Steven Rostedt (VMware) (5):
>       selftests: ftrace: Allow some tests to be run in a tracing instance
>       selftests: ftrace: Make func_event_triggers and func_traceonoff_triggers tests do instances
>       selftests: ftrace: Have event tests also run in an tracing instance
>       selftests: ftrace: Have some basic tests run in a tracing instance too
>       selftests: ftrace: Allow some event trigger tests to run in an instance

Acked-by: Namhyung Kim <namhyung@kernel.org>


But I saw a warning during the below test.  I used the for-next branch
but the commit id was different:

c486bbae781cce337a31cbbbc609f2313ab54542 ("Merge branch
'trace/ftrace/core' into trace/ftrace/next").

Thanks,
Namhyung


[2] Basic test for tracers
[  908.674961] 
[  908.675178] ===============================
[  908.675611] [ ERR: suspicious RCU usage.  ]
[  908.675922] 4.11.0-rc5kvm+ #230 Tainted: G        W      
[  908.675922] -------------------------------
[  908.675922] /home/namhyung/project/linux/include/linux/rcupdate.h:842 rcu_read_lock() used illegally while idle!
[  908.675922] 
[  908.675922] other info that might help us debug this:
[  908.675922] 
[  908.675922] 
[  908.675922] RCU used illegally from idle CPU!
[  908.675922] rcu_scheduler_active = 2, debug_locks = 0
[  908.675922] RCU used illegally from extended quiescent state!
[  908.675922] 2 locks held by swapper/0/0:
[  908.675922]  #0:  (max_trace_lock){......}, at: [<ffffffff81143c33>] check_critical_timing+0xa3/0x150
[  908.675922]  #1:  (rcu_read_lock){......}, at: [<ffffffff8111f9b5>] __is_insn_slot_addr+0x5/0x120
[  908.675922] 
[  908.675922] stack backtrace:
[  908.675922] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W       4.11.0-rc5kvm+ #230
[  908.675922] Call Trace:
[  908.675922]  dump_stack+0x68/0x93
[  908.675922]  lockdep_rcu_suspicious+0xe0/0x100
[  908.675922]  ? start_kernel+0x3b7/0x3c4
[  908.675922]  __is_insn_slot_addr+0xe4/0x120
[  908.675922]  ? start_kernel+0x3b7/0x3c4
[  908.675922]  __kernel_text_address+0x69/0xb0
[  908.675922]  ? start_kernel+0x3b7/0x3c4
[  908.675922]  unwind_get_return_address+0x47/0x60
[  908.675922]  __save_stack_trace+0x83/0xd0
[  908.675922]  save_stack_trace+0x1b/0x20
[  908.675922]  __ftrace_trace_stack+0x22e/0x240
[  908.675922]  __trace_stack+0x10/0x20
[  908.675922]  check_critical_timing+0xe9/0x150
[  908.675922]  ? do_idle+0x88/0x120
[  908.675922]  ? default_idle_call+0x23/0x37
[  908.675922]  ? do_idle+0x88/0x120
[  908.675922]  stop_critical_timings+0xcf/0xe0
[  908.675922]  default_idle_call+0x23/0x37
[  908.675922]  do_idle+0x88/0x120
[  908.675922]  cpu_startup_entry+0x1d/0x20
[  908.675922]  rest_init+0x130/0x140
[  908.675922]  start_kernel+0x3b7/0x3c4
[  908.675922]  x86_64_start_reservations+0x2f/0x31
[  908.675922]  x86_64_start_kernel+0x17d/0x190
[  908.675922]  start_cpu+0x14/0x14
[  908.675922]  ? start_cpu+0x14/0x14
	[PASS]

[toc] | [prev] | [next] | [standalone]


#1631443 — Re: [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to allow instance testing

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-04-26 15:00 +0200
SubjectRe: [for-next][PATCH 0/5] selftests: ftrace: Tracing updates to allow instance testing
Message-ID<tAuI2-2oF-11@gated-at.bofh.it>
In reply to#1631102
On Wed, 26 Apr 2017 11:07:52 +0900
Namhyung Kim <namhyung@kernel.org> wrote:

> Hi Steve,
> 
> On Tue, Apr 25, 2017 at 09:24:40AM -0400, Steven Rostedt wrote:
> >   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
> > for-next
> > 
> > Head SHA1: d6322f6cc483bd512efd3360fa76d0286a5b528b
> > 
> > 
> > Steven Rostedt (VMware) (5):
> >       selftests: ftrace: Allow some tests to be run in a tracing instance
> >       selftests: ftrace: Make func_event_triggers and func_traceonoff_triggers tests do instances
> >       selftests: ftrace: Have event tests also run in an tracing instance
> >       selftests: ftrace: Have some basic tests run in a tracing instance too
> >       selftests: ftrace: Allow some event trigger tests to run in an instance  
> 
> Acked-by: Namhyung Kim <namhyung@kernel.org>
> 
> 
> But I saw a warning during the below test.  I used the for-next branch
> but the commit id was different:
> 
> c486bbae781cce337a31cbbbc609f2313ab54542 ("Merge branch
> 'trace/ftrace/core' into trace/ftrace/next").

Yeah, my for-next branch is a merge of urgent and my branch. I don't do
rebases, but this is actually a reset, of a new merge between my two
branches.

> 
> Thanks,
> Namhyung
> 
> 
> [2] Basic test for tracers
> [  908.674961] 
> [  908.675178] ===============================
> [  908.675611] [ ERR: suspicious RCU usage.  ]
> [  908.675922] 4.11.0-rc5kvm+ #230 Tainted: G        W      
> [  908.675922] -------------------------------
> [  908.675922] /home/namhyung/project/linux/include/linux/rcupdate.h:842 rcu_read_lock() used illegally while idle!
> [  908.675922] 
> [  908.675922] other info that might help us debug this:
> [  908.675922] 
> [  908.675922] 
> [  908.675922] RCU used illegally from idle CPU!
> [  908.675922] rcu_scheduler_active = 2, debug_locks = 0
> [  908.675922] RCU used illegally from extended quiescent state!
> [  908.675922] 2 locks held by swapper/0/0:
> [  908.675922]  #0:  (max_trace_lock){......}, at: [<ffffffff81143c33>] check_critical_timing+0xa3/0x150
> [  908.675922]  #1:  (rcu_read_lock){......}, at: [<ffffffff8111f9b5>] __is_insn_slot_addr+0x5/0x120
> [  908.675922] 
> [  908.675922] stack backtrace:
> [  908.675922] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W       4.11.0-rc5kvm+ #230
> [  908.675922] Call Trace:
> [  908.675922]  dump_stack+0x68/0x93
> [  908.675922]  lockdep_rcu_suspicious+0xe0/0x100
> [  908.675922]  ? start_kernel+0x3b7/0x3c4
> [  908.675922]  __is_insn_slot_addr+0xe4/0x120
> [  908.675922]  ? start_kernel+0x3b7/0x3c4
> [  908.675922]  __kernel_text_address+0x69/0xb0
> [  908.675922]  ? start_kernel+0x3b7/0x3c4
> [  908.675922]  unwind_get_return_address+0x47/0x60
> [  908.675922]  __save_stack_trace+0x83/0xd0
> [  908.675922]  save_stack_trace+0x1b/0x20
> [  908.675922]  __ftrace_trace_stack+0x22e/0x240
> [  908.675922]  __trace_stack+0x10/0x20
> [  908.675922]  check_critical_timing+0xe9/0x150

Ah, this is a different issue from the stack tracing one. This is irq
tracing. I wonder if we should have that stop latency tracing when RCU
is not functioning.

-- Steve

> [  908.675922]  ? do_idle+0x88/0x120
> [  908.675922]  ? default_idle_call+0x23/0x37
> [  908.675922]  ? do_idle+0x88/0x120
> [  908.675922]  stop_critical_timings+0xcf/0xe0
> [  908.675922]  default_idle_call+0x23/0x37
> [  908.675922]  do_idle+0x88/0x120
> [  908.675922]  cpu_startup_entry+0x1d/0x20
> [  908.675922]  rest_init+0x130/0x140
> [  908.675922]  start_kernel+0x3b7/0x3c4
> [  908.675922]  x86_64_start_reservations+0x2f/0x31
> [  908.675922]  x86_64_start_kernel+0x17d/0x190
> [  908.675922]  start_cpu+0x14/0x14
> [  908.675922]  ? start_cpu+0x14/0x14
> 	[PASS]

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web