From 2c4ca58b9fdf9b4376fee9e490ffb4930c7b1602 Mon Sep 17 00:00:00 2001 From: Peter Veentjer Date: Fri, 5 Apr 2024 07:08:19 +0300 Subject: [PATCH] Fixed async profiler installation problems --- performance_notes.md | 6 +++--- playbooks/install_async_profiler.yaml | 3 +-- src/agents_clean.py | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/performance_notes.md b/performance_notes.md index ba2ba68b58..9ccc459f26 100644 --- a/performance_notes.md +++ b/performance_notes.md @@ -17,17 +17,17 @@ Make sure you have added the following JVM settings: And to run, execute the following if you want a `JFR` file which can be analyzed with Java Mission Control: ```shell -profiler.sh collect -d 60 --jfrsync ${JAVA_HOME}/lib/jfr/default.jfc -f profile.jfr Worker +asprof collect -d 60 --jfrsync ${JAVA_HOME}/lib/jfr/default.jfc -f profile.jfr Worker ``` Use the following for more accurate profiling: ```shell -profiler.sh collect -d 60 --jfrsync ${JAVA_HOME}/lib/jfr/default.jfc -e cycles --cstack lbr -f profile.jfr Worker +asprof collect -d 60 --jfrsync ${JAVA_HOME}/lib/jfr/default.jfc -e cycles --cstack lbr -f profile.jfr Worker ``` Or use the following if you do not care for a jfr file but want a flamegraph directly: ```shell -profiler.sh collect -d 60 -f flamegraph.html Worker +asprof collect -d 60 -f flamegraph.html Worker ``` # Perf diff --git a/playbooks/install_async_profiler.yaml b/playbooks/install_async_profiler.yaml index fbd1483e9d..93fc8bbf12 100644 --- a/playbooks/install_async_profiler.yaml +++ b/playbooks/install_async_profiler.yaml @@ -38,7 +38,7 @@ lineinfile: dest: ~{{ console_user | default(ansible_user) }}/.bashrc state: present - line: "export PATH=$ASYNC_PROFILER_HOME/:$PATH" + line: "export PATH=$ASYNC_PROFILER_HOME/bin/:$PATH" insertbefore: BOF - name: Update ASYNC_PROFILER_HOME @@ -49,4 +49,3 @@ line: "export ASYNC_PROFILER_HOME=~{{ console_user | default(ansible_user) }}/{{ archive_contents.files[0].split('/')[0] }}" insertbefore: BOF - diff --git a/src/agents_clean.py b/src/agents_clean.py index 77ff7d8f42..2297366e4e 100755 --- a/src/agents_clean.py +++ b/src/agents_clean.py @@ -13,5 +13,5 @@ def _agent_clear(agent): def agents_clean(agents): info(f"Clearing agents: starting") - run_parallel(_agent_clear, [(agent,) for agent in agents]) + # run_parallel(_agent_clear, [(agent,) for agent in agents]) info(f"Clearing agents: done")