Skip to content

Instantly share code, notes, and snippets.

View tstuefe's full-sized avatar

Thomas Stuefe tstuefe

View GitHub Profile
@tstuefe
tstuefe / ccptr.md
Last active April 19, 2023 11:31
class space compact oh

Today's compressed class pointers encode a 64-bit pointer into 32 bits. Introduced with JDK 8, compressed class pointers first depended on compressed object pointers; with JDK 15, this dependency was removed (JDK-8241825). Enabling compressed class pointers is highly desirable. Today, only two reasons remain that require an application to disable compressed class pointers:

  • It uses JVMCI, which on some platforms inhibits the use of compressed class pointers.
  • It loads more than roughly three million classes. This limit is imposed by the way class space is implemented today. Note that the latter limit is theoretical - an application that hits this limit would use approximately six to ~30 GB for metaspace alone; we have yet to find an application that does.

Compact object headers will limit the bits available to identify a class to 32 bits or less. The feature, therefore, requires compressed class pointers to be enabled unconditionally. The cases mentioned abo

commit 60dc9adee66e6f83ccb406a965e61c49e2541d28
Author: tstuefe <thomas.stuefe@gmail.com>
Date: Wed Jul 19 14:29:12 2023 +0200
remove TLS stuff
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index 9f357d8e6b0..3dd44c1e0d2 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
```
0x0000000000000001 0000000000000000000000000000000000000000000000000000000000000001 (size=64, length=1, rotation=0)
0x0000000000000002 0000000000000000000000000000000000000000000000000000000000000010 (size=64, length=1, rotation=1)
0x0000000000000003 0000000000000000000000000000000000000000000000000000000000000011 (size=64, length=2, rotation=0)
0x0000000000000004 0000000000000000000000000000000000000000000000000000000000000100 (size=64, length=1, rotation=2)
0x0000000000000006 0000000000000000000000000000000000000000000000000000000000000110 (size=64, length=2, rotation=1)
0x0000000000000007 0000000000000000000000000000000000000000000000000000000000000111 (size=64, length=3, rotation=0)
0x0000000000000008 0000000000000000000000000000000000000000000000000000000000001000 (size=64, length=1, rotation=3)
0x000000000000000c 0000000000000000000000000000000000000000000000000000000000001100 (size=64, length=2, rotation=2)
@tstuefe
tstuefe / vmatree.md
Last active February 27, 2024 09:35

Proposal for an alternative memory tracker for virtual memory that is faster and simpler.

Preface

Regions as sequence of addresses

Stop treating and storing regions as regions. That causes a lot of redundancy (end pointer of one region is the start of another) and ambiguity.

Instead, lets treat regions as sequence of annotated pointers:

Keybase proof

I hereby claim:

  • I am tstuefe on github.
  • I am tstuefe (https://keybase.io/tstuefe) on keybase.
  • I have a public key ASAK2RZL4sMn4SawJ1qKxfG3eqw1MaKlrXz3k33gs08KZAo

To claim this, I am signing this object: