This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# do the statistics of renaissance results | |
# | |
# probably should choose gem 'enumerable-statistics' in the future. | |
# so far, we only need simple procedures. | |
# | |
def median(a) | |
copy = a.sort | |
return copy[a.size / 2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//jdk9+ java -XX:+UnlockDiagnosticVMOptions -XX:AbortVMOnException=java.lang.OutOfMemoryError OOMEInThread | |
// OutOfMemoryError is an unchecked exception. please note that even it keeps throwing, | |
// it only terminates a thread but not the java process. the following command shows that OnOutOfMemoryError | |
// fails to react OOME from java and get stuck forever. | |
// | |
public class OOMEInThread { | |
public static void main(String[] args) { | |
String msg = "a long long message."; | |
// write your code here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am navyxliu on github. | |
* I am xliu (https://keybase.io/xliu) on keybase. | |
* I have a public key whose fingerprint is FD6D CB16 0216 060A 4F5D B218 B9D9 34C6 1E04 7B0D | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//java -XX:+PrintCompilation -XX:CompileOnly=OSR::main -XX:CompileCommand=quiet -XX:-TieredCompilation OSR | |
import java.io.FileWriter; // Import the FileWriter class | |
import java.io.IOException; // Import the IOException class to handle errors | |
class OSR { | |
public static void main(String[] args) throws IOException { | |
FileWriter writer = new FileWriter("/dev/null"); | |
for (int i=0; i<3_000_000; ++i) { | |
writer.write("."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "reconfigure", | |
"type": "shell", | |
"command": "make reconfigure CONF=linux-x86_64-server-fastdebug LOG=info", | |
"problemMatcher": [], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void breakpoint() { | |
exit(-1); | |
} | |
struct node { | |
friend class linkedlist; | |
int key; | |
int value; | |
node* prev, * next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$cat TestHaltNode.java | |
import jdk.internal.misc.Unsafe; | |
public class TestHaltNode { | |
static final Unsafe UNSAFE = Unsafe.getUnsafe(); | |
static boolean f; | |
static int address; | |
private static int getAddress() { | |
return address; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. git clone https://github.com/navyxliu/JavaGCworkload.git | |
2. sh -x ./runJava.sh 4g gc.log -XX:+UnlockExperimentalVMOptions -XX:G1LogLevel=finest -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=8 -XX:GCLogFileSize=16k $* | |
3. the testcase itself is in infinite mode(-1). Usually, hotspot crashes in 4 hours. | |
I found jdk8u/hotspot could crash on a varienty of systems. | |
eg. I got this hs_err_report on AL2012. it has glibc 2.12. btw, AL2012 is similar to RHEL6 | |
The message looks very similiar to JDK-8190798 and JDK-8191393 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
recursive case. | |
4390 358 com.sun.tools.javac.comp.Resolve::findMemberType (277 bytes) | |
@ 8 com.sun.tools.javac.code.Symbol$ClassSymbol::members (16 bytes) inline (hot) | |
\-> TypeProfile (5649/5649 counts) = com/sun/tools/javac/code/Symbol$ClassSymbol | |
@ 12 com.sun.tools.javac.code.Scope::lookup (43 bytes) inline (hot) | |
\-> TypeProfile (5649/5649 counts) = com/sun/tools/javac/code/Scope | |
@ 34 com.sun.tools.javac.code.Scope$Entry::access$000 (5 bytes) accessor | |
@ 45 com.sun.tools.javac.comp.Resolve::isAccessible (327 bytes) hot method too big | |
@ 94 com.sun.tools.javac.code.Types::supertype (12 bytes) inline (hot) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Test Results (version 2) | |
#Sun Oct 06 23:14:31 UTC 2019 | |
#-----testdescription----- | |
$file=/src/hotspot/test/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_class/TestDescription.java | |
$root=/src/hotspot/test | |
keywords=stress gc othervm driver | |
library=/vmTestbase /testlibrary /test/lib | |
modules=java.base/jdk.internal.misc\:+open java.base/jdk.internal.misc | |
requires=((vm.gc.G1) & (vm.opt.ClassUnloading \!\= false)) & (vm.opt.ClassUnloadingWithConcurrentMark \!\= false) | |
run=USER_SPECIFIED driver jdk.test.lib.FileInstaller . .\nUSER_SPECIFIED driver gc.g1.unloading.bytecode.GenClassesBuilder\nUSER_SPECIFIED build sun.hotspot.WhiteBox\nUSER_SPECIFIED driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission\nUSER_SPECIFIED main/othervm -Xbootclasspath/a\:. -XX\:+UnlockDiagnosticVMOptions -XX\:+WhiteBoxAPI -XX\:+UseG1GC -XX\:+ExplicitGCInvokesConcurrent -Xloggc\:gc.log -XX\:-UseGCOverheadLimit gc.g1.unloading.UnloadingTest -classloadingMethod anonymous_cl |