From 58e6f6f3d5460c07d55c2ebcd0631cc21cde792b Mon Sep 17 00:00:00 2001 From: Olya Gupalo Date: Mon, 18 Nov 2024 19:58:54 +0200 Subject: [PATCH] Correct the name of Profile-Guided Optimizations to singular --- docs/reference-manual/native-image/BuildOptions.md | 2 +- docs/reference-manual/native-image/BuildOutput.md | 10 +++++----- .../native-image/OptimizationsAndPerformance.md | 4 ++-- docs/reference-manual/native-image/PGO-Basic-Usage.md | 2 +- docs/reference-manual/native-image/PGO-LCOV.md | 2 +- docs/reference-manual/native-image/PGO.md | 6 +++--- docs/reference-manual/native-image/WorkshopsAndLabs.md | 2 +- docs/reference-manual/native-image/guides/guides.md | 2 +- .../native-image/guides/optimize-file-size.md | 2 +- .../guides/optimize-native-executable-with-pgo.md | 6 +++--- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/reference-manual/native-image/BuildOptions.md b/docs/reference-manual/native-image/BuildOptions.md index d6cb925a179f..5f166ea08300 100644 --- a/docs/reference-manual/native-image/BuildOptions.md +++ b/docs/reference-manual/native-image/BuildOptions.md @@ -77,7 +77,7 @@ Run `native-image --help` for help on build options. * `--target`: select the compilation target for `native-image` (in the `-` format). It defaults to host's OS-architecture pair. * `--trace-class-initialization`: provide a comma-separated list of fully-qualified class names that a class initialization is traced for * `--trace-object-instantiation`: provide a comma-separated list of fully-qualified class names that an object instantiation is traced for -* `-O`: control code optimizations where available variants are: `b` - optimize for fastest build time, `s` - optimize for size, `0` - no optimizations, `1` - basic optimizations, `2` - aggressive optimizations, `3` - all optimizations for best performance (enabled automatically with Profile-Guided Optimizations) +* `-O`: control code optimizations where available variants are: `b` - optimize for fastest build time, `s` - optimize for size, `0` - no optimizations, `1` - basic optimizations, `2` - aggressive optimizations, `3` - all optimizations for best performance (enabled automatically with Profile-Guided Optimization (PGO)) * `-da`, `-da[:[packagename]|:[classname]`, `disableassertions[:[packagename]|:[classname]`: disable assertions with specified granularity at run time * `-dsa`, `-disablesystemassertions`: disable assertions in all system classes at run time * `-ea`, `-ea[:[packagename]|:[classname]`, `enableassertions[:[packagename]|:[classname]`: enable assertions with specified granularity at run time diff --git a/docs/reference-manual/native-image/BuildOutput.md b/docs/reference-manual/native-image/BuildOutput.md index a64ca8ba240b..d3eb9008f1a5 100644 --- a/docs/reference-manual/native-image/BuildOutput.md +++ b/docs/reference-manual/native-image/BuildOutput.md @@ -100,7 +100,7 @@ Use `-Os` to optimize for size. The targeted machine type can be selected with the `-march` option and defaults to `x86-64-v3` on AMD64 and `armv8-a` on AArch64. See [here](#recommendation-cpu) for recommendations on how to use this option. -On Oracle GraalVM, the line also shows information about [Profile-Guided Optimizations (PGO)](#recommendation-pgo). +On Oracle GraalVM, the line also shows information about [Profile-Guided Optimization (PGO)](#recommendation-pgo). - `off`: PGO is not used - `instrument`: The generated executable or shared library is instrumented to collect data for PGO (`--pgo-instrument`) - `user-provided`: PGO is enabled and uses a user-provided profile (for example `--pgo default.iprof`) @@ -300,15 +300,15 @@ Use `-march=list` to list all available machine types that can be targeted expli The G1 garbage collector is available for your platform. Consider enabling it using `--gc=G1` at build time to improve the latency and throughput of your application. For more information see the [docs on Memory Management](MemoryManagement.md). -For best peak performance, also consider using [Profile-Guided Optimizations](#recommendation-pgo). +For best peak performance, also consider using [Profile-Guided Optimization](#recommendation-pgo). #### `HEAP`: Specify a Maximum Heap Size Please refer to [Maximum Heap Size](#glossary-gc-max-heap-size). -#### `PGO`: Use Profile-Guided Optimizations for Improved Throughput +#### `PGO`: Use Profile-Guided Optimization for Improved Throughput -Consider using Profile-Guided Optimizations to optimize your application for improved throughput. +Consider using Profile-Guided Optimization (PGO) to optimize your application for improved throughput. These optimizations allow the Graal compiler to leverage profiling information, similar to when it is running as a JIT compiler, when AOT-compiling your application. For this, perform the following steps: @@ -316,7 +316,7 @@ For this, perform the following steps: 2. Run your instrumented application with a representative workload to generate profiling information in the form of an `.iprof` file. 3. Re-build your application and pass in the profiling information with `--pgo=.iprof` to generate an optimized version of your application. -Relevant guide: [Optimize a Native Executable with Profile-Guided Optimizations](guides/optimize-native-executable-with-pgo.md). +Relevant guide: [Optimize a Native Executable with Profile-Guided Optimization](guides/optimize-native-executable-with-pgo.md). For best peak performance, also consider using the [G1 garbage collector](#recommendation-g1gc). diff --git a/docs/reference-manual/native-image/OptimizationsAndPerformance.md b/docs/reference-manual/native-image/OptimizationsAndPerformance.md index caf0224b3cc5..5ab0e63cab97 100644 --- a/docs/reference-manual/native-image/OptimizationsAndPerformance.md +++ b/docs/reference-manual/native-image/OptimizationsAndPerformance.md @@ -24,9 +24,9 @@ The following table provides an overview of the different optimization levels an | `-O2` | Advanced | **Default:** Aims for good performance at a reasonable file size. | | `-O3` | All | Aims for the best performance at the cost of longer build times. Used automatically by Oracle GraalVM for [PGO builds](guides/optimize-native-executable-with-pgo.md) (`--pgo` option). `-O3` and `-O2` are identical in GraalVM Community Edition. | -### Profile-Guided Optimizations for Improved Throughput +### Profile-Guided Optimization for Improved Throughput -Consider using Profile-Guided Optimizations to optimize your application for improved throughput. +Consider using Profile-Guided Optimization (PGO) to optimize your application for improved throughput. These optimizations allow the Graal compiler to leverage profiling information, similar to when it is running as a JIT compiler, when AOT-compiling your application. For this, perform the following steps: diff --git a/docs/reference-manual/native-image/PGO-Basic-Usage.md b/docs/reference-manual/native-image/PGO-Basic-Usage.md index 06117694882b..03674f4666cb 100644 --- a/docs/reference-manual/native-image/PGO-Basic-Usage.md +++ b/docs/reference-manual/native-image/PGO-Basic-Usage.md @@ -1,7 +1,7 @@ --- layout: docs toc_group: pgo -link_title: Basic Usage of Profile-Guided Optimizations +link_title: Basic Usage of Profile-Guided Optimization permalink: /reference-manual/native-image/optimizations-and-performance/PGO/basic-usage/ --- diff --git a/docs/reference-manual/native-image/PGO-LCOV.md b/docs/reference-manual/native-image/PGO-LCOV.md index 6b8a025fdd21..10c71483fa92 100644 --- a/docs/reference-manual/native-image/PGO-LCOV.md +++ b/docs/reference-manual/native-image/PGO-LCOV.md @@ -9,7 +9,7 @@ permalink: /reference-manual/native-image/optimizations-and-performance/PGO/LCOV Here you will learn how to analyze PGO profiles with the aid of LCOV-based tooling. -Profile-Guided Optimizations (PGO) help you maximize the performance of your native application. +Profile-Guided Optimization (PGO) helps you maximize the performance of your native application. As part of the PGO process, you create an instrumented binary and run a workload on it to generate a PGO profile file that you can then feed back into the build process to generate an optimized binary of your application. diff --git a/docs/reference-manual/native-image/PGO.md b/docs/reference-manual/native-image/PGO.md index 1225a60bde21..d0da6a9901ed 100644 --- a/docs/reference-manual/native-image/PGO.md +++ b/docs/reference-manual/native-image/PGO.md @@ -86,15 +86,15 @@ This would lead to the inlining phase choosing to inline `handleNotEnoughArgumen Hence, the goal is to gather profiles on workload that match the production workloads as much as possible. The gold standard for this is to run the exact same workloads you expect to run in production on the instrumented binary. -For a more detailed usage overview, go to [Basic Usage of Profile-Guided Optimizations](PGO-Basic-Usage.md) documentation. +For a more detailed usage overview, go to [Basic Usage of Profile-Guided Optimization](PGO-Basic-Usage.md) documentation. ### Further Reading -* [Basic Usage of Profile-Guided Optimizations](PGO-Basic-Usage.md) +* [Basic Usage of Profile-Guided Optimization](PGO-Basic-Usage.md) * [Inspecting a Profile in a Build Report](PGO-Build-Report.md) * [Creating LCOV Coverage Reports](PGO-LCOV.md) * [Merging Profiles from Multiple Sources](PGO-Merging-Profiles.md) * [Tracking Profile Quality Over Time](PGO-Profile-Quality.md) * [The _iprof_ File Format](PGO-IprofFileFormat.md) * [The _iprof_ JSON Schema](assets/iprof-v1.0.0.schema.json) -* [Frequently Asked Questions](PGO-FAQ.md) +* [Frequently Asked Questions](PGO-FAQ.md) \ No newline at end of file diff --git a/docs/reference-manual/native-image/WorkshopsAndLabs.md b/docs/reference-manual/native-image/WorkshopsAndLabs.md index 24d8966cc0bb..381ec2a4d47f 100644 --- a/docs/reference-manual/native-image/WorkshopsAndLabs.md +++ b/docs/reference-manual/native-image/WorkshopsAndLabs.md @@ -19,7 +19,7 @@ The following labs are available: - [GraalVM Native Image Quick Start](https://luna.oracle.com/lab/47dafec8-4095-4fba-8313-dad43a64dee4): This lab is for developers new to Native Image who are keen to start building cloud native Java applications. - [GraalVM, Reflection and Native Image](https://luna.oracle.com/lab/5fde71fb-8044-4c82-aa1c-3f2e5771caed): This lab shows how to preconfigure the `native-image` builder when reflection is used, and make your Java application compatible with ahead-of-time compilation using Native Image. - [GraalVM Native Image, Spring and Containerisation](https://luna.oracle.com/lab/fdfd090d-e52c-4481-a8de-dccecdca7d68): This lab shows you how to package a Spring Boot application into a native executable; containerise it; shrink the footprint even more by creating small a Distroless container Image. -- [Optimize Cloud Native Java Apps with Oracle GraalVM PGO](https://luna.oracle.com/lab/3f0b7c86-6105-4b7a-9a3b-eb73b251a1aa): This lab shows how to run a Java Microbenchmark Harness (JMH) benchmark as a native executable, built with GraalVM Native Image, and then optimize it for higher throughput using Profile-Guided Optimizations (PGO). +- [Optimize Cloud Native Java Apps with Oracle GraalVM PGO](https://luna.oracle.com/lab/3f0b7c86-6105-4b7a-9a3b-eb73b251a1aa): This lab shows how to run a Java Microbenchmark Harness (JMH) benchmark as a native executable, built with GraalVM Native Image, and then optimize it for higher throughput using Profile-Guided Optimization (PGO). - [OCI MySQL, Vault, Micronaut, GraalVM Native Image](https://luna.oracle.com/lab/a78388fd-c15f-48b4-96aa-5e4716ae236c): In this lab, you will learn how to build a portable cloud-native Java application with Micronaut, GraalVM Native Image and MySQL Database service, and Secrets in Vault on Oracle Cloud Infrastructure. - [GraalVM Native Build Tools, for Maven](https://luna.oracle.com/lab/e5af592b-3365-45ce-b964-6fd409e5c76f): This lab shows you how to use the GraalVM Native Build Tools to easily build a native executable of your application using Maven. It is aimed at developers with the knowledge of Java. - [Build Cloud Native Java Applications with Micronaut and GraalVM Native Image](https://luna.oracle.com/lab/e329af0f-504e-4eb0-8804-2dd6b10076c9): The workshop features several labs that walk you through the steps to get going with Micronaut, GraalVM, and Oracle Cloud Infrastructure services. diff --git a/docs/reference-manual/native-image/guides/guides.md b/docs/reference-manual/native-image/guides/guides.md index 64184b10a7dd..8efdbcff97d8 100644 --- a/docs/reference-manual/native-image/guides/guides.md +++ b/docs/reference-manual/native-image/guides/guides.md @@ -30,7 +30,7 @@ Here you will learn how to: - [Include Reachability Metadata Using the Native Image Gradle Plugin](include-reachability-metadata-gradle.md) - [Include Reachability Metadata Using the Native Image Maven Plugin](include-reachability-metadata-maven.md) - [Include Resources in a Native Executable](include-resources.md) -- [Optimize a Native Executable with Profile-Guided Optimizations](optimize-native-executable-with-pgo.md) +- [Optimize a Native Executable with Profile-Guided Optimization](optimize-native-executable-with-pgo.md) - [Optimize a Native Executable for File Size](optimize-file-size.md) - [Specify Class Initialization Explicitly](specify-class-initialization.md) - [Use Gradle to Build a Native Executable from a Java Application](https://graalvm.github.io/native-build-tools/latest/gradle-plugin-quickstart.html) diff --git a/docs/reference-manual/native-image/guides/optimize-file-size.md b/docs/reference-manual/native-image/guides/optimize-file-size.md index e65fa758b75b..f7bc387d1456 100644 --- a/docs/reference-manual/native-image/guides/optimize-file-size.md +++ b/docs/reference-manual/native-image/guides/optimize-file-size.md @@ -98,7 +98,7 @@ Moreover, build-time initialization, if not used towards a specific goal, can ca Generally, it is a good idea to check file size, number of embedded resources, or other metrics from time to time, for example, when adding or updating dependencies, or even monitor build metrics frequently. For this, you can use the [machine-readable version of the build output](../BuildOutput.md#machine-readable-build-output) or the [build reports for GitHub Actions](https://medium.com/graalvm/native-image-build-reports-and-update-notifications-351aca964a55){:target="_blank"}. -There are other Native Image techniques that can positively affect the executable size, besides improving other metrics, for example, [Profile-Guided Optimizations (PGO)](optimize-native-executable-with-pgo.md). +There are other Native Image techniques that can positively affect the executable size, besides improving other metrics, for example, [Profile-Guided Optimization (PGO)](optimize-native-executable-with-pgo.md). ### Related Documentation diff --git a/docs/reference-manual/native-image/guides/optimize-native-executable-with-pgo.md b/docs/reference-manual/native-image/guides/optimize-native-executable-with-pgo.md index 192ed0827f63..838f8476f467 100644 --- a/docs/reference-manual/native-image/guides/optimize-native-executable-with-pgo.md +++ b/docs/reference-manual/native-image/guides/optimize-native-executable-with-pgo.md @@ -6,10 +6,10 @@ permalink: /reference-manual/native-image/guides/optimize-native-executable-with redirect_from: /reference-manual/native-image/PGO/ --- -# Optimize a Native Executable with Profile-Guided Optimizations +# Optimize a Native Executable with Profile-Guided Optimization GraalVM Native Image offers quick startup and less memory consumption for a Java application, running as a native executable, by default. -You can optimize this native executable even more for additional performance gain and higher throughput by applying Profile-Guided Optimizations (PGO). +You can optimize this native executable even more for additional performance gain and higher throughput by applying Profile-Guided Optimization (PGO). With PGO you can collect the profiling data in advance, and then feed it to the `native-image` tool, which will use this information to optimize the performance of a native application. The general workflow is: @@ -188,7 +188,7 @@ For other installation options, visit the [Downloads section](https://www.graalv You should get the performance comparable to, or faster, than the Java version of the program. For example, on a machine with 16 GB of memory and 8 cores, the `TOTAL time` for 10 iterations reduced from ~2200 to ~270 milliseconds. This guide showed how you can optimize native executables for additional performance gain and higher throughput. -Oracle GraalVM offers extra benefits for building native executables, such as Profile-Guided Optimizations (PGO). +Oracle GraalVM offers extra benefits for building native executables, such as Profile-Guided Optimization (PGO). With PGO you "train" your application for specific workloads and significantly improve the performance. ### Related Documentation