[bootlin/training-materials updates] master: Boot time: toolchain optimization lab (2e98aba8)

Michael Opdenacker michael.opdenacker at bootlin.com
Tue May 21 07:22:37 CEST 2019


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/2e98aba8dddecf797beb0fe77b6d9945fbb08fc1

>---------------------------------------------------------------

commit 2e98aba8dddecf797beb0fe77b6d9945fbb08fc1
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Tue May 21 07:22:37 2019 +0200

    Boot time: toolchain optimization lab
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


>---------------------------------------------------------------

2e98aba8dddecf797beb0fe77b6d9945fbb08fc1
 .../data/0001-ffmpeg-exit-after-first-frame.patch  |  41 +++
 labs/boot-time-toolchain/boot-time-toolchain.tex   | 145 ++++++++
 mk/boot-time.mk                                    |   2 +
 slides/boot-time-measuring/boot-time-measuring.tex |   1 +
 .../boot-time-references/boot-time-references.tex  |  20 ++
 .../boot-time-toolchain2/boot-time-toolchain2.tex  |  11 +-
 slides/boot-time-toolchain2/using-time-command.svg | 366 +++++++++++++++++++++
 7 files changed, 585 insertions(+), 1 deletion(-)

diff --git a/lab-data/boot-time/rootfs/data/0001-ffmpeg-exit-after-first-frame.patch b/lab-data/boot-time/rootfs/data/0001-ffmpeg-exit-after-first-frame.patch
new file mode 100644
index 00000000..ede40606
--- /dev/null
+++ b/lab-data/boot-time/rootfs/data/0001-ffmpeg-exit-after-first-frame.patch
@@ -0,0 +1,41 @@
+From 2722d61aaa1f2604b3de5bd581b871c6f9d54d7e Mon Sep 17 00:00:00 2001
+From: Michael Opdenacker <michael.opdenacker at bootlin.com>
+Date: Fri, 17 May 2019 19:41:49 +0200
+Subject: [PATCH] ffmpeg - exit after first frame
+
+This writes to the application log and exits after the first frame
+has been decoded and displayed.
+
+Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>
+---
+ fftools/ffmpeg.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
+index 01f04103cf..e2f8785b7a 100644
+--- a/fftools/ffmpeg.c
++++ b/fftools/ffmpeg.c
+@@ -4659,6 +4659,7 @@ static int transcode(void)
+     InputStream *ist;
+     int64_t timer_start;
+     int64_t total_packets_written = 0;
++    static int framecounter=0;
+ 
+     ret = transcode_init();
+     if (ret < 0)
+@@ -4696,6 +4697,12 @@ static int transcode(void)
+         }
+ 
+         /* dump report by using the output first video and audio streams */
++	// Bootlin hack to signal when the first frame has been decoded
++	if (framecounter++==0) {
++		// Log on console and exit
++		av_log(NULL, AV_LOG_INFO, "First frame decoded!\n");
++		exit_program(1);
++	}
+         print_report(0, timer_start, cur_time);
+     }
+ #if HAVE_THREADS
+-- 
+2.17.1
+
diff --git a/labs/boot-time-toolchain/boot-time-toolchain.tex b/labs/boot-time-toolchain/boot-time-toolchain.tex
new file mode 100644
index 00000000..692bc3d8
--- /dev/null
+++ b/labs/boot-time-toolchain/boot-time-toolchain.tex
@@ -0,0 +1,145 @@
+\subchapter{Toolchain optimization}{Get the best cross-compiling
+toolchain for your application and system}
+
+The goal of this lab is to find the best toolchain for your application,
+in terms of performance and code size. Smaller code can be faster to
+load, and save time when using in an initramfs (when the whole
+filesystem is loaded at once in RAM).
+
+In this lab, we will see how to test an alternative toolchain, measuring:
+\begin{itemize}
+ \item Application execution time
+ \item Application and total filesystem size
+\end{itemize}
+
+\section{Measuring application execution time}
+
+At this stage, measuring the total system boot time is not accurate
+enough. We need to time the execution of the application more precisely.
+
+Hence, we will call the \code{ffmpeg} player directly from the command
+line and temporarily apply a patch that will make \code{ffmpeg}
+exit after processing the first frame.
+
+To achieve this:
+\begin{itemize}
+\item Temporarily replace the
+\code{0001-ffmpeg-log-notification-after-first-frame.patch} patch
+by \code{0001-ffmpeg-exit-after-first-frame.patch} found in
+\code{~/boot-time-labs/rootfs/data/}.
+\item Edit the \code{S50playvideo} script to comment out the line
+starting \code{ffmpeg} automatically.
+\end{itemize}
+
+Now, rebuild the root filesystem:
+\begin{verbatim}
+make ffmpeg-dirclean
+make
+\end{verbatim}
+
+Let's measure the total root filesystem size and the size of the
+\code{ffmpeg} executable:
+
+\begin{verbatim}
+ls -l output/images/rootfs.tar
+tar tvf output/images/rootfs.tar ./usr/bin/ffmpeg
+make
+\end{verbatim}
+
+Write these two numbers in the first row of the below table:
+
+\begin{tabular}{| l | l | r |}
+  \hline
+  & Total rootfs size & \code{/usr/bin/ffmpeg} size \\
+  \hline
+  \hline
+  ARM toolchain & & \\
+  \hline
+  Thumb2 toolchain  & & \\
+  \hline
+  Difference (percentage) & & \\
+  \hline
+\end{tabular}
+
+Reflash the root filesystem on the SD card and reboot your board.
+On the serial console, log in and run the video player through the
+\code{time} command (copying and pasting the command from these
+instructions or from the \code{/etc/init.d/S50playvideo} file:
+
+\begin{verbatim}
+time ffmpeg -t 10 -f video4linux2 -video_size 544x288 -input_format mjpeg \
+-i /dev/video0 -pix_fmt rgb565le -f fbdev /dev/fb0
+\end{verbatim}
+
+Write down your first results in the below table (\code{total1},
+\code{user1} and \code{sys1} columns):
+
+\begin{tabular}{| l | l | l | l || l | l | l || l | l | l |}
+  \hline
+  & total1 & user1 & sys1 & total2 & user2 & sys2 & total3 & user3 & sys3 \\
+  \hline
+  \hline
+  ARM toolchain & & & & & & & & & \\
+  \hline
+  Thumb2 toolchain & & & & & & & & & \\
+  \hline
+\end{tabular}
+
+After the first run, the program and its shared libraries are now in the
+file cache. Lets run the command two more times and write down (in the
+\code{2} and \code{3} columns) how fast it can run in this ideal case.
+
+\section{Switching to a Thumb2 toolchain}
+
+Now, let's modify the Buildroot toolchain, so that it generates {\em
+Thumb2} code (instead of {\em ARM}) by default.
+
+Before we switch, let's make a backup of the \code{buildroot} directory,
+in case results are disappointing and we wish to revert the changes without
+having to go through a full build again. In our particular case, we will
+start the next lab using this backup, waiting for the new build to be
+complete.
+
+In case you didn't know, a time and disk space efficient way to do this is by using the
+\code{cp -al} command, which uses hard links instead of making new copies
+of each file:
+
+\begin{verbatim}
+cd ..
+cp -al buildroot buildroot-arm
+\end{verbatim}
+
+You can then check that the files correspond to the same inode:
+\begin{verbatim}
+ls -i buildroot/Makefile buildroot-arm/Makefile
+\end{verbatim}
+
+Back to the \code{buildroot} directory, run \code{make menuconfig}, and
+in \code{Target options}, set \code{ARM instruction set} to
+\code{Thumb2}.
+
+Save the changes and run the full toolchain and root filesystem build
+again:
+
+\begin{verbatim}
+make clean
+make
+\end{verbatim}
+
+This is probably going to run for at least 30 minutes. In the meantime,
+start working on the next lab.
+
+When the build is over:
+\begin{itemize}
+\item Measure the new rootfilesystem archive and \code{ffmpeg}
+executable size, write it down in the table, and compute the difference
+percentages vs. the ARM code.
+\item Update the SD card with the new filesystem, run the same time
+measurements, and write down the results to compare them with the ARM
+ones.
+\end{itemize}
+
+So, was it a good choice to switch to {\em Thumb2}? Where there any size
+and performance benefits?
+
+Don't hesitate to show your results to your instructor.
diff --git a/mk/boot-time.mk b/mk/boot-time.mk
index 753c17b2..c6f06ade 100644
--- a/mk/boot-time.mk
+++ b/mk/boot-time.mk
@@ -24,6 +24,7 @@ BOOT_TIME_SLIDES = \
 		boot-time-kernel \
 		boot-time-bootloader \
 		boot-time-hardware-init \
