JavaScript is required to for searching.
ナビゲーションリンクをスキップ
印刷ビューの終了
Oracle Solaris Studio 12.2: パフォーマンスアナライザ
search filter icon
search icon

ドキュメントの情報

はじめに

1.  パフォーマンスアナライザの概要

2.  パフォーマンスデータ

3.  パフォーマンスデータの収集

4.  パフォーマンスアナライザツール

5.   er_print コマンド行パフォーマンス解析ツール

er_print の構文

メトリックリスト

関数リストを制御するコマンド

functions

metrics metric_spec

sort metric_spec

fsummary

fsingle function_name [N]

呼び出し元 - 呼び出し先リストを管理するコマンド

callers-callees

csingle function_name [N]

cprepend function-name [N | ADDR]

cappend function-name [N | ADDR]

crmfirst

crmlast

呼び出しツリーリストを制御するコマンド

calltree

リークリストと割り当てリストを管理するコマンド

leaks

allocs

ソースリストと逆アセンブリリストを管理するコマンド

pcs

psummary

lines

lsummary

source|src { filename | function_name } [ N]

disasm|dis { filename | function_name } [ N]

scc com_spec

sthresh value

dcc com_spec

dthresh value

cc com_spec

setpath path_list

addpath path_list

pathmap old-prefix new-prefix

ハードウェアカウンタデータ空間およびメモリーオブジェクトリストを制御するコマンド

data_objects

data_single name [N]

data_layout

memobj mobj_type

mobj_list

mobj_define mobj_type index_exp

インデックスオブジェクトリストを制御するコマンド

indxobj indxobj_type

indxobj_list

indxobj_define indxobj_type index_exp

OpenMP インデックスオブジェクトのコマンド

OMP_preg

OMP_task

スレッドアナライザ対応コマンド

races

rdetail race_id

deadlocks

ddetail deadlock_id

実験、標本、スレッド、および LWP を一覧表示するコマンド

experiment_list

sample_list

lwp_list

thread_list

cpu_list

実験データのフィルタリングを制御するコマンド

フィルタ式の指定

filters filter_exp

フィルタ式のオペランドトークンの一覧表示

describe

フィルタリング用の標本、スレッド、LWP、および CPU の選択

選択リスト

選択用のコマンド

sample_select sample_spec

lwp_select lwp_spec

thread_select thread_spec

cpu_select cpu_spec

ロードオブジェクトの展開と短縮を制御するコマンド

object_list

object_show object1,object2,...

object_hide object1,object2,...

object_api object1,object2,...

objects_default

object_select object1,object2,...

メトリックスを一覧するコマンド

metric_list

cmetric_list

data_metric_list

indx_metric_list

出力を制御するコマンド

outfile { filename | - }

appendfile filename

limit n

name { long | short } [ :{ shared_object_name | no_shared_object_name } ]

viewmode { user| expert | machine }

compare { on | off }

その他の情報を出力するコマンド

header exp_id

ifreq

objects

overview exp_id

statistics exp_id

デフォルト値を設定するコマンド

dmetrics metric_spec

dsort metric_spec

en_desc { on | off | =regexp }

パフォーマンスアナライザにのみデフォルト値を設定するコマンド

tabs tab_spec

rtabs tab_spec

tlmode tl_mode

tldata tl_data

その他のコマンド

procstats

script file

version

quit

help

式の文法

フィルタ式の例

er_print コマンドの例

6.  パフォーマンスアナライザとそのデータについて

7.  注釈付きソースと逆アセンブリデータについて

8.  実験の操作

9.  カーネルプロファイリング

索引

er_print コマンドの例

ここでは、er_print コマンドの使用例を示します。

例 5-8 関数にかかる時間の概要を表示

er_print -functions test.1.er

例 5-9 呼び出し元 - 呼び出し先関係を表示

er_print -callers-callees test.1.er

例 5-10 ホットなソース行を表示

ソース行情報は、コードのコンパイルとリンクで -g が指定されていることを前提にしています。Fortran の関数とルーチンの場合は、関数名の最後に下線を付けてください。関数名のあとの 1 は、myfunction の複数インスタンスを区別するためのものです。

er_print -source  myfunction 1 test.1.er

例 5-11 ユーザー関数スタックから myfunc という名前の関数をフィルタリング

er_print -filters 'FNAME("myfunc") SOME IN USTACK' -functions test.1.er

例 5-12 gprof に似た出力を生成

次の例は、実験から gprof 形式に似た一覧を生成します。出力は er_print.out というファイルで、先頭の 100 個の関数と、関数ごとの属性ユーザー時間でソートされた呼び出し元 - 呼び出し先データの一覧です。

er_print -outfile  er_print.out -metrics e.%user -sort e.user \
-limit 100 -func -callers-callees test.1.er

この例のコマンドを分解して、次の独立した 2 つのコマンドにすることもできます。ただし、大規模な実験またはアプリケーションでは、er_print の呼び出しのたびに、かなりの時間がかかることがありますので注意してください。

er_print -metrics  e.%user -limit 100  -functions test.1.er
er_print -metrics  e.%user -callers-callees test.1.er

例 5-13 コンパイラのコメントのみを表示

このコマンドを使用するためにプログラムを実行する必要はありません。

er_src -myfile.o

例 5-14 時計時間プロファイリングを使用して、関数および呼び出し元と呼び出し先を一覧表示

er_print -metrics  ei.%wall -functions test.1.er
er_print -metrics aei.%wall  -callers-callees test.1.er

例 5-15 er_print コマンドを含むスクリプトを実行

er_print -script myscriptfile test.1.er

myscriptfile スクリプトに er_print コマンドが含まれます。スクリプトファイルの例を次に示します。

## myscriptfile

## Send script output to standard output
outfile -

## Display descriptive information about the experiments
header

## Write out the sample data for all experiments
overview

## Write out execution statistics, aggregated over 
## the current sample set for all experiments
statistics

## List functions
functions

## Display status and names of available load objects
object_list


## Write out annotated disassembly code for systime, 
## to file disasm.out
outfile disasm.out
disasm systime


## Write out annotated source code for synprog.c 
## to file source.out
outfile source.out
source synprog.c

## Terminate processing of the script
quit