Skip to content

Commit

Permalink
added more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dougxc committed Nov 17, 2016
1 parent 294a8e7 commit f423713
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/Examples.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
This documents describes options available in Graal for doing common activities.
This documents describes options available in Graal that are commonly helpful.
It complements the detailed information in [Debugging](Debugging.md) which should be read first.

## Measuring compilation time and partial evaluation time.
## Graal scenarios

Add `-Dgraaldebug.timer.CompilationTime=true` to measure the time spent in compilation.

Add `-XX:JVMCIThreads=1` to have a single JVMCI compiler thread. This simplifies
debugging in an IDE by ensuring a breakpoint in Graal code is hit by a single thread.

Use `-XX:+BootstrapJVMCI` to stress-test the compiler without having to specify an application.
To force *all* bootstrap compilations to go through Graal, add `-XX:-TieredCompilation` as well.

Use `-Dgraal.Dump= -Dgraal.MethodFilter=MyClass.someMethod` to see the compiler graphs in
IGV when compiling `MyClass.someMethod`. If you want the graphs sent immediately to IGV, ensure it is running (`mx igv`).
To have the graphs written to disk instead (e.g., to share), add `-Dgraal.PrintIdealGraphFile=true`.
To disable the dumping of LIR, register allocation and code generation info to `*.cfg` files readable by the C1Visualizer,
add `-XX:PrintBackendCFG=false`.

## GraalTruffle scenarios

Add `-Dgraaldebug.timer.PartialEvaluationTime=true` to measure the time spent in partial evaluation.

0 comments on commit f423713

Please sign in to comment.