Skip to content

Debugging PermGen Space

September 9, 2010

use jstat for stats on perm gen space and gc utils.

jmap -permstat 2239

-XX:+TraceClassLoading or -XX:+TraceClassUnloading

OR use : Btrace just to get classes loaded info:

package com.sun.btrace.samples;

import static com.sun.btrace.BTraceUtils.*;
import com.sun.btrace.annotations.*;

 * A simple BTrace program that prints stack trace
 * whenever a class is loaded by a user-defined
 * class loader. We insert a return point probe in
 * ClassLoader.defineClass method to detect successful
 * class load.
@BTrace public class Classload {
   public static void defineclass(Class cl) {
       println(strcat("loaded ", name(cl)));

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: