Skip to content

Conversation

@apangin
Copy link
Member

@apangin apangin commented Jan 24, 2018

  • New output format: -o svg
  • Automatically choose output format depending on file extension
  • Removed references to flamegraph.pl

Copy link
Contributor

@goldshtn goldshtn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@apangin
Copy link
Member Author

apangin commented Jan 24, 2018

Thank you for review!

@apangin apangin merged commit 5637877 into master Jan 24, 2018
@apangin apangin deleted the flamegraph branch January 24, 2018 20:36
@rockiee281
Copy link

With -f flame.svg ,no output int flame.svg but something like 'Stopped profiling after 30 seconds'.

Without '-f' option, I can get the load trace normally.

env: Centos 7.2, jdk8 with hotspot, 32G memory with G1, build the async-profiler from master

@apangin
Copy link
Member Author

apangin commented Jan 26, 2018

@rockiee281 I guess an older version of libasyncProfiler.so had been already loaded into Java process before you started profiling with a new version. Can it be the case?

@rockiee281
Copy link

Hi, I build a fresh aysnc-profiler from source, and never use this tools before so I think there won't be any libasyncProfiler.so load by java process before

@rockiee281
Copy link

Anyway , now I use the old way to generate colloapsed tarce file and make flame graph by flamegraph.pl . This is really great tool, thanks

@apangin
Copy link
Member Author

apangin commented Jan 29, 2018

@rockiee281 Hmm. -f flame.svg is also supposed to work. If it does not - it is a bug that I'd like to fix. If you can easily reproduce the problem, could you please add the following echo line to see the full jattach command issued by profiler.sh? Thanks.

diff --git a/profiler.sh b/profiler.sh
index 644a25b..d389950 100755
--- a/profiler.sh
+++ b/profiler.sh
@@ -45,6 +45,7 @@ check_if_terminated() {
 }

 jattach() {
+    echo $JATTACH $PID load "$PROFILER" true $1
     $JATTACH $PID load "$PROFILER" true $1 > /dev/null
     RET=$?

@rockiee281
Copy link

@apangin this output 2 lines:
./build/jattach 134836 load /<dir_where_build>/async-profiler/build/libasyncProfiler.so true start,event=cpu,file=flame1.svg,svg
./build/jattach 134836 load /<dir_where_build>/async-profiler/build/libasyncProfiler.so true stop,file=flame1.svg,svg

And this time it works well. I think its my mistake. Thanks you 👍

6fears7 pushed a commit to 6fears7/async-profiler that referenced this pull request Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants