diff options
Diffstat (limited to 'documentation/profile-manual/profile-manual-usage.xml')
-rw-r--r-- | documentation/profile-manual/profile-manual-usage.xml | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/documentation/profile-manual/profile-manual-usage.xml b/documentation/profile-manual/profile-manual-usage.xml index 9116d5bf71..c1ceb5830a 100644 --- a/documentation/profile-manual/profile-manual-usage.xml +++ b/documentation/profile-manual/profile-manual-usage.xml | |||
@@ -22,7 +22,7 @@ | |||
22 | <para> | 22 | <para> |
23 | Don't let the fact that it's part of the kernel fool you into thinking | 23 | Don't let the fact that it's part of the kernel fool you into thinking |
24 | that it's only for tracing and profiling the kernel - you can indeed | 24 | that it's only for tracing and profiling the kernel - you can indeed |
25 | use it to trace and profile just the kernel , but you can also use it | 25 | use it to trace and profile just the kernel, but you can also use it |
26 | to profile specific applications separately (with or without kernel | 26 | to profile specific applications separately (with or without kernel |
27 | context), and you can also use it to trace and profile the kernel | 27 | context), and you can also use it to trace and profile the kernel |
28 | and all applications on the system simultaneously to gain a system-wide | 28 | and all applications on the system simultaneously to gain a system-wide |
@@ -30,10 +30,10 @@ | |||
30 | </para> | 30 | </para> |
31 | 31 | ||
32 | <para> | 32 | <para> |
33 | In many ways, it aims to be a superset of all the tracing and profiling | 33 | In many ways, perf aims to be a superset of all the tracing and profiling |
34 | tools available in Linux today, including all the other tools covered | 34 | tools available in Linux today, including all the other tools covered |
35 | in this HOWTO. The past couple of years have seen perf subsume a lot | 35 | in this HOWTO. The past couple of years have seen perf subsume a lot |
36 | of the functionality of those other tools, and at the same time those | 36 | of the functionality of those other tools and, at the same time, those |
37 | other tools have removed large portions of their previous functionality | 37 | other tools have removed large portions of their previous functionality |
38 | and replaced it with calls to the equivalent functionality now | 38 | and replaced it with calls to the equivalent functionality now |
39 | implemented by the perf subsystem. Extrapolation suggests that at | 39 | implemented by the perf subsystem. Extrapolation suggests that at |
@@ -126,7 +126,7 @@ | |||
126 | wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink> | 126 | wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink> |
127 | </literallayout> | 127 | </literallayout> |
128 | The quickest and easiest way to get some basic overall data about | 128 | The quickest and easiest way to get some basic overall data about |
129 | what's going on for a particular workload it to profile it using | 129 | what's going on for a particular workload is to profile it using |
130 | 'perf stat'. 'perf stat' basically profiles using a few default | 130 | 'perf stat'. 'perf stat' basically profiles using a few default |
131 | counters and displays the summed counts at the end of the run: | 131 | counters and displays the summed counts at the end of the run: |
132 | <literallayout class='monospaced'> | 132 | <literallayout class='monospaced'> |
@@ -201,7 +201,7 @@ | |||
201 | As our first attempt at profiling this workload, we'll simply | 201 | As our first attempt at profiling this workload, we'll simply |
202 | run 'perf record', handing it the workload we want to profile | 202 | run 'perf record', handing it the workload we want to profile |
203 | (everything after 'perf record' and any perf options we hand | 203 | (everything after 'perf record' and any perf options we hand |
204 | it - here none - will be executedin a new shell). perf collects | 204 | it - here none - will be executed in a new shell). perf collects |
205 | samples until the process exits and records them in a file named | 205 | samples until the process exits and records them in a file named |
206 | 'perf.data' in the current working directory. | 206 | 'perf.data' in the current working directory. |
207 | <literallayout class='monospaced'> | 207 | <literallayout class='monospaced'> |
@@ -241,7 +241,7 @@ | |||
241 | Notice also that the above report shows an entry for 'busybox', | 241 | Notice also that the above report shows an entry for 'busybox', |
242 | which is the executable that implements 'wget' in Yocto, but that | 242 | which is the executable that implements 'wget' in Yocto, but that |
243 | instead of a useful function name in that entry, it displays | 243 | instead of a useful function name in that entry, it displays |
244 | an not-so-friendly hex value instead. The steps below will show | 244 | a not-so-friendly hex value instead. The steps below will show |
245 | how to fix that problem. | 245 | how to fix that problem. |
246 | </para> | 246 | </para> |
247 | 247 | ||
@@ -308,7 +308,7 @@ | |||
308 | </para> | 308 | </para> |
309 | 309 | ||
310 | <para> | 310 | <para> |
311 | Notice also that here there's also a case where the a hex value | 311 | Notice also that here there's also a case where the hex value |
312 | is displayed in the callstack, here in the expanded | 312 | is displayed in the callstack, here in the expanded |
313 | sys_clock_gettime() function. Later we'll see it resolve to a | 313 | sys_clock_gettime() function. Later we'll see it resolve to a |
314 | userspace function call in busybox. | 314 | userspace function call in busybox. |
@@ -367,7 +367,7 @@ | |||
367 | 367 | ||
368 | <para> | 368 | <para> |
369 | To generate the debug info for the packages in the image, we can | 369 | To generate the debug info for the packages in the image, we can |
370 | to add dbg-pkgs to EXTRA_IMAGE_FEATURES in local.conf. For example: | 370 | add dbg-pkgs to EXTRA_IMAGE_FEATURES in local.conf. For example: |
371 | <literallayout class='monospaced'> | 371 | <literallayout class='monospaced'> |
372 | EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs" | 372 | EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs" |
373 | </literallayout> | 373 | </literallayout> |
@@ -462,7 +462,7 @@ | |||
462 | The tracing and profiling infrastructure in Linux has become | 462 | The tracing and profiling infrastructure in Linux has become |
463 | unified in a way that allows us to use the same tool with a | 463 | unified in a way that allows us to use the same tool with a |
464 | completely different set of counters, not just the standard | 464 | completely different set of counters, not just the standard |
465 | hardware counters that traditionally tools have had to restrict | 465 | hardware counters that traditional tools have had to restrict |
466 | themselves to (of course the traditional tools can also make use | 466 | themselves to (of course the traditional tools can also make use |
467 | of the expanded possibilities now available to them, and in some | 467 | of the expanded possibilities now available to them, and in some |
468 | cases have, as mentioned previously). | 468 | cases have, as mentioned previously). |
@@ -828,7 +828,7 @@ | |||
828 | </para> | 828 | </para> |
829 | 829 | ||
830 | <para> | 830 | <para> |
831 | Luckily, there is general-purpose way to handle such needs, | 831 | Luckily, there is a general-purpose way to handle such needs, |
832 | called 'programming languages'. Making programming languages | 832 | called 'programming languages'. Making programming languages |
833 | easily available to apply to such problems given the specific | 833 | easily available to apply to such problems given the specific |
834 | format of data is called a 'programming language binding' for | 834 | format of data is called a 'programming language binding' for |
@@ -925,9 +925,9 @@ | |||
925 | </literallayout> | 925 | </literallayout> |
926 | Each event handler function in the generated code is modified | 926 | Each event handler function in the generated code is modified |
927 | to do this. For convenience, we define a common function called | 927 | to do this. For convenience, we define a common function called |
928 | inc_counts() that each handler calls; inc_counts simply tallies | 928 | inc_counts() that each handler calls; inc_counts() simply tallies |
929 | a count for each event using the 'counts' hash, which is a | 929 | a count for each event using the 'counts' hash, which is a |
930 | specialized has function that does Perl-like autovivification, a | 930 | specialized hash function that does Perl-like autovivification, a |
931 | capability that's extremely useful for kinds of multi-level | 931 | capability that's extremely useful for kinds of multi-level |
932 | aggregation commonly used in processing traces (see perf's | 932 | aggregation commonly used in processing traces (see perf's |
933 | documentation on the Python language binding for details): | 933 | documentation on the Python language binding for details): |