<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/trace/trace_functions_graph.c, branch v5.10-rc3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>tracing: make tracing_init_dentry() returns an integer instead of a d_entry pointer</title>
<updated>2020-09-19T02:17:14+00:00</updated>
<author>
<name>Wei Yang</name>
<email>richard.weiyang@linux.alibaba.com</email>
</author>
<published>2020-07-12T01:10:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=22c36b18263426bdd97ef5e04c0e92224c612ee1'/>
<id>22c36b18263426bdd97ef5e04c0e92224c612ee1</id>
<content type='text'>
Current tracing_init_dentry() return a d_entry pointer, while is not
necessary. This function returns NULL on success or error on failure,
which means there is no valid d_entry pointer return.

Let's return 0 on success and negative value for error.

Link: https://lkml.kernel.org/r/20200712011036.70948-5-richard.weiyang@linux.alibaba.com

Signed-off-by: Wei Yang &lt;richard.weiyang@linux.alibaba.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current tracing_init_dentry() return a d_entry pointer, while is not
necessary. This function returns NULL on success or error on failure,
which means there is no valid d_entry pointer return.

Let's return 0 on success and negative value for error.

Link: https://lkml.kernel.org/r/20200712011036.70948-5-richard.weiyang@linux.alibaba.com

Signed-off-by: Wei Yang &lt;richard.weiyang@linux.alibaba.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ring-buffer: Rename ring_buffer_read() to read_buffer_iter_advance()</title>
<updated>2020-03-19T23:11:19+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2020-03-17T21:32:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bc1a72afdc4a91844928831cac85731566e03bc6'/>
<id>bc1a72afdc4a91844928831cac85731566e03bc6</id>
<content type='text'>
When the ring buffer was first created, the iterator followed the normal
producer/consumer operations where it had both a peek() operation, that just
returned the event at the current location, and a read(), that would return
the event at the current location and also increment the iterator such that
the next peek() or read() will return the next event.

The only use of the ring_buffer_read() is currently to move the iterator to
the next location and nothing now actually reads the event it returns.
Rename this function to its actual use case to ring_buffer_iter_advance(),
which also adds the "iter" part to the name, which is more meaningful. As
the timestamp returned by ring_buffer_read() was never used, there's no
reason that this new version should bother having returning it. It will also
become a void function.

Link: http://lkml.kernel.org/r/20200317213416.018928618@goodmis.org

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the ring buffer was first created, the iterator followed the normal
producer/consumer operations where it had both a peek() operation, that just
returned the event at the current location, and a read(), that would return
the event at the current location and also increment the iterator such that
the next peek() or read() will return the next event.

The only use of the ring_buffer_read() is currently to move the iterator to
the next location and nothing now actually reads the event it returns.
Rename this function to its actual use case to ring_buffer_iter_advance(),
which also adds the "iter" part to the name, which is more meaningful. As
the timestamp returned by ring_buffer_read() was never used, there's no
reason that this new version should bother having returning it. It will also
become a void function.

Link: http://lkml.kernel.org/r/20200317213416.018928618@goodmis.org

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tracing: Make struct ring_buffer less ambiguous</title>
<updated>2020-01-13T18:19:38+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2019-12-13T18:58:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=13292494379f92f532de71b31a54018336adc589'/>
<id>13292494379f92f532de71b31a54018336adc589</id>
<content type='text'>
As there's two struct ring_buffers in the kernel, it causes some confusion.
The other one being the perf ring buffer. It was agreed upon that as neither
of the ring buffers are generic enough to be used globally, they should be
renamed as:

   perf's ring_buffer -&gt; perf_buffer
   ftrace's ring_buffer -&gt; trace_buffer

This implements the changes to the ring buffer that ftrace uses.

Link: https://lore.kernel.org/r/20191213140531.116b3200@gandalf.local.home

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As there's two struct ring_buffers in the kernel, it causes some confusion.
The other one being the perf ring buffer. It was agreed upon that as neither
of the ring buffers are generic enough to be used globally, they should be
renamed as:

   perf's ring_buffer -&gt; perf_buffer
   ftrace's ring_buffer -&gt; trace_buffer

