Compare commits
6 commits
2f4d546b20
...
a59dec512e
Author | SHA1 | Date | |
---|---|---|---|
Théophile Bastian | a59dec512e | ||
Théophile Bastian | bf3d847cf6 | ||
Théophile Bastian | 79f6500721 | ||
Théophile Bastian | 9d6d60737b | ||
Théophile Bastian | e943b3d799 | ||
Théophile Bastian | e17dab21e4 |
BIN
img/roundtorvalds.png
Normal file
BIN
img/roundtorvalds.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 110 KiB |
142
slides.tex
142
slides.tex
|
@ -36,10 +36,6 @@
|
|||
\ifthenelse{\theframenumber = 0}
|
||||
{}
|
||||
{\insertframenumber/\inserttotalframenumber}}
|
||||
\newcommand{\sectionline}{
|
||||
\ifthenelse{\thesection = 0}
|
||||
{}
|
||||
{\Roman{section}~-- \insertsection}}
|
||||
|
||||
\newcommand{\cmark}{\color{OliveGreen}\ding{52}}
|
||||
\newcommand{\xmark}{\color{BrickRed}\ding{56}}
|
||||
|
@ -59,6 +55,20 @@
|
|||
sensitive=false,
|
||||
}
|
||||
|
||||
\setbeamertemplate{footline}
|
||||
{
|
||||
\leavevmode%
|
||||
\hbox{%
|
||||
\hskip0.9\paperwidth
|
||||
%\begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
|
||||
% \usebeamerfont{author in head/foot}\insertshortauthor
|
||||
%\end{beamercolorbox}%
|
||||
\begin{beamercolorbox}[center, wd=.1\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
|
||||
\slidecountline{}
|
||||
\end{beamercolorbox}}%
|
||||
\vskip0pt%
|
||||
}
|
||||
|
||||
|
||||
\newcolumntype{b}{X}
|
||||
\newcolumntype{s}{>{\hsize=.43\hsize}X}
|
||||
|
@ -67,7 +77,7 @@
|
|||
{\lstinline[language=C, keepspaces=true, basicstyle=\ttfamily]}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\title[\sectionline] {Reliable and Fast DWARF-based Stack Unwinding}
|
||||
\title[] {Reliable and Fast DWARF-based Stack Unwinding}
|
||||
\author[\slidecountline]{\textbf{Théophile Bastian}\\
|
||||
\textbf{Stephen Kell} \\
|
||||
\textbf{Francesco Zappa Nardelli}}
|
||||
|
@ -142,7 +152,7 @@ Segmentation fault.
|
|||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\subsection{Stack frames and unwinding}
|
||||
|
||||
\begin{frame}{Call stack and registers}
|
||||
\begin{frame}
|
||||
\begin{columns}[c]
|
||||
\begin{column}{0.55\textwidth}
|
||||
\begin{center}
|
||||
|
@ -186,84 +196,63 @@ Segmentation fault.
|
|||
0084a19 & rsp+56 & c-56 & c-48 & c-40 & c-32 & c-24 & c-16 & c-8 \\
|
||||
0084a1d & rsp+48 & c-56 & c-48 & c-40 & c-32 & c-24 & c-16 & c-8 \\
|
||||
0084a1e & rsp+40 & c-56 & c-48 & c-40 & c-32 & c-24 & c-16 & c-8 \\
|
||||
0084a20 & rsp+32 & c-56 & c-48 & c-40 & c-32 & c-24 & c-16 & c-8 \\
|
||||
0084a22 & rsp+24 & c-56 & c-48 & c-40 & c-32 & c-24 & c-16 & c-8 \\
|
||||
0084a24 & rsp+16 & c-56 & c-48 & c-40 & c-32 & c-24 & c-16 & c-8 \\
|
||||
0084a26 & rsp+8 & c-56 & c-48 & c-40 & c-32 & c-24 & c-16 & c-8 \\
|
||||
0084a30 & rsp+64 & c-56 & c-48 & c-40 & c-32 & c-24 & c-16 & c-8 \\
|
||||
\end{tabular}
|
||||
\vspace{1em}
|
||||
|
||||
\pause{}
|
||||
|
||||
\vspace{-3cm}
|
||||
\hfill\includegraphics[height=3cm, angle=45, origin=c]{img/dwarf_logo}
|
||||
\hspace{-1cm}
|
||||
\only<1>{\vspace{19mm}}
|
||||
\begin{columns}
|
||||
\begin{column}{0.50\textwidth}
|
||||
\only<2->{
|
||||
\begin{tcolorbox}[enhanced, halign=center, frame hidden, colback=YellowGreen]
|
||||
\textbf{For each instruction\ldots}\\
|
||||
(identified by its program counter)
|
||||
\end{tcolorbox}
|
||||
}
|
||||
\end{column}
|
||||
\begin{column}{0.50\textwidth}
|
||||
\only<3->{
|
||||
\begin{tcolorbox}[enhanced, halign=center, frame hidden,
|
||||
interior style={right color=Apricot, left color=Thistle}]
|
||||
\textbf{\ldots{}an expression to compute its return address
|
||||
location on the stack}
|
||||
\end{tcolorbox}
|
||||
}
|
||||
\end{column}
|
||||
\end{columns}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}[t, fragile]{The real DWARF}
|
||||
\begin{lstlisting}[numbers=none, language=]
|
||||
00009b30 48 009b34 FDE cie=0000 pc=0084950..0084b37
|
||||
DW_CFA_advance_loc: 2 to 0000000000084952
|
||||
30 24 34 FDE pc=004020..004040
|
||||
DW_CFA_def_cfa_offset: 16
|
||||
DW_CFA_offset: r15 (r15) at cfa-16
|
||||
DW_CFA_advance_loc: 2 to 0000000000084954
|
||||
DW_CFA_advance_loc: 6 to 0000000000004026
|
||||
DW_CFA_def_cfa_offset: 24
|
||||
DW_CFA_offset: r14 (r14) at cfa-24
|
||||
DW_CFA_advance_loc: 2 to 0000000000084956
|
||||
DW_CFA_def_cfa_offset: 32
|
||||
DW_CFA_offset: r13 (r13) at cfa-32
|
||||
DW_CFA_advance_loc: 2 to 0000000000084958
|
||||
DW_CFA_def_cfa_offset: 40
|
||||
DW_CFA_offset: r12 (r12) at cfa-40
|
||||
DW_CFA_advance_loc: 1 to 0000000000084959
|
||||
DW_CFA_advance_loc: 10 to 0000000000004030
|
||||
DW_CFA_def_cfa_expression (DW_OP_breg7 (rsp): 8; DW_OP_breg16 (rip): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit11; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus)
|
||||
[...]
|
||||
\end{lstlisting}
|
||||
|
||||
\begin{itemize}
|
||||
\item[\textbf{$\longrightarrow$}] \textbf{\alert{constructed} on-demand
|
||||
by a \alert{Turing-complete bytecode}!}
|
||||
by a \alert{Turing-complete stack machine}!}
|
||||
\end{itemize}
|
||||
|
||||
\pause{}
|
||||
|
||||
\vspace{-6.5cm}
|
||||
\begin{center}
|
||||
\bf \fontsize{8cm}{1cm}
|
||||
\colorbox{white}{\alert{Complex}} \\
|
||||
\colorbox{white}{\alert{\& slow!}}
|
||||
\end{center}
|
||||
\end{frame}
|
||||
\vspace{-5cm}
|
||||
\begin{tcolorbox}[halign=center, colframe=red, colback=Lavender]
|
||||
\bf \huge
|
||||
Complex \,\& \,slow
|
||||
\end{tcolorbox}
|
||||
|
||||
\begin{frame}{Why does slow matter?}
|
||||
\begin{itemize}
|
||||
|
||||
\item{} After all, we're talking about \alert{debugging procedures} ran
|
||||
by a \alert{human being} (slower than the machine).
|
||||
|
||||
\ldots{}or are we?
|
||||
\end{itemize}
|
||||
|
||||
\pause{}
|
||||
\begin{center}
|
||||
\textbf{\Large{}No!}
|
||||
\end{center}
|
||||
|
||||
\begin{itemize}
|
||||
\pause{}\item{} Pretty much any \alert{program analysis tool}
|
||||
\pause{}\item{} \alert{Profiling} with polling profilers
|
||||
|
||||
\pause{}\item{} \alert{Exception handling} in C++
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\vspace{2em}
|
||||
|
||||
\begin{center}
|
||||
\textbf{\Large{}Debug data is not only for debugging}
|
||||
\end{center}
|
||||
|
||||
\vspace{1em}
|
||||
$\leadsto$ we might want \alert{an alternative time/space trade-off}
|
||||
\pause{}
|
||||
\begin{tcolorbox}[halign=center, colframe=red, colback=Lavender]
|
||||
\huge
|
||||
\textbf{Pervasive:}\\ relied upon by debuggers, profilers, C++
|
||||
exceptions \\
|
||||
\medskip{}
|
||||
\textbf{$\leadsto$ not only for debuggers!}
|
||||
\end{tcolorbox}
|
||||
\end{frame}
|
||||
|
||||
\newcommand{\LinusMailOne}{
|
||||
|
@ -283,8 +272,15 @@ Segmentation fault.
|
|||
\newcommand{\LinusSource}{
|
||||
\hfill ---~Linus Torvalds, 2012
|
||||
}
|
||||
\begin{frame}{A debugging hell: Linux kernel}
|
||||
\LinusMailOne{}
|
||||
\begin{frame}
|
||||
\begin{columns}
|
||||
\begin{column}{0.75\textwidth}
|
||||
\LinusMailOne{}
|
||||
\end{column}
|
||||
\begin{column}{0.25\textwidth}
|
||||
\includegraphics[width=\textwidth]{img/roundtorvalds.png}
|
||||
\end{column}
|
||||
\end{columns}
|
||||
|
||||
\only<1-2>{
|
||||
\vspace{1em}
|
||||
|
@ -324,7 +320,7 @@ Segmentation fault.
|
|||
\end{block}}
|
||||
\newcommand{\tblhl}{\rowcolor{Tan}}
|
||||
|
||||
\begin{frame}{Working on an example}
|
||||
\begin{frame}
|
||||
\newcommand{\firsttblrows}{
|
||||
\tblrowval{\hspace{-2ex}<{\bf foo}>:}{}{\textbf{CFA}}{\textbf{ra}}
|
||||
\rowonly<3>{\tblhl{}} \tblrowval{push}{\%r15}{rsp+8}{c-8}
|
||||
|
@ -422,7 +418,7 @@ Segmentation fault.
|
|||
|
||||
\subsection{Compilation ahead-of-time}
|
||||
|
||||
\begin{frame}{Compilation overview}
|
||||
\begin{frame}
|
||||
\begin{itemize}
|
||||
\item Compiled to \alert{C code}
|
||||
\item C code then \alert{compiled to native binary} (gcc)
|
||||
|
@ -439,7 +435,7 @@ Segmentation fault.
|
|||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\begin{frame}[shrink]{Compilation example: generated C}
|
||||
\begin{frame}[shrink]
|
||||
\lstinputlisting[language=C]{src/fib7/fib7.eh_elf_basic.c}
|
||||
|
||||
\pause{}
|
||||
|
@ -452,7 +448,7 @@ Segmentation fault.
|
|||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\begin{frame}{Mostly plug-and-play: libunwind interface}
|
||||
\begin{frame}
|
||||
\begin{itemize}
|
||||
\item \alert{libunwind}: \textit{de facto} standard library for
|
||||
unwinding
|
||||
|
@ -492,7 +488,7 @@ Segmentation fault.
|
|||
\section*{Conclusion}
|
||||
\setcounter{section}{0}
|
||||
|
||||
\begin{frame}{A fragment of our article}
|
||||
\begin{frame}
|
||||
The original article \textbf{Reliable and Fast DWARF-based Stack Unwinding}
|
||||
contains
|
||||
|
||||
|
|
Loading…
Reference in a new issue