Title: Theory / Unimportant / CS / Programming / Java / JVM / General
On every note of this deck, unless a note says otherwise:
Page: https://docs.oracle.com/en/java/javase/16/vm/understanding-directives-better.html#GUID-C776A298-BC96-40C7-8028-DB461298DD9F

Name: Adaptive compiler
Definition: A compiler that optimize hot spot only
Page: https://docs.oracle.com/en/java/javase/16/vm/java-virtual-machine-technology-overview.html#GUID-982B244A-9B01-479A-8651-CB6475019281
Chapter: 1

Name: Client VM
Definition: A light version of the VM, optimized for client computer that were generally not as powerful as server
Page: https://docs.oracle.com/en/java/javase/16/vm/java-virtual-machine-technology-overview.html#GUID-982B244A-9B01-479A-8651-CB6475019281
Chapter: 1
Context: JVM

Name: Minimal VM
Definition: A very light version of the VM, optimized for client computer that have a minimal environment, even less than server. Deprecated
Page: https://docs.oracle.com/en/java/javase/16/vm/java-virtual-machine-technology-overview.html#GUID-982B244A-9B01-479A-8651-CB6475019281
Chapter: 1
Context: JVM

Name: java virtual machine
Definition: A machine interpreting java bytecode onto the actual hardware
Page: https://docs.oracle.com/en/java/javase/16/vm/java-virtual-machine-technology-overview.html#GUID-982B244A-9B01-479A-8651-CB6475019281
Chapter: 1
Abbreviation: JVM

Name: Compiler directive
Definition: an instruction that tells the JVM how compilation should occur
Page: https://docs.oracle.com/en/java/javase/16/vm/java-virtual-machine-technology-overview.html#GUID-982B244A-9B01-479A-8651-CB6475019281
Chapter: 1
Context: JVM

Meaning: Directive given to the compiler
Page: https://docs.oracle.com/en/java/javase/16/vm/java-virtual-machine-technology-overview.html#GUID-982B244A-9B01-479A-8651-CB6475019281
Chapter: 1
Context: JVM
Implementation: An array of directive blocks
Name: Directive file

Question: In case of conflict between directive which one is prioritary
Answer: the higher one in the file
Page: https://docs.oracle.com/en/java/javase/16/vm/writing-directives.html#GUID-8D24F71C-00A0-4959-AF10-1E08201B0B69
Chapter: 1
Context: JVM
Name: Directive file

Instruction: matcher
Page: https://docs.oracle.com/en/java/javase/16/vm/writing-directives.html#GUID-8D24F71C-00A0-4959-AF10-1E08201B0B69
Effect: An array of method patterns against which the directive should be applied
Language: json
Context: jvm directive file
Chapter: 1

Instruction: c1
Page: https://docs.oracle.com/en/java/javase/16/vm/writing-directives.html#GUID-8D24F71C-00A0-4959-AF10-1E08201B0B69
Effect: options for the c1 compiler
Language: json
Context: jvm directive file
Chapter: 1

Instruction: c2
Page: https://docs.oracle.com/en/java/javase/16/vm/writing-directives.html#GUID-8D24F71C-00A0-4959-AF10-1E08201B0B69
Effect: dictionnary of options for the c2 compiler
Language: json
Context: jvm directive file
Chapter: 1

Instruction: some entry which is neither match, c1 nor c2
Page: https://docs.oracle.com/en/java/javase/16/vm/writing-directives.html#GUID-8D24F71C-00A0-4959-AF10-1E08201B0B69
Effect: an option applying to both compiler
Context: jvm directive file
Chapter: 1

Instruction: package/class.method(parameter_list) (potentially with * as arbitrary string)
Page: https://docs.oracle.com/en/java/javase/16/vm/writing-directives.html#GUID-8D24F71C-00A0-4959-AF10-1E08201B0B69
Effect: A representation of one or many method
Context: compiler directive
Chapter: 1
Name: ccstr

Instruction: inline: "+pattern"
Page: https://docs.oracle.com/en/java/javase/16/vm/writing-directives.html#GUID-8D24F71C-00A0-4959-AF10-1E08201B0B69
Effect: force inlining of any java code matching against pattern
Context: compiler directive
Chapter: 1

Instruction: inline: "-pattern"
Page: https://docs.oracle.com/en/java/javase/16/vm/writing-directives.html#GUID-8D24F71C-00A0-4959-AF10-1E08201B0B69
Effect: Prevent inlining of any java code matching against pattern
Context: compiler directive
Chapter: 1

Instruction: inline: [rule_1, ..., rule_n]
Page: https://docs.oracle.com/en/java/javase/16/vm/writing-directives.html#GUID-8D24F71C-00A0-4959-AF10-1E08201B0B69
Effect: same as
inline rule_1
...
inline rule_n
Context: compiler directive
Chapter: 1

Name: default directive
Definition: a compiler directive that contains default values for all possible directive options and matches every method submitted for compilation
Page: https://docs.oracle.com/en/java/javase/16/vm/understanding-directives-better.html#GUID-C776A298-BC96-40C7-8028-DB461298DD9F
Chapter: 1
Context: jvm

Name: Java management extension
Page: https://docs.oracle.com/en/java/javase/16/vm/understanding-directives-better.html#GUID-C776A298-BC96-40C7-8028-DB461298DD9F
Chapter: 2
Context: java
Abbreviation: JVX
DefType: A profiler

Fla: -XX:-option
Effect: disable compiler option option
Chapter: 2
Context: java

Fla: -XX:+option
Effect: enable compiler option option
Chapter: 2
Context: java

Fla: -XX:CompilerDirectivesFile=file.json
Effect: Uses directive file of file.json or do not starti f error
Chapter: 2
Context: java

Fla: -XX:+CompilerDirectivesPrint
Effect: rint the directives stack when a program starts or when additional directives are added through diagnostic commands.
Chapter: 2
Context: java

Instruction: jcmd
Page: https://docs.oracle.com/en/java/javase/16/vm/understanding-directives-better.html#GUID-C776A298-BC96-40C7-8028-DB461298DD9F
Context: java
Chapter: 2
Returns: a list of the Java process that are running, along with their PID numbers

Fla: pid Compiler.directive file
Effect: Tell java compiler at pid to follow directive from file if file is correct. Otherwise exit the command with an error, not changing the process pid
Prefix: jcmd
Chapter: 2

Fla: pid Compiler.directive_remove
Effect: remove the top most directive from java compiler with pid
Prefix: jcmd
Chapter: 2

Fla: pid Compiler.directives_clear
Effect: remove all directives from java compiler with pid
Prefix: jcmd
Chapter: 2

Fla: pid Compiler.directives_print
Prefix: jcmd
Chapter: 2
Print: the directive stack

Name: Class data sharing
Definition: Feature of using a read-only archive of common classes (e.g. standard library) that can be used along multiple JVM process via memory-mapping
Page: https://docs.oracle.com/en/java/javase/16/vm/class-data-sharing.html#GUID-7EAA3411-8CF0-4D19-BD05-DF5E1780AA91
Chapter: 4
Abbreviation: CDS
Intuition: helps reduce the startup time and memory footprint between multiple JVM

Name: Compact string
Definition: An implementation of string, at JVM-level, that optimize for string containing only Latin-1 characters, defaulting to UTF-16 only if necessary
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm
Extra: You can disable the compact strings feature by using the -XX:-CompactStrings flag with the java command line.

Name: tiered compilation
Definition: not understood
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm

Name: Code cache
Definition: the area of memory where the Java Virtual Machine stores generated native code
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm

Name: Graal
Definition: high-performance, optimizing, just-in-time compiler written in Java that integrates with Java HotSpot VM
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm

Name: Ahead-of-Time compilation
Definition: compiling the Java classes to native code before launching the virtual machine
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm
Abbreviation: AOT

Name: Just-of-Time compilation
Definition: Deciding during runtime which part of the code to compile to native code
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm

Name: Compressed Ordinary object pointer
Definition: An ordinary object pointer, compressed into 32 bits instead of 64
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm
Construction: Objects are aligned on 8 bytes boundary, so a part of the address was always 0. Also it stores as an offset from java heap base

Name: Zero-Based Compressed Ordinary object pointer
Definition: Optimization of Compressed Ordinary object pointer when the heap base is at position 0.
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm

Name: Escape analysis
Definition: Technique used to decide whether to allocated an object on Java heap, depending on its use
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm

Name: Global escape object
Definition: An object that escapes the method and thread were it is created
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm Escape analysis
Example: an object stored in a static field
Example2: stored in a field of an escaped object
Example3: returned as the result of the current method.

Name: ArgEscape object
Definition: An object that is passed as an argument or referenced by an argument but does not globally escape during a call
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm Escape analysis
Intuition: No need to synchronize them.

Name: NoEscape object
Definition: An object that do not escape the method and thread it is defined in.
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm Escape analysis
Intuition: Could be replaced by a scalar in the stack. No need to synchronize them

Name: lock elision
Definition: Removing synchronization block when it is determined that an object use is local
Page: https://docs.oracle.com/en/java/javase/16/vm/java-hotspot-virtual-machine-performance-enhancements.html#GUID-D2E3DC58-D18B-4A6C-8167-4A1DFB4888E4
Chapter: 5
Context: jvm