Created
March 8, 2012 13:15
-
-
Save rednaxelafx/2000950 to your computer and use it in GitHub Desktop.
BTrace script to log System.gc() calls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.sun.btrace.annotations.*; | |
import static com.sun.btrace.BTraceUtils.*; | |
@BTrace | |
public class TraceSystemGCCall { | |
@OnMethod( | |
clazz="/.*/", | |
method="/.*/", | |
location=@Location( | |
value=Kind.CALL, | |
clazz="java.lang.System", | |
method="gc" | |
) | |
) | |
public static void onSystemGC() { | |
jstack(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment