2 .\" Japanese Version Copyright (c) 1997 Koso Fukuba
3 .\" all rights reserved.
4 .\" Translated Mon Jan 27 12:00:00 JST 1997
5 .\" by Koso Fukuba <koso@ga2.so-net.or.jp>
7 .\" Translated Tue Sep 02 12:00:00 JST 1997
8 .\" by Koso Fukuba <koso@ga2.so-net.or.jp>
10 .\" Updated Mon Apr 9 20:17:43 JST 2001
11 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
12 .\" Updated & Modified Wed Aug 28 04:34:09 JST 2002 by Yuichi SATO
13 .\" Updated & Modified Sat May 1 17:16:36 JST 2004 by Yuichi SATO
15 .TH READPROFILE 1 "May 1996"
19 .\"O readprofile - a tool to read kernel profiling information
20 readprofile - カーネルのプロファイリング情報を読みだすツール
30 .\"O This manpage documents version 2.0 of the program.
31 このオンラインマニュアルは、バージョン 2.0 のものである。
41 .\"O information to print ascii data on standard output.
47 .\"O organized in three columns: the first is the number of clock ticks,
48 .\"O the second is the name of the C function in the kernel where those many
49 .\"O ticks occurred, and the third is the normalized `load' of the procedure,
50 .\"O calculated as a ratio between the number of ticks and the length of
51 .\"O the procedure. The output is filled with blanks to ease readability.
52 出力される情報は、3 種類の情報から構成されている。
53 最初の項目は、クロックチック (clock tick) である。
54 2 番目は、たくさんの時間を消費しているカーネル内部の C の関数名である。
55 3 番目の項目は、手続きの「負荷」を正規化したもので、
56 関数の長さとクロック数の比率として計算される。
57 これらの項目は、読み取りやすいように空白を入れ、桁を揃えて出力される。
60 .\"O Available command line options are the following:
65 .\"O Specify a mapfile, which by default is
66 .\"O .B /usr/src/linux/System.map.
67 .\"O You should specify the map file on cmdline if your current kernel isn't the
68 .\"O last one you compiled, or if you keep System.map elsewhere. If the name of
69 .\"O the map file ends with `.gz' it is decompressed on the fly.
72 .B /usr/src/linux/System.map
74 現在のカーネルが最後にコンパイルしたものでない場合、
75 または System.map を他の場所に保存している場合は、
76 コマンドライン上でマップファイルを指定する必要がある。
77 マップファイル名の最後が `.gz' となっている場合は、
82 .\"O Specify a different profiling buffer, which by default is
83 .\"O .B /proc/profile.
84 .\"O Using a different pro-file is useful if you want to `freeze' the
85 .\"O kernel profiling at some time and read it later. The
87 .\"O file can be copied using `cat' or `cp'. There is no more support for
88 .\"O compressed profile buffers, like in
89 .\"O .B readprofile-1.1,
90 .\"O because the program needs to know the size of the buffer in advance.
97 プロファイリング情報を読む場合などに有用である。
99 は、`cat' や、`cp' コマンドを使ってコピーすることができる。
100 プログラムがプロファイリングバッファのサイズを
104 圧縮されたプロファイリングバッファはサポートされなくなった。
108 .\"O Info. This makes
110 .\"O only print the profiling step used by the kernel.
111 .\"O The profiling step is the resolution of the profiling buffer, and
112 .\"O is chosen during kernel configuration (through `make config'),
113 .\"O or in the kernel's command line.
116 .\"O (terse) switch is used together with
118 .\"O only the decimal number is printed.
124 プロファイリングステップはプロファイリングバッファの精度であり、
125 (make config を使った) カーネルの設定、
126 またはカーネルのコマンドラインで指定される。
130 と一緒に指定されると、単に 10 進数の数字のみが表示される。
134 .\"O Print all symbols in the mapfile. By default the procedures with 0 reported
135 .\"O ticks are not printed.
136 マップファイル中のすべてのシンボルを表示する。
137 デフォルトでは、使用クロック数が 0 の手続きは出力されない。
141 .\"O Print individual histogram-bin counts.
142 各メモリ領域に対する出現数のカウントを表示する。
146 .\"O Reset the profiling buffer. This can only be invoked by root, because
147 .\"O .B /proc/profile
148 .\"O is readable by everybody but writable only by the superuser. However,
151 .\"O setuid 0, in order to reset the buffer without gaining privileges.
152 プロファイリングバッファの内容を初期化する。
154 は、スーパーユーザーだけが書き込み可能で、
156 このオプションを使用するには、スーパーユーザーの権限が必要となる。
159 を setuid 0 とすることで、特権を持たないユーザーでも
160 プロファイリングバッファの内容を初期化することができる。
164 .\"O On some architectures it is possible to alter the frequency at which
165 .\"O the kernel delivers profiling interrupts to each CPU. This option allows you to
166 .\"O set the frequency, as a multiplier of the system clock frequency, HZ.
167 .\"O This is supported on i386-SMP (2.2 and 2.4 kernel) and also on sparc-SMP
168 .\"O and sparc64-SMP (2.4 kernel). This option also resets the profiling buffer,
169 .\"O and requires superuser privileges.
170 カーネルがプロファイリング割り込みを各 CPU に送る周期を変更できる
173 周期をシステムクロック周波数 HZ の倍数で設定できる。
174 i386-SMP (2.2 と 2.4 カーネル) と
175 sparc64-SMP (2.4 カーネル) でサポートされている。
176 このオプションはプロファイリングバッファの初期化も行うので、
181 .\"O Verbose. The output is organized in four columns and filled with blanks.
182 .\"O The first column is the RAM address of a kernel function, the second is
183 .\"O the name of the function, the third is the number of clock ticks and the
184 .\"O last is the normalized load.
186 出力は 4 つの項目から構成され、それぞれ空白により桁が揃えられる。
187 最初の項目はカーネルの関数の RAM アドレス、
190 最後の項目には正規化された負荷が表示される。
194 .\"O Version. This makes
196 .\"O print its version number and exit.
199 は、現在のバージョン番号を表示した後、終了する。
203 .\"O Browse the profiling buffer ordering by clock ticks:
204 プロファイリングバッファの内容を使用したクロック数の順に表示するには:
206 readprofile | sort -nr | less
209 .\"O Print the 20 most loaded procedures:
210 最もたくさんクロックを使用した関数の上位 20 個を表示するには:
212 readprofile | sort -nr +2 | head -20
215 .\"O Print only filesystem profile:
216 ファイルシステムのプロファイリング情報だけを表示するには:
218 readprofile | grep _ext2
221 .\"O Look at all the kernel information, with ram addresses"
222 すべてのカーネル情報を RAM アドレスと一緒に表示させるには:
224 readprofile -av | less
227 .\"O Browse a `freezed' profile buffer for a non current kernel:
228 現在のカーネルのものではない「凍結された」
229 プロファイリングバッファの内容を表示するには:
231 readprofile -p ~/profile.freeze -m /zImage.map.gz
234 .\"O Request profiling at 2kHz per CPU, and reset the profiling buffer
235 各 CPU に対して 2kHz の周期でプロファイリングを要求し、
236 プロファイリングバッファを初期化するには:
238 sudo readprofile -M 20
247 .\"O only works with an 1.3.x or newer kernel,
249 .\"O .B /proc/profile
250 .\"O changed in the step from 1.2 to 1.3
251 カーネルバージョン 1.2 から 1.3 で
255 は 1.3.x 以降のカーネルでのみ動作する。
258 .\"O This program only works with ELF kernels. The change for a.out kernels
259 .\"O is trivial, and left as an exercise to the a.out user.
260 このプログラムは、ELF カーネルでのみ動作する。
261 a.out カーネルへの変更は大きな作業ではない。
262 a.out カーネルユーザーへの練習問題として残してある。
265 .\"O To enable profiling, the kernel must be rebooted, because no profiling module
266 .\"O is available, and it wouldn't be easy to build. To enable profiling,
267 .\"O you can specify "profile=2" (or another number) on the kernel commandline.
268 .\"O The number you specify is the two-exponent used as profiling step.
270 カーネルの (再構築と) リブートが必要である。
271 これはプロファイリング用のモジュールは存在せず、
273 プロファイリングを有効にするには、カーネルのコマンドライン上で、
274 "profile=2" (または、別の数字) を指定する必要がある。
275 この数字を指数として 2 を累乗したものが、
276 プロファイリングステップとして使用される。
279 .\"O Profiling is disabled when interrupts are inhibited. This means that many
280 .\"O profiling ticks happen when interrupts are re-enabled. Watch out for
281 .\"O misleading information.
282 プロファイリングは、割り込みが禁止されていると使用できない。
284 多くのプロファイリングのカウントが行われることを意味する。
290 .\"O /proc/profile A binary snapshot of the profiling buffer.
291 .\"O /usr/src/linux/System.map The symbol table for the kernel.
292 .\"O /usr/src/linux/* The program being profiled :-)
293 /proc/profile プロファイリングバッファのバイナリスナップショット
294 /usr/src/linux/System.map カーネルのシンボルテーブル
295 /usr/src/linux/* プロファイルされるプログラム :-)