+		boot-time-references \
 
 BOOT_TIME_LABS = boot-time-goals \
 		setup \
@@ -33,6 +34,7 @@ BOOT_TIME_LABS = boot-time-goals \
 		boot-time-build-bootloader \
 		boot-time-build-kernel-and-start-system \
 		boot-time-software-measurement \
+		boot-time-toolchain \
 		boot-time-application \
 		boot-time-init-scripts \
 		boot-time-kernel \
diff --git a/slides/boot-time-measuring/boot-time-measuring.tex b/slides/boot-time-measuring/boot-time-measuring.tex
index f4df3568..1ea00545 100644
--- a/slides/boot-time-measuring/boot-time-measuring.tex
+++ b/slides/boot-time-measuring/boot-time-measuring.tex
@@ -130,6 +130,7 @@ was received at that time.}
 \frametitle{Dedicated measuring resources}
 Later, we will see specific resources for measuring time
 \begin{itemize}
+  \item \code{time} for measuring application time
   \item \code{strace} for application tracing
   \item \code{bootchartd} for tracing the execution of system services
   \item \code{CONFIG_PRINTK_TIME} and \code{initcall_debug} for
diff --git a/slides/boot-time-references/boot-time-references.tex b/slides/boot-time-references/boot-time-references.tex
new file mode 100644
index 00000000..ebf1b112
--- /dev/null
+++ b/slides/boot-time-references/boot-time-references.tex
@@ -0,0 +1,20 @@
+\section{References}
+
+\begin{frame}
+\frametitle{Conference presentations}
+\begin{itemize}
+\item Andrew Murray - The Right Approach to Minimal Boot Time (2010) \\
+      Video: \url{https://frama.link/nrf696Hy}\\
+      Slides: \url{https://frama.link/uCBH9jQM} \\
+      Great talk about the methodology.
+\item Chris Simmonds - A Pragmatic Guide to Boot-Time Optimization (2017)\\
+      Video: \url{https://youtu.be/gIK1he6Ocpg}\\
+      Slides: \url{https://frama.link/TC0YKM9N}
+\item Jan Altenberg - How to Boot Linux in One Second (2015)\\
+      Video: \url{https://youtu.be/KTRA1PRJWH8}
+      Slides: \url{https://frama.link/bFkvgLFR}
+\item Michael Opdenacker - Embedded Linux size reduction techniques (2017)
+      Video: \url{https://youtu.be/ynNLlzOElOU}
+      Slides: \url{https://frama.link/fS5gQZZq}
+\end{itemize}
+\end{frame}
diff --git a/slides/boot-time-toolchain2/boot-time-toolchain2.tex b/slides/boot-time-toolchain2/boot-time-toolchain2.tex
index 87ccef97..d4dfd407 100644
--- a/slides/boot-time-toolchain2/boot-time-toolchain2.tex
+++ b/slides/boot-time-toolchain2/boot-time-toolchain2.tex
@@ -1,3 +1,11 @@
+\begin{frame}
+\frametitle{Time your commands using the time command}
+\begin{center}
+\includegraphics[height=0.7\textheight]{slides/boot-time-toolchain2/using-time-command.pdf}
+\end{center}
+This gives you the best time that can possibly be achieved (with the fastest storage).
+\end{frame}
+
 \setuplabframe {Trying a Thumb2 toolchain}
 {
 \begin{itemize}
@@ -8,6 +16,7 @@
 \end{itemize}
 }
 
+
 \begin{frame}
 \frametitle{Lessons from labs: ARM vs Thumb2}
 \begin{itemize}
@@ -32,7 +41,7 @@ class)}\\
 
 Tried to replace {\em uClibc} by {\em musl} in our video player lab:
 \begin{itemize}
-   \item musl library size: 680 KB (size of the \code{lib/} \code{tar} archive)
+   \item musl library size: 680 KB (size of the \code{tar} archive for \code{lib/})
    \item uClibc library size: 570 KB
    \item uClibc saves 110 KB (useful), but otherwise no other significant change
     in filesystem and code size. Not a surprise when the system is mostly filled
diff --git a/slides/boot-time-toolchain2/using-time-command.svg b/slides/boot-time-toolchain2/using-time-command.svg
new file mode 100644
index 00000000..c01147c6
--- /dev/null
+++ b/slides/boot-time-toolchain2/using-time-command.svg
@@ -0,0 +1,366 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="334.21622mm"
+   height="186.5276mm"
+   viewBox="0 0 334.21622 186.5276"
+   version="1.1"
+   id="svg8"
+   inkscape:version="0.92.3 (2405546, 2018-03-11)"
+   sodipodi:docname="using-time-command.svg">
+  <defs
+     id="defs2">
+    <marker
+       inkscape:isstock="true"
+       style="overflow:visible"
+       id="marker3024"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="Arrow1Mstart">
+      <path
+         transform="matrix(0.4,0,0,0.4,4,0)"
+         style="fill:#ca0b0b;fill-opacity:1;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1.00000003pt;stroke-opacity:1"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         id="path3022"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart"
+       style="overflow:visible"
+       inkscape:isstock="true"
+       inkscape:collect="always">
+      <path
+         id="path929"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#ca0b0b;fill-opacity:1;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1.00000003pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lstart"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path923"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
+         transform="matrix(0.8,0,0,0.8,10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path926"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart-8"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path929-3"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#ca0b0b;fill-opacity:1;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1.00000003pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart-8-0"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path929-3-7"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#ca0b0b;fill-opacity:1;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1.00000003pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart-1"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path929-7"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#ca0b0b;fill-opacity:1;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1.00000003pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart-6"
+       style="overflow:visible"
+       inkscape:isstock="true"
+       inkscape:collect="always">
+      <path
+         inkscape:connector-curvature="0"
+         id="path929-5"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#ca0b0b;fill-opacity:1;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1.00000003pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.88150131"
+     inkscape:cx="367.77054"
+     inkscape:cy="380.24451"
+     inkscape:document-units="mm"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     fit-margin-top="10"
+     fit-margin-left="10"
+     fit-margin-right="10"
+     fit-margin-bottom="10"
+     inkscape:window-width="1853"
+     inkscape:window-height="1025"
+     inkscape:window-x="67"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata5">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-2.7920086,-8.111828)">
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.8194437px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="12.851191"
+       y="42.244045"
+       id="text817"><tspan
+         sodipodi:role="line"
+         id="tspan815"
+         x="12.851191"
+         y="42.244045"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px">> time ffmpeg ...</tspan><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="53.428799"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan831">real	0m 2.06s</tspan><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="64.613548"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan819">user	0m 0.17s</tspan><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="75.798302"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan821">sys	0m 0.26s</tspan><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="86.983055"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan823" /><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="98.007362"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan833" /><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="109.03167"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan843">> time ffmpeg...</tspan><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="120.21642"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan825">real	0m 0.66s</tspan><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="131.40117"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan827">user	0m 0.17s</tspan><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="142.58592"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan829">sys	0m 0.25s</tspan><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="153.77068"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:'Courier 10 Pitch';-inkscape-font-specification:'Courier 10 Pitch, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan835" /><tspan
+         sodipodi:role="line"
+         x="12.851191"
+         y="164.79498"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.81944466px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332px"
+         id="tspan837">real = user + sys + waiting time</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.8194437px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="12.533006"
+       y="24.812538"
+       id="text841"><tspan
+         sodipodi:role="line"
+         id="tspan839"
+         x="12.533006"
+         y="24.812538"
+         style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-opacity:1">First run</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.8194437px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="12.817226"
+       y="95.986916"
+       id="text841-7"><tspan
+         sodipodi:role="line"
+         id="tspan839-4"
+         x="12.817226"
+         y="95.986916"
+         style="fill:#000000;fill-opacity:1;stroke-width:0.26458332px">Second run (program and librairies already in file cache)</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.8194437px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="112.79565"
+       y="64.267433"
+       id="text841-4"><tspan
+         sodipodi:role="line"
+         x="112.79565"
+         y="64.267433"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ca0b0b;fill-opacity:1;stroke-width:0.26458332px"
+         id="tspan881">Time in userspace (running the program and shared libs)</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.8194437px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="112.79565"
+       y="74.701973"
+       id="text841-4-6"
+       inkscape:transform-center-x="6.1471991"
+       inkscape:transform-center-y="-18.708867"><tspan
+         sodipodi:role="line"
+         x="112.79565"
+         y="74.701973"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ca0b0b;fill-opacity:1;stroke-width:0.26458332px"
+         id="tspan881-8">Time in kernel space (accessing files, accessing device data)</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.8194437px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="112.79565"
+       y="53.560822"
+       id="text841-4-4"><tspan
+         sodipodi:role="line"
+         x="112.79565"
+         y="53.560822"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ca0b0b;fill-opacity:1;stroke-width:0.26458332px"
+         id="tspan881-89">Total observed time</tspan></text>
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mstart)"
+       d="m 107.17508,51.646573 c -16.837981,0 -17.10525,0 -17.10525,0 v 0"
+       id="path921"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mstart-8)"
+       d="m 106.5568,62.497183 c -16.837977,0 -17.105246,0 -17.105246,0 v 0"
+       id="path921-7"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mstart-8-0)"
+       d="m 106.5568,73.080523 c -16.837975,0 -17.105244,0 -17.105244,0 v 0"
+       id="path921-7-1"
+       inkscape:connector-curvature="0" />
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.8194437px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="108.51142"
+       y="173.52148"
+       id="text1893"><tspan
+         sodipodi:role="line"
+         id="tspan1891"
+         x="108.51142"
+         y="181.32463"
+         style="stroke-width:0.26458332px" /></text>
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker3024);marker-end:url(#Arrow1Mstart-1)"
+       d="m 87.3134,171.73531 -42.228587,-0.26727 v 0"
+       id="path921-8"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccc" />
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.8194437px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="12.805789"
+       y="183.17181"
+       id="text841-4-4-2"><tspan
+         sodipodi:role="line"
+         x="12.805789"
+         y="183.17181"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ca0b0b;fill-opacity:1;stroke-width:0.26458332px"
+         id="tspan881-89-9">Your program cannot run faster than user + sys (unless you optimize the code)</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.8194437px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="112.78773"
+       y="119.57751"
+       id="text841-4-4-9"><tspan
+         sodipodi:role="line"
+         x="112.78773"
+         y="119.57751"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ca0b0b;fill-opacity:1;stroke-width:0.26458332px"
+         id="tspan881-89-4">Less waiting time!</tspan></text>
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ca0b0b;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mstart-6)"
+       d="m 107.16717,117.66326 c -16.837981,0 -17.10525,0 -17.10525,0 v 0"
+       id="path921-3"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>




More information about the training-materials-updates mailing list