Search code examples
javaeclipsegarbage-collection

how to use GCMV in Eclipse?


All in the title.

I just found this plugin in Eclipse to evaluate my WebApp running on a tomcat6 server. After I open the perspective GCMV and turn on the server, it shows nothing at all.

I've done some search about GCMV tutorial Eclipse etc. But didn't find anything interesting.

Well I know I'm such an idiot, so can someone give some instructions about how to use it?


Solution

  • GCMV doesn't work on a running JVM. It is used offline after the application finishes.

    To use it, do the following:

    1. Add the following VM argument to your command line to generate a gc log file:

      -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:[log file location]

    2. From GCMV perspective use File->Load File... with the file generated in step 1.