lucet icon indicating copy to clipboard operation
lucet copied to clipboard

add option to report timing, as well as reporting time taken to output

Open iximeow opened this issue 4 years ago • 1 comments

Adds a --report-times which makes for nice breakdowns via lucetc --report-times slow_to_compile.wat like:

======== ========  ==================================
   Total     Self  Pass
-------- --------  ----------------------------------
   0.000    0.000  Translate WASM module
   0.001    0.001  Translate WASM function
  12.435    3.888  Verify Cranelift IR
   0.005    0.005  Verify CSSA
   0.008    0.008  Verify live ranges
   0.005    0.005  Verify value locations
   0.086    0.086  Verify CPU flags
  15.781    0.006  Compilation passes
   0.049    0.049  Control flow graph
  10.828   10.828  Dominator tree
   0.260    0.260  Loop analysis
   0.003    0.003  Post-legalization rewriting
   0.000    0.000  Pre-legalization rewriting
   0.001    0.001  Dead code elimination
   0.009    0.009  Legalization
   0.002    0.002  Global value numbering
   0.402    0.000  Loop invariant code motion
   0.000    0.000  Remove unreachable blocks
   5.229    0.018  Register allocation
   0.002    0.002  RA liveness analysis
   0.001    0.001  RA coalescing CSSA
   0.006    0.006  RA spilling
   0.005    0.005  RA reloading
   0.007    0.007  RA coloring
   0.001    0.001  Prologue/epilogue insertion
   0.005    0.005  Instruction encoding shrinking
   0.990    0.588  Branch relaxation
   0.000    0.000  Binary machine code emission
   0.000    0.000  Layout full renumbering
   0.000    0.000  Emit output

or in json ( ../target/debug/lucetc tests/wasm/arith.wat --report-times --error-style json):

{"errors":null,"timing":{"pass_times":["   0.000    0.000  Translate WASM module","   0.000    0.000  Translate WASM function","   0.004    0.003  Verify Cranelift IR","   0.000    0.000  Verify CSSA","   0.000    0.000  Verify live ranges","   0.000    0.000  Verify value locations","   0.000    0.000  Verify CPU flags","   0.006    0.000  Compilation passes","   0.000    0.000  Control flow graph","   0.000    0.000  Dominator tree","   0.000    0.000  Loop analysis","   0.000    0.000  Post-legalization rewriting","   0.000    0.000  Pre-legalization rewriting","   0.000    0.000  Dead code elimination","   0.000    0.000  Legalization","   0.000    0.000  Global value numbering","   0.000    0.000  Loop invariant code motion","   0.000    0.000  Remove unreachable blocks","   0.002    0.000  Register allocation","   0.000
 0.000  RA liveness analysis","   0.000    0.000  RA coalescing CSSA","   0.000    0.000  RA spilling","   0.000    0.000  RA reloading","   0.000    0.000  RA coloring","   0.000    0.000  Prologue/epilogue insertion","   0.000    0.000  Instruction encoding shrinking","   0.000    0.000  Branch relaxation","   0.000    0.000  Binary machine code emission","   0.000    0.000  Emit output"]}}

iximeow avatar Dec 19 '19 23:12 iximeow

This PR was closed as a byproduct of deleting the branch named master. If this is still an active PR, re-open as a new PR against main.

pchickey avatar Jun 26 '20 00:06 pchickey