最后
整理的这些资料希望对Java开发的朋友们有所参考以及少走弯路,本文的重点是你有没有收获与成长,其余的都不重要,希望读者们能谨记这一点。
其实面试这一块早在第一个说的25大面试专题就全都有的。以上提及的这些全部的面试+学习的各种笔记资料,我这差不多来回搞了三个多月,收集整理真的很不容易,其中还有很多自己的一些知识总结。正是因为很麻烦,所以对以上这些学习复习资料感兴趣,
cd jdk-jdk8-b120/
删除adjust-mflags.sh的67行,不然编译会报错
sed -i ‘67d’ hotspot/make/linux/makefiles/adjust-mflags.sh
bash ./configure --with-target-bits=64 --with-debug-level=slowdebug --enable-debug-symbols --with-boot-jdk=/openjdk/java-se-7u75-ri --with-freetype-include=/usr/include/freetype2/ --with-freetype-lib=/usr/lib/x86_64-linux-gnu ZIP_DEBUGINFO_FILES=0
正常输出
====================================================
A new configuration has been successfully created in
/openjdk/jdk-jdk8-b120/build/linux-x86_64-normal-server-slowdebug
using configure arguments ‘–with-target-bits=64 --with-debug-level=slowdebug --enable-debug-symbols --with-boot-jdk=/openjdk/java-se-7u75-ri --with-freetype-include=/usr/include/freetype2/ --with-freetype-lib=/usr/lib/x86_64-linux-gnu ZIP_DEBUGINFO_FILES=0’.
Configuration summary:
-
Debug level: slowdebug
-
JDK variant: normal
-
JVM variants: server
-
OpenJDK target: OS: linux, CPU architecture: x86, address length: 64
Tools summary:
-
Boot JDK: openjdk version “1.7.0_75” OpenJDK Runtime Environment (build 1.7.0_75-b13) OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode) (at /openjdk/java-se-7u75-ri)
-
C Compiler: gcc-5 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 version 20160609 (at /usr/bin/gcc-5)
-
C++ Compiler: g+±5 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 version 20160609 (at /usr/bin/g+±5)
Build performance summary:
-
Cores to use: 4
-
Memory limit: 12698 MB
-
ccache status: not installed (consider installing)
Build performance tip: ccache gives a tremendous speedup for C++ recompilations.
You do not have ccache installed. Try installing it.
You might be able to fix this by running ‘sudo apt-get install ccache’.
make all DISABLE_HOTSPOT_OS_VERSION_CHECK=OK ZIP_DEBUGINFO_FILES=0
一杯咖啡时间过后看到一下内容输出就大功告成了。
----- Build times -------
Start 2021-01-15 00:57:13
End 2021-01-15 01:05:57
00:00:27 corba
00:00:14 demos
00:01:40 docs
00:02:15 hotspot
00:00:18 images
00:00:17 jaxp
00:00:20 jaxws
00:02:31 jdk
00:00:30 langtools
00:00:12 nashorn
00:08:44 TOTAL
Finished building OpenJDK for target ‘all’
===========================================================================
把 jdk-jdk8-b120.tar.gz 解压,用clion打开项目(open -> 选择jdk-jdk8-b120目录)
添加GDB Remote Debug配置如下图
进入容器,cd到 /openjdk/jdk-jdk8-b120/build/linux-x86_64-normal-server-slowdebug/jdk/bin ,执行 gdbserver
gdbserver :1234 ./java
正常输出
Process ./java created; pid = 5642
Listening on port 1234
下一步
等待一会儿,程序就停在断点上了。
架构学习资料
由于篇幅限制小编,pdf文档的详解资料太全面,细节内容实在太多啦,所以只把部分知识点截图出来粗略的介绍,每个小节点里面都有更细化的内容!