Unix-commands-dprofpp
dprofpp-Unix、Linuxコマンド
link:/unix_commands/index [previous] link:/unix_commands/index [next] [[1]] php [AddThis Social Bookmark Button]
NAME
概要
*-a-z-l-v-U-d-s-r-u-q-F-I | -E-O cnt-A-R-S-gサブルーチン-G-P-f*
dprofpp -T [ -F ] [* -gサブルーチン*] [プロファイル]
dprofpp -t [ -F ] [* -gサブルーチン*] [プロファイル]
dprofpp -G <regexp> [ -P ] [プロファイル]
dprofpp -p script [ -Q ] [その他のオプション]
dprofpp -V [プロファイル]
説明
dprofpptmon.out
- Perlスクリプトをプロファイルするには、*-d *スイッチを指定してperlインタープリターを実行します。 したがって、スクリプト_test.pl_をDevel
- DProfでプロファイルするには、次を使用します。
++
$ perl5 -d:DProf test.pl |
次に、dprofppを実行してプロファイルを分析します。 dprofppの出力は、プログラムのフラグと使用しているPerlのバージョンによって異なります。
++
$ dprofpp -u Total Elapsed Time = 1.67 Seconds User Time = 0.61 Seconds Exclusive Times %Time Seconds #Calls sec/call Name 52.4 0.320 2 0.1600 main::foo 45.9 0.280 200 0.0014 main::bar 0.00 0.000 1 0.0000 DynaLoader::import 0.00 0.000 1 0.0000 main::baz |
dprofppツールは、プロファイルデータを分析する前にプロファイラーを実行することもできます。 上記の2つのコマンドは、1つのdprofppコマンドで実行できます。
++
$ dprofpp -u -p test.pl |
- 生のプロファイルの説明については、Devel
- DProfのPROFILE FORMATを参照してください。
出力
Tag | Description |
---|---|
%Time | Percentage of time spent in this routine. |
#Calls | Number of calls to this routine. |
sec/call | Average number of seconds per call to this routine. |
Name | Name of routine. |
CumulS | Time (in seconds) spent in this routine and routines called from it. |
ExclSec | Time (in seconds) spent in this routine (not including those called from it). |
Csec/c | Average time (in seconds) spent in each call of this routine (including those called from it). |
オプション
Tag | Description |
---|---|
-a | Sort alphabetically by subroutine names. |
-d | Reverse whatever sort is used |
-A |
Count timing for autoloaded subroutine as timing for
|
-R | Count anonymous subroutines defined in the same package separately. |
-E | (default) Display all subroutine times exclusive of child subroutine times. |
-F | Force the generation of fake exit timestamps if dprofpp reports that the profile is garbled. This is only useful if dprofpp determines that the profile is garbled due to missing exit timestamps. You’re on your own if you do this. Consult the BUGS section. |
-I | Display all subroutine times inclusive of child subroutine times. |
-l | Sort by number of calls to the subroutines. This may help identify candidates for inlining. |
-O cnt | Show only cnt subroutines. The default is 15. |
*-p script * | Tells dprofpp that it should profile the given script and then interpret its profile data. See* -Q*. |
*-Q * | Used with* -p* to tell dprofpp to quit after profiling the script, without interpreting the data. |
-q | Do not display column headers. |
-r | Display elapsed real times rather than user+system times. |
-s | Display system times rather than user+system times. |
-T | Display subroutine call tree to stdout. Subroutine statistics are not displayed. |
-t | Display subroutine call tree to stdout. Subroutine statistics are not displayed. When a function is called multiple consecutive times at the same calling level then it is displayed once with a repeat count. |
-S |
Display merged subroutine call tree to stdout. Statistics are displayed for each branch of the tree. 関数が同じブランチで複数回(_必ずしも連続_ではない)呼び出されると、これらの呼び出しはすべて次のレベルの1つのブランチに入ります。 リピートカウントは、包括的、排他的、子供用の時間を組み合わせて出力されます。 ブランチは包括時間に関してソートされます。 |
-U | Do not sort. Display in the order found in the raw profile. |
-u | Display user times rather than user+system times. |
-V | Print dprofpp’s version number and exit. If a raw profile is found then its XS_VERSION variable will be displayed, too. |
-v | Sort by average time spent in subroutines during each call. This may help identify candidates for inlining. |
-z | (default) Sort by amount of user+system time used. The first few lines should show you which subroutines are using the most time. |
-g subroutine
|
Ignore subroutines except subroutine and whatever is called from it.
|
-G <regexp> |
Aggregate Group all calls matching the pattern together. For example this can be used to group all calls of a set of packages
|
a|
-G "(package1::)|(package2::)|(package3::)"
または名前でサブルーチンをグループ化するには:
[width="100%",cols="100%",] |
a|
-G "getNum"
-P | Used with -G to aggregate Pull together all calls that did not match -G. | -f <regexp> | Filter all calls matching the pattern. | -h | Display brief help and exit. | -H | Display long help and exit. |
環境
*DPROFPP_OPTS-I-E-F*
これはかなり遅れて追加されたため、いくつかの望ましくない副作用があります。 コマンドラインのオプションは、DPROFPP_OPTSのオプションをオーバーライドする必要がありますが、このバージョンではそれを当てにしないでください。
BUGS
_ exit()exec() -F
- Devel
- DProfのバグ、またはプロファイルデータを生成するプロファイラーは、ここに表示されます。 Devel :: DProfのバグを参照してください。
_ <perl5-porters@perl.org> _のperl5-portersメーリングリストにバグレポートと機能リクエストをメールで送信します。 バグレポートには、*-V *オプションの出力を含める必要があります。
ファイル
++
dprofpp - profile processor tmon.out - raw profile |
関連項目
- perl、Devel
- DProf、times(2)link:/unix_commands/index [previous] link:/unix_commands/index [next] link :/cgi-bin/printversion.cgi?tutorial = unix_commands&file = dprofpp [Printer Friendly]
Advertisements |