From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Byungchul Park <byungchul.park@lge.com>,
Jungseok Lee <jungseoklee85@gmail.com>
Subject: [for-next][PATCH 12/14] tracing: Introduce two additional marks for delay
Date: Sat, 29 Aug 2015 11:02:27 -0400 [thread overview]
Message-ID: <20150829150240.168641631@goodmis.org> (raw)
In-Reply-To: 20150829150215.458315917@goodmis.org
[-- Attachment #1: 0012-tracing-Introduce-two-additional-marks-for-delay.patch --]
[-- Type: text/plain, Size: 4357 bytes --]
From: Jungseok Lee <jungseoklee85@gmail.com>
A fine granulity support for delay would be very useful when profiling
VM logics, such as page allocation including page reclaim and memory
compaction with function graph.
Thus, this patch adds two additional marks with two changes.
- An equal sign in mark selection function is removed to align code
behavior with comments and documentation.
- The function graph example related to delay in ftrace.txt is updated
to cover all supported marks.
Link: http://lkml.kernel.org/r/1436626300-1679-3-git-send-email-jungseoklee85@gmail.com
Cc: Byungchul Park <byungchul.park@lge.com>
Signed-off-by: Jungseok Lee <jungseoklee85@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
Documentation/trace/ftrace.txt | 51 +++++++++++++++++++++++++++++++-----------
kernel/trace/trace_output.c | 4 +++-
2 files changed, 41 insertions(+), 14 deletions(-)
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 7ddb1e319f84..072d3c4d5753 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -686,6 +686,8 @@ The above is mostly meaningful for kernel developers.
The marks are determined by the difference between this
current trace and the next trace.
'$' - greater than 1 second
+ '@' - greater than 100 milisecond
+ '*' - greater than 10 milisecond
'#' - greater than 1000 microsecond
'!' - greater than 100 microsecond
'+' - greater than 10 microsecond
@@ -1939,26 +1941,49 @@ want, depending on your needs.
ie:
- 0) | up_write() {
- 0) 0.646 us | _spin_lock_irqsave();
- 0) 0.684 us | _spin_unlock_irqrestore();
- 0) 3.123 us | }
- 0) 0.548 us | fput();
- 0) + 58.628 us | }
+ 3) # 1837.709 us | } /* __switch_to */
+ 3) | finish_task_switch() {
+ 3) 0.313 us | _raw_spin_unlock_irq();
+ 3) 3.177 us | }
+ 3) # 1889.063 us | } /* __schedule */
+ 3) ! 140.417 us | } /* __schedule */
+ 3) # 2034.948 us | } /* schedule */
+ 3) * 33998.59 us | } /* schedule_preempt_disabled */
[...]
- 0) | putname() {
- 0) | kmem_cache_free() {
- 0) 0.518 us | __phys_addr();
- 0) 1.757 us | }
- 0) 2.861 us | }
- 0) ! 115.305 us | }
- 0) ! 116.402 us | }
+ 1) 0.260 us | msecs_to_jiffies();
+ 1) 0.313 us | __rcu_read_unlock();
+ 1) + 61.770 us | }
+ 1) + 64.479 us | }
+ 1) 0.313 us | rcu_bh_qs();
+ 1) 0.313 us | __local_bh_enable();
+ 1) ! 217.240 us | }
+ 1) 0.365 us | idle_cpu();
+ 1) | rcu_irq_exit() {
+ 1) 0.417 us | rcu_eqs_enter_common.isra.47();
+ 1) 3.125 us | }
+ 1) ! 227.812 us | }
+ 1) ! 457.395 us | }
+ 1) @ 119760.2 us | }
+
+ [...]
+
+ 2) | handle_IPI() {
+ 1) 6.979 us | }
+ 2) 0.417 us | scheduler_ipi();
+ 1) 9.791 us | }
+ 1) + 12.917 us | }
+ 2) 3.490 us | }
+ 1) + 15.729 us | }
+ 1) + 18.542 us | }
+ 2) $ 3594274 us | }
+ means that the function exceeded 10 usecs.
! means that the function exceeded 100 usecs.
# means that the function exceeded 1000 usecs.
+ * means that the function exceeded 10 msecs.
+ @ means that the function exceeded 100 msecs.
$ means that the function exceeded 1 sec.
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index dfab253727dc..8e481a84aeea 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -496,6 +496,8 @@ static const struct trace_mark {
char sym;
} mark[] = {
MARK(1000000000ULL , '$'), /* 1 sec */
+ MARK(100000000ULL , '@'), /* 100 msec */
+ MARK(10000000ULL , '*'), /* 10 msec */
MARK(1000000ULL , '#'), /* 1000 usecs */
MARK(100000ULL , '!'), /* 100 usecs */
MARK(10000ULL , '+'), /* 10 usecs */
@@ -508,7 +510,7 @@ char trace_find_mark(unsigned long long d)
int size = ARRAY_SIZE(mark);
for (i = 0; i < size; i++) {
- if (d >= mark[i].val)
+ if (d > mark[i].val)
break;
}
--
2.4.6
next prev parent reply other threads:[~2015-08-29 15:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-29 15:02 [for-next][PATCH 00/14] tracing: Updates for 4.3 Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 01/14] tracing: Prefer kcalloc over kzalloc with multiply Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 02/14] tracing: Fix for non-continuous cpu ids Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 03/14] ftrace: correct the counter increment for trace_buffer data Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 04/14] ring-buffer: Add event descriptor to simplify passing data Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 05/14] ring-buffer: Move the adding of the extended timestamp out of line Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 06/14] ring-buffer: Get timestamp after event is allocated Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 07/14] ring-buffer: Make sure event has enough room for extend and padding Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 08/14] ring-buffer: Reorganize function locations Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 09/14] tracing: Clean up stack tracing and fix fentry updates Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 10/14] ftrace: add tracing_thresh to function profile Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 11/14] ftrace: Fix function_graph duration spacing with 7-digits Steven Rostedt
2015-08-29 15:02 ` Steven Rostedt [this message]
2015-08-29 15:02 ` [for-next][PATCH 13/14] ftrace: Format MCOUNT_ADDR address as type unsigned long Steven Rostedt
2015-08-29 15:02 ` [for-next][PATCH 14/14] tracing: Allow triggers to filter for CPU ids and process names 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=20150829150240.168641631@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=byungchul.park@lge.com \
--cc=jungseoklee85@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox