Index

A

Addresses, finding, 92

Age tables, 19

Aging, live objects, 18, 19

Allocating humongous objects, allocation path, 19, 21

Available regions, 8

B

Barriers, in RSets, 2830, 35

Boolean command-line options, 145

C

Cards, definition, 25

Chunks. See also Regions

cards, 25

definition, 2528

global card table, 2528

Class browser, 8485

Class files, dumping, 84, 112

Class instances, displaying, 88

ClassDump, 106108

Classes

dumping, 106108

unloading, 153

Cleanup phase, G1 GC, 13

Cleanup stage of concurrent marking, 36

CLHSDB (Command-Line HotSpot Debugger). See also HSDB (HotSpot Debugger)

command list, 102

description, 100102

Java objects, examining, 101

launching, 100

VM data structures, examining, 101

CMS (Concurrent Mark Sweep) GC, pause times, 57

Coarse-grained bitmap, 25

Code root scanning, 4344

Code Viewer, 9597

Code Viewer panel, 120122

Collection sets (CSets). See CSets (collection sets)

Command Line Flags, 98, 100

Command-line options. See also specific options

boolean, 145

default values, 146

diagnostic options, enabling, 153154

displaying, 98, 100

overtuning, causing evacuation failure, 59

types of, 145

Compaction

CMS (Concurrent Mark Sweep) GC, 7

G1 GC, 10, 12

Parallel GC, 23

Compute Reverse Pointers, 8990

Concurrent cycle, G1 GC, 13

Concurrent garbage collection, definition, 2

Concurrent Mark Sweep (CMS) GC, pause times, 57

Concurrent marking

concurrent marking pre-write barriers, 35

description, 13

high remark times, 36

identifying allocated objects, 30

next bitmap, 3033

NTAMS (next TAMS), 3033, 37

overview, 33

previous bitmap, 3033

pre-write barriers, 35

PTAMS (previous TAMS), 3033, 37

SATB (snapshot-at-the-beginning), 30

SATB pre-write barriers, 35

TAMS (top-at-mark-starts), 3033

Concurrent marking, stages of

cleanup, 36

concurrent marking, 3436

initial mark, 34

remark, 36

root region scanning, 34

Concurrent marking cycle, triggering, 21

Concurrent marking phase, tuning, 5254

Concurrent marking pre-write barriers, 35

Concurrent marking stage of concurrent marking, 3436

Concurrent refinement threads, 4243

logging, 148

maximum number, setting, 29

purpose of, 29

in RSets, 2830

Concurrent root region scanning, 13

Constant pools, 70

Copy to survivor, 18, 19

Core files. See also Crash dump files

attaching to HSDB, 76

collecting, 108

Command Line Flags, 98, 100

command-line JVM options, displaying, 98, 100

creating, 108

description, 108

exploring with the SA Plugin, 118119

Java threads, displaying, 119120

JFR information, extracting, 107108

JVM version, displaying, 9899

multiple debugging sessions on, 113

opening with Serviceability Agent, 7677

permanent generation statistics, printing, 103104

process map, printing, 104

reading bits with the /proc interface, 111

remote debugging, 7880, 114

thread stack trace, displaying, 119120

Core files, transported

debugging, 109110

shared library problems, 109110, 112

Crash dump files. See also Core files

attaching HSDB to, 76

collecting, 108

creating, 108

description, 108

reading bits with the Windows Debugger Engine, 111

CSets (collection sets)

definition, 9

minimum old CSet size, setting, 5758

old regions per CSet, maximum threshold, 58

old regions per CSet, minimum threshold, 5758

D

Deadlock Detection, 84, 86

Deadlocks

detecting, 84, 86

troubleshooting, 131136

Debug messages, enable printing on Windows, 112

Debugging tools. See JDI (Java Debug Interface); Serviceability Agent

Deduplicating Java strings, 149151

Dirty card queue, 2930

DumpJFR, 107108

E

Eden space, 11, 1819

Efficiency, garbage collection. See GC efficiency

