Skip to content

Instantly share code, notes, and snippets.

@vlsi

vlsi/externals

Last active Aug 29, 2015
Embed
What would you like to do?
CopyOnWriteArrayList footprint in jre 1.8
$ sudo java -jar jol-cli-0.3-full.jar externals java.util.concurrent.CopyOnWriteArrayList
Running 64-bit HotSpot VM.
Using compressed oop with 3-bit shift.
Using compressed klass with 3-bit shift.
Objects are 8 bytes aligned.
Field sizes by type: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes]
Array element sizes: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes]
objc[33686]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
java.util.concurrent.CopyOnWriteArrayList object externals:
ADDRESS SIZE TYPE PATH VALUE
76b2c62d8 24 java.util.concurrent.CopyOnWriteArrayList (object)
76b2c62f0 16 java.util.concurrent.locks.ReentrantLock .lock (object)
76b2c6300 32 java.util.concurrent.locks.ReentrantLock$NonfairSync .lock.sync (object)
76b2c6320 16 [Ljava.lang.Object; .array []
$ sudo java -jar jol-cli-0.3-full.jar footprint java.util.concurrent.CopyOnWriteArrayList
Password:
Running 64-bit HotSpot VM.
Using compressed oop with 3-bit shift.
Using compressed klass with 3-bit shift.
Objects are 8 bytes aligned.
Field sizes by type: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes]
Array element sizes: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes]
objc[33668]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
java.util.concurrent.CopyOnWriteArrayList instance footprint:
COUNT AVG SUM DESCRIPTION
1 16 16 [Ljava.lang.Object;
1 24 24 java.util.concurrent.CopyOnWriteArrayList
1 16 16 java.util.concurrent.locks.ReentrantLock
1 32 32 java.util.concurrent.locks.ReentrantLock$NonfairSync
4 88 (total)
$ java -version
java version "1.8.0_40-ea"
Java(TM) SE Runtime Environment (build 1.8.0_40-ea-b21)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b24, mixed mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.