From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: Enable tracing around vfp preemption enable/disable
Date: Mon, 4 Mar 2013 14:43:03 -0800 [thread overview]
Message-ID: <1362436983-28988-3-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <1362436983-28988-1-git-send-email-sboyd@codeaurora.org>
The VFP code enables and disables preemption but doesn't call
into the tracer except for in the VFP bounce code to say that
preemption has been enabled again. Trace the preemption disable
and enable calls made in assembly so that we can accurately
measure how long preemption is disabled while handling VFP
exceptions.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
| 14 ++++++++++++++
1 file changed, 14 insertions(+)
--git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index 130e6a6..75bcb18 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -165,19 +165,33 @@
.macro preempt_enable_no_resched, tsk, cnt
#ifdef CONFIG_PREEMPT_COUNT
+#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER)
+ stmdb sp!, {r0-r3, ip, lr}
+ mov r0, #1
+ bl sub_preempt_count
+ ldmia sp!, {r0-r3, ip, lr}
+#else
get_thread_info \tsk
ldr \cnt, [\tsk, #TI_PREEMPT] @ get preempt count
sub \cnt, \cnt, #1 @ decrement it
str \cnt, [\tsk, #TI_PREEMPT]
#endif
+#endif
.endm
.macro preempt_disable, tsk, cnt
#ifdef CONFIG_PREEMPT_COUNT
+#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER)
+ stmdb sp!, {r0-r3, ip, lr}
+ mov r0, #1
+ bl add_preempt_count
+ ldmia sp!, {r0-r3, ip, lr}
+#else
ldr \cnt, [\tsk, #TI_PREEMPT] @ get preempt count
add \cnt, \cnt, #1 @ increment it
str \cnt, [\tsk, #TI_PREEMPT]
#endif
+#endif
.endm
/*
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
prev parent reply other threads:[~2013-03-04 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 22:43 [PATCH 0/2] Call tracing/debug code in VFP preempt code Stephen Boyd
2013-03-04 22:43 ` [PATCH 1/2] ARM: Consolidate preempt enable/disable assembly into macros Stephen Boyd
2013-03-04 22:43 ` Stephen Boyd [this message]
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=1362436983-28988-3-git-send-email-sboyd@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).