ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides ›...

55
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | ZGC Concurrent Class Unloading Another safepoint operation bites the dust Erik Österlund Garbage Collection Engineer Java Platform Group, Oracle February 04, 2019

Transcript of ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides ›...

Page 1: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

ZGC Concurrent Class UnloadingAnother safepoint operation bites the dust

Erik ÖsterlundGarbage Collection EngineerJava Platform Group, OracleFebruary 04, 2019

Page 2: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Safe Harbor Statement

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

2

Page 3: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Agenda

What is ZGC? What is class unloading?

Overview of phases

Concurrent code and metadata unloading

Evaluation

Future plans

1

2

3

4

5

3

Page 4: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

What is ZGC?

4

Page 5: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

New Concurrent GC in JDK 11

(Experimental feature, Linux/x86_64 only)

5

Page 6: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

ZGC Goals

Multi-terabyte heaps Max GC pause time

Easy to tuneMax application throughput reduction

10msTB

15%

6

Page 7: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

What is a concurrent GC

Serial Parallel CMS G1 ZGCMarking - - ✔* ✔* ✔

Relocation/Compaction - - - - ✔

Reference Processing - - - - ✔

Relocation Set Selection - - - - ✔

StringTable Cleaning - - - - ✔

JNI WeakRef Cleaning - - - - ✔

JNI GlobalRefs Scanning - - - - ✔

Class Unloading - - - - ✔

Thread Stack Scanning - - - - -

7

**) Old Gen strong references Only

Page 8: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Concurrent Class Unloading

Released in JDK 12 for ZGC

8

Page 9: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Traditional Class Unloading

• Step 1: Marking (concurrent)

–Mark metadata (classes, CLDs) when marking objects

• Step 2: Reference processing (STW)

– Need to know what is reachable from finalizers before class unloading

• Step 3: Unloading (STW)– Unload code cache

– Unload metadata

9

Page 10: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

ZGC Concurrnet Class Unloading

• Step 1: Marking (concurrent)

–Mark metadata (classes, CLDs) when marking objects

–Mark both strong and final reachable graphs

• Step 2: Reference processing (concurrent)– Already know what is reachable from finalizers before class unloading

• Step 3: Unloading (concurrent)

– Unload code cache

– Unload metadata

10

Page 11: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

ZGC Phases

ConcurrentMark/Remap

Pause Mark End Pause Relocate StartPause Mark Start

ConcurrentPrepare for Reloc.

ConcurrentRelocate

GC Cycle

11

ConcurrentReference Processing

ConcurrentClass Unloading

Page 12: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Step 1: Marking

12

Page 13: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Marking overview

• Color heap object pointers with appropriate marked color

– Special bit pattern for edges reachable from finalizers only

–Mutator load barriers upgrade them to strongly reachable when loaded

• Mark metadata objects similarly–Mark metadata reachable from objects, with strong/final reachability

13

Page 14: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 14

Java Object

CLD Handle Area

handle

handle

Class Loader Data

Class loader

holder

handleref count Java.lang.Class

Klass

mirror

Java.lang.ClassLoader Java Object

Java Object

Metadata graph

Page 15: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Step 2: Reference Processing

15

Page 16: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Reference processing overview

• WeakReferences cleared if referent not strongly reachable

• PhantomReferences cleared if referent not reachable

• "Weak" VM datastructures have "phantom" strength

– Classes die if not reachable (including from finalizers)

• Each access on weak/phantom is annotated using my Access API

• A class is dead if a phantom load of its holder returns NULL

16

Page 17: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Step 3: Unloading

17

Page 18: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Stale Datastructures after Reference Processing

Subklass/sibling/implementor lists

Method data objects

Instance class dependency context

jli.CallSite dependency context

Class loader data graph

Protection domain cache table

Module table

String table

18

Package table

Symbol table

Resolved method table

Loader constraint table

Resolution error table

Metaspace

Code cache (JIT compiled code)

Inline caches

Page 19: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Basically everything is a huge mess...

...and we just continue running anyway

19

Page 20: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

ZGC Unloading Overview

Pause Mark End

20

Reference Processing

Class Unloading

Unlink Purge

Han

dsh

ake

Page 21: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

ZGC Unloading Overview

Pause Mark End

21

Reference Processing

Class Unloading

Unlink Purge

Han

dsh

ake

Metadata Metadata

Page 22: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

ZGC Unloading Overview

Pause Mark End

22

Reference Processing

Class Unloading

Unlink Purge

Han

dsh

ake

Metadata Code Metadata Code

Page 23: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Concurrent Code Unloading

23

Page 24: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Code cache

• Colored pointers into Java heap

–Misaligned immediate values

–Which color should native compiled object references have?

– Need a way to paint native compiled object references

• Inline caches (CompiledIC) pointing at now dead native methods (nmethods), because of dead object references

– Running any such code yields crashes

– Need a way of preventing calls to dead native methods

24

Page 25: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

NMethod Entry Barriers

• Arm all nmethods not on stack in GC pause

– Change global epoch value, caught with cmp; je; at verified entry

• Trap calls to armed nmethods

– NMethods are "good" or "bad" based on object pointer liveness

• When entering good nmethods– Fix up object pointers (oops)

– Disarm barrier by patching cmp immediate value

• When entering bad nmethods

– Re-resolve the call

25

Page 26: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Example: Calling inline cache to dead nmethod

