-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boot time slides: mention ltrace too
The description is shared with the embedded Linux course Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- Loading branch information
1 parent
c9befc5
commit edbf945
Showing
7 changed files
with
74 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
\begin{frame} | ||
\frametitle{ltrace} | ||
A tool to trace library calls used by a program and all the signals | ||
it receives | ||
\begin{itemize} | ||
\item Very useful complement to \code{strace}, which shows only system | ||
calls. Library calls include system calls too! | ||
\item Of course, works even if you don't have the sources | ||
\item Allows to filter library calls with regular expressions, or | ||
just by a list of function names. | ||
\item Manual page: \url{https://linux.die.net/man/1/ltrace} | ||
\item Works better with {\em glibc}. \code{ltrace} was broken | ||
with {\em uClibc} and may still be. | ||
\end{itemize} | ||
See \url{https://en.wikipedia.org/wiki/Ltrace} for details | ||
\end{frame} | ||
|
||
\begin{frame}[fragile] | ||
\frametitle{ltrace example output} | ||
\small | ||
\begin{block}{} | ||
\begin{verbatim} | ||
ltrace nedit index.html | ||
sscanf(0x8274af1, 0x8132618, 0x8248640, 0xbfaadfe8, 0) = 1 | ||
sprintf("const 0", "const %d", 0) = 7 | ||
strcmp("startScan", "const 0") = 1 | ||
strcmp("ScanDistance", "const 0") = -1 | ||
strcmp("const 200", "const 0") = 1 | ||
strcmp("$list_dialog_button", "const 0") = -1 | ||
strcmp("$shell_cmd_status", "const 0") = -1 | ||
strcmp("$read_status", "const 0") = -1 | ||
strcmp("$search_end", "const 0") = -1 | ||
strcmp("$string_dialog_button", "const 0") = -1 | ||
strcmp("$rangeset_list", "const 0") = -1 | ||
strcmp("$calltip_ID", "const 0") = -1 | ||
\end{verbatim} | ||
\end{block} | ||
\end{frame} | ||
|
||
\begin{frame}[fragile] | ||
\frametitle{ltrace summary} | ||
Example summary at the end of the ltrace output (\code{-c} option) | ||
\scriptsize | ||
\begin{block}{} | ||
\begin{verbatim} | ||
Process 17019 detached | ||
% time seconds usecs/call calls errors syscall | ||
------ ----------- ----------- --------- --------- ---------------- | ||
100.00 0.000050 50 1 set_thread_area | ||
0.00 0.000000 0 48 read | ||
0.00 0.000000 0 44 write | ||
0.00 0.000000 0 80 63 open | ||
0.00 0.000000 0 19 close | ||
0.00 0.000000 0 1 execve | ||
0.00 0.000000 0 2 2 access | ||
0.00 0.000000 0 3 brk | ||
0.00 0.000000 0 1 munmap | ||
0.00 0.000000 0 1 uname | ||
0.00 0.000000 0 1 mprotect | ||
0.00 0.000000 0 19 mmap2 | ||
0.00 0.000000 0 50 46 stat64 | ||
0.00 0.000000 0 18 fstat64 | ||
------ ----------- ----------- --------- --------- ---------------- | ||
100.00 0.000050 288 111 total | ||
\end{verbatim} | ||
\end{block} | ||
\end{frame} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters