Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword or section
Like this

Table Of Contents

About the Diagnostics Guide
What does the "Java Virtual Machine (JVM)" mean?
Who should read this book
Using this book
Other sources of information
Reporting problems
Conventions and terminology
Java application stack
Components of the IBM Virtual Machine for Java
Java Application Stack
JVM Application Programming Interface (API)
Diagnostics component
Memory management
Class loader
Platform port layer
Chapter 2. Memory management
Overview of memory management
Object allocation
Reachable objects
Garbage collection
Heap sizing problems
Heap lock allocation
Cache allocation
Large Object Area
Detailed description of garbage collection
Mark phase
Mark stack overflow
Concurrent mark
Sweep phase
Parallel bitwise sweep
Compaction phase
Subpool (AIX, Linux PPC and zSeries, z/OS and i5/OS only)
Reference objects
Final reference processing
JNI weak reference
Heap expansion
Heap shrinkage
Generational Concurrent Garbage Collector
Tenure age
Tilt ratio
How to do heap sizing
Initial and maximum heap sizes
Using verbose:gc
Using fine tuning options
Interaction of the Garbage Collector with applications
How to coexist with the Garbage Collector
Root set
Thread local heap
Bug reports
Nature of finalizers
How finalizers are run
Manually starting the Garbage Collector
Frequently asked questions about the Garbage Collector
Chapter 3. Class loading
The parent-delegation model
Namespaces and the runtime package
Custom class loaders
Chapter 4. Class data sharing
Chapter 5. The JIT compiler
JIT compiler overview
How the JIT compiler optimizes code
1. Inlining
2. Local optimizations
Phase 1 - inlining
Phase 2 - local optimizations
Phase 3 - control flow optimizations
Phase 4 - global optimizations
Phase 5 - native code generation
Frequently asked questions about the JIT compliler
The RMI implementation
Thread pooling for RMI connection handlers
Understanding distributed garbage collection
Debugging applications involving RMI
Chapter 7. The ORB
RMI-IIOP limitations
Further reading
Examples of client–server applications
Remote object implementation (or servant)
Stubs and ties generation
Server code
Using the ORB
v org.omg.CORBA.ORBId
v org.omg.CORBA.ORBListenEndpoints
v org.omg.CORBA.ORBServerId
How the ORB works
The client side
ORB initialization
Remote method invocation
Interoperable Naming Service (INS)
Chapter 8. The Java Native Interface (JNI)
Overview of JNI
The JNI and the Garbage Collector
Overview of JNI object references
JNI transitions
Copying and pinning
Using the isCopy flag
Using the mode flag
A generic way to use the isCopy and mode flags
Handling exceptions
Debugging the JNI
JNI checklist
Part 2. Submitting problem reports
Part 3. Problem determination
Chapter 9. First steps in problem determination
Chapter 10. AIX problem determination
Setting up and checking your AIX environment
Enabling full AIX core files
Operating system settings
Java Virtual Machine settings
Available disk space
General debugging techniques
AIX debugging commands
AIX busy hangs
Poor performance on AIX
Understanding memory usage
32- and 64-bit JVMs
The 32-bit AIX Virtual Memory Model
The 64-bit AIX Virtual Memory Model
Changing the Memory Model (32-bit JVM)
The native and Java heaps
The AIX 32-bit JVM default memory models
Monitoring the native heap
Native heap usage
Monitoring the Java heap
Receiving OutOfMemoryError exceptions
Is the Java or native heap exhausted?
Java heap exhaustion
Native heap exhaustion
AIX fragmentation problems
See MALLOCTYPE=buckets
Submitting a bug report
Debugging performance problems
Finding the bottleneck
CPU bottlenecks
Memory bottlenecks
I/O bottlenecks
JVM heap sizing
JIT compilation and performance
Application profiling
MustGather information for AIX
Setting up and checking your Linux environment
Working directory
Threading libraries
Using system dump tools
Examining process information
The ps command
The vmstat command
Tracing tools
Debugging with gdb
Debugging memory leaks
CPU usage
Memory usage
Network problems
MustGather information for Linux
Producing system dumps
Producing Javadumps
Using system logs
Determining the operating environment
Sending information to Java Support
/proc file system
Known limitations on Linux
Threads as processes
Floating stacks limitations
glibc limitations
Setting up and checking your Windows environment
Windows 32-bit large address aware support
System dump
Diagnosing crashes in Windows
Data to send to IBM
Getting a dump from a hung JVM
Analyzing deadlocks
The Windows memory model
Classifying leaks
Tracing leaks
Using Heapdump to debug memory leaks
OutOfMemoryError creating a thread
Windows systems resource usage
MustGather information for Windows
Setting up and checking your z/OS environment
LE settings
Environment variables
Private storage usage
Setting up dumps
Using IPCS commands
Using dbx
Interpreting error message IDs
Determining the failing function
Working with TDUMPs using IPCS
The process is deadlocked
The process is looping
The process is performing badly
Understanding Memory Usage
Allocations to LE HEAP
z/OS virtual storage
OutOfMemoryError exceptions
z/OS systems resource usage
MustGather information for z/OS
Determining which VM is in use
Setting up your IBM Technology for Java Environment
Required Software and Licensing
Configuring JAVA_HOME
Enabling i5/OS PASE core files
Setting environment variables for i5/OS PASE or QShell
Determining the home directory for a user
Setting default Java command-line options
Diagnosing problems at the command line
IBM i debugging commands
Work with Active Jobs (WRKACTJOB)
Work with Job (WRKJOB)
Work with System Status (WRKSYSSTS)
Work with Disk Status (WRKDSKSTS)
Process Status (ps)
Debugger (dbx)
Analyzing CPU bottlenecks
Analyzing memory problems
Analyzing I/O problems
Checking the system environment
Finding out about the Java environment
Detailed crash diagnosis
Diagnosing hangs
i5/OS deadlocks
i5/OS busy hangs
The 32-bit i5/OS PASE Virtual memory model
The process and garbage-collected heaps
Monitoring the garbage-collected heap
Process heap usage
Garbage-collected heap exhaustion
Using the DBX Plug-in for Java
Important dbx usage notes and warnings
Using dbx to investigate a Java system dump
Identifying an ORB problem
Debug properties
ORB exceptions
System exceptions
Completion status and minor codes
Java security permissions for the ORB
Interpreting the stack trace
Description string
Interpreting ORB traces
Message trace
Comm traces
Client or server
Service contexts
Common problems
ORB application hangs
Client and server are running, but not naming service
IBM ORB service: collecting data
Preliminary tests
Overview of fonts
Font utilities
Common NLS problem and possible causes
Part 4. Using diagnostic tools
Categorizing the problem
Summary of diagnostic information
Summary of cross-platform tooling
Heapdump analysis tooling
Cross-platform dump viewer
JVMTI tools
JVMPI tools
JPDA tools
Trace formatting
Chapter 21. Using dump agents
Using the -Xdump option
Merging -Xdump agents
Dump agents
Console dumps
System dumps
Stack dumps
Tool option
Snap traces
Dump events
Advanced control of dump agents
exec option
file option
filter option
opts option
Priority option
range option
request option
defaults option
Dump agent tokens
Default dump agents
Removing dump agents
Dump agent environment variables
Signal mappings
Windows, Linux, AIX, and i5/OS specifics
z/OS specifics
Chapter 22. Using Javadump
Enabling a Javadump
Triggering a Javadump
Interpreting a Javadump
Javadump tags
Storage Management (MEMINFO)
Locks, monitors, and deadlocks (LOCKS)
Threads and stack trace (THREADS)
Classloaders and Classes (CLASSES)
Environment variables and Javadump
Chapter 23. Using Heapdump
Information for users of previous releases of Heapdump
Getting Heapdumps
Enabling text formatted ("classic") Heapdumps
Available tools for processing Heapdumps
Using -Xverbose:gc to obtain heap information
Environment variables and Heapdump
Text (classic) Heapdump file format
Chapter 24. Using system dumps and the dump viewer
Overview of system dumps
System dump defaults
Overview of the dump viewer
Using the dump extractor, jextract
Example session
Chapter 25. Tracing Java applications and the JVM
What can be traced?
Types of tracepoint
Default tracing
Default assertion tracing
Where does the data go?
Writing trace data to memory buffers
Writing trace data to a file
External tracing
Tracing to stderr
Trace combinations
Controlling the trace
Specifying trace options
Detailed descriptions of trace options
Tracepoint specification:
Using the Java API
Using the trace formatter
Determining the tracepoint ID of a tracepoint
Application trace
Implementing application trace
Printf specifiers
Using application trace at run time
Using method trace
Running with method trace
Untraceable methods
Examples of use
Example of method trace output
An example of method trace output
Collecting diagnostics from Java runtime problems
Verifying your Java diagnostics configuration
Configuring the Diagnostics Collector
Diagnostics Collector settings
Known limitations
How do the garbage collectors work?
Common causes of perceived leaks
Hash tables
Static class data
JNI references
Objects with finalizers
-verbose:gc logging
Global collections
Garbage collection triggered by System.gc()
Allocation failures
Tenured allocation failures
Scavenger collections
Concurrent garbage collection
Concurrent sweep completed
Concurrent kickoff
Allocation failures during concurrent mark
System.gc() calls during concurrent mark
Timing problems during garbage collection
-Xtgc tracing
Finding which methods allocated large objects
Chapter 29. Class-loader diagnostics
Class-loader command-line options
Class-loader runtime diagnostics
Loading from native code
Deploying shared classes
Cache naming
Cache access
Cache housekeeping
Cache performance
Growing classpaths
Concurrent access
Compatibility between service releases
Nonpersistent shared cache cleanup
Dealing with runtime bytecode modification
Modification contexts
SharedClassHelper partitions
Using the safemode option
Further considerations for runtime bytecode modification
Understanding dynamic updates
Redeeming stale classes
Using the Java Helper API
SharedClassHelper API
Understanding shared classes diagnostics output
Verbose output
VerboseIO output
VerboseHelper output
printStats utility
printAllStats utility
Debugging problems with shared classes
Using shared classes trace
Why classes in the cache might not be found or stored
Dealing with initialization problems
Dealing with verification problems
Dealing with cache problems
Class sharing with OSGi ClassLoading framework
Preparing to use JVMRI
Writing an agent
Registering a trace listener
Changing trace options
Starting the agent
Building the agent
Agent design
JVMRI functions
API calls provided by JVMRI
RasInfo structure
RasInfo request types
Intercepting trace data
The -Xtrace:external=<option>
Calling external trace
Chapter 32. Using the HPROF Profiler
Explanation of the HPROF output file
Chapter 33. Using the JVMTI
Chapter 34. Using the Diagnostic Tool Framework for Java
Using the DTFJ interface
DTFJ example application
Chapter 35. Using JConsole
Part 5. Appendixes
Appendix A. CORBA minor codes
Appendix B. Environment variables
Displaying the current environment
Setting an environment variable
Separating values in a list
JVM environment settings
z/OS environment variables
Appendix C. Messages
DUMP messages
J9VM messages
SHRC messages
Appendix D. Command-line options
Specifying command-line options
General command-line options
System property command-line options
JVM command-line options
-XX command-line options
JIT command-line options
Garbage Collector command-line options
Appendix E. Default settings for the JVM
0 of .
Results for:
No results containing your search query
P. 1
JVM Diagnostics Guide

JVM Diagnostics Guide

|Views: 116|Likes:
Published by siteuse

More info:

Published by: siteuse on Sep 14, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





You're Reading a Free Preview
Pages 10 to 78 are not shown in this preview.
You're Reading a Free Preview
Pages 88 to 114 are not shown in this preview.
You're Reading a Free Preview
Pages 124 to 285 are not shown in this preview.
You're Reading a Free Preview
Pages 295 to 334 are not shown in this preview.
You're Reading a Free Preview
Pages 344 to 498 are not shown in this preview.

Activity (5)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
mainstreet liked this
Manusch liked this
bobbyg1 liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->