This implements the changes to the ring buffer that ftrace uses.

Link: https://lore.kernel.org/r/20191213140531.116b3200@gandalf.local.home

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tracing: Rename trace_buffer to array_buffer</title>
<updated>2020-01-13T18:19:38+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2020-01-09T23:53:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1c5eb4481e0151d579f738175497f998840f7bbc'/>
<id>1c5eb4481e0151d579f738175497f998840f7bbc</id>
<content type='text'>
As we are working to remove the generic "ring_buffer" name that is used by
both tracing and perf, the ring_buffer name for tracing will be renamed to
trace_buffer, and perf's ring buffer will be renamed to perf_buffer.

As there already exists a trace_buffer that is used by the trace_arrays, it
needs to be first renamed to array_buffer.

Link: https://lore.kernel.org/r/20191213153553.GE20583@krava

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As we are working to remove the generic "ring_buffer" name that is used by
both tracing and perf, the ring_buffer name for tracing will be renamed to
trace_buffer, and perf's ring buffer will be renamed to perf_buffer.

As there already exists a trace_buffer that is used by the trace_arrays, it
needs to be first renamed to array_buffer.

Link: https://lore.kernel.org/r/20191213153553.GE20583@krava

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fgraph: Remove redundant ftrace_graph_notrace_addr() test</title>
<updated>2019-07-31T01:50:03+00:00</updated>
<author>
<name>Changbin Du</name>
<email>changbin.du@gmail.com</email>
</author>
<published>2019-07-30T14:08:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6c77221df96177da0520847ce91e33f539fb8b2d'/>
<id>6c77221df96177da0520847ce91e33f539fb8b2d</id>
<content type='text'>
We already have tested it before. The second one should be removed.
With this change, the performance should have little improvement.

Link: http://lkml.kernel.org/r/20190730140850.7927-1-changbin.du@gmail.com

Cc: stable@vger.kernel.org
Fixes: 9cd2992f2d6c ("fgraph: Have set_graph_notrace only affect function_graph tracer")
Signed-off-by: Changbin Du &lt;changbin.du@gmail.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We already have tested it before. The second one should be removed.
With this change, the performance should have little improvement.

Link: http://lkml.kernel.org/r/20190730140850.7927-1-changbin.du@gmail.com

Cc: stable@vger.kernel.org
Fixes: 9cd2992f2d6c ("fgraph: Have set_graph_notrace only affect function_graph tracer")
Signed-off-by: Changbin Du &lt;changbin.du@gmail.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tracing: Put a margin between flags and duration for wakeup tracers</title>
<updated>2019-02-06T16:56:19+00:00</updated>
<author>
<name>Changbin Du</name>
<email>changbin.du@gmail.com</email>
</author>
<published>2019-01-01T15:46:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=afbab501c66bece057bc30656f71f856cd1b3baa'/>
<id>afbab501c66bece057bc30656f71f856cd1b3baa</id>
<content type='text'>
Don't mix context flags with function duration info.

