Skip to content

Commit

Permalink
Use the GitHub URL so that we can transform it into ../../tools/profi…
Browse files Browse the repository at this point in the history
…ling.md when building the website
  • Loading branch information
olyagpl committed Sep 29, 2021
1 parent f3ed542 commit 7f99372
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/user/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Here are a few tips you can follow to analyse and improve peak performance:
* Compare the performance between the Native Image and the JVM mode if possible. Depending on the characteristics of your application, one or the other might show better peak performance.
* The Polyglot API comes with several tools and options to inspect the performance of your application:
* `--cpusampler` and `--cputracer` will print a list of the hottest methods when the application is terminated. Use that list to figure out where most time is spent in your application.
* `--experimental-options --memtracer` can help you understand the memory allocations of your application. Refer to the [Profiling Command Line Tool](../../tools/profiling.md) reference for more detail.
* `--experimental-options --memtracer` can help you understand the memory allocations of your application. Refer to the [Profiling Command Line Tool](https://github.com/oracle/graal/blob/master/docs/tools/profiling.md) reference for more detail.

### What is the difference between running GraalVM's JavaScript in a Native Image compared to the JVM?
In essence, the JavaScript engine of GraalVM is a plain Java application.
Expand Down Expand Up @@ -249,7 +249,7 @@ Execution only in interpreted mode will strongly impact the guest application pe
To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.
```

To resolve this, use [GraalVM](../../getting-started/graalvm-community/get-started-graalvm-community.md) or see [RunOnJDK.md](https://github.com/oracle/graaljs/blob/master/docs/user/RunOnJDK.md) for instructions how to set up the Graal compiler on a compatible JVMCI-enabled stock JDK.
To resolve this, use [GraalVM](https://github.com/oracle/graal/blob/master/docs/getting-started/graalvm-community/get-started-graalvm-community.md) or see the [Run GraalVM JavaScript on a Stock JDK guide](RunOnJDK.md) for instructions how to set up the Graal compiler on a compatible JVMCI-enabled stock JDK.

Nevertheless, if this is intentional, you can disable the warning and continue to run with degraded performance by setting the above mentioned option, either via the command line or using the `Context.Builder`, e.g.:
```java
Expand Down
2 changes: 1 addition & 1 deletion docs/user/JavaInteroperability.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Context context = Context.newBuilder("js")
context.eval("js", jsSourceCode);
```

See the [Polyglot Programming](../polyglot-programming.md) guide for more details.
See the [Polyglot Programming](https://github.com/oracle/graal/blob/master/docs/reference-manual/polyglot-programming.md) guide for more details.

## ScriptEngine (JSR 223)
The `org.graalvm.polyglot.Context` is the preferred execution method for interoperability with GraalVM's languages and tools.
Expand Down
2 changes: 1 addition & 1 deletion docs/user/NashornMigrationGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ GraalVM JavaScript differs from Nashorn in some aspects that were intentional de
GraalVM JavaScript takes a _secure by default_ approach.
Unless explicitly permitted by the embedder, JavaScript code cannot access Java classes or access the file system, among other restrictions.
Several features of GraalVM JavaScript, including Nashorn compatibility features, are only available when the relevant security settings are permissive enough.
Make sure you [understand the security implications](../../security/security-guide.md) of any change that lifts the secure default limits to your application and the host system.
Make sure you [understand the security implications](https://github.com/oracle/graal/blob/master/docs/security/security-guide.md) of any change that lifts the secure default limits to your application and the host system.

For a full list of available settings, see [`Context.Builder`](https://www.graalvm.org/truffle/javadoc/org/graalvm/polyglot/Context.Builder.html).
Those flags can be defined when building the context with GraalVM Polyglot API.
Expand Down
2 changes: 1 addition & 1 deletion docs/user/NodeJSVSJavaScriptContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ As such, it can run JavaScript code in a variety of embedding scenarios, includi

Depending on the GraalVM's JavaScript embedding scenario, applications have access to different built-in capabilities.
For example, Node.js applications executed using GraalVM's `bin/node` executable have access to all of Node.js' APIs, including built-in Node.js modules such as `fs`, `http`, etc.
Conversely, JavaScript code embedded in a Java application has access to limited capabilities, as specified through the [Context API](../embedding/embed-languages.md/#compile-and-run-a-polyglot-application), and do not have access to Node.js built-in modules.
Conversely, JavaScript code embedded in a Java application has access to limited capabilities, as specified through the [Context API](https://github.com/oracle/graal/blob/master/docs/reference-manual/embedding/embed-languages.md#compile-and-run-a-polyglot-application), and do not have access to Node.js built-in modules.

This guide describes the main differences between a Node.js application and a GraalVM JavaScript application embedded in Java.

Expand Down
2 changes: 1 addition & 1 deletion docs/user/Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Context context = Context.newBuilder("js")
context.eval("js", "42");
```

See the [Polyglot Programming](../polyglot-programming.md/#passing-options-programmatically) reference for information on how to set options programmatically.
See the [Polyglot Programming](https://github.com/oracle/graal/blob/master/docs/reference-manual/polyglot-programming.md#passing-options-programmatically) reference for information on how to set options programmatically.

## Stable and Experimental Options

Expand Down
2 changes: 1 addition & 1 deletion docs/user/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Type ".help" for more information.
0.8198353068437427
```

For more information about interoperability with other programming languages, see [Polyglot Programming](../polyglot-programming.md) for a general description.
For more information about interoperability with other programming languages, see [Polyglot Programming](https://github.com/oracle/graal/blob/master/docs/reference-manual/polyglot-programming.md) for a general description.

## Interoperability with Java

Expand Down
2 changes: 1 addition & 1 deletion docs/user/RunOnJDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permalink: /reference-manual/js/RunOnJDK/
# Run GraalVM JavaScript on a Stock JDK

GraalVM JavaScript is optimized for execution as part of GraalVM, or in an embedding scenario built on GraalVM.
This guarantees best possible performance by using the [GraalVM compiler](https://github.com/oracle/graal) as the optimizing compiler, and potentially [Native Image](../native-image/README.md) to ahead-of-time compile the engine into a native binary.
This guarantees best possible performance by using the [GraalVM compiler](https://github.com/oracle/graal) as the optimizing compiler, and potentially [Native Image](https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/README.md) to ahead-of-time compile the engine into a native binary.

As GraalVM JavaScript is a Java application, it is possible to execute it on a stock Java VM like OpenJDK.
When executed without the GraalVM compiler, JavaScript performance will be significantly worse.
Expand Down

0 comments on commit 7f99372

Please sign in to comment.