summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Traut <manut@mecka.net>2013-07-10 22:16:06 +0200
committerManuel Traut <manut@mecka.net>2013-07-10 22:16:06 +0200
commitea021d44dc2ccd154bb9ff284787029a71049d21 (patch)
treee46a5175d6215f04c2d2add5bd458e73fc7a8680
parentecb92a716ccbd64e0dd9b647c17d8fcabc0da0e9 (diff)
update kernel-debugging
- add informations about make/menuconfig kernel hacking Signed-off-by: Manuel Traut <manut@mecka.net>
-rw-r--r--kernel-devel/kernel-debugging/pres_kernel-debugging_en.tex86
1 files changed, 86 insertions, 0 deletions
diff --git a/kernel-devel/kernel-debugging/pres_kernel-debugging_en.tex b/kernel-devel/kernel-debugging/pres_kernel-debugging_en.tex
index cc1824f..82dc25b 100644
--- a/kernel-devel/kernel-debugging/pres_kernel-debugging_en.tex
+++ b/kernel-devel/kernel-debugging/pres_kernel-debugging_en.tex
@@ -2,6 +2,73 @@
\title{Kernel-Debugging}
\maketitle
+
+\section{Kernel Configuration}
+\begin{frame}
+\frametitle{Kernel hacking / printk and dmesg options}
+\begin{itemize}
+\item Show timing information on printks
+\item Default message log level (1-7)
+\item Enable dynamic printk() support
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Kernel hacking / Compile-time checks and compiler options}
+\begin{itemize}
+\item Compile the kernel with debug info
+\item Debug Filesystem
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Kernel hacking / Memory Debugging}
+\begin{itemize}
+\item Kernel memory leak detector
+\end{itemize}
+reports leaks in /sys/kernel/debug/kmemleak
+
+see also: Documentation/kmemleak.txt
+\end{frame}
+
+\begin{frame}
+\frametitle{Kernel hacking / Debug Lockups and Hangs}
+\begin{itemize}
+\item Debug Lockups and Hangs
+\begin{description}
+\item[Softlockup] loop in kernel mode
+\item[Hardlockup] CPU loop in kernel mode without letting IRQs run
+\item[Hung task] task is uninterruptible (D state)
+\end{description}
+\end{itemize}
+stack trace is printed on detection
+\end{frame}
+
+\begin{frame}
+\frametitle{Kernel hacking / Lock Debugging}
+\begin{itemize}
+\item RT Mutex debugging, deadlock detection
+\item Lock debugging: prove locking correctness, see Documentation/lockdep-design.txt.
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Kernel hacking / Tracing}
+\begin{itemize}
+\item Kernel Function (Graph) Tracer
+\item Scheduling Latency Tracer
+\item Enable [k/u]probes-based dynamic events
+\item enable/disable function tracing dynamically
+\item Ring buffer benchmark stress tester (!!don't use it!!)
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Kernel hacking}
+\begin{description}
+\item[Remote debugging over FireWire] Documentation/debugging-via-ohci1394.txt
+\end{description}
+\end{frame}
\section{printk}
\begin{frame}[fragile]
\frametitle{printk is your friend!!}
@@ -38,6 +105,25 @@ $ cat /proc/sys/kernel/printk
\end{verbatim}
\end{frame}
+\section{dynamic printk}
+\begin{frame}
+\frametitle{dynamic printk}
+controlled by debugfs: dynamic\_debug/control
+
+format: filename:lineno [module]function flags format
+\begin{description}
+\item[filename] source file of the debug statement
+\item[lineno] line number of the debug statement
+\item[module] module that contains the debug statement
+\item[function] function that contains the debug statement
+\item[flags] '=p' means the line is turned 'on' for printing
+\item[format] the format used for the debug statement
+\end{description}
+Use pr\_debug() and dev\_dbg() in your code.
+
+see also: Documentation/dynamic-debug-howto.txt
+\end{frame}
+
\section{Logging messages}
\begin{frame}[fragile]
\frametitle{Serial Console}