Instead of this:

 # tracer: wakeup_rt
 #
 # wakeup_rt latency trace v1.1.5 on 5.0.0-rc1-test+
 # --------------------------------------------------------------------
 # latency: 177 us, #545/545, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:8)
 #    -----------------
 #    | task: migration/0-11 (uid:0 nice:0 policy:1 rt_prio:99)
 #    -----------------
 #
 #                                       _-----=&gt; irqs-off
 #                                      / _----=&gt; need-resched
 #                                     | / _---=&gt; hardirq/softirq
 #                                     || / _--=&gt; preempt-depth
 #                                     ||| /
 #   REL TIME      CPU  TASK/PID       ||||  DURATION                  FUNCTION CALLS
 #      |          |     |    |        ||||   |   |                     |   |   |   |
         0 us |   0)    &lt;idle&gt;-0    |  dNh5              |  /*      0:120:R   + [000]    11:  0:R migration/0 */
         2 us |   0)    &lt;idle&gt;-0    |  dNh5  0.000 us    |            (null)();
         4 us |   0)    &lt;idle&gt;-0    |  dNh4              |  _raw_spin_unlock() {
         4 us |   0)    &lt;idle&gt;-0    |  dNh4  0.304 us    |    preempt_count_sub();
         5 us |   0)    &lt;idle&gt;-0    |  dNh3  1.063 us    |  }
         5 us |   0)    &lt;idle&gt;-0    |  dNh3  0.266 us    |  ttwu_stat();
         6 us |   0)    &lt;idle&gt;-0    |  dNh3              |  _raw_spin_unlock_irqrestore() {
         6 us |   0)    &lt;idle&gt;-0    |  dNh3  0.273 us    |    preempt_count_sub();
         6 us |   0)    &lt;idle&gt;-0    |  dNh2  0.818 us    |  }

Show this:

 # tracer: wakeup
 #
 # wakeup latency trace v1.1.5 on 4.20.0+
 # --------------------------------------------------------------------
 # latency: 593 us, #674/674, CPU#0 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
 #    -----------------
 #    | task: kworker/0:1H-339 (uid:0 nice:-20 policy:0 rt_prio:0)
 #    -----------------
 #
 #                                      _-----=&gt; irqs-off
 #                                     / _----=&gt; need-resched
 #                                    | / _---=&gt; hardirq/softirq
 #                                    || / _--=&gt; preempt-depth
 #                                    ||| /
 #  REL TIME      CPU  TASK/PID       ||||     DURATION                  FUNCTION CALLS
 #     |          |     |    |        ||||      |   |                     |   |   |   |
        0 us |   0)    &lt;idle&gt;-0    |  dNs. |               |  /*      0:120:R   + [000]   339:100:R kworker/0:1H */
        3 us |   0)    &lt;idle&gt;-0    |  dNs. |   0.000 us    |            (null)();
       67 us |   0)    &lt;idle&gt;-0    |  dNs. |   0.721 us    |  ttwu_stat();
       69 us |   0)    &lt;idle&gt;-0    |  dNs. |   0.607 us    |  _raw_spin_unlock_irqrestore();
       71 us |   0)    &lt;idle&gt;-0    |  .Ns. |   0.598 us    |  _raw_spin_lock_irq();
       72 us |   0)    &lt;idle&gt;-0    |  .Ns. |   0.584 us    |  _raw_spin_lock_irq();
       73 us |   0)    &lt;idle&gt;-0    |  dNs. | + 11.118 us   |  __next_timer_interrupt();
       75 us |   0)    &lt;idle&gt;-0    |  dNs. |               |  call_timer_fn() {
       76 us |   0)    &lt;idle&gt;-0    |  dNs. |               |    delayed_work_timer_fn() {
       76 us |   0)    &lt;idle&gt;-0    |  dNs. |               |      __queue_work() {
       ...

Link: http://lkml.kernel.org/r/20190101154614.8887-4-changbin.du@gmail.com

Signed-off-by: Changbin Du &lt;changbin.du@gmail.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't mix context flags with function duration info.

Instead of this:

 # tracer: wakeup_rt
 #
 # wakeup_rt latency trace v1.1.5 on 5.0.0-rc1-test+
 # --------------------------------------------------------------------
 # latency: 177 us, #545/545, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:8)
 #    -----------------
 #    | task: migration/0-11 (uid:0 nice:0 policy:1 rt_prio:99)
 #    -----------------
 #
 #                                       _-----=&gt; irqs-off
 #                                      / _----=&gt; need-resched
 #                                     | / _---=&gt; hardirq/softirq
 #                                     || / _--=&gt; preempt-depth
 #                                     ||| /
 #   REL TIME      CPU  TASK/PID       ||||  DURATION                  FUNCTION CALLS
 #      |          |     |    |        ||||   |   |                     |   |   |   |
         0 us |   0)    &lt;idle&gt;-0    |  dNh5              |  /*      0:120:R   + [000]    11:  0:R migration/0 */
         2 us |   0)    &lt;idle&gt;-0    |  dNh5  0.000 us    |            (null)();
         4 us |   0)    &lt;idle&gt;-0    |  dNh4              |  _raw_spin_unlock() {
         4 us |   0)    &lt;idle&gt;-0    |  dNh4  0.304 us    |    preempt_count_sub();
         5 us |   0)    &lt;idle&gt;-0    |  dNh3  1.063 us    |  }
         5 us |   0)    &lt;idle&gt;-0    |  dNh3  0.266 us    |  ttwu_stat();
         6 us |   0)    &lt;idle&gt;-0    |  dNh3              |  _raw_spin_unlock_irqrestore() {
         6 us |   0)    &lt;idle&gt;-0    |  dNh3  0.273 us    |    preempt_count_sub();
         6 us |   0)    &lt;idle&gt;-0    |  dNh2  0.818 us    |  }

