Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Issue 2584613002: PATCH (not to be comitted): Support for printing instruction statistics

Created:
4 years ago by kustermann
Modified:
4 years ago
Reviewers:
Target Ref:
refs/heads/master
Visibility:
Public.

Description

PATCH (not to be committed): Support for printing instruction statistics This change adds a --print-instruction-stats flag to the VM which will print out the distribution of RX code size based on type of instruction. The statistics will be sorted and printed like this: ... 1.66 % 43957 bytes 1864 count 23.58 avg bytes/entry - StoreIndexed 1.69 % 44639 bytes 288 count 155.00 avg bytes/entry - <copy parameters> 1.99 % 52616 bytes 15085 count 3.49 avg bytes/entry - TargetEntry 2.45 % 64872 bytes 26897 count 2.41 avg bytes/entry - PushArgument 2.52 % 66550 bytes 2918 count 22.81 avg bytes/entry - CheckedSmiOp 2.62 % 69338 bytes 3780 count 18.34 avg bytes/entry - <frame-entry> 2.81 % 74344 bytes 6886 count 10.80 avg bytes/entry - Goto 3.37 % 89178 bytes 320 count 278.68 avg bytes/entry - <stub-code> 3.38 % 89333 bytes 6701 count 13.33 avg bytes/entry - Branch 3.44 % 90961 bytes 1327 count 68.55 avg bytes/entry - <try-sync-spilling-code> 4.14 % 109423 bytes 4939 count 22.15 avg bytes/entry - Return 4.33 % 114471 bytes 2918 count 39.23 avg bytes/entry - <slow-path:checked-smi> 4.39 % 115981 bytes 36639 count 3.17 avg bytes/entry - ParallelMove 4.63 % 122436 bytes 3222 count 38.00 avg bytes/entry - <checked-entry-prologue> 4.75 % 125730 bytes 2319 count 54.22 avg bytes/entry - <slow-path:checked-smi-compare> 6.70 % 177308 bytes 3863 count 45.90 avg bytes/entry - <slow-path:stack-overflow> 8.99 % 237752 bytes 8696 count 27.34 avg bytes/entry - InstanceCall 9.47 % 250515 bytes 9934 count 25.22 avg bytes/entry - StoreInstanceField -------------------- 0.03 % 680 bytes unaccounted 2.77 % 73237 bytes alignment 5.80 % 153312 bytes instruction object header 91.41 % 2417571 bytes instructions -------------------- 100.00 % 2644800 bytes in total -------------------- 0 return-constant functions 0 return-constant-with-load-field functions 45 wasteful functions (body < 2 * frame overhead) -------------------- -------------------- Emitted 4791 functions --------------------

Patch Set 1 #

Patch Set 2 : Fixed polymorphic call inside try, added more tags for remaining unknown code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+577 lines, -7 lines) Patch
M runtime/vm/clustered_snapshot.cc View 2 chunks +7 lines, -0 lines 0 comments Download
A runtime/vm/code_statistics.h View 1 1 chunk +107 lines, -0 lines 0 comments Download
A runtime/vm/code_statistics.cc View 1 1 chunk +258 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler.h View 4 chunks +20 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 9 chunks +19 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm.cc View 1 5 chunks +11 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 7 chunks +14 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 chunks +5 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 10 chunks +16 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 10 chunks +16 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 1 chunk +13 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/precompiler.cc View 8 chunks +22 lines, -4 lines 0 comments Download
M runtime/vm/raw_object.h View 2 chunks +5 lines, -0 lines 0 comments Download
M runtime/vm/snapshot.h View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/snapshot.cc View 2 chunks +30 lines, -0 lines 0 comments Download
M runtime/vm/stub_code.cc View 4 chunks +29 lines, -0 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (2 generated)
kustermann
Description was changed from ========== PATCH (not to be comitted): Support for printing instruction statistics ...
4 years ago (2016-12-15 15:44:35 UTC) #1
kustermann
4 years ago (2016-12-15 22:48:13 UTC) #2
Description was changed from

==========
PATCH (not to be committed): Support for printing instruction statistics

This change adds a --print-instruction-stats flag to the VM which will print out
the
distribution of RX code size based on type of instruction.


The statistics will be sorted and printed like this:
 ...
 1.93 %   139096 bytes       905 count   153.70 avg bytes/entry    -   
<stub-code>
 1.94 %   139842 bytes     15538 count     9.00 avg bytes/entry    -    Return
 1.97 %   142581 bytes      4924 count    28.96 avg bytes/entry    -   
PolymorphicInstanceCall
 2.22 %   160481 bytes      6174 count    25.99 avg bytes/entry    -   
StoreIndexed
 2.60 %   187603 bytes     21487 count     8.73 avg bytes/entry    -    Goto
 2.95 %   212938 bytes      5595 count    38.06 avg bytes/entry    -   
<slow-path:checked-smi>
 3.05 %   220148 bytes     12063 count    18.25 avg bytes/entry    -   
<frame-entry>
 3.42 %   246597 bytes    101243 count     2.44 avg bytes/entry    -   
PushArgument
 3.45 %   248765 bytes     20491 count    12.14 avg bytes/entry    -    Branch
 4.64 %   335067 bytes    124178 count     2.70 avg bytes/entry    -   
ParallelMove
 6.52 %   471064 bytes     12351 count    38.14 avg bytes/entry    -   
<slow-path:stack-overflow>
 9.59 %   692718 bytes     25399 count    27.27 avg bytes/entry    -   
StoreInstanceField
15.42 %  1113056 bytes     41254 count    26.98 avg bytes/entry    -   
InstanceCall
--------------------
 9.64 %   695864 bytes unaccounted
 3.39 %   244752 bytes alignment
 6.90 %   498080 bytes instruction object header
80.07 %  5780984 bytes instructions
--------------------
100.00 %  7219680 bytes in total
--------------------
    3617 return-constant functions
    3829 return-constant-with-load-field functions
    1248 wasteful functions (body < 2 * frame overhead)
--------------------
--------------------
Emitted 15565 functions
--------------------
==========

to

==========
PATCH (not to be committed): Support for printing instruction statistics

This change adds a --print-instruction-stats flag to the VM which will print out
the
distribution of RX code size based on type of instruction.


The statistics will be sorted and printed like this:
 ...
 1.66 %    43957 bytes      1864 count    23.58 avg bytes/entry    -   
StoreIndexed
 1.69 %    44639 bytes       288 count   155.00 avg bytes/entry    -    <copy
parameters>
 1.99 %    52616 bytes     15085 count     3.49 avg bytes/entry    -   
TargetEntry
 2.45 %    64872 bytes     26897 count     2.41 avg bytes/entry    -   
PushArgument
 2.52 %    66550 bytes      2918 count    22.81 avg bytes/entry    -   
CheckedSmiOp
 2.62 %    69338 bytes      3780 count    18.34 avg bytes/entry    -   
<frame-entry>
 2.81 %    74344 bytes      6886 count    10.80 avg bytes/entry    -    Goto
 3.37 %    89178 bytes       320 count   278.68 avg bytes/entry    -   
<stub-code>
 3.38 %    89333 bytes      6701 count    13.33 avg bytes/entry    -    Branch
 3.44 %    90961 bytes      1327 count    68.55 avg bytes/entry    -   
<try-sync-spilling-code>
 4.14 %   109423 bytes      4939 count    22.15 avg bytes/entry    -    Return
 4.33 %   114471 bytes      2918 count    39.23 avg bytes/entry    -   
<slow-path:checked-smi>
 4.39 %   115981 bytes     36639 count     3.17 avg bytes/entry    -   
ParallelMove
 4.63 %   122436 bytes      3222 count    38.00 avg bytes/entry    -   
<checked-entry-prologue>
 4.75 %   125730 bytes      2319 count    54.22 avg bytes/entry    -   
<slow-path:checked-smi-compare>
 6.70 %   177308 bytes      3863 count    45.90 avg bytes/entry    -   
<slow-path:stack-overflow>
 8.99 %   237752 bytes      8696 count    27.34 avg bytes/entry    -   
InstanceCall
 9.47 %   250515 bytes      9934 count    25.22 avg bytes/entry    -   
StoreInstanceField
--------------------
 0.03 %      680 bytes unaccounted
 2.77 %    73237 bytes alignment
 5.80 %   153312 bytes instruction object header
91.41 %  2417571 bytes instructions
--------------------
100.00 %  2644800 bytes in total
--------------------
       0 return-constant functions
       0 return-constant-with-load-field functions
      45 wasteful functions (body < 2 * frame overhead)
--------------------
--------------------
Emitted 4791 functions
--------------------
==========

Powered by Google App Engine
This is Rietveld 408576698