diff --git a/report/report.tex b/report/report.tex index 03e3d93..ef5c672 100644 --- a/report/report.tex +++ b/report/report.tex @@ -55,8 +55,8 @@ Under supervision of Francesco Zappa-Nardelli\\ \subsection*{Source code}\label{ssec:source_code} The source code of all the implementations made during this internship is -available at \url{https://git.tobast.fr/m2-internship/} under free software -licenses, in various repositories. +available at \url{https://git.tobast.fr/m2-internship/}. See +Section~\ref{ssec:code_avail} for details. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -679,6 +679,16 @@ The tentative approach that was chosen to try to get better unwinding speeds at a reasonable space loss was to compile directly the \ehframe{} into native machine code on the x86\_64 platform. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsection{Code availability}\label{ssec:code_avail} + +All the code produced during this internship is available on the various +repositories from \url{https://git.tobast.fr/m2-internship/}. The repositories +contain \texttt{README} files describing them; a summary and global description +can be found in the \texttt{abstract} repository. This should be detailed +enough to run the project. The source code is entirely under free software +licenses. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Compilation: \ehelfs}\label{ssec:ehelfs} @@ -748,6 +758,16 @@ imagine, in a future environment production, packaging \ehelfs{} files separately, so that people interested in heavy computation can have the choice to install them. +This, in particular, means that each ELF file has its unwinding data in a +separate \ehelf{} file --~just like with DWARF, where each ELF retains its own +DWARF data. Thus, an unwinder must first acquire a \emph{memory map}, a table +listing the various ELF files loaded and \emph{mapped} in memory, and on which +memory segment. This memory map is provided by the operating system --~for +instance, on Linux, it is available as a file in \texttt{/proc}. Once this map +is acquired, when unwinding from a given IP, the unwinder must identify the +memory segment from which it comes, deduce the source ELF file, and deduce the +corresponding \ehelf. + \medskip \lstinputlisting[language=C, caption={\ehelf{} for the previous example}, @@ -922,14 +942,13 @@ Interfacing \ehelfs{} with \prog{perf} required, in a first place, to fork turned out necessary to slightly modify \prog{libunwind}'s interface to add a parameter to an initialisation function, since \prog{libunwind} is made to be agnostic of the system and process as much as possible, to be able to unwind in -any context. This very restricted information lacked a \emph{memory map}, a -table indicating which shared object is mapped at which address in memory, in -order to use \ehelfs. Apart from this, the modified version of \prog{libunwind} -produced is entirely compatible with the vanilla version. This means that the -only modifications required to use \ehelfs{} within any project using -\prog{libunwind} should be changing one line of code to add one parameter to a -function call and linking against the modified version of \prog{libunwind} -instead of the system version. +any context. This very restricted information lacked a memory map (see +Section~\ref{ssec:ehelfs}) in order to use \ehelfs. Apart from this, the +modified version of \prog{libunwind} produced is entirely compatible with the +vanilla version. This means that the only modifications required to use +\ehelfs{} within any project using \prog{libunwind} should be changing one line +of code to add one parameter to a function call and linking against the +modified version of \prog{libunwind} instead of the system version. Once this was done, plugging it in \prog{perf} was the matter of a few lines of code only, left apart the benchmarking code. The major problem encountered was @@ -1212,8 +1231,9 @@ some unsupported instruction at all. \hfill \begin{minipage}{0.7\textwidth} \begin{flushright} \itshape{} \small{} - Unless otherwise explicitly stated, any image, source code snippet or - table from the present document can be reused freely by anyone. + Unless otherwise explicitly stated, any image from the present document + is distributed under Creative Commons BY-SA license, and any code + snippet is distributed under 3-clause BSD license. \end{flushright} \end{minipage}