26

Page 27: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Java Heap MetaspaceCode Heap

27

nmethod A

CompiledIC

Method

Klass

nmethod B

oop

oop

Java Object

Java Object

Java Objectoop

Method

Page 28: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Java Heap MetaspaceCode Heap

28

nmethod A

CompiledIC

C2I adapter

oop

oop

Java Object

Java Object

Method

Page 29: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Example: Calling inline cache to stale but live nmethod

29

Page 30: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Java Heap MetaspaceCode Heap

30

nmethod A

CompiledIC

Methodnmethod B

oop

oop

Java Object

Java Object

Java Object

oop

Method

Java Object

Page 31: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Java Heap MetaspaceCode Heap

31

nmethod A

CompiledIC

Methodnmethod B

oop

oop

Java Object

Java Object

Java Object

oop

Method

Java Object

Page 32: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Concurrent Code Unloading

• Unlink

– Clean stale inline caches (patch machine code that Java threads run)

– Fixup object references (patching more machine code)

– Disarm entry barriers (yet some more machine code patching)

– Unlink nmethods from dependency contexts (lock-free unlinking)

– Unlink exception caches (more lock-free unlinking)

• Global rendezvous handshake

• Purge– Purge unloading nmethods with make_unloaded()

– Sweeper subsequently frees up memory in code cache

32

Page 33: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Concurrent Metadata Unloading

33

Page 34: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Structure

• Unlink

– Expose logically already unlinked view of data to mutators

– Subclass/sibling/implementor lists (lock-free)

–Method data object (lock-free and per-MDO lock)

– Protection domain cache (lock)

– Class loader data graph (lock)

– StringTable and SymbolTable (crazy concurrent)

• Rendezvous handshake

• Purge

– Delete Klass, Method, CLD, handles, table entries, etc.

34

Page 35: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Evaluation

35

Page 36: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Mode: Composite

Heap Size: 128G

OS: Oracle Linux 7.4

HW: Intel Xeon E5-2690 2.9GHz2 sockets, 16 cores (32 hw-threads)

SPECjbb®2015 is a registered trademark of the Standard PerformanceEvaluation Corporation (spec.org). The actual results are not representedas compliant because the SUT may not meet SPEC's requirements forgeneral availability.

SPECjbb®2015 – Score

36

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

ZGC Parallel G1

(Higher is better)

max-JOPS (Throughput) critical-JOPS (Throughput with latency requirements)

Page 37: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Mode: Composite

Heap Size: 128G

OS: Oracle Linux 7.4

HW: Intel Xeon E5-2690 2.9GHz2 sockets, 16 cores (32 hw-threads)

SPECjbb®2015 is a registered trademark of the Standard PerformanceEvaluation Corporation (spec.org). The actual results are not representedas compliant because the SUT may not meet SPEC's requirements forgeneral availability.

SPECjbb®2015 – Score

37

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

ZGC Parallel G1

(Higher is better)

max-JOPS (Throughput) critical-JOPS (Throughput with latency requirements)

50%29%

Page 38: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

SPECjbb®2015 – Pause Times

38

Page 39: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

SPECjbb®2015 – Pause Times

39

Page 40: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

SPECjbb®2015 – Pause Times

40

Page 41: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Future Plans

41

Page 42: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Future Plans

• Short-term

– Turn ZGC into a product feature

42

Page 43: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Future Plans

• Short-term

– Turn ZGC into a product feature

Remove experimental status

43

Page 44: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Future Plans

• Short-term

– Turn ZGC into a product feature

44

Page 45: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Future Plans

• Short-term

– Turn ZGC into a product feature

• Long-term

– Generational

– Sub-millisecond max pause times

– Additional platform support

– Graal JIT support

45

Page 46: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Future Plans

• Short-term

– Turn ZGC into a product feature

• Long-term

– Generational

– Sub-millisecond max pause times

– Additional platform support

– Graal JIT support

Generational• Withstand higher allocation rates• Lower heap overhead• Lower CPU usage

46

Page 47: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Future Plans

• Short-term

– Turn ZGC into a product feature

• Long-term

– Generational

– Sub-millisecond max pause times

– Additional platform support

– Graal JIT support

Sub-millisecond max pause times• Within reach• Reduce root set size• Time-to-Safepoint, etc

47

Page 48: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Future Plans

• Short-term

– Turn ZGC into a product feature

• Long-term

– Generational

– Sub-millisecond max pause times

– Additional platform support

– Graal JIT support

Additional platform support• macOS?• Windows?• Sparc?• Aarch64?

48

Page 49: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Future Plans

• Short-term

– Turn ZGC into a product feature

• Long-term

– Generational

– Sub-millisecond max pause times

– Additional platform support

– Graal JIT support

49

Page 50: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Get Involved!

50

Page 51: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

ZGC Project

[email protected]

http://wiki.openjdk.java.net/display/zgc/Main

Follow, Participate, Give Feedback

51

Page 52: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

ZGC Project

http://hg.openjdk.java.net/jdk/jdk

http://hg.openjdk.java.net/zgc/zgc

Source Code

52

Page 53: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Thanks!

53

Page 54: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Questions?

54

Page 55: ZGC Concurrent Class Unloading - Oraclecr.openjdk.java.net › ~pliden › slides › ZGC-Jfokus-2019.pdf•WeakReferences cleared if referent not strongly reachable •PhantomReferences