Ergonomics heuristics, dumping, 55

Evacuation, 47

Evacuation failures

definition, 16

duration of, determining, 37

log messages, 5354

overview, 3738

to-space exhausted log message, 5354

Evacuation failures, potential causes

heap size, 59

insufficient space in survivor regions, 60

long-lived humongous objects, 5960

overtuning JVM command-line options, 59

External root region scanning, 42

F

Finalizable objects, printing details of, 103

FinalizerInfo, 103

Find Address in Heap, 9293

Find Object by Query, 9091

Find panel, 122123

Find Pointer, 92, 122123

Find Value in Code Cache, 9293

Find Value in CodeCache (in VisualVM), 122123

Find Value in Heap, 122123

Fine RSets, 25

Fragmentation

CMS (Concurrent Mark Sweep) GC, 7

G1 GC, 10

maximum allowable, 5659

per region, controlling, 58

Full GCs

algorithm for, 1213

compacting the heap, 1213

evaluation failures, 3738

triggering, 3738

G

G1 garbage collector. See G1 GC

G1 GC. See also Regions

available regions, 8

cleanup, 13

collection cycles, 1617

compaction, 10, 12

concurrent cycle, 13

concurrent marking, 13

concurrent root region scanning, 13

description, 810

enabling, 146

fragmentation, 10

free memory amount, setting, 146147

full GCs, 1213

heap sizing, 14

initial-mark phase, 13

marking the live object graph, 13

pause times, 10

remarking, 13

threads, setting number of, 146

Garbage, maximum allowable, 5659

Garbage collectors. common issues, 78

Garbage First garbage collector. See G1 GC

Garbage-collector-related issues, 92

GC efficiency

definition, 17

identifying garbage collection candidates, 2224

GC Worker Other times too high, 48

GCLABs (GC local allocation buffers), 47

gcore tool, 108

Generations, definition, 24

H

Heap, occupancy threshold, adaptive adjustment, 151

Heap Parameters, 98

HeapDumper, 103

Heaps

boundaries, displaying, 9899, 101

dividing into regions. See Regions

dumping, 103

free memory, setting, 152

G1 concurrent cycle, initiating, 149

liveness information, printing, 147

raw memory contents, displaying, 94

region size, setting, 146

size, causing evacuation failure, 59

size changes, logging, 152

sizes, Parallel GC, 24

sizing, G1 GC, 14

HotSpot Serviceability Agent. See Serviceability Agent

Hprof files, creating, 149

HSDB (HotSpot Debugger). See also CLHSDB (Command-Line HotSpot Debugger)

connecting to debug server, 7880

core files, attaching to, 76

debugging modes, 74

description, 7280

HotSpot processes, attaching to, 7476

launching, 72

opening core files, 7677

remote debugging, 7880

HSDB (HotSpot Debugger) tools and utilities

addresses, finding, 92

class browser, 8485

class instances, displaying, 88

Code Viewer, 9597

Compute Reverse Pointers, 8990

Deadlock Detection, 84, 86

displaying Java threads, 8084

dumping class files, 84, 112

Find Address in Heap, 9293

Find Object by Query, 9091

Find Pointer, 92

Find Value in Code Cache, 9293

garbage-collector-related issues, 92

heap boundaries, displaying, 9899

Heap Parameters, 98

Java Threads, 8084

JIT compiler-related problems, 9293, 9597

liveness path, getting, 8889, 91

memory leaks, 8789

Memory Viewer, 94

method bytecodes, displaying, 9597, 120122

Monitor Cache Dump, 94

Object Histogram, 8789

Object Inspector, 8587

out-of-memory problems, 8789

raw memory contents, displaying, 94

reference paths, computing, 8990

synchronization-related issues, 95

System Properties, 9899

VM Version Info, 9899

Humongous continue regions, 12

Humongous objects

allocation path, 19, 21

causing evacuation failure, 5960

description, 12

identifying, 19

optimizing allocation and reclamation of, 20

short-lived, optimizing collection of, 21

Humongous Reclaim, 50

