-
Notifications
You must be signed in to change notification settings - Fork 1
/
notes.txt
80 lines (48 loc) · 1.8 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
graalvm = marketing / twitter
JDK Enhancement-Proposal : JEP
graal est embarqué dans openJDK 11 mais pas dans 17 -> utilisation de GraalVM
-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler
-XX:-EnableJVMCI
level :
0 = interpret
1/2/3 = C1
4 = C2 or Graal
graal remplace C2
graal is wirtten in java / C2 is in c++
graal uses Java Heap / C2 use malloc
graal compile itsel using JIT / C2 is static
memory allocation
initTimer = see what is load
bootstrap = run all java.* package to make it hot
-XX:+BootstrapJVMCI -XX:-UseJVMCINativeLibrary
https://youtu.be/Rvb-kvuPzqI
https://www.baeldung.com/jvm-tiered-compilation
graph benchmark :
blender = native=GraalVM>OpenJDK
blender2 = native>GraalVM=OpenJDK=0
blender3 = native=GraalVM>OpenJDK
blender4 = native>OpenJDK>>GraalVM
blender5 = native>OpenJDK=GraalVM
blender6 = OpenJDK>native=GraalVM
blender7 = native>OpenJDK>>GraalVM
fibo = native=GraalVM>OpenJDK
fibo2 = native>OpenJDK>GraalVM
blender = blender3 -> non optimisé au build time
blender2 = optimisation trouvée au runtime
blender6 = blender but more efficient for native
blender7 = blender4
demo :
cd demo
export JAVA_HOME=~/Téléchargements/jdk-11.0.14+9/
$JAVA_HOME/bin/javac Blender4.java
$JAVA_HOME/bin/java Blender4
$JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler Blender4
export JAVA_HOME=~/Téléchargements/jdk-17.0.1+12/
$JAVA_HOME/bin/javac Blender4.java
$JAVA_HOME/bin/java Blender4
$JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler Blender4
jdk retire inutile -> utilisation de GraalVM
export JAVA_HOME=~/Téléchargements/graalvm-ce-java17-21.3.0/
$JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler Blender4
$JAVA_HOME/bin/java Blender4
$JAVA_HOME/bin/java -XX:-UseJVMCICompiler Blender4