From: Jason Wessel <jason.wessel@windriver.com>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
kgdb-bugreport@lists.sourceforge.net,
Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH 7/8] debug_core: Turn off tracing while in the debugger
Date: Mon, 22 Mar 2010 14:17:28 -0500 [thread overview]
Message-ID: <1269285449-1424-8-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1269285449-1424-7-git-send-email-jason.wessel@windriver.com>
The kernel debugger should turn off kernel tracing any time the
debugger is active and restore it on resume.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/debug/debug_core.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index f471268..ab2a43f 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -449,6 +449,7 @@ static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs)
int sstep_tries = 100;
int error = 0;
int i, cpu;
+ int trace_on = 0;
acquirelock:
/*
* Interrupts will be restored by the 'trap return' code, except when
@@ -483,6 +484,8 @@ return_normal:
*/
if (arch_kgdb_ops.correct_hw_break)
arch_kgdb_ops.correct_hw_break();
+ if (trace_on)
+ tracing_on();
atomic_dec(&cpu_in_kgdb[cpu]);
touch_softlockup_watchdog_sync();
clocksource_touch_watchdog();
@@ -558,6 +561,9 @@ return_normal:
kgdb_single_step = 0;
kgdb_contthread = current;
exception_level = 0;
+ trace_on = tracing_is_on();
+ if (trace_on)
+ tracing_off();
/* Talk to debugger with gdbserial protocol */
error = gdb_serial_stub(ks);
@@ -589,6 +595,8 @@ kgdb_restore:
else
kgdb_sstep_pid = 0;
}
+ if (trace_on)
+ tracing_on();
/* Free kgdb_active */
atomic_set(&kgdb_active, -1);
touch_softlockup_watchdog_sync();
--
1.6.4.rc1
next prev parent reply other threads:[~2010-03-22 19:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 19:17 [GIT PULL] kgdb fixes for 2.6.34-rc2 Jason Wessel
2010-03-22 19:17 ` [PATCH 1/8] Move kernel/kgdb.c to kernel/debug/debug_core.c Jason Wessel
2010-03-22 19:17 ` [PATCH 2/8] Separate the gdbstub from the debug core Jason Wessel
2010-03-22 19:17 ` [PATCH 3/8] kgdb: eliminate kgdb_wait(), all cpus enter the same way Jason Wessel
2010-03-22 19:17 ` [PATCH 4/8] kgdb: have ebin2mem call probe_kernel_write once Jason Wessel
2010-03-22 19:17 ` [PATCH 5/8] kgdb,debug_core: Use atomic operators which use barriers Jason Wessel
2010-03-22 19:17 ` [PATCH 6/8] kgdbts,sh: Add in breakpoint pc offset for superh Jason Wessel
2010-03-22 19:17 ` Jason Wessel [this message]
2010-03-22 19:17 ` [PATCH 8/8] MAINTAINERS: update kgdb, and debug_core info Jason Wessel
2010-03-29 14:01 ` [GIT PULL] kgdb fixes for 2.6.34-rc2 Jason Wessel
2010-04-01 16:04 ` Linus Torvalds
2010-04-02 18:38 ` Jason Wessel
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=1269285449-1424-8-git-send-email-jason.wessel@windriver.com \
--to=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
Powered by JetHome