Compare commits

...

4 commits

View file

@ -17,6 +17,7 @@
\usepackage{multirow}
\usepackage[many]{tcolorbox}
\usepackage[absolute,overlay]{textpos}
\usetikzlibrary{arrows.meta}
\usepackage{texlib/my_listings}
\usepackage{texlib/specific}
@ -129,7 +130,7 @@
\begin{frame}[fragile]{}
\begin{columns}[c]
\begin{column}{0.65\textwidth}
\begin{lstlisting}[language=gdb, numbers=none, escapechar=|]
\begin{lstlisting}[basicstyle=\tt,language=gdb, numbers=none, escapechar=|]
$ ./a.out
Segmentation fault.
@ -240,22 +241,26 @@ Segmentation fault.
by a \alert{Turing-complete stack machine}!}
\end{itemize}
\pause{}
\only<2->{
\begin{textblock*}{0.90\textwidth}[0.5,0](0.5\paperwidth,0.17\paperheight)%
\begin{tcolorbox}[halign=center, colframe=red, colback=Lavender]
\bf \huge
Complex \,\& \,slow
\end{tcolorbox}
\end{textblock*}
}
\vspace{-5cm}
\begin{tcolorbox}[halign=center, colframe=red, colback=Lavender]
\bf \huge
Complex \,\& \,slow
\end{tcolorbox}
\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}
\only<3->{
\begin{textblock*}{0.90\textwidth}[0.5,0](0.5\paperwidth,0.35\paperheight)%
\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{textblock*}
}
\end{frame}
\newcommand{\LinusMailOne}{
@ -403,7 +408,7 @@ Segmentation fault.
\begin{frame}{How do we actually synthesize?}
\begin{itemize}
\item Upon entering a function, we know (ABI)
\item Upon entering a function, we know
\[ \cfa = \reg{rsp} - 8
\qquad \ra = \cfa + 8 \]
\item The semantics of each instruction specifies \alert{how it changes \cfa}.
@ -435,31 +440,52 @@ Segmentation fault.
\subsection{Compilation ahead-of-time}
\begin{frame}
\begin{itemize}
\item Compiled to \alert{C code}
\item C code then \alert{compiled to native binary} (gcc)
\begin{itemize}
\item[$\leadsto$] gcc optimisations for free
\end{itemize}
\item Compiled as \alert{separate \texttt{.so} files}, called \ehelfs{}
\bigskip{}
\item Morally a \alert{monolithic switch} on IPs
\item Each case contains assembly that computes a \alert{row of the
table}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[shrink]
\lstinputlisting[language=C]{src/fib7/fib7.eh_elf_basic.c}
\vspace{0.5cm}
\begin{tikzpicture}
\begin{scope}[every node/.style={rectangle,thick,draw,scale=0.95}]
\node (dwarf) at (0, 0) {
\lstinputlisting[basicstyle=\tiny\tt,numbers=none,language=]{src/dw_plt_abbr}
};
\pause{}
\vspace{1em}
\begin{center}
The real code is optimised, but boils down to this.
\end{center}
\only<2->{
\node (table) at (0.5\textwidth, -0.23\textheight) {
\tiny\tt
\begin{tabular}{
>{\columncolor{YellowGreen}}l
>{\columncolor{Thistle}}l
l l
>{\columncolor{Apricot}}l}
LOC & CFA & rbx & rbp & ra \\
0084950 & rsp+8 & u & u & c-8 \\
0084952 & rsp+16 & u & u & c-8 \\
0084954 & rsp+24 & u & u & c-8 \\
0084956 & rsp+32 & u & u & c-8 \\
\end{tabular}
};
}
\only<3->{
\node (csrc) at (0, -0.6\textheight) {
\lstinputlisting[basicstyle=\tiny,numbers=none,language=C]{src/fib7/fib7.eh_elf_basic.c}
};
\node (ehelf) at (0.55\textwidth, -0.75\textheight) {
ELF file:
``\ehelf{}''
};
}
\end{scope}
\begin{scope}[>={Stealth[black]},
every node/.style={fill=white,rectangle},
every path/.style={draw=black,very thick}]
\only<2->{\path [->] (dwarf) -| node {runtime} (table);}
\only<3->{
\path [->] (dwarf) edge node {ahead of time} (csrc);
\path [->] (csrc) -| node {gcc, AoT} (ehelf);
}
\end{scope}
\end{tikzpicture}
\end{frame}
@ -505,16 +531,14 @@ Segmentation fault.
\section*{Conclusion}
\setcounter{section}{0}
\begin{frame}
The original article \textbf{Reliable and Fast DWARF-based Stack Unwinding}
contains
\vspace{1em}
\begin{frame}{A lot of things remain to be done!}
\begin{itemize}
\item{} DWARF unwinding tables validation;
\item{} DWARF unwinding tables synthesis;
\item{} DWARF-based unwinding speedup.
\item{} Synthesis + compare = verification of unwinding data!
\item{} Synthesis could be integrated in compilers: support for inline
assembly, fallback, \ldots
\item{} Speedup could be implemented in profilers, debuggers,
\ldots{}
\item{} Probably many more cool things to do!
\end{itemize}
\vspace{1em}