Show Table of Contents
23.2.3. カーネルとユーザースペースのプロファイルの分離
デフォルトでは、カーネルモードとユーザーモードの情報は各イベントで収集されます。特定のカウンターの為にカーネルモードのイベントを無視するように OProfile を設定するには、以下のコマンドを実行します:
~]# opcontrol --event=event-name:sample-rate:unit-mask:0
そのカウンターの為のカーネルモードのプロファイリングを再度スタートするには、以下のコマンドを実行します:
~]# opcontrol --event=event-name:sample-rate:unit-mask:1
特定のカウンターのためにユーザーモードのイベントを無視するように OProfile を設定するには、以下のコマンドを実行します:
~]# opcontrol --event=event-name:sample-rate:unit-mask:kernel:0
そのカウンターのためのユーザーモードのプロファイリングを再度スタートするには、以下のコマンドを実行します:
~]# opcontrol --event=event-name:sample-rate:unit-mask:kernel:1
OProfile デーモンがサンプルファイルに対してプロファイルデータを書き込む際には、カーネルとライブラリプロファイルデータを別々のサンプルファイルに分離することができます。デーモンがサンプルファイルに書き込む方法を設定するには、root として以下のコマンドを実行します:
~]# opcontrol --separate=choice
choice は以下のいずれかです:
none— プロファイルを分離しません (デフォルト)library— ライブラリ用にアプリケーション単位のプロファイルを生成しますkernel— カーネルとカーネルモジュール用にアプリケーション単位のプロファイルを生成しますall— ライブラリ用にアプリケーション単位のプロファイルを、カーネルとカーネルモジュール用にアプリケーション単位のプロファイルを生成します
--separate=library が使用される場合は、サンプルファイルの名前は実行可能ファイルの名前とライブラリの名前を含みます。
注記
これらの設定の変更は OProfile プロファイラーが再起動した時点に反映されます。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.