Show this:

 # tracer: wakeup
 #
 # wakeup latency trace v1.1.5 on 4.20.0+
 # --------------------------------------------------------------------
 # latency: 593 us, #674/674, CPU#0 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
 #    -----------------
 #    | task: kworker/0:1H-339 (uid:0 nice:-20 policy:0 rt_prio:0)
 #    -----------------
 #
 #                                      _-----=&gt; irqs-off
 #                                     / _----=&gt; need-resched
 #                                    | / _---=&gt; hardirq/softirq
 #                                    || / _--=&gt; preempt-depth
 #                                    ||| /
 #  REL TIME      CPU  TASK/PID       ||||     DURATION                  FUNCTION CALLS
 #     |          |     |    |        ||||      |   |                     |   |   |   |
        0 us |   0)    &lt;idle&gt;-0    |  dNs. |               |  /*      0:120:R   + [000]   339:100:R kworker/0:1H */
        3 us |   0)    &lt;idle&gt;-0    |  dNs. |   0.000 us    |            (null)();
       67 us |   0)    &lt;idle&gt;-0    |  dNs. |   0.721 us    |  ttwu_stat();
       69 us |   0)    &lt;idle&gt;-0    |  dNs. |   0.607 us    |  _raw_spin_unlock_irqrestore();
       71 us |   0)    &lt;idle&gt;-0    |  .Ns. |   0.598 us    |  _raw_spin_lock_irq();
       72 us |   0)    &lt;idle&gt;-0    |  .Ns. |   0.584 us    |  _raw_spin_lock_irq();
       73 us |   0)    &lt;idle&gt;-0    |  dNs. | + 11.118 us   |  __next_timer_interrupt();
       75 us |   0)    &lt;idle&gt;-0    |  dNs. |               |  call_timer_fn() {
       76 us |   0)    &lt;idle&gt;-0    |  dNs. |               |    delayed_work_timer_fn() {
       76 us |   0)    &lt;idle&gt;-0    |  dNs. |               |      __queue_work() {
       ...

Link: http://lkml.kernel.org/r/20190101154614.8887-4-changbin.du@gmail.com

Signed-off-by: Changbin Du &lt;changbin.du@gmail.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>function_graph: Support displaying relative timestamp</title>
<updated>2019-02-06T16:56:18+00:00</updated>
<author>
<name>Changbin Du</name>
<email>changbin.du@gmail.com</email>
</author>
<published>2019-01-01T15:46:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9acd8de69d107537a68d010c9149fa9d9aba91f4'/>
<id>9acd8de69d107537a68d010c9149fa9d9aba91f4</id>
<content type='text'>
When function_graph is used for latency tracers, relative timestamp
is more straightforward than absolute timestamp as function trace
does. This change adds relative timestamp support to function_graph
and applies to latency tracers (wakeup and irqsoff).

Instead of:

 # tracer: irqsoff
 #
 # irqsoff latency trace v1.1.5 on 5.0.0-rc1-test
 # --------------------------------------------------------------------
 # latency: 521 us, #1125/1125, CPU#2 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:8)
 #    -----------------
 #    | task: swapper/2-0 (uid:0 nice:0 policy:0 rt_prio:0)
 #    -----------------
 #  =&gt; started at: __schedule
 #  =&gt; ended at:   _raw_spin_unlock_irq
 #
 #
 #                                       _-----=&gt; irqs-off
 #                                      / _----=&gt; need-resched
 #                                     | / _---=&gt; hardirq/softirq
 #                                     || / _--=&gt; preempt-depth
 #                                     ||| /
 #     TIME        CPU  TASK/PID       ||||  DURATION                  FUNCTION CALLS
 #      |          |     |    |        ||||   |   |                     |   |   |   |
   124.974306 |   2)  systemd-693   |  d..1  0.000 us    |  __schedule();
   124.974307 |   2)  systemd-693   |  d..1              |    rcu_note_context_switch() {
   124.974308 |   2)  systemd-693   |  d..1  0.487 us    |      rcu_preempt_deferred_qs();
   124.974309 |   2)  systemd-693   |  d..1  0.451 us    |      rcu_qs();
   124.974310 |   2)  systemd-693   |  d..1  2.301 us    |    }
