java
#不进则退#
这个作者很懒,什么都没留下…
展开
-
jvm调优参数
-Xms1G// 初始化堆内存-Xmx// 最大堆内存-XX:+UseSerialGC// 新生代使用serial垃圾回收器原创 2021-06-07 16:08:52 · 182 阅读 · 0 评论 -
jit生成代码反编译
-server-Xcomp-XX:+UnlockDiagnosticVMOptions-XX:+PrintAssembly-XX:CompileCommand=compileonly,*Bar.sum-XX:+UnlockDiagnosticVMOptions-XX:+PrintAssembly-Xcomp-XX:CompileCommand=dontinline,*Bar.sum-XX:CompileCommand=compileonly,*Bar.sum原创 2021-06-07 16:08:36 · 695 阅读 · 0 评论 -
Arthas的使用
curl -O https://arthas.aliyun.com/arthas-boot.jarjava -jar arthas-boot.jarjava -jar arthas-boot.jar -hjava -jar arthas-boot.jar --repo-mirror aliyun --use-httpcurl -L https://arthas.aliyun.com/install.sh | shcurl -O https://arthas.aliyun.com/math.原创 2021-06-07 16:08:18 · 81 阅读 · 0 评论 -
java GC命令
-XX:+PrintGC 输出GC日志-XX:+PrintGCDetails 输出GC的详细日志-XX:+PrintGCTimeStamps 输出GC的时间戳(以基准时间的形式)-XX:+PrintGCDateStamps 输出GC的时间戳(以日期的形式,如 2013-05-04T21:53:59.234+0800)-XX:+PrintHeapAtGC 在进行GC的前后打印出堆的信息-Xloggc:../logs/gc.log 日志文件的输出路径-XX:+HeapDumpOnOutOfMem.原创 2021-06-01 11:13:09 · 505 阅读 · 0 评论 -
java线程池源码详解
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1, 3, 4, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(5), new RejectedExecutionHandler() { @Override public void re...原创 2021-05-25 21:10:07 · 133 阅读 · 1 评论 -
ReentrantLock的Condition源码详解
// 创建ReentrantLock 对象 ReentrantLock reentrantLock = new ReentrantLock(); public ReentrantLock() { sync = new NonfairSync(); } // 创建 Condition 对象 Condition condition1 = reentrantLock.newCondition(); public Condition ne...原创 2021-05-25 20:36:08 · 115 阅读 · 0 评论 -
Semaphore源码详解
Semaphore semaphore = new Semaphore(1);传进的参数赋值个state Sync(int permits) { setState(permits); }调用acquire // semaphore.acquire(); public void acquire() throws InterruptedException { sync.acquireShare.原创 2021-05-25 17:05:30 · 185 阅读 · 0 评论 -
ReentrantLock的源码详解
ReentrantLock reentrantLock = new ReentrantLock();创建一个非公平锁public ReentrantLock() { sync = new NonfairSync(); }调用的锁的lock方法reentrantLock.lock();调用NonfairSync的lock方法 final void lock() { // state是否等于0,等于0,把它的值设..原创 2021-05-25 15:36:40 · 340 阅读 · 0 评论