IBM's Java Diagnostics, part 4th

Source: Internet
Author: User

Extending IBM Dump Analyzer for Java using the analysis module

Write your own analysis program

Introduction: The first article in this series describes IBM dump analyzer for Java (or dump analyzer). You've learned how it functions, how it gets done, and how it works. Before starting this article, you should review the previous installment to make sure you fully understand how the Dump Analyzer works.

A key aspect of the Dump Analyzer tool is its scalability. It is composed of a set of analysis modules, each of which is responsible for analyzing a specific aspect of the dump and helping to diagnose specific types of problems. This step-by-step article explains how to write a new analysis module and how to run it inside the Dump Analyzer.

Overview

The build base for Dump Analyzer is the diagnostic tooling Framework for Java (DTFJ), which is part of IBM's Java platform implementation. If you want to write a Dump Analyzer analysis module, you should be familiar with DTFJ.

The goal of the Dump Analyzer tool is to provide an environment that has been basically built, for a specific analysis module to run. First, the JVM must have built the system dump and formatted it using the Jextract tool. Dump Analyzer First selects a suitable image factory (will read the formatted dump) and then reads the file to create a DTFJ image object that describes the memory content. A separate analysis context is then built for each Java runtime in the dump. Finally, select a specific analysis module to run in these contexts.

The parsing module accesses all of the Image at run time, but it is primarily accessed for the specific Java runtime it is analyzing. In addition, it will use various tools to generate reports, report processes, and errors. You can also use a number of utility classes to simplify the writing of your analysis program. Over time, our team expects to be able to provide more practical classes when writing analysis programs and separating useful infrastructures.

You may need to build three types of analysis modules. The first module will run and draw conclusions about the run-time content of the analysis. The conclusion is similar to "the JIT is active", "There are deadlocks", "this dump being caused by" "or" This dump application contains Phere®classes ". The second type generates a report that describes details about the Image content. You can use these reports when you try to diagnose application failures. These reports, of course, contain warning messages about potential errors and list the contents of the dump. Both types of modules should be written in the Java language, and this article will use the term Analyzer (Analyzer) to refer to any type of analysis module.

In general, the conclusions of the first analysis module will be examined further by another analysis module, attempting to diagnose specific failures or provide recommended operations. Finally, you should be able to generate recommended actions similar to the following:

If the dump is caused by a protection failure ...

...... The current thread is in the local code ...

...... The current local code is in the package com.acme ...

...... We recommend that you contact ACME Industries for further analysis.

These types of rules can be written using the scripting language that is included with the Dump Analyzer. This script represents the third type of analysis module. Dump Analyzer is designed with simplicity in mind and does not use a looping structure. Within the script, you can request a specific parse operation and output some conclusions. The scripts themselves do not actually perform the analysis, but rather link the other analysis modules logically.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.