[..]
   124.974826 |   2)    &lt;idle&gt;-0    |  d..2              |  finish_task_switch() {
   124.974826 |   2)    &lt;idle&gt;-0    |  d..2              |    _raw_spin_unlock_irq() {
   124.974827 |   2)    &lt;idle&gt;-0    |  d..2  0.000 us    |  _raw_spin_unlock_irq();
   124.974828 |   2)    &lt;idle&gt;-0    |  d..2  0.000 us    |  tracer_hardirqs_on();
   &lt;idle&gt;-0       2d..2  552us : &lt;stack trace&gt;
  =&gt; __schedule
  =&gt; schedule_idle
  =&gt; do_idle
  =&gt; cpu_startup_entry
  =&gt; start_secondary
  =&gt; secondary_startup_64

Show:

 # tracer: irqsoff
 #
 # irqsoff latency trace v1.1.5 on 5.0.0-rc1-test+
 # --------------------------------------------------------------------
 # latency: 511 us, #1053/1053, CPU#7 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:8)
 #    -----------------
 #    | task: swapper/7-0 (uid:0 nice:0 policy:0 rt_prio:0)
 #    -----------------
 #  =&gt; started at: __schedule
 #  =&gt; ended at:   _raw_spin_unlock_irq
 #
 #
 #                                       _-----=&gt; irqs-off
 #                                      / _----=&gt; need-resched
 #                                     | / _---=&gt; hardirq/softirq
 #                                     || / _--=&gt; preempt-depth
 #                                     ||| /
 #   REL TIME      CPU  TASK/PID       ||||  DURATION                  FUNCTION CALLS
 #      |          |     |    |        ||||   |   |                     |   |   |   |
         0 us |   7)   sshd-1704    |  d..1  0.000 us    |  __schedule();
         1 us |   7)   sshd-1704    |  d..1              |    rcu_note_context_switch() {
         1 us |   7)   sshd-1704    |  d..1  0.611 us    |      rcu_preempt_deferred_qs();
         2 us |   7)   sshd-1704    |  d..1  0.484 us    |      rcu_qs();
         3 us |   7)   sshd-1704    |  d..1  2.599 us    |    }
[..]
       509 us |   7)    &lt;idle&gt;-0    |  d..2              |  finish_task_switch() {
       510 us |   7)    &lt;idle&gt;-0    |  d..2              |    _raw_spin_unlock_irq() {
       510 us |   7)    &lt;idle&gt;-0    |  d..2  0.000 us    |  _raw_spin_unlock_irq();
       512 us |   7)    &lt;idle&gt;-0    |  d..2  0.000 us    |  tracer_hardirqs_on();
   &lt;idle&gt;-0       7d..2  543us : &lt;stack trace&gt;
  =&gt; __schedule
  =&gt; schedule_idle
  =&gt; do_idle
  =&gt; cpu_startup_entry
  =&gt; start_secondary
  =&gt; secondary_startup_64

Link: http://lkml.kernel.org/r/20190101154614.8887-2-changbin.du@gmail.com

Signed-off-by: Changbin Du &lt;changbin.du@gmail.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When function_graph is used for latency tracers, relative timestamp
is more straightforward than absolute timestamp as function trace
does. This change adds relative timestamp support to function_graph
and applies to latency tracers (wakeup and irqsoff).

Instead of:

 # tracer: irqsoff
 #
 # irqsoff latency trace v1.1.5 on 5.0.0-rc1-test
 # --------------------------------------------------------------------
 # latency: 521 us, #1125/1125, CPU#2 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:8)
 #    -----------------
 #    | task: swapper/2-0 (uid:0 nice:0 policy:0 rt_prio:0)
 #    -----------------
 #  =&gt; started at: __schedule
 #  =&gt; ended at:   _raw_spin_unlock_irq
 #
 #
 #                                       _-----=&gt; irqs-off
 #                                      / _----=&gt; need-resched
 #                                     | / _---=&gt; hardirq/softirq
 #                                     || / _--=&gt; preempt-depth
 #                                     ||| /
 #     TIME        CPU  TASK/PID       ||||  DURATION                  FUNCTION CALLS
 #      |          |     |    |        ||||   |   |                     |   |   |   |
   124.974306 |   2)  systemd-693   |  d..1  0.000 us    |  __schedule();
   124.974307 |   2)  systemd-693   |  d..1              |    rcu_note_context_switch() {
   124.974308 |   2)  systemd-693   |  d..1  0.487 us    |      rcu_preempt_deferred_qs();
   124.974309 |   2)  systemd-693   |  d..1  0.451 us    |      rcu_qs();
   124.974310 |   2)  systemd-693   |  d..1  2.301 us    |    }
[..]
   124.974826 |   2)    &lt;idle&gt;-0    |  d..2              |  finish_task_switch() {
   124.974826 |   2)    &lt;idle&gt;-0    |  d..2              |    _raw_spin_unlock_irq() {
   124.974827 |   2)    &lt;idle&gt;-0    |  d..2  0.000 us    |  _raw_spin_unlock_irq();
   124.974828 |   2)    &lt;idle&gt;-0    |  d..2  0.000 us    |  tracer_hardirqs_on();
   &lt;idle&gt;-0       2d..2  552us : &lt;stack trace&gt;
  =&gt; __schedule
  =&gt; schedule_idle
  =&gt; do_idle
  =&gt; cpu_startup_entry
  =&gt; start_secondary
  =&gt; secondary_startup_64

Show:

 # tracer: irqsoff
 #
 # irqsoff latency trace v1.1.5 on 5.0.0-rc1-test+
 # --------------------------------------------------------------------
 # latency: 511 us, #1053/1053, CPU#7 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:8)
 #    -----------------
 #    | task: swapper/7-0 (uid:0 nice:0 policy:0 rt_prio:0)
 #    -----------------
 #  =&gt; started at: __schedule
 #  =&gt; ended at:   _raw_spin_unlock_irq
 #
 #
 #                                       _-----=&gt; irqs-off
 #                                      / _----=&gt; need-resched
 #                                     | / _---=&gt; hardirq/softirq
 #                                     || / _--=&gt; preempt-depth
 #                                     ||| /
 #   REL TIME      CPU  TASK/PID       ||||  DURATION                  FUNCTION CALLS
 #      |          |     |    |        ||||   |   |                     |   |   |   |
         0 us |   7)   sshd-1704    |  d..1  0.000 us    |  __schedule();
         1 us |   7)   sshd-1704    |  d..1              |    rcu_note_context_switch() {
         1 us |   7)   sshd-1704    |  d..1  0.611 us    |      rcu_preempt_deferred_qs();
         2 us |   7)   sshd-1704    |  d..1  0.484 us    |      rcu_qs();
         3 us |   7)   sshd-1704    |  d..1  2.599 us    |    }
[..]
       509 us |   7)    &lt;idle&gt;-0    |  d..2              |  finish_task_switch() {
       510 us |   7)    &lt;idle&gt;-0    |  d..2              |    _raw_spin_unlock_irq() {
       510 us |   7)    &lt;idle&gt;-0    |  d..2  0.000 us    |  _raw_spin_unlock_irq();
       512 us |   7)    &lt;idle&gt;-0    |  d..2  0.000 us    |  tracer_hardirqs_on();
   &lt;idle&gt;-0       7d..2  543us : &lt;stack trace&gt;
  =&gt; __schedule
  =&gt; schedule_idle
  =&gt; do_idle
  =&gt; cpu_startup_entry
  =&gt; start_secondary
  =&gt; secondary_startup_64

Link: http://lkml.kernel.org/r/20190101154614.8887-2-changbin.du@gmail.com

Signed-off-by: Changbin Du &lt;changbin.du@gmail.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>function_graph: Move ftrace_graph_ret_addr() to fgraph.c</title>
<updated>2018-12-09T01:54:07+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-11-18T23:36:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=76b42b63ed0d004961097d3a3cd979129d4afd26'/>
<id>76b42b63ed0d004961097d3a3cd979129d4afd26</id>
<content type='text'>
Move the function function_graph_ret_addr() to fgraph.c, as the management
of the curr_ret_stack is going to change, and all the accesses to ret_stack
needs to be done in fgraph.c.

Reviewed-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the function function_graph_ret_addr() to fgraph.c, as the management
of the curr_ret_stack is going to change, and all the accesses to ret_stack
needs to be done in fgraph.c.

Reviewed-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fgraph: Add new fgraph_ops structure to enable function graph hooks</title>
<updated>2018-12-09T01:54:07+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-11-15T19:06:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=688f7089d8851b1a81106f0c0b9b29181b2f2dc8'/>
<id>688f7089d8851b1a81106f0c0b9b29181b2f2dc8</id>
<content type='text'>
Currently the registering of function graph is to pass in a entry and return
function. We need to have a way to associate those functions together where
the entry can determine to run the return hook. Having a structure that
contains both functions will facilitate the process of converting the code
to be able to do such.

This is similar to the way function hooks are enabled (it passes in
ftrace_ops). Instead of passing in the functions to use, a single structure
is passed in to the registering function.

The unregister function is now passed in the fgraph_ops handle. When we
allow more than one callback to the function graph hooks, this will let the
system know which one to remove.

Reviewed-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the registering of function graph is to pass in a entry and return
function. We need to have a way to associate those functions together where
the entry can determine to run the return hook. Having a structure that
contains both functions will facilitate the process of converting the code
to be able to do such.

This is similar to the way function hooks are enabled (it passes in
ftrace_ops). Instead of passing in the functions to use, a single structure
is passed in to the registering function.

The unregister function is now passed in the fgraph_ops handle. When we
allow more than one callback to the function graph hooks, this will let the
system know which one to remove.

Reviewed-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>function_graph: Do not expose the graph_time option when profiler is not configured</title>
<updated>2018-12-09T01:54:06+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-11-23T18:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c8dd0f45874547e6e77bab03d71feb16c4cb98a8'/>
<id>c8dd0f45874547e6e77bab03d71feb16c4cb98a8</id>
<content type='text'>
When the function profiler is not configured, the "graph_time" option is
meaningless, as the function profiler is the only thing that makes use of
it. Do not expose it if the profiler is not configured.

Link: http://lkml.kernel.org/r/20181123061133.GA195223@google.com

Reported-by: Joel Fernandes &lt;joel@joelfernandes.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the function profiler is not configured, the "graph_time" option is
meaningless, as the function profiler is the only thing that makes use of
it. Do not expose it if the profiler is not configured.

Link: http://lkml.kernel.org/r/20181123061133.GA195223@google.com

Reported-by: Joel Fernandes &lt;joel@joelfernandes.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
