From b55cb7c97392e41513f67a6212d39b9b2ecd7180 Mon Sep 17 00:00:00 2001 From: Andrei Pangin Date: Wed, 8 Jan 2025 19:32:17 +0000 Subject: [PATCH] Use relative URLs in docs where possible --- README.md | 2 +- docs/AdvancedStacktraceFeatures.md | 6 +++--- docs/FlamegraphInterpretation.md | 8 ++++---- docs/GettingStarted.md | 2 +- docs/OutputFormats.md | 6 +++--- docs/Troubleshooting.md | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7b0038d4..c042a9bf 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ $ asprof -d 30 -f flamegraph.html The above command translates to: run profiler for 30 seconds and save results to `flamegraph.html` as an interactive [Flame Graph](docs/FlamegraphInterpretation.md) that can be viewed in a browser. -[![FlameGraph](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/flamegraph.png)](https://htmlpreview.github.io/?https://github.com/async-profiler/async-profiler/blob/master/.assets/html/flamegraph.html) +[![FlameGraph](/.assets/images/flamegraph.png)](https://htmlpreview.github.io/?https://github.com/async-profiler/async-profiler/blob/master/.assets/html/flamegraph.html) Find more details in the [Getting started guide](docs/GettingStarted.md). diff --git a/docs/AdvancedStacktraceFeatures.md b/docs/AdvancedStacktraceFeatures.md index 8eeb9fa9..bb19f8c6 100644 --- a/docs/AdvancedStacktraceFeatures.md +++ b/docs/AdvancedStacktraceFeatures.md @@ -8,7 +8,7 @@ some take more resources to compile, other take less. Furthermore, there are cas a bug in C2 compiler causes a JIT thread to stuck in an infinite loop consuming 100% CPU. Async-profiler can highlight which particular Java methods take most CPU time to compile. -![](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/comptask_feature.png) +![](/.assets/images/comptask_feature.png) The feature can be enabled with the option `-F comptask` (or its agent equivalent `features=comptask`). @@ -18,7 +18,7 @@ In some applications, a significant amount of CPU time is spent on dispatching m async-profiler shows a pseudo-frame on top of v/itable stub with the actual type of object the virtual method is called on. This should make clear the proportion of different receivers for the particular call site. -![](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/vtable_feature.png) +![](/.assets/images/vtable_feature.png) The feature can be enabled with the option `-F vtable` (or its agent equivalent `features=vtable`). @@ -30,6 +30,6 @@ profiling, async-profiler provides an option to record PC address of the current running method for each execution sample. In this case, each stack trace will include a synthetic frame with the address at the top of every stack trace. -![](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/pcaddr_feature.png) +![](/.assets/images/pcaddr_feature.png) The feature can be enabled with the option `-F pcaddr` (or its agent equivalent `features=pcaddr`). diff --git a/docs/FlamegraphInterpretation.md b/docs/FlamegraphInterpretation.md index c289b3e1..f06aa53f 100644 --- a/docs/FlamegraphInterpretation.md +++ b/docs/FlamegraphInterpretation.md @@ -39,7 +39,7 @@ Profiling starts by taking samples `X` times per second. Whenever a sample is ta the current call stack for it is saved. The diagram below shows the unsorted sampling view before the sorting and aggregation takes place. -![](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/ProfilerSamplings.png) +![](/.assets/images/ProfilerSamplings.png) Below are the sampling numbers: @@ -53,7 +53,7 @@ Below are the sampling numbers: Samples are then alphabetically sorted at the base level just after root (or main method) of the application. -![](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/SortedSamplings.png) +![](/.assets/images/SortedSamplings.png) Note that X-axis is no longer a timeline. Flame graph does not preserve information on _when_ a particular stack trace was taken, it only indicates _how often_ @@ -63,7 +63,7 @@ a stack trace was observed during profiling. The blocks for the same functions at each level of stack depth are then stitched together to get an aggregated view of the flame graph. -![](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/AggregatedView.png) +![](/.assets/images/AggregatedView.png) In this example, except `func4()`, no other function actually consumes any resource at the base level of stack depth. `func5()`, `func6()`, @@ -82,4 +82,4 @@ Color is another flame graph dimension that may be used to encode additional inf about each frame. Colors may have different meaning in various flame graph implementations. async-profiler uses the following palette to differentiate frame types: -![](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/flamegraph_colors.png) +![](/.assets/images/flamegraph_colors.png) diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index b4a17cd4..a1b48225 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -98,7 +98,7 @@ $ jps $ asprof -d 30 -f /tmp/flamegraph.html 8983 ``` -[![Example](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/flamegraph.png)](https://htmlpreview.github.io/?https://github.com/async-profiler/async-profiler/blob/master/.assets/html/flamegraph.html) +[![Example](/.assets/images/flamegraph.png)](https://htmlpreview.github.io/?https://github.com/async-profiler/async-profiler/blob/master/.assets/html/flamegraph.html) The flame graph html can be opened in any browser of your choice for further interpretation. diff --git a/docs/OutputFormats.md b/docs/OutputFormats.md index 0cae503d..833baea0 100644 --- a/docs/OutputFormats.md +++ b/docs/OutputFormats.md @@ -1,6 +1,6 @@ # Output Formats -async-profiler currently supports the below output formats: +async-profiler currently supports the following output formats: - `collapsed` - This is a collection of call stacks, where each line is a semicolon separated list of frames followed by a counter. This is used by the FlameGraph script to generate the FlameGraph visualization of the profile data. @@ -18,12 +18,12 @@ async-profiler currently supports the below output formats: - `flamegraph` - FlameGraph is a hierarchical representation of call traces of the profiled software in a color coded format. Read more on the [interpretation](FlamegraphInterpretation.md) of FlameGraphs. - [![FlameGraph](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/flamegraph.png)](https://htmlpreview.github.io/?https://github.com/async-profiler/async-profiler/blob/master/.assets/html/flamegraph.html) + [![FlameGraph](/.assets/images/flamegraph.png)](https://htmlpreview.github.io/?https://github.com/async-profiler/async-profiler/blob/master/.assets/html/flamegraph.html) - `tree` - Profile output generated in HTML format showing a tree view of resource usage beginning with the call stack with the highest resource usage and then showing other call stacks in descending order of resource usage. Expanding a parent frame follows the same hierarchical representation within that frame. - ![Tree](https://github.com/async-profiler/async-profiler/blob/master/.assets/images/treeview_example.png) + ![Tree](/.assets/images/treeview_example.png) - `text` - If no output format is specified with `-o` and filename has no extension provided, profiled output is generated in text format. diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md index 86d0cc1e..5c8826c1 100644 --- a/docs/Troubleshooting.md +++ b/docs/Troubleshooting.md @@ -38,9 +38,9 @@ Usually this happens in one of the following cases: 2. JVM is started with `-XX:+DisableAttachMechanism` option. 3. `/tmp` directory of Java process is not physically the same directory as `/tmp` of your shell, because Java is running in a container or in - `chroot` environment. `jattach` attempts to solve this automatically, + `chroot` environment. `asprof` attempts to solve this automatically, but it might lack the required permissions to do so. - - Check `strace build/jattach PID properties` + - Check `strace asprof PID jcmd` 4. JVM is busy and cannot reach a safepoint. For instance, JVM is in the middle of long-running garbage collection. - How to check: run `kill -3 PID`. Healthy JVM process should print