-
jdeps -M -s lib/*
-
jdeps -genmoduleinfo msrc lib/*
- msrc//module-info.java
- requires / exports / provides 修飾子
-
jdeps -R -cp lib/* lib/(what_you_want).jar
-
jdeps -s -R -cp lib/* lib/(what_you_want).jar
-
jdeps -s -ct -R -cp lib/* lib/(what_you_want).jar
-
jlink --help
-
jlink --modulepath $JMODS --addmods java.base --output yimage --exclude-files *.diz
This file contains 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
# streams: some indexable collection | |
IntStream.range(0, streams.size()) | |
.forEach(index -> | |
some.process( | |
index, | |
streams.get(index) | |
) | |
); |
This file contains 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
import javafx.scene.Node; | |
import javafx.scene.Parent; | |
// : | |
private void dump(Node n, int depth) { | |
for (int i = 0; i < depth; i++) System.out.print(" "); | |
System.out.println(n); | |
if (n instanceof Parent) for (Node c: ((Parent) n).getChildrenUnmodifiable()) dump(c, depth + 1); | |
} | |
// : |
This file contains 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
object HelloWorld { | |
def main(args: Array[String]) { | |
println("Hello, world!") | |
} | |
} |
This file contains 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
sudo dnf install -y --enablerepo="*debug*" hg net-snmp net-snmp-devel gcc gcc-c++ binutils binutils-devel maven ant java-1.8.0-openjdk java-1.8.0-openjdk-devel java-1.8.0-openjdk-debuginfo | |
hg clone http://icedtea.classpath.org/hg/heapstats | |
cd heapstats/ | |
./configure; make agent | |
sed -e "s/thread_record_enable=false/thread_record_enable=true/" agent/heapstats.conf > agent/heapstats_threadrecorder.conf | |
cd agent/test/deadlock | |
javac DLSample.java | |
java -agentpath:../../src/libheapstats.so=../../heapstats_threadrecorder.conf DLSample 5 |
This file has been truncated, but you can view the full file.
This file contains 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
diff -r d284ec1e1226 Makefile.am | |
--- a/Makefile.am Wed Oct 14 10:43:58 2015 +0900 | |
+++ b/Makefile.am Tue Oct 20 16:54:18 2015 +0900 | |
@@ -26,14 +26,14 @@ | |
install-exec-local: | |
$(mkdir_p) $(DESTDIR)/$(libexecdir) | |
$(mkdir_p) $(DESTDIR)/$(libexecdir)/lib | |
- $(INSTALL_DATA) $(ANALYZER_DIR)/THIRD_PARTY_README $(DESTDIR)/$(libexecdir) | |
- $(INSTALL_DATA) $(ANALYZER_DIR)/heapstats-analyzer.jar $(DESTDIR)/$(libexecdir) | |
- $(INSTALL_DATA) $(ANALYZER_DIR)/filterDefine.xsd $(DESTDIR)/$(libexecdir) |
This file contains 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
set logging on | |
set logging file /path/to/file | |
f 7 | |
p/x counter | |
p/x counter->objData | |
p/x (TObjectData *)counter->objData | |
p/x counter->objData->klassOop |
This file contains 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
(gdb) bt | |
#0 0x00007f523e4741d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 | |
#1 0x00007f523e4758c8 in __GI_abort () at abort.c:90 | |
#2 0x00007f523dda7c89 in os::abort (dump_core=<optimized out>) | |
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/os/linux/vm/os_linux.cpp:1513 | |
#3 0x00007f523df496d6 in VMError::report_and_die (this=this@entry=0x7f51f31f5150) | |
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/share/vm/utilities/vmError.cpp:1060 | |
#4 0x00007f523ddb1347 in JVM_handle_linux_signal (sig=11, info=0x7f51f31f53f0, ucVoid=0x7f51f31f52c0, | |
abort_if_unrecognized=<optimized out>) | |
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp:541 |
This file contains 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
#0 0x00007f47efbb21d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 | |
#1 0x00007f47efbb38c8 in __GI_abort () at abort.c:90 | |
#2 0x00007f47ef4e5c89 in os::abort (dump_core=<optimized out>) | |
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/os/linux/vm/os_linux.cpp:1513 | |
#3 0x00007f47ef6876d6 in VMError::report_and_die (this=this@entry=0x7f47d6749da0) | |
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/share/vm/utilities/vmError.cpp:1060 | |
#4 0x00007f47ef687d97 in crash_handler (sig=11, info=0x7f47d6749ff0, ucVoid=0x7f47d6749ec0) | |
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/os/linux/vm/vmError_linux.cpp:106 | |
#5 <signal handler called> | |
#6 os::is_first_C_frame (fr=fr@entry=0x7f47d674aaa0) |