Humongous regions

contiguity, 21

definition, 11

description, 1921

examples of, 2021

Humongous start regions, 12

I

IHOP. See XX:InitiatingHeapOccupancyPercent

Initial-mark stage of concurrent marking, 34

Initial-mark phase, G1 GC, 13

inspect command, 101

J

Java application threads. See Threads

Java Debug Interface (JDI). See JDI (Java Debug Interface)

Java heaps. See Heaps

Java objects. See also Humongous objects; Young collection pauses, live objects

examining, 101

ordinary object pointers, inspecting, 120121

Java Stack Trace panel, 119120

Java strings

deduplicating, 149150

deduplication statistics, printing, 151

deduplication threshold, setting, 150

Java threads. See Threads

Java Threads panel, 119120

java.lang.OutOfMemoryError, 123130

java.lang.OutOfMemoryError, troubleshooting, 123130

Java-level deadlocks, troubleshooting, 131136

JavaScript Debugger (JSDB), 108

JavaScript interface to Serviceability Agent, 108

JDI (Java Debug Interface)

description, 113

SA Core Attaching Connector, 113

SA Debug Server Attaching Connector, 114

SAPID Attaching Connector, 113

JFR information, extracting, 107108

JIT compiler-related problems, 9293, 9597

jsadebugd utility, 114

JSDB (JavaScript Debugger), 108

JVM version, displaying, 9899

L

Large object allocations. See Humongous objects

LIBSAPROC_DEBUG environment variable, 112

libsaproc.so binaries, 69

Licensed features, enabling, 154

Live object graph, marking, 13

Live objects, liveness factor per region, calculating, 2224

Liveness information, printing, 147

Liveness path, getting, 8889, 91

Load balancing, 4748

Log messages, evacuation failures, 5354

Logging

concurrent refinement threads, 148

heap size changes, 152

update log buffer, 2930

M

Marking the live object graph, 13

Marking threshold, setting, 54

Memory

free amount, setting, 146147, 152

reserving for promotions, 147

Memory leaks, 8789

Memory Viewer, 94

Method bytecodes, displaying, 9597, 120122

Mixed collection cycle

definition, 23

number of mixed collections, determining, 2324

Mixed collection pause, 2224

Mixed collection phase

ergonomics heuristics, dumping, 55

fragmentation, maximum allowable, 5659

fragmentation per region, controlling, 58

garbage, maximum allowable, 5659

minimum old CSet size, setting, 5758

old regions per CSet, maximum threshold, 58

old regions per CSet, minimum threshold, 5758

reclaimable percentage threshold, 5659

tuning, 5456

Mixed GCs, 8, 147

Monitor Cache Dump, 94

Multithreaded parallel garbage collection, 12

Multithreaded reference processing, enabling, 62

Mutator threads, definition, 29

N

Native methods versus nmethods, 44

Next bitmap, 3033

Nmethods, 44

NTAMS (next TAMS), 3033, 37

O

Object Histogram, 8789, 105

Object histograms, collecting, 8789, 105

Object Inspector, 8587

Old generation, live objects

age tables, 19

aging, 19

Old-to-old references, 25

Old-to-young references, 25

Oop Inspector panel, 120121

oops (ordinary object pointers), inspecting, 120121

Out-of-memory problems, 8789

P

Parallel GC

compaction, 23

definition, 12

description, 24

enabling, 23

interrupting Java application threads, 4

Java heap sizes, 24

pause times, 4

uses for, 34

Pauses

Concurrent Mark Sweep (CMS) GC, 57

G1 GC, 10

Parallel GC, 4

Serial GC, 4

time goal, setting, 151

young collection, 1819

.pdb files, setting the path to, 111

Performance tuning. See Tuning

Permanent generation statistics, printing, 103104

PermStat, 103104

Per-region-tables (PRTs), 2526

PLABs, 18, 21, 152153

PMap, 104

Postmortem analysis

core files, 136143

Java HotSpot VM crashes, 136143

Previous bitmap, 3033

Previous TAMS (PTAMS), 3033, 37

Pre-write barriers

concurrent marking, 35

in RSets, 35

Process maps, printing, 104

Processed buffers, 4244

Processes

debugging, 113

exploring with the SA Plugin, 118119

Java threads, displaying, 119120

JFR information, extracting, 107108

JVM version, displaying, 9899

permanent generation statistics, printing, 103104

process map, printing, 104

reading bits with the /proc interface, 111

reading bits with the Windows Debugger Engine, 111

remote debugging, 114

thread stack trace, displaying, 119120

Promotion failure. See Evacuation failures

PRTs (per-region-tables), 2526

PTAMS (previous TAMS), 3033, 37

R

Raw memory contents, displaying, 94

Reading bits with the /proc interface, 111

Reclaimable percentage threshold, mixed collection phase, 5659

Reclaiming regions, 13

Reclamation, 47

Reference object types, 60

Reference paths, computing, 8990

Reference processing

enabling multithreaded reference processing, 62

excessive weak references, correcting, 63

observing, 60

overhead, 36

overview, 60

reference object types, 60

soft references, 6365

Region size

adaptive selection, overwriting, 18

average, 10

calculating, 10

determining, 18

setting, 146

Regions. See also Chunks; CSets (collection sets); RSets (remembered sets)

available, 8

candidates, identifying. See GC efficiency

concurrent root region scanning, 13

dividing heaps, 810

eden space, 11, 1819

GC efficiency, 17

humongous, 11

maximum number of, 1011

mixed GC, 8

mixing old generation with young collections, 8

reclaiming, 13

region size, 10

root, definition, 34

sorting. See GC efficiency

survivor fill capacity, 19

survivor space, 11, 1819

types of, 11

Remark stage of concurrent marking, 36

Remark times, high, reasons for, 36

Remarking phase, G1 GC, 13

Remembered sets (RSets). See RSets (remembered sets)

Remote debugging, 7880, 114

Resizing, young generation, 18

RMI (Remote Method Invocation), 114

Root objects, definition, 34

Root references, collecting, 13

Root region scanning stage of concurrent marking, 34

RSets (remembered sets)

barriers, 2830

coarse, 25

coarse-grained bitmap, 25

code root scanning, 4344

concurrent marking pre-write barriers, 35

concurrent refinement threads, 2830

definition, 11, 25

density, 25

fine, 25

number per region, 25

pre-write barriers, 35

printing a summary of, 147148

processed buffers, 4244

SATB pre-write barriers, 35

size, 11

sparse, 25

summarizing statistics, 4447

visualizing potential improvements, 47

write barriers, 2830

RSets (remembered sets), importance of

old-to-old references, 25

old-to-young references, 25

overview, 2428

PRTs (per-region-tables), 2526

S

SA_ALTROOT environment variable

description, 112

setting, 110

SA_IGNORE_THREADDB environment variable, 112

sa-jdi.jar binaries, 69, 113

SATB (snapshot-at-the-beginning), 30

SATB pre-write barriers, 35

sawindbg.dll binaries, 69

Scanning nmethods, 44

Serial GC. See also Parallel GC

definition, 4

description, 45

interrupting Java application threads, 5

pause times, 4

Serviceability Agent

binaries in the JDK, 6970

components, 69

description, 68

enable printing of debug messages on Windows, 112

environment variables, 112

HotSpot data structures, 7071

purpose of, 68

system properties, 111112

version matching, 71

Serviceability Agent, debugging tools. See also CLHSDB (Command-Line HotSpot Debugger); HSDB (HotSpot Debugger)

ClassDump, 106108

DumpJFR, 107108

extending, 115117

finalizable objects, printing details of, 103

FinalizerInfo, 103

heap, dumping, 103

HeapDumper, 103

JavaScript interface to Serviceability Agent, 108

JFR information, extracting, 107108

JSDB (JavaScript Debugger), 108

loaded classes, dumping, 106108

Object Histogram, 105

object histograms, collecting, 105

permanent generation statistics, printing, 103104

PermStat, 103104

PMap, 104

process maps, printing, 104

SOQL (Structured Object Query Language), 106

SOQL queries, executing, 106

Serviceability Agent, plugin for VisualVM

Code Viewer panel, 120122

description, 117118

Find panel, 122123

Find Pointer utility, 122123

Find Value in CodeCache utility, 122123

Find Value in Heap utility, 122123

installing, 118

Java Stack Trace panel, 119120

Java Threads panel, 119120

Oop Inspector panel, 120121

ordinary object pointers, inspecting, 120121

using, 118119

utilities, 119123

Serviceability Agent, troubleshooting problems

Java-level deadlocks, 131136

OutOfMemoryError, 123130

postmortem analysis of core files, 136143

postmortem analysis of HotSpot JVM crashes, 136143

Shared library problems with transported core files, 109110

Snapshot-at-the beginning (SATB), 30

Soft references, 6365

SOQL (Structured Object Query Language), 106

SOQL queries, executing, 106

Sparse RSets, 25

Stop-the-world garbage collection, 24

sun.jvm.hotspot.debugger.useProcDebugger, 111

sun.jvm.hotspot.debugger.useWindbgDebugger, 111

sun.jvm.hotspot.debugger.windbg.disableNativeLookup, 111

sun.jvm.hotspot.debugger.windbg.imagePath, 111

sun.jvm.hotspot.debugger.windbg.symbolPath, 111

sun.jvm.hotspot.jdi.SACoreAttachingConnector, 113

sun.jvm.hotspot.jdi.SAPIDAHachingConnector, 113

sun.jvm.hotspot.loadLibrary.DEBUG, 111

sun.jvm.hotspot.runtime.VM.disableVersionCheck, 111

sun.jvm.hotspot.tools.jcore.filter=<name of class> property, 106108, 111

sun.jvm.hotspot.tools.jcore.outputDir=<output directory> property, 106107

sun.jvm.hotspot.tools.jcore.PackageNameFilter.pkgList=<list of packages> property, 106, 111

sun.jvm.hotspot.tools.Tool, 115

Survivor fill capacity, 19

Survivor regions, insufficient space causing evacuation failure, 60

Survivor space, 11, 1819

Synchronization-related issues, 95

T

TAMS (top-at-mark-starts), 3033

Tenuring threshold, live objects, 18, 19

Termination, 4748

Thread count, increasing, 54

Thread stack trace, displaying, 119120

Threads

CMS (Concurrent Mark Sweep) GC, 67

displaying, 8084, 119120

setting number of, 146

time ratio, setting, 148149

Threads, interrupting

Parallel GC, 4

Serial GC, 5

Timed activities, variance in, 42

TLABs, 1718, 21, 153

Top-at-mark-starts (TAMS), 3033

To-space exhausted log message, 5354. See also Evacuation failures

To-space exhaustion. See Evacuation failures

To-space overflow. See Evacuation failures

Troubleshooting. See JDI (Java Debug Interface); Serviceability Agent

Tuning

concurrent marking phase, 5254

mixed collection phase, 5456

reclamation, 6365

young generations, 5052

U

universe command, 101

Update log buffer, 2930

userdump tool, 108

V

Version checking, disabling, 111

Version matching, 71

VisualVM. See Serviceability Agent

VM data structures, examining, 101

VM Version Info, 9899

VMStructs class, 7071

vmStructs.cpp file, 7071

W

Weak references, excessive, correcting, 63

Work stealing, 4748

Write barriers, RSets, 2830

X

–XX:+ClassUnloadingWithConcurrentMark, 36, 153

–XX:+CMSParallelInitialMarkEnabled, 6

–XX:+CMSParallelRemarkEnabled, 6

–XX:ConcGCThreads, 3435, 54, 146

–XX:G1ConcRefinementGreenZone, 29, 148

–XX:G1ConcRefinementRedZone, 29, 148

–XX:G1ConcRefinementThreads, 2930, 43

–XX:G1ConcRefinementYellowZone, 29, 148

–XX:G1HeapRegionSize, 19, 59, 146

–XX:G1HeapRegionSize=n, 18

–XX:G1HeapWastePercent, 23, 146147

–XX:G1MaxNewSizePercent, 17, 5052

–XX:G1MixedGCCountTarget, 23, 57, 147

–XX:G1MixedGCLiveThresholdPercent, 58

–XX:G1NewSizePercent, 17, 5052

–XX:+G1PrintRegionLivenessInfo, 147

–XX:G1ReservePercent, 60, 147

–XX:+G1SummarizeRSetStats, 4447, 147

–XX:G1SummarizeRSetStatsPeriod, 148

–XX:+G1TraceConcRefinement, 148

–XX:+G1UseAdaptiveConcRefinement, 148

–XX:+G1UseAdaptiveIHOP, 151

–XX:GCTimeRatio, 148149

–XX:+HeapDumpAfterFullGC, 149

–XX:+HeapDumpBeforeFullGC, 149

–XX:InitiatingHeapOccupancyPercent

default value, 11

description, 149

heap occupancy percentage, 22

occupancy threshold, default, 22

occupancy threshold, setting, 30

overview, 2224

–XX:InitiatingHeapOccupancyPercent=n, 5254

–XX:MaxGCPauseMillis, 17, 5052, 151

–XX:MaxHeapFreeRatio, 152

–XX:MaxTenuringThreshold, 19

–XX:MinHeapFreeRatio, 152

–XX:ParallelGCThreads, 2930, 35, 43, 54

–XX:+ParallelRefProcEnabled, 6263

–XX:+PrintAdaptiveSizePolicy, 55, 59, 152

–XX:+PrintGCDetails, 18, 27, 6061

–XX:PrintGCTimeStamps, 27

–XX:+PrintReferenceGC, 6163

–XX:+PrintStringDeduplicationStatistics, 151

–XX:+ResizePLAB, 152153

–XX:+ResizeTLAB, 153

–XX:SoftRefLRUPolicyMSPerMB=1000, 6364

–XX:StringDeduplicationAgeThreshold, 150

–XX:TargetSurvivorRatio, 19

–XX:+UnlockCommercialFeatures, 154

–XX:+UnlockDiagnosticVMOptions, 147, 153154

–XX:+UnlockExperimentalVMOptions, 154

–XX:+UseConcurrentMarkSweepGC, 6

–XX:+UseG1GC, 27

–XX:+UseG1GC, 146

–XX:+UseParallelGC, 23

–XX:+UseParallelOldGC, 23

–XX:+UseSerialGC, 5

–XX:+UseStringDeduplication, 149150

Y

Young collection pauses

description, 1819

eden regions, 1819

survivor regions, 1819

triggering, 18

Young collection pauses, live objects

aging, 18, 19

copy to survivor, 18, 19

identifying, 2224

liveness factor per region, calculating, 2224

survivor fill capacity, 19

tenuring, 18, 19

tenuring threshold, 18, 19

Young collections

concurrent marking phase, tuning, 5254

evacuation failure, log messages, 5354

increasing thread count, 54

marking threshold, setting, 54

phases, 39. See also specific phases

Young collections, parallel phase

activities outside of GC, 48

code root scanning, 4344

code sample, 3940

concurrent refinement threads, 4243

definition, 39

evacuation, 47

external root region scanning, 42

load balancing, 4748

processed buffers, 4244

reclamation, 47

RSets, and processed buffers, 4244

RSets, summarizing statistics, 4447

scanning nmethods, 44

start of parallel activities, 41

summarizing parallel activities, 48

termination, 4748

variance in timed activities, 42

work stealing, 4748

Young collections, serial phase

activities, 4850

definition, 39

Young generation

description, 1718

initial generation size, setting, 5052

maximum growth limit, setting, 5052

pause time goal, setting, 5052

resizing, 18

size, calculating, 1718

tuning, 5052

Yuasa, Taiichi, 30

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.37.10