1 .TH READPROFILE 1 "January 1995"
4 readprofile - a tool to read kernel profiling information
12 This manpage documents version 1.1 of the program.
21 information to print ascii data on standard output.
23 organized in three columns: the first is the number of clock ticks,
24 the second is the name of the C function in the kernel where those many
25 ticks occurred, and the third is the normalized `load' of the procedure,
26 calculated as a ratio between the number of thicks and the lenght of
27 the procedure. The output is filled with blanks to ease readability.
30 Available command line options are the following:
34 Specify a mapfile, which by default is
35 .B /usr/src/linux/System.map.
38 with kernels in the 1.1.7x series, if the default file can't be opened,
40 .B /usr/src/linux/zSystem.map
42 You should specify the map file on cmdline if your current kernel isn't the
43 last one you compiled. If the name of the map file ends with `.gz' it
44 is decompressed on the fly.
48 Specify a different profiling buffer, which by default is
50 Using a different pro-file is useful if you want to `freeze' the
51 kernel profiling at some time and read it later. The
53 file can be copied using `cat' or `cp'. If the name of the pro-file
54 ends by `.gz' it is decompressed on the fly. The pro-file is such that
56 shrinks it by 50-100 times.
62 only print the profiling step used by the kernel.
63 The profiling step is the resolution of the profiling buffer, and
64 is chosen during kernel configuration (through `make config').
67 (terse) switch is used together with
69 only the decimal number is printed.
73 Print all symbols in the mapfile. By default the procedures with 0 reported
74 ticks are not printed.
78 Reset the profiling buffer. This can only be invoked by root, because
80 is readable by everybody but writable only by the superuser.
84 Terse. This causes the output to be unfilled. It is the format used in the
90 Verbose. The output is organized in four columns and filled with blanks.
91 The first column is the RAM address of a kernel function, the second is
92 the name of the function, the third is the number of clock ticks and the
93 last is the normalized load.
99 print its version number and exit.
102 Browse the profiling buffer ordering by clock ticks:
104 readprofile | sort -nr | less
107 Print the 20 most loaded procedures:
109 readprofile | sort -nr +2 | head -20
112 Print only filesystem profile:
114 readprofile | grep _ext2
117 Look at all the kernel information, with ram addresses"
119 readprofile -av | less
122 Browse a gzipped `freezed' profile buffer for a non current kernel:
124 readprofile -p ~/profile.freeze.gz -m /zImage.map
132 needs a kernel version 1.1.73 or newer, because
138 To enable profiling, the kernel must be reconfigured, recompiled, and
139 rebooted. No profiling module is available, and it wouldn't be easy to
140 build. So this can be construed as a feature.
143 Profiling is disabled when interrupts are inhibited. This means that many
144 profiling ticks happen when interrupts are re-enabled. Watch out for
145 misleading information.
149 Readprofile and /proc/profile are by Alessandro Rubini (rubini@ipvvis.unipv.it)
153 /proc/profile A binary snapshot of the profiling buffer.
154 /usr/src/linux/System.map The symbol table for the kernel.
155 /usr/src/linux/zSystem.map Old name for the symbol table.
157 /usr/src/linux/* The program being profiled :-)