Welcome!

Jinwoo Hwang

Subscribe to Jinwoo Hwang: eMailAlertsEmail Alerts
Get Jinwoo Hwang via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: Virtualization Magazine, Java EE Journal, JavaBlackBelt, Sun Developer Journal, IBM Journal, Java Developer Magazine

Article

Anatomy of a Java Finalizer

Experimenting on finalizer implementations in various Java Virtual Machines

The analysis tells us that the tenured generation got exhausted and the tool recommends that we increase the Java heap size with the -Xmx command-line option. If it does not help, we can use IBM's HeapAnalyzer to investigate the Java heap dump. If we click on chart icon, we can see what's happening visually in Figure 3.

By default, Java heap usage in tenured generation after garbage collection is shown in red. The X axis represents time. The Y axis represents the size of the Java heap (left) or milliseconds (right).

Each red dot represents each Java garbage collection activity. The red-dotted vertical line represents Java heap exhaustion. We can see that Java heap usage in tenured generation went up and then we had Java heap exhaustion. After that, Java heap usage in tenured generation plateaued all the way to the end of the Java Virtual Machine execution.

By clicking on the "Max Tenured" button, we can check whether tenured generation reached its maximum size at the plateau (see Figure 4).

We can see that Java heap usage in tenured generation reached maximum size. You might have already noticed that increasing the maximum size of tenured generation would only delay the java.lang.OutOfMemoryError. So we do not need to try with a larger -Xmx command-line option. Let's move on and run the IBM HeapAnalyzer to investigate the Java heap dump.

More details about IBM Pattern Modeling and Analysis Tool for Java Garbage Collector is outside of scope of this article. Further information is available in this Webcast replay: "How to analyze verbosegc trace with IBM Pattern Modeling and Analysis Tool for IBM Java Garbage Collector".

More Stories By Jinwoo Hwang

Jinwoo Hwang is a software engineer, inventor, author, and technical leader at IBM WebSphere Application Server Technical Support in Research Triangle Park, North Carolina. He joined IBM in 1995 and worked with IBM Global Learning Services, IBM Consulting Services, and software development teams prior to his current position at IBM. He is an IBM Certified Solution Developer and IBM Certified WebSphere Application Server System Administrator as well as a SUN Certified Programmer for the Java platform. He is the architect and creator of the following technologies:

Mr. Hwang is the author of the book C Programming for Novices (ISBN:9788985553643, Yonam Press, 1995) as well as the following webcasts and articles:

Mr. Hwang is the author of the following IBM technical articles:

  • VisualAge Performance Guide,1999
  • CORBA distributed object applet/servlet programming for IBM WebSphere Application Server and VisualAge for Java v2.0E ,1999
  • Java CORBA programming for VisualAge for Java ,1998
  • MVS/CICS application programming for VisualAge Generator ,1998
  • Oracle Native/ODBC application programming for VisualAge Generator ,1998
  • MVS/CICS application Web connection programming for VisualAge Generator ,1998
  • Java applet programming for VisualAge WebRunner ,1998
  • VisualAge for Java/WebRunner Server Works Java Servlet Programming Guide ,1998
  • RMI Java Applet programming for VisualAge for Java ,1998
  • Multimedia Database Java Applet Programming Guide ,1997
  • CICS ECI Java Applet programming guide for VisualAge Generator 3.0 ,1997
  • CICS ECI DB2 Application programming guide for VigualGen, 1997
  • VisualGen CICS ECI programming guide, 1997
  • VisualGen CICS DPL programming guide, 1997

Mr. Hwang holds the following patents in the U.S. / other countries:


Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
vishetty 07/30/09 07:28:00 AM EDT

Hi,
you seem to say that,
"If there's any exception thrown by the finalize() method, the finalization of the object is halted.", But the Java Language specification seems to say "If an uncaught exception is thrown during the finalization, the exception is ignored and finalization of that object terminates".
Is this is a IBM JVM specific behavior?