Skip to content

Commit 8d949c9

Browse files
committed
[GR-44617] Compiler Advantages description unclear.
PullRequest: graal/13960
2 parents 3b04592 + 825642d commit 8d949c9

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

docs/reference-manual/java/Operations.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,8 @@ ls -l /Users/demo/graal-dumps/1499768882600
155155
-rw-r--r-- 1 demo staff 1727409 Jul 13 11:46 HotSpotCompilation-791[NodeLIRBuilder.matchComplexExpressions(List)].cfg
156156
```
157157
You should attach a .zip of this directory to an issue on [GitHub](https://github.com/oracle/graal/issues).
158+
159+
### Related Documentation
160+
161+
- [Graal Compiler](compiler.md)
162+
- [Compiler Configuration on JVM](Options.md)

docs/reference-manual/java/Options.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,8 @@ js --jvm --vm.Dgraal.ShowConfiguration=info -version
134134
```
135135
136136
> Note the `-D` prefix is replaced by `--vm.D`.
137+
138+
### Related Documentation
139+
140+
- [Graal Compiler](compiler.md)
141+
- [JVM Operations Manual](Operations.md)

docs/reference-manual/java/compiler.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ GraalVM includes a version of the HotSpot JVM that supports JVMCI.
2323
## Compiler Advantages
2424

2525
The Graal compiler provides optimized performance for programs running on the JVM through unique approaches to code analysis and optimization.
26-
It includes multiple optimization algorithms (called “Phases”), like aggressive inlining, polymorphic inlining, and others.
27-
For example, the compiler in Oracle GraalVM includes 62 optimization phases, of which 27 are patented.
26+
It includes multiple optimization algorithms (called “Phases”), like aggressive inlining, polymorphic inlining, and others.
27+
Find some of the platform-independent compiler optimizations in GraalVM Community Edition [here](https://github.com/oracle/graal/blob/master/compiler/src/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/CEOptimization.java).
2828

29-
The Graal compiler assures performance advantages for highly-abstracted programs due to its ability to remove costly object allocations.
30-
Code using more abstraction and modern Java features like Streams or Lambdas will see greater speedups.
31-
Low-level code or code that converges to things like I/O, memory allocation, or garbage collection will see less improvement.
32-
Consequently, an application running on GraalVM needs to spend less time doing memory management and garbage collection.
29+
The Graal compiler can bring performance advantages for highly-abstracted programs. For example, it includes a [partial-escape-analysis optimization](https://www.javadoc.io/static/org.graalvm.compiler/compiler/22.3.1/org/graalvm/compiler/core/phases/CEOptimization.html#PartialEscapeAnalysis) that can remove costly allocations of certain objects.
30+
This optimization determines when a new object is accessible outside a compilation unit and only allocates it on paths that "escape" the compilation unit (e.g. the object is passed as a parameter, stored in a field, or returned from a method). This can greatly improve performance of an application by reducing the number of heap allocations.
31+
Code using more modern Java features like Streams or Lambdas will see greater speedups as this type of code involves a significant number of such non- or partially-escaping objects. Code that is bound by things like I/O or memory allocations that cannot be removed by the compiler will see less improvement.
3332
For more information on performance tuning, refer to [Compiler Configuration on JVM](Options.md).
3433

3534
## Graph Compilation
@@ -53,7 +52,7 @@ The pipeline for such compilation is:
5352

5453
Besides the Truffle framework, GraalVM incorporates its optimizing compiler into an advanced ahead-of-time (AOT) compilation technology -- [Native Image](../native-image/README.md) -- which translates Java and JVM-based code into a native platform executable.
5554
These native executables start nearly instantaneously, are smaller, and consume less resources of the same Java application, making them ideal for cloud deployments and microservices.
56-
For more information about AOT compilation, go to [Native Image](../native-image/README.md).
55+
For more information about the AOT compilation, go to [Native Image](../native-image/README.md).
5756

5857
## Compiler Operating Modes
5958

@@ -82,6 +81,11 @@ This will produce diagnostic data for every method compiled by the compiler.
8281
To refine the set of methods for which diagnostic data is produced, use the `-Dgraal.MethodFilter=<class>.<method>` option.
8382
For example, `-Dgraal.MethodFilter=java.lang.String.*,HashMap.get` will produce diagnostic data only for methods in the `java.lang.String` class as well as methods named `get` in a class whose non-qualified name is `HashMap`.
8483

85-
Instead of being written to a file, diagnostic data can also be sent over the network to the [Ideal Graph Visualizer](../../tools/ideal-graph-visualizer.md).
84+
Instead of being written to a file, diagnostic data can also be sent over the network to the [Ideal Graph Visualizer](https://www.graalvm.org/latest/tools/igv/).
8685
This requires the `-Dgraal.PrintGraph=Network` option, upon which the compiler will try to send diagnostic data to _127.0.0.1:4445_.
87-
This network endpoint can be configured with the `-Dgraal.PrintGraphHost` and `-Dgraal.PrintGraphPort` options.
86+
This network endpoint can be configured with the `-Dgraal.PrintGraphHost` and `-Dgraal.PrintGraphPort` options.
87+
88+
### Related Documentation
89+
90+
- [JVM Operations Manual](Operations.md)
91+
- [Compiler Configuration on JVM](Options.md)

0 commit comments

Comments
 (0)