Java profiling using jdwp

412 Views Asked by At

I have a java webserver (wildfly 10) running my java *.war applications. I managed to setup my Eclipse to "Remote Debug" listen to port 9797. This is all great but how do I profile how long each of my methods takes - using jdwp?

bin/standalone.conf
JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=9797,server=y,suspend=n"
1

There are 1 best solutions below

0
On BEST ANSWER

You cannot use JDWP alone for profiling. I'd recommend that you take a look at Visual VM that can attach to the existing process and perform profiling / sampling for you : https://visualvm.github.io/download.html