| 
 | 
 | 
 Chromium Code Reviews
 Chromium Code Reviews Issue 
            2159683003:
    [interpreter] Add relative numbers to dispatch report  (Closed)
    
  
    Issue 
            2159683003:
    [interpreter] Add relative numbers to dispatch report  (Closed) 
  | Description[interpreter] Add relative numbers to dispatch report
This adds an additional column with percentages to the output of
bytecode_dispatch_report.py --top-dispatches-for-bytecode.
The percentages always represent the relative number of dispatches to
the target bytecode to all dispatches from the source bytecode.
The additional flag --sort-sources-relative/-r allows sorting the
"Top sources of dispatches to" the given bytecode by this column to more
easily find bytecodes that significantly often dispatch to the target.
BUG=v8:4899
LOG=N
Committed: https://crrev.com/a3f598fc85b274320dd4556b36c6c36087e80bcd
Cr-Commit-Position: refs/heads/master@{#37873}
   Patch Set 1 #
      Total comments: 4
      
     Patch Set 2 : refactor from comments #
      Total comments: 4
      
     Patch Set 3 : don't generate whole table and don't use generator #
 Messages
    Total messages: 18 (8 generated)
     
 Description was changed from ========== [interpreter] Add relative numbers to dispatch report This adds an additional column with percentages to the output of bytecode_dispatch_report.py --top-dispatches-for-bytecode. The percentages always represent the relative number of dispatches to the target bytecode to all dispatches from the source bytecode. The additional flag --sort-sources-relative/-r allows sorting the "Top sources of dispatches to" the given bytecode by this column to more easily find bytecodes that significantly often dispatch to the target. BUG=v8:4899 LOG=N ========== to ========== [interpreter] Add relative numbers to dispatch report This adds an additional column with percentages to the output of bytecode_dispatch_report.py --top-dispatches-for-bytecode. The percentages always represent the relative number of dispatches to the target bytecode to all dispatches from the source bytecode. The additional flag --sort-sources-relative/-r allows sorting the "Top sources of dispatches to" the given bytecode by this column to more easily find bytecodes that significantly often dispatch to the target. BUG=v8:4899 LOG=N ========== 
 klaasb@google.com changed reviewers: + rmcilroy@chromium.org 
 Hi, when trying to find out which bytecodes actually dispatch often to Star, I added a small feature to the dispatch report script. 
 Nice, looks like a useful feature. One suggestion, let me know what you think https://codereview.chromium.org/2159683003/diff/1/tools/ignition/bytecode_dis... File tools/ignition/bytecode_dispatches_report.py (right): https://codereview.chromium.org/2159683003/diff/1/tools/ignition/bytecode_dis... tools/ignition/bytecode_dispatches_report.py:222: "speficied bytecode") fix typo https://codereview.chromium.org/2159683003/diff/1/tools/ignition/bytecode_dis... tools/ignition/bytecode_dispatches_report.py:255: destinations[destination] = (count, count / total) I think it would be better to do this as a processing stage in print_top_dispatch_sources_and_destinations (with the result being a new table, rather than modifying the existing one), since ratio is only used there. WDYT? 
 https://codereview.chromium.org/2159683003/diff/1/tools/ignition/bytecode_dis... File tools/ignition/bytecode_dispatches_report.py (right): https://codereview.chromium.org/2159683003/diff/1/tools/ignition/bytecode_dis... tools/ignition/bytecode_dispatches_report.py:222: "speficied bytecode") On 2016/07/19 09:23:08, rmcilroy wrote: > fix typo Done. https://codereview.chromium.org/2159683003/diff/1/tools/ignition/bytecode_dis... tools/ignition/bytecode_dispatches_report.py:255: destinations[destination] = (count, count / total) On 2016/07/19 09:23:08, rmcilroy wrote: > I think it would be better to do this as a processing stage in > print_top_dispatch_sources_and_destinations (with the result being a new table, > rather than modifying the existing one), since ratio is only used there. WDYT? Done. 
 lgtm https://codereview.chromium.org/2159683003/diff/20001/tools/ignition/bytecode... File tools/ignition/bytecode_dispatches_report.py (right): https://codereview.chromium.org/2159683003/diff/20001/tools/ignition/bytecode... tools/ignition/bytecode_dispatches_report.py:95: def find_top_dispatch_sources(dispatches_table, bytecode, top_count, update name (find_top_dispatch_sources_and_destinations) https://codereview.chromium.org/2159683003/diff/20001/tools/ignition/bytecode... tools/ignition/bytecode_dispatches_report.py:106: for source, table_row in iteritems(relative_table): It seems a bit strange to have an inner function part-way through the function which captures something initialized earlier in the function. Could you either pass relative_table as an argument to this, or just make this build a table inline rather than being an inner generator function. 
 https://codereview.chromium.org/2159683003/diff/20001/tools/ignition/bytecode... File tools/ignition/bytecode_dispatches_report.py (right): https://codereview.chromium.org/2159683003/diff/20001/tools/ignition/bytecode... tools/ignition/bytecode_dispatches_report.py:95: def find_top_dispatch_sources(dispatches_table, bytecode, top_count, On 2016/07/19 11:33:15, rmcilroy wrote: > update name (find_top_dispatch_sources_and_destinations) Done. https://codereview.chromium.org/2159683003/diff/20001/tools/ignition/bytecode... tools/ignition/bytecode_dispatches_report.py:106: for source, table_row in iteritems(relative_table): On 2016/07/19 11:33:15, rmcilroy wrote: > It seems a bit strange to have an inner function part-way through the function > which captures something initialized earlier in the function. > > Could you either pass relative_table as an argument to this, or just make this > build a table inline rather than being an inner generator function. Done. 
 The CQ bit was checked by klaasb@google.com 
 The patchset sent to the CQ was uploaded after l-g-t-m from rmcilroy@chromium.org Link to the patchset: https://codereview.chromium.org/2159683003/#ps40001 (title: "don't generate whole table and don't use generator") 
 CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... 
 The CQ bit was unchecked by klaasb@google.com 
 The CQ bit was checked by klaasb@google.com 
 CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... 
 
            
              
                Message was sent while issue was closed.
              
            
             Description was changed from ========== [interpreter] Add relative numbers to dispatch report This adds an additional column with percentages to the output of bytecode_dispatch_report.py --top-dispatches-for-bytecode. The percentages always represent the relative number of dispatches to the target bytecode to all dispatches from the source bytecode. The additional flag --sort-sources-relative/-r allows sorting the "Top sources of dispatches to" the given bytecode by this column to more easily find bytecodes that significantly often dispatch to the target. BUG=v8:4899 LOG=N ========== to ========== [interpreter] Add relative numbers to dispatch report This adds an additional column with percentages to the output of bytecode_dispatch_report.py --top-dispatches-for-bytecode. The percentages always represent the relative number of dispatches to the target bytecode to all dispatches from the source bytecode. The additional flag --sort-sources-relative/-r allows sorting the "Top sources of dispatches to" the given bytecode by this column to more easily find bytecodes that significantly often dispatch to the target. BUG=v8:4899 LOG=N ========== 
 
            
              
                Message was sent while issue was closed.
              
            
             Committed patchset #3 (id:40001) 
 
            
              
                Message was sent while issue was closed.
              
            
             CQ bit was unchecked. 
 
            
              
                Message was sent while issue was closed.
              
            
             Description was changed from ========== [interpreter] Add relative numbers to dispatch report This adds an additional column with percentages to the output of bytecode_dispatch_report.py --top-dispatches-for-bytecode. The percentages always represent the relative number of dispatches to the target bytecode to all dispatches from the source bytecode. The additional flag --sort-sources-relative/-r allows sorting the "Top sources of dispatches to" the given bytecode by this column to more easily find bytecodes that significantly often dispatch to the target. BUG=v8:4899 LOG=N ========== to ========== [interpreter] Add relative numbers to dispatch report This adds an additional column with percentages to the output of bytecode_dispatch_report.py --top-dispatches-for-bytecode. The percentages always represent the relative number of dispatches to the target bytecode to all dispatches from the source bytecode. The additional flag --sort-sources-relative/-r allows sorting the "Top sources of dispatches to" the given bytecode by this column to more easily find bytecodes that significantly often dispatch to the target. BUG=v8:4899 LOG=N Committed: https://crrev.com/a3f598fc85b274320dd4556b36c6c36087e80bcd Cr-Commit-Position: refs/heads/master@{#37873} ========== 
 
            
              
                Message was sent while issue was closed.
              
            
             Patchset 3 (id:??) landed as https://crrev.com/a3f598fc85b274320dd4556b36c6c36087e80bcd Cr-Commit-Position: refs/heads/master@{#37873} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
