JVM
Java · 21 notes
- Java Production Issue Troubleshootinghistorical
Java production troubleshooting can start by finding resource-heavy processes with tools such as top, then locating related threads or code. These notes record diagnostic steps.
- Garbage Collection Conceptshistorical
Object reclamation can use approaches such as reference counting or reachability. These notes begin with counters and examine circular-reference problems.
- 7.4 Class Lifecyclehistorical
Java classes pass through loading, linking, initialization, use, and unloading. These notes organize the work performed at each stage.
- 7.5 Memory Regionshistorical
The JVM uses runtime memory areas for objects and other data. These notes begin with the heap and examine each area's role and creation timing.
- 7.6 Tuning Approachhistorical
Tuning Approach: Reduce the number of Full GCs / reduce Full GC duration / reduce memory usage.
- Garbage Collection Algorithmshistorical
Garbage collection identifies reachable objects and handles those no longer used. These notes organize algorithms around marking and reclamation.
- Class Initialization Orderhistorical
Active use can trigger Java class initialization, including prior parent-class initialization. These notes use code examples to examine class and instance initialization order.
- 7.9 Object Allocation Ruleshistorical
Object Allocation Rules: Objects are preferentially allocated in the Eden area. If there is not enough space in Eden, the virtual machine performs a Minor GC.
- 7.10 3. Garbage Collectorshistorical
Objects have different lifetimes, motivating generational memory organization and collection. These notes compare collectors through young- and old-generation characteristics.
- Custom Class Loaderhistorical
Custom class loaders can load classes from selected paths and isolate same-named classes in different applications. These notes examine implementations through those scenarios.
- Escape Analysishistorical
Escape analysis examines an object's scope and whether code outside a method or thread can access it. These notes organize cases such as method escape.
- 7.13 4. Selecting a Specific Garbage Collector with JVM Parametershistorical
JVM startup options select garbage collectors. These notes record collector combinations for young and old generations and their corresponding flags.
- 7.14 Object Creation Processhistorical
Java object creation involves allocation, constructor invocation, and storing a reference. These notes trace a new expression through bytecode.
- Garbage Collectionhistorical
JVM garbage collection can be studied through its concepts, algorithms, collectors, and selection flags. This page links those topics.
- 7.16 Object Layout in Memoryhistorical
Java objects store headers and instance data, with arrays also carrying length information. These notes compare ordinary-object and array layouts.
- 7.17 Referenceshistorical
Java references have different strengths that affect whether an object can be reclaimed. These notes compare them through examples, starting with strong references.
- How Objects Are Locatedhistorical
Java can locate objects through direct pointers. These notes compare object-access approaches and examine references when garbage collection moves objects.
- 7.19 OOM Exampleshistorical
GC cannot reclaim strongly reachable objects, which may continue consuming memory. These notes illustrate out-of-memory failures across memory areas.
- 7.20 Performance Analysis Toolshistorical
JVM performance troubleshooting begins with process information and suitable diagnostic tools. These notes organize tools by their commands and output.
- 7.21 JVM Parameter Tuninghistorical
JVM heap size can be configured with options such as -Xms and -Xmx. These notes continue with generation ratios and their relationship to GC costs.
- 7.22 GC Log Analysishistorical
GC logs expose young- and old-generation collections. These notes use Parallel GC logs to explain output fields and analysis tools.