主頁 > 後端開發 > hs_err_prd.log日志分析

hs_err_prd.log日志分析

2020-11-13 14:57:02 後端開發

 java程式運行的時候,突然JVM發生錯誤導致崩潰時,會生成一個hs_err_pid_xxx.log這樣的檔案,該檔案包含了導致 JVM crash 的重要資訊,我們可以通過分析該檔案定位到導致 JVM Crash 的原因,從而修復保證系統穩定,默認該檔案出生在專案得根目錄,

這個檔案主要包含如下內容:

  • 日志頭資訊
  • crash 的執行緒資訊
  • 所有執行緒資訊
  • 安全點和鎖資訊
  • 堆資訊
  • 本地代碼快取
  • 編譯事件
  • gc 相關時間
  • 逆優化
  • 重新定義類
  • 內部例外資訊
  • jvm 記憶體映射
  • jvm 啟動引數
  • 服務器資訊

一、日志頭檔案

翻譯過來的意思大概就是:

? 沒有足夠的記憶體,Java運行時環境無法繼續,本機記憶體分配(malloc)無法為ChunkPool :: allocate分配32744個位元組可能的原因:系統沒有物理RAM或交換空間該行程正在啟用CompressedOops的情況下運行,并且Java Heap可能阻止了本機堆的增長可能的解決方案:

  1. 減少系統上的記憶體負載
  2. 增加物理記憶體或交換記憶體
  3. 檢查交換后備存盤是否已滿
  4. 減小Java堆大小(-Xmx / -Xms)
  5. 減小Java執行緒數減小Java執行緒堆疊大小(-Xss)
  6. 設定較大的代碼-XX:ReservedCodeCacheSize =

進行高速快取JVM以基于零的壓縮Oops模式運行,在該模式下,Java堆位于前32GB地址空間中, Java堆基址是本機堆增長的最大限制,請使用-XX:HeapBaseMinAddress設定Java Heap基礎并將Java Heap放置在32GB以上的虛擬地址上,

該輸出檔案可能被截斷或不完整,記憶體不足錯誤(allocation.cpp:272),pid = 16756,tid = 0x0000000000006b78

JRE版本:Java(TM)SE運行時環境(8.0_231-b11)(內部版本1.8.0_231-b11)

Java VM:Java HotSpot(TM) )64位服務器VM(25.231-b11混合模式Windows-amd64壓縮的oops)

無法寫入核心轉儲,默認情況下,在Windows客戶端版本上不啟用小型轉儲

這段資訊簡述了發生例外的資訊,是服務器記憶體不足,除此之外,JVM 自身的 bug,應用程式錯誤,JVM 引數,JNI 呼叫錯誤,版本資訊和配置資訊等也會導致JVM Crash,

Out of Memory Error (allocation.cpp:272), pid=16756, tid=0x0000000000006b78
復制代碼
  • pid=16756 行程號
  • tid=0x0000000000006b78 執行緒號

二、crash 的執行緒資訊

---------------  T H R E A D  ---------------

Current thread (0x000000001fd37800):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=27512, stack(0x0000000020170000,0x0000000020270000)]

Stack: [0x0000000020170000,0x0000000020270000]
[error occurred during error reporting (printing stack bounds), id 0xc0000005]

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)


Current CompileTask:
C2:  19813 10229       4       java.net.URLClassLoader$1::run (5 bytes)

復制代碼

執行緒資訊

Current thread (0x0000000001e94800):  JavaThread "pool-1-thread-2" [_thread_in_native, id=30111, stack(0x00007f3d567e5000,0x00007f3d568e6000)]
復制代碼
  • 0x0000000001e94800:出錯的執行緒指標
  • JavaThread:執行緒型別,執行緒可能還會有以下:
  1. JavaThread:Java執行緒
  2. VMThread : JVM 的內部執行緒
  3. CompilerThread:用來呼叫JITing,實時編譯裝卸class , 通常,jvm會啟動多個執行緒來處理這部分作業,執行緒名稱后面的數字也會累加,例如:CompilerThread1
  4. GCTaskThread:執行gc的執行緒
  5. WatcherThread:JVM 周期性任務調度的執行緒,是一個單例物件
  6. ConcurrentMarkSweepThread:jvm在進行CMS GC的時候,會創建一個該執行緒去進行GC,該執行緒被創建的同時會創建一個SurrogateLockerThread(簡稱SLT)執行緒并且啟動它,SLT啟動之后,處于等待階段,CMST開始GC時,會發一個訊息給SLT讓它去獲取Java層Reference物件的全域鎖:Lock
  • pool-1-thread-2:執行緒名稱
  • _thread_in_native:當前執行緒狀態
  1. _thread_in_native:執行緒當前狀態,狀態列舉包括:
  2. _thread_uninitialized:執行緒還沒有創建,它只在記憶體原因崩潰的時候才出現
  3. _thread_new:執行緒已經被創建,但是還沒有啟動
  4. _thread_in_native:執行緒正在執行本地代碼,一般這種情況很可能是本地代碼有問題
  5. _thread_in_vm:執行緒正在執行虛擬機代碼
  6. _thread_in_Java:執行緒正在執行解釋或者編譯后的Java代碼
  7. _thread_blocked:執行緒處于阻塞狀態
  8. …_trans:以_trans結尾,執行緒正處于要切換到其它狀態的中間狀態
  • id=30111 :執行緒id
  • stack(0x00007f3d567e5000,0x00007f3d568e6000):堆疊區間

三、執行緒資訊

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x000000002404f000 JavaThread "com.alibaba.nacos.naming.beat.sender" daemon [_thread_blocked, id=7612, stack(0x0000000021740000,0x0000000021840000)]
  0x0000000024047800 JavaThread "DestroyJavaVM" [_thread_blocked, id=25856, stack(0x0000000002fb0000,0x00000000030b0000)]
  0x0000000024048800 JavaThread "http-nio-51000-AsyncTimeout" daemon [_thread_blocked, id=12996, stack(0x0000000030020000,0x0000000030120000)]
  0x000000002404e800 JavaThread "http-nio-51000-Acceptor-0" daemon [_thread_in_native, id=22020, stack(0x000000002ff20000,0x0000000030020000)]
  0x000000002404d800 JavaThread "http-nio-51000-ClientPoller-1" daemon [_thread_in_native, id=11852, stack(0x000000002fe20000,0x000000002ff20000)]
  0x0000000024046000 JavaThread "http-nio-51000-ClientPoller-0" daemon [_thread_in_native, id=23656, stack(0x000000002fd20000,0x000000002fe20000)]
  0x0000000024047000 JavaThread "http-nio-51000-exec-10" daemon [_thread_blocked, id=11672, stack(0x000000002fc20000,0x000000002fd20000)]
  0x000000002404b800 JavaThread "http-nio-51000-exec-9" daemon [_thread_blocked, id=6460, stack(0x000000002fb20000,0x000000002fc20000)]
  0x000000002404d000 JavaThread "http-nio-51000-exec-8" daemon [_thread_blocked, id=4524, stack(0x000000002fa20000,0x000000002fb20000)]
  0x000000002404c000 JavaThread "http-nio-51000-exec-7" daemon [_thread_blocked, id=7536, stack(0x000000002f920000,0x000000002fa20000)]
  0x000000002404a800 JavaThread "http-nio-51000-exec-6" daemon [_thread_blocked, id=15648, stack(0x000000002f820000,0x000000002f920000)]
  0x0000000024045800 JavaThread "http-nio-51000-exec-5" daemon [_thread_blocked, id=17580, stack(0x000000002f720000,0x000000002f820000)]
  0x0000000022175800 JavaThread "http-nio-51000-exec-4" daemon [_thread_blocked, id=23840, stack(0x000000002f620000,0x000000002f720000)]
  0x0000000021bf9000 JavaThread "http-nio-51000-exec-3" daemon [_thread_blocked, id=20868, stack(0x000000002f520000,0x000000002f620000)]
  0x0000000021bfc000 JavaThread "http-nio-51000-exec-2" daemon [_thread_blocked, id=9416, stack(0x000000002f420000,0x000000002f520000)]
  0x0000000021bff800 JavaThread "http-nio-51000-exec-1" daemon [_thread_blocked, id=7856, stack(0x000000002f320000,0x000000002f420000)]
  0x0000000021bfc800 JavaThread "NioBlockingSelector.BlockPoller-1" daemon [_thread_in_native, id=17036, stack(0x000000002f060000,0x000000002f160000)]
  0x0000000021bf8000 JavaThread "dubbo-remoting-server-heartbeat-thread-1" daemon [_thread_blocked, id=11892, stack(0x000000002edf0000,0x000000002eef0000)]
  0x0000000021bf9800 JavaThread "NettyServerBoss-7-1" daemon [_thread_in_native, id=8756, stack(0x000000002e8a0000,0x000000002e9a0000)]
  0x0000000021bfe000 JavaThread "Keep-Alive-Timer" daemon [_thread_blocked, id=15228, stack(0x000000002f220000,0x000000002f320000)]
  0x0000000021bfd800 JavaThread "xxl-job, executor ExecutorRegistryThread" daemon [_thread_blocked, id=20704, stack(0x000000002e7a0000,0x000000002e8a0000)]
  0x0000000021bfb000 JavaThread "nioEventLoopGroup-5-1" [_thread_in_native, id=19896, stack(0x000000002e6a0000,0x000000002e7a0000)]
  0x0000000021bfa800 JavaThread "Thread-17" daemon [_thread_blocked, id=23024, stack(0x000000002eaf0000,0x000000002ebf0000)]
  0x0000000021bf0800 JavaThread "Thread-16" daemon [_thread_blocked, id=9520, stack(0x000000002e9f0000,0x000000002eaf0000)]
  0x0000000021bf6000 JavaThread "xxl-job, executor TriggerCallbackThread" daemon [_thread_blocked, id=15680, stack(0x000000002e2f0000,0x000000002e3f0000)]
  0x0000000021bf4800 JavaThread "xxl-job, executor JobLogFileCleanThread" daemon [_thread_blocked, id=18152, stack(0x000000002ada0000,0x000000002aea0000)]
  0x0000000021bf6800 JavaThread "com.alibaba.nacos.naming.beat.sender" daemon [_thread_blocked, id=856, stack(0x000000002e400000,0x000000002e500000)]
  0x0000000021bf5000 JavaThread "JetCacheDefaultExecutor" daemon [_thread_blocked, id=4936, stack(0x000000002e5a0000,0x000000002e6a0000)]
  0x0000000021bf3000 JavaThread "DubboClientReconnectTimer-thread-2" daemon [_thread_blocked, id=20420, stack(0x000000002d9f0000,0x000000002daf0000)]
  0x0000000021bf1800 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=13332, stack(0x000000002d6f0000,0x000000002d7f0000)]
  0x0000000021bf2000 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=12236, stack(0x000000002d5f0000,0x000000002d6f0000)]
  0x0000000022179000 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=12008, stack(0x000000002d4f0000,0x000000002d5f0000)]
  0x0000000022178800 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=26380, stack(0x000000002d3f0000,0x000000002d4f0000)]
  0x0000000022177800 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=5812, stack(0x000000002d2f0000,0x000000002d3f0000)]
  0x0000000022176000 JavaThread "dubbo-remoting-client-heartbeat-thread-1" daemon [_thread_blocked, id=27148, stack(0x000000002c020000,0x000000002c120000)]
  0x000000002217d000 JavaThread "NettyClientWorker-4-1" daemon [_thread_in_native, id=22332, stack(0x000000002bf20000,0x000000002c020000)]
  0x000000002217c000 JavaThread "DubboClientReconnectTimer-thread-1" daemon [_thread_blocked, id=22356, stack(0x000000002be20000,0x000000002bf20000)]
  0x000000002217b800 JavaThread "DubboSaveRegistryCache-thread-1" daemon [_thread_blocked, id=23092, stack(0x000000002bd20000,0x000000002be20000)]
  0x000000002216e800 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=23676, stack(0x000000002b680000,0x000000002b780000)]
  0x0000000022172800 JavaThread "DubboRegistryFailedRetryTimer-thread-1" daemon [_thread_blocked, id=22928, stack(0x000000002b920000,0x000000002ba20000)]
  0x0000000022171000 JavaThread "com.alibaba.nacos.naming.push.receiver" daemon [_thread_in_native, id=11576, stack(0x000000002b820000,0x000000002b920000)]
  0x000000002216e000 JavaThread "com.alibaba.nacos.naming.failover" daemon [_thread_blocked, id=16176, stack(0x000000002b230000,0x000000002b330000)]
  0x0000000022173000 JavaThread "com.alibaba.nacos.naming.beat.sender" daemon [_thread_blocked, id=22464, stack(0x000000002b580000,0x000000002b680000)]
  0x000000002216f800 JavaThread "com.alibaba.nacos.naming.beat.sender" daemon [_thread_blocked, id=17320, stack(0x000000002b480000,0x000000002b580000)]
  0x0000000022171800 JavaThread "com.alibaba.nacos.naming.client.listener" daemon [_thread_blocked, id=26024, stack(0x000000002b380000,0x000000002b480000)]
  0x0000000022174000 JavaThread "Timer-0" daemon [_thread_blocked, id=23244, stack(0x0000000022f40000,0x0000000023040000)]
  0x0000000022174800 JavaThread "Log4j2-TF-9-Scheduled-3" daemon [_thread_blocked, id=11696, stack(0x000000002aee0000,0x000000002afe0000)]
  0x000000002659f800 JavaThread "qos-boss-1-1" daemon [_thread_in_native, id=12388, stack(0x000000002aca0000,0x000000002ada0000)]
  0x00000000265a1000 JavaThread "Druid-ConnectionPool-Destroy-613765444" daemon [_thread_blocked, id=16984, stack(0x000000002a6a0000,0x000000002a7a0000)]
  0x00000000265a0000 JavaThread "Druid-ConnectionPool-Create-613765444" daemon [_thread_blocked, id=912, stack(0x000000002a390000,0x000000002a490000)]
  0x00000000256d0800 JavaThread "Abandoned connection cleanup thread" daemon [_thread_blocked, id=14864, stack(0x0000000029c40000,0x0000000029d40000)]
  0x00000000226f0800 JavaThread "commons-pool-evictor-thread" [_thread_blocked, id=5724, stack(0x0000000029d40000,0x0000000029e40000)]
  0x00000000223a8000 JavaThread "container-0" [_thread_blocked, id=13076, stack(0x00000000298d0000,0x00000000299d0000)]
  0x0000000024f90000 JavaThread "ContainerBackgroundProcessor[StandardEngine[Tomcat]]" daemon [_thread_blocked, id=24912, stack(0x0000000025a70000,0x0000000025b70000)]
  0x000000001fdf4000 JavaThread "Service Thread" daemon [_thread_blocked, id=19776, stack(0x0000000020570000,0x0000000020670000)]
  0x000000001fd46000 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=8488, stack(0x0000000020470000,0x0000000020570000)]
  0x000000001fd3b000 JavaThread "C2 CompilerThread2" daemon [_thread_in_native, id=24984, stack(0x0000000020370000,0x0000000020470000)]
  0x000000001fd3a800 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=8528, stack(0x0000000020270000,0x0000000020370000)]
=>0x000000001fd37800 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=27512, stack(0x0000000020170000,0x0000000020270000)]
  0x000000001fd30800 JavaThread "Monitor Ctrl-Break" daemon [_thread_in_native, id=21904, stack(0x0000000020070000,0x0000000020170000)]
  0x000000001e31d800 JavaThread "Attach Listener" daemon [_thread_blocked, id=3000, stack(0x000000001f770000,0x000000001f870000)]
  0x000000001e2c8000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6592, stack(0x000000001f670000,0x000000001f770000)]
  0x000000001cbc7000 JavaThread "Finalizer" daemon [_thread_blocked, id=20556, stack(0x000000001f510000,0x000000001f610000)]
  0x000000001e2a3000 JavaThread "Reference Handler" daemon [_thread_blocked, id=27324, stack(0x000000001f410000,0x000000001f510000)]

Other Threads:
  0x000000001e282800 VMThread [stack: 0x000000001f310000,0x000000001f410000] [id=16568]
  0x000000001fecc000 WatcherThread [stack: 0x0000000020670000,0x0000000020770000] [id=27436]
復制代碼

如上資訊,執行緒阻塞

四、安全點和鎖資訊

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None
復制代碼

虛擬機狀態:

  • not at safepoint 表示正常運行,其余狀態:
  • at safepoint:所有執行緒都因為虛擬機等待狀態而阻塞,等待一個虛擬機操作完成;
  • synchronizing:一個特殊的虛擬機操作,要求虛擬機內的其它執行緒保持等待狀態,

虛擬機的 Mutex 和 Monito r目前沒有被執行緒持有,Mutex 是虛擬機內部的鎖,而 Monitor 則關聯到了 Java 物件,

五、堆資訊

Heap:
 PSYoungGen      total 503296K, used 245424K [0x000000076db80000, 0x000000078f800000, 0x00000007c0000000)
  eden space 471552K, 45% used [0x000000076db80000,0x000000077ac32f38,0x000000078a800000)
  from space 31744K, 99% used [0x000000078cb80000,0x000000078ea791c8,0x000000078ea80000)
  to   space 36352K, 0% used [0x000000078a800000,0x000000078a800000,0x000000078cb80000)
 ParOldGen       total 246784K, used 47975K [0x00000006c9200000, 0x00000006d8300000, 0x000000076db80000)
  object space 246784K, 19% used [0x00000006c9200000,0x00000006cc0d9cf0,0x00000006d8300000)
 Metaspace       used 77566K, capacity 79042K, committed 79400K, reserved 1120256K
  class space    used 8950K, capacity 9204K, committed 9256K, reserved 1048576K

Card table byte_map: [0x0000000012760000,0x0000000012f20000] byte_map_base: 0x000000000f117000
復制代碼

PSYoungGen, eden space, from space, to space, ParOldGen,Metaspace 有列印, Card table表示一種卡表,是 jvm 維護的一種資料結構,用于記錄更改物件時的參考,以便 gc 時遍歷更少的 table 和 root,

六、本地代碼快取

CodeCache: size=245760Kb used=28185Kb max_used=30942Kb free=217574Kb
 bounds [0x00000000033a0000, 0x0000000005250000, 0x00000000123a0000]
 total_blobs=8846 nmethods=8190 adapters=567
 compilation: enabled
復制代碼

七、編譯事件

Compilation events (10 events):
Event: 19.664 Thread 0x000000001fd46000 10237       3       java.net.URI::access$400 (4 bytes)
Event: 19.664 Thread 0x000000001fd46000 nmethod 10237 0x0000000004016850 code [0x00000000040169a0, 0x0000000004016ad0]
Event: 19.724 Thread 0x000000001fd46000 10238  s    3       java.io.BufferedOutputStream::write (67 bytes)
Event: 19.725 Thread 0x000000001fd46000 nmethod 10238 0x000000000461ce10 code [0x000000000461cfe0, 0x000000000461d838]
Event: 19.768 Thread 0x000000001fd46000 10239       3       com.alibaba.fastjson.parser.JSONScanner::scanFieldString (528 bytes)
Event: 19.770 Thread 0x000000001fd46000 nmethod 10239 0x000000000388dd10 code [0x000000000388e180, 0x0000000003891558]
Event: 19.771 Thread 0x000000001fd46000 10240       3       com.alibaba.fastjson.parser.DefaultJSONParser::setContext (44 bytes)
Event: 19.771 Thread 0x000000001fd46000 nmethod 10240 0x0000000003a0e010 code [0x0000000003a0e1a0, 0x0000000003a0e788]
Event: 19.771 Thread 0x000000001fd46000 10241       3       com.alibaba.fastjson.parser.ParseContext::<init> (20 bytes)
Event: 19.772 Thread 0x000000001fd46000 nmethod 10241 0x00000000045da690 code [0x00000000045da7e0, 0x00000000045da9d0]

復制代碼

記錄編譯時的10個編譯事件

八、記錄GC事件

C Heap History (10 events):
Event: 8.619 GC heap before
{Heap before GC invocations=15 (full 3):
 PSYoungGen      total 358912K, used 24951K [0x000000076db80000, 0x0000000786d00000, 0x00000007c0000000)
  eden space 331264K, 0% used [0x000000076db80000,0x000000076db80000,0x0000000781f00000)
  from space 27648K, 90% used [0x0000000783c80000,0x00000007854ddfe8,0x0000000785780000)
  to   space 30208K, 0% used [0x0000000781f00000,0x0000000781f00000,0x0000000783c80000)
 ParOldGen       total 169984K, used 37423K [0x00000006c9200000, 0x00000006d3800000, 0x000000076db80000)
  object space 169984K, 22% used [0x00000006c9200000,0x00000006cb68bdd0,0x00000006d3800000)
 Metaspace       used 58028K, capacity 58678K, committed 59160K, reserved 1101824K
  class space    used 6871K, capacity 7020K, committed 7080K, reserved 1048576K
Event: 8.797 GC heap after
Heap after GC invocations=15 (full 3):
 PSYoungGen      total 358912K, used 0K [0x000000076db80000, 0x0000000786d00000, 0x00000007c0000000)
  eden space 331264K, 0% used [0x000000076db80000,0x000000076db80000,0x0000000781f00000)
  from space 27648K, 0% used [0x0000000783c80000,0x0000000783c80000,0x0000000785780000)
  to   space 30208K, 0% used [0x0000000781f00000,0x0000000781f00000,0x0000000783c80000)
 ParOldGen       total 246784K, used 47344K [0x00000006c9200000, 0x00000006d8300000, 0x000000076db80000)
  object space 246784K, 19% used [0x00000006c9200000,0x00000006cc03c100,0x00000006d8300000)
 Metaspace       used 58028K, capacity 58678K, committed 59160K, reserved 1101824K
  class space    used 6871K, capacity 7020K, committed 7080K, reserved 1048576K
}
Event: 9.665 GC heap before
{Heap before GC invocations=16 (full 3):
 PSYoungGen      total 358912K, used 331264K [0x000000076db80000, 0x0000000786d00000, 0x00000007c0000000)
  eden space 331264K, 100% used [0x000000076db80000,0x0000000781f00000,0x0000000781f00000)
  from space 27648K, 0% used [0x0000000783c80000,0x0000000783c80000,0x0000000785780000)
  to   space 30208K, 0% used [0x0000000781f00000,0x0000000781f00000,0x0000000783c80000)
 ParOldGen       total 246784K, used 47344K [0x00000006c9200000, 0x00000006d8300000, 0x000000076db80000)
  object space 246784K, 19% used [0x00000006c9200000,0x00000006cc03c100,0x00000006d8300000)
 Metaspace       used 60281K, capacity 61068K, committed 61608K, reserved 1103872K
  class space    used 7054K, capacity 7221K, committed 7336K, reserved 1048576K
Event: 9.669 GC heap after
Heap after GC invocations=16 (full 3):
 PSYoungGen      total 361472K, used 6221K [0x000000076db80000, 0x000000078a400000, 0x00000007c0000000)
  eden space 331264K, 0% used [0x000000076db80000,0x000000076db80000,0x0000000781f00000)
  from space 30208K, 20% used [0x0000000781f00000,0x00000007825135f0,0x0000000783c80000)
  to   space 30208K, 0% used [0x0000000788680000,0x0000000788680000,0x000000078a400000)
 ParOldGen       total 246784K, used 47352K [0x00000006c9200000, 0x00000006d8300000, 0x000000076db80000)
  object space 246784K, 19% used [0x00000006c9200000,0x00000006cc03e100,0x00000006d8300000)
 Metaspace       used 60281K, capacity 61068K, committed 61608K, reserved 1103872K
  class space    used 7054K, capacity 7221K, committed 7336K, reserved 1048576K
}
Event: 10.930 GC heap before
{Heap before GC invocations=17 (full 3):
 PSYoungGen      total 361472K, used 337485K [0x000000076db80000, 0x000000078a400000, 0x00000007c0000000)
  eden space 331264K, 100% used [0x000000076db80000,0x0000000781f00000,0x0000000781f00000)
  from space 30208K, 20% used [0x0000000781f00000,0x00000007825135f0,0x0000000783c80000)
  to   space 30208K, 0% used [0x0000000788680000,0x0000000788680000,0x000000078a400000)
 ParOldGen       total 246784K, used 47352K [0x00000006c9200000, 0x00000006d8300000, 0x000000076db80000)
  object space 246784K, 19% used [0x00000006c9200000,0x00000006cc03e100,0x00000006d8300000)
 Metaspace       used 62023K, capacity 63076K, committed 63272K, reserved 1105920K
  class space    used 7179K, capacity 7353K, committed 7464K, reserved 1048576K
Event: 10.936 GC heap after
Heap after GC invocations=17 (full 3):
 PSYoungGen      total 418816K, used 11552K [0x000000076db80000, 0x0000000789a00000, 0x00000007c0000000)
  eden space 398848K, 0% used [0x000000076db80000,0x000000076db80000,0x0000000786100000)
  from space 19968K, 57% used [0x0000000788680000,0x00000007891c8050,0x0000000789a00000)
  to   space 29184K, 0% used [0x0000000786100000,0x0000000786100000,0x0000000787d80000)
 ParOldGen       total 246784K, used 47360K [0x00000006c9200000, 0x00000006d8300000, 0x000000076db80000)
  object space 246784K, 19% used [0x00000006c9200000,0x00000006cc040100,0x00000006d8300000)
 Metaspace       used 62023K, capacity 63076K, committed 63272K, reserved 1105920K
  class space    used 7179K, capacity 7353K, committed 7464K, reserved 1048576K
}
Event: 12.511 GC heap before
{Heap before GC invocations=18 (full 3):
 PSYoungGen      total 418816K, used 410400K [0x000000076db80000, 0x0000000789a00000, 0x00000007c0000000)
  eden space 398848K, 100% used [0x000000076db80000,0x0000000786100000,0x0000000786100000)
  from space 19968K, 57% used [0x0000000788680000,0x00000007891c8050,0x0000000789a00000)
  to   space 29184K, 0% used [0x0000000786100000,0x0000000786100000,0x0000000787d80000)
 ParOldGen       total 246784K, used 47360K [0x00000006c9200000, 0x00000006d8300000, 0x000000076db80000)
  object space 246784K, 19% used [0x00000006c9200000,0x00000006cc040100,0x00000006d8300000)
 Metaspace       used 68944K, capacity 70376K, committed 70440K, reserved 1112064K
  class space    used 7941K, capacity 8182K, committed 8232K, reserved 1048576K
Event: 12.525 GC heap after
Heap after GC invocations=18 (full 3):
 PSYoungGen      total 428032K, used 24539K [0x000000076db80000, 0x000000078ea80000, 0x00000007c0000000)
  eden space 398848K, 0% used [0x000000076db80000,0x000000076db80000,0x0000000786100000)
  from space 29184K, 84% used [0x0000000786100000,0x00000007878f6d80,0x0000000787d80000)
  to   space 31744K, 0% used [0x000000078cb80000,0x000000078cb80000,0x000000078ea80000)
 ParOldGen       total 246784K, used 47368K [0x00000006c9200000, 0x00000006d8300000, 0x000000076db80000)
  object space 246784K, 19% used [0x00000006c9200000,0x00000006cc042100,0x00000006d8300000)
 Metaspace       used 68944K, capacity 70376K, committed 70440K, reserved 1112064K
  class space    used 7941K, capacity 8182K, committed 8232K, reserved 1048576K
}
Event: 13.558 GC heap before
{Heap before GC invocations=19 (full 3):
 PSYoungGen      total 428032K, used 423387K [0x000000076db80000, 0x000000078ea80000, 0x00000007c0000000)
  eden space 398848K, 100% used [0x000000076db80000,0x0000000786100000,0x0000000786100000)
  from space 29184K, 84% used [0x0000000786100000,0x00000007878f6d80,0x0000000787d80000)
  to   space 31744K, 0% used [0x000000078cb80000,0x000000078cb80000,0x000000078ea80000)
 ParOldGen       total 246784K, used 47368K [0x00000006c9200000, 0x00000006d8300000, 0x000000076db80000)
  object space 246784K, 19% used [0x00000006c9200000,0x00000006cc042100,0x00000006d8300000)
 Metaspace       used 72037K, capacity 73490K, committed 73640K, reserved 1114112K
  class space    used 8339K, capacity 8615K, committed 8616K, reserved 1048576K
Event: 13.573 GC heap after
Heap after GC invocations=19 (full 3):
 PSYoungGen      total 503296K, used 31716K [0x000000076db80000, 0x000000078f800000, 0x00000007c0000000)
  eden space 471552K, 0% used [0x000000076db80000,0x000000076db80000,0x000000078a800000)
  from space 31744K, 99% used [0x000000078cb80000,0x000000078ea791c8,0x000000078ea80000)
  to   space 36352K, 0% used [0x000000078a800000,0x000000078a800000,0x000000078cb80000)
 ParOldGen       total 246784K, used 47975K [0x00000006c9200000, 0x00000006d8300000, 0x000000076db80000)
  object space 246784K, 19% used [0x00000006c9200000,0x00000006cc0d9cf0,0x00000006d8300000)
 Metaspace       used 72037K, capacity 73490K, committed 73640K, reserved 1114112K
  class space    used 8339K, capacity 8615K, committed 8616K, reserved 1048576K
}
復制代碼

也是記錄10次

九、逆優化

Deoptimization events (10 events):
Event: 14.207 Thread 0x0000000003133800 Uncommon trap: reason=speculate_class_check action=maybe_recompile pc=0x000000000352a960 method=java.util.AbstractList.listIterator()Ljava/util/ListIterator; @ 2
Event: 14.213 Thread 0x0000000003133800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003a49c14 method=org.springframework.util.ConcurrentReferenceHashMap$Segment.clear()V @ 4
Event: 14.229 Thread 0x0000000003133800 Uncommon trap: reason=unloaded action=reinterpret pc=0x00000000048007cc method=javassist.bytecode.ConstPool.readOne(Ljava/io/DataInputStream;)I @ 124
Event: 14.229 Thread 0x0000000003133800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000000360babc method=java.io.DataInputStream.readUTF(Ljava/io/DataInput;)Ljava/lang/String; @ 112
Event: 18.804 Thread 0x0000000021bfe000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000004bf1f54 method=java.util.AbstractList.clear()V @ 3
Event: 19.222 Thread 0x0000000021bff800 Uncommon trap: reason=predicate action=maybe_recompile pc=0x0000000003e8c130 method=java.util.TreeMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; @ 132
Event: 19.234 Thread 0x0000000021bff800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003eff9d4 method=org.springframework.util.AntPathMatcher$AntPathStringMatcher.matchStrings(Ljava/lang/String;Ljava/util/Map;)Z @ 17
Event: 19.423 Thread 0x0000000021bff800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000004983078 method=java.lang.AbstractStringBuilder.append(Ljava/lang/CharSequence;)Ljava/lang/AbstractStringBuilder; @ 37
Event: 19.423 Thread 0x0000000021bff800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000004983078 method=java.lang.AbstractStringBuilder.append(Ljava/lang/CharSequence;)Ljava/lang/AbstractStringBuilder; @ 37
Event: 19.536 Thread 0x0000000021bff800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000004ec5dc8 method=java.util.AbstractList$Itr.next()Ljava/lang/Object; @ 14
復制代碼

逆優化也記錄10次

十、重新定義類

Classes redefined (0 events):
No events
復制代碼

默認記錄10次,但是這里沒有發生

十一、內部例外

Internal exceptions (10 events):
Event: 18.332 Thread 0x0000000022174000 Exception <a 'java/io/FileNotFoundException'> (0x0000000778329e08) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u231\13620\hotspot\src\share\vm\prims\jni.cpp, line 710]
Event: 19.194 Thread 0x0000000021bff800 Exception <a 'java/security/PrivilegedActionException'> (0x0000000778f71b48) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u231\13620\hotspot\src\share\vm\prims\jvm.cpp, line 1502]
Event: 19.194 Thread 0x0000000021bff800 Exception <a 'java/security/PrivilegedActionException'> (0x0000000778f71d58) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u231\13620\hotspot\src\share\vm\prims\jvm.cpp, line 1502]
Event: 19.195 Thread 0x0000000021bff800 Exception <a 'java/security/PrivilegedActionException'> (0x0000000778fb7628) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u231\13620\hotspot\src\share\vm\prims\jvm.cpp, line 1502]
Event: 19.195 Thread 0x0000000021bff800 Exception <a 'java/security/PrivilegedActionException'> (0x0000000778fb7838) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u231\13620\hotspot\src\share\vm\prims\jvm.cpp, line 1502]
Event: 19.509 Thread 0x0000000021bff800 Exception <a 'java/lang/ClassNotFoundException': com/xmiles/weather/ad/activity/entity/response/GrabIndexResponseV2$GrabRedConfigIndexBeanInfo> (0x000000077a2f4958) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u231\13620\hotspot\src\share
Event: 19.510 Thread 0x0000000021bff800 Exception <a 'java/lang/ClassNotFoundException': com/xmiles/weather/ad/activity/entity/response/GrabIndexResponseV2$GrabRedConfigIndexCustomizer> (0x000000077a33a788) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u231\13620\hotspot\src\sha
Event: 19.511 Thread 0x0000000021bff800 Exception <a 'java/lang/ClassNotFoundException': com/xmiles/weather/ad/activity/entity/grab/db/GrabRedConfigV2BeanInfo> (0x000000077a39bf78) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u231\13620\hotspot\src\share\vm\classfile\systemDict
Event: 19.512 Thread 0x0000000021bff800 Exception <a 'java/lang/ClassNotFoundException': com/xmiles/weather/ad/activity/entity/grab/db/GrabRedConfigV2Customizer> (0x000000077a3d4498) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u231\13620\hotspot\src\share\vm\classfile\systemDi
Event: 19.512 Thread 0x0000000021bff800 Exception <a 'java/lang/ClassNotFoundException': java/io/SerializableCustomizer> (0x000000077a409d00) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u231\13620\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210]
復制代碼

十二、jvm 記憶體映射

Dynamic libraries:
0x00007ff7c4fd0000 - 0x00007ff7c5007000    D:\soft\java8\bin\java.exe
0x00007ffe2ac30000 - 0x00007ffe2ae26000    C:\Windows\SYSTEM32\ntdll.dll
0x00007ffe291b0000 - 0x00007ffe2926d000    C:\Windows\System32\KERNEL32.DLL
0x00007ffe28380000 - 0x00007ffe28648000    C:\Windows\System32\KERNELBASE.dll
0x00007ffe29360000 - 0x00007ffe2940a000    C:\Windows\System32\ADVAPI32.dll
0x00007ffe29ef0000 - 0x00007ffe29f8e000    C:\Windows\System32\msvcrt.dll
0x00007ffe29270000 - 0x00007ffe2930b000    C:\Windows\System32\sechost.dll
0x00007ffe296e0000 - 0x00007ffe29804000    C:\Windows\System32\RPCRT4.dll
0x00007ffe28db0000 - 0x00007ffe28f50000    C:\Windows\System32\USER32.dll
0x00007ffe28650000 - 0x00007ffe28672000    C:\Windows\System32\win32u.dll
0x00007ffe29310000 - 0x00007ffe2933a000    C:\Windows\System32\GDI32.dll
0x00007ffe28a30000 - 0x00007ffe28b39000    C:\Windows\System32\gdi32full.dll
0x00007ffe28910000 - 0x00007ffe289ad000    C:\Windows\System32\msvcp_win.dll
0x00007ffe28810000 - 0x00007ffe28910000    C:\Windows\System32\ucrtbase.dll
0x00007ffe16110000 - 0x00007ffe163ab000    C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.488_none_ca04af081b815d21\COMCTL32.dll
0x00007ffe29500000 - 0x00007ffe29530000    C:\Windows\System32\IMM32.DLL
0x0000000069020000 - 0x00000000690f2000    D:\soft\java8\jre\bin\msvcr100.dll
0x0000000066c70000 - 0x0000000067516000    D:\soft\java8\jre\bin\server\jvm.dll
0x00007ffe29340000 - 0x00007ffe29348000    C:\Windows\System32\PSAPI.DLL
0x00007ffe15b60000 - 0x00007ffe15b87000    C:\Windows\SYSTEM32\WINMM.dll
0x00007ffe1b8e0000 - 0x00007ffe1b8e9000    C:\Windows\SYSTEM32\WSOCK32.dll
0x00007ffe22ee0000 - 0x00007ffe22eea000    C:\Windows\SYSTEM32\VERSION.dll
0x00007ffe29410000 - 0x00007ffe2947b000    C:\Windows\System32\WS2_32.dll
0x00007ffe25b50000 - 0x00007ffe25b5f000    D:\soft\java8\jre\bin\verify.dll
0x00007ffe1b1d0000 - 0x00007ffe1b1f9000    D:\soft\java8\jre\bin\java.dll
0x00007ffe13880000 - 0x00007ffe138a3000    D:\soft\java8\jre\bin\instrument.dll
0x00007ffe18d20000 - 0x00007ffe18d36000    D:\soft\java8\jre\bin\zip.dll
0x00007ffe2a040000 - 0x00007ffe2a780000    C:\Windows\System32\SHELL32.dll
0x00007ffe264b0000 - 0x00007ffe26c44000    C:\Windows\SYSTEM32\windows.storage.dll
0x00007ffe29a30000 - 0x00007ffe29d85000    C:\Windows\System32\combase.dll
0x00007ffe27c50000 - 0x00007ffe27c7c000    C:\Windows\SYSTEM32\Wldp.dll
0x00007ffe28ca0000 - 0x00007ffe28d4e000    C:\Windows\System32\SHCORE.dll
0x00007ffe29020000 - 0x00007ffe29075000    C:\Windows\System32\shlwapi.dll
0x00007ffe282b0000 - 0x00007ffe282d6000    C:\Windows\SYSTEM32\profapi.dll
0x00007ffe1b240000 - 0x00007ffe1b25a000    D:\soft\IntelliJ IDEA Educational Edition 2020.1.2\bin\breakgen64.dll
0x00007ffe15a30000 - 0x00007ffe15a4a000    D:\soft\java8\jre\bin\net.dll
0x00007ffe27a40000 - 0x00007ffe27aaa000    C:\Windows\system32\mswsock.dll
0x00007ffe25be0000 - 0x00007ffe25bed000    D:\soft\java8\jre\bin\management.dll
0x00007ffe0d3b0000 - 0x00007ffe0d3c7000    C:\Windows\system32\napinsp.dll
0x00007ffe0d390000 - 0x00007ffe0d3ab000    C:\Windows\system32\pnrpnsp.dll
0x00007ffe0d370000 - 0x00007ffe0d385000    C:\Windows\system32\wshbth.dll
0x00007ffe23dc0000 - 0x00007ffe23ddd000    C:\Windows\system32\NLAapi.dll
0x00007ffe27750000 - 0x00007ffe2778b000    C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x00007ffe27790000 - 0x00007ffe2785b000    C:\Windows\SYSTEM32\DNSAPI.dll
0x00007ffe291a0000 - 0x00007ffe291a9000    C:\Windows\System32\NSI.dll
0x00007ffe0d2a0000 - 0x00007ffe0d2b2000    C:\Windows\System32\winrnr.dll
0x00007ffe21370000 - 0x00007ffe2137a000    C:\Windows\System32\rasadhlp.dll
0x00007ffe21420000 - 0x00007ffe2149f000    C:\Windows\System32\fwpuclnt.dll
0x00007ffe286d0000 - 0x00007ffe286f7000    C:\Windows\System32\bcrypt.dll
0x00007ffe15a10000 - 0x00007ffe15a22000    D:\soft\java8\jre\bin\nio.dll
0x00007ffe27c90000 - 0x00007ffe27ca8000    C:\Windows\SYSTEM32\CRYPTSP.dll
0x00007ffe273f0000 - 0x00007ffe27424000    C:\Windows\system32\rsaenh.dll
0x00007ffe28270000 - 0x00007ffe2829e000    C:\Windows\SYSTEM32\USERENV.dll
0x00007ffe289b0000 - 0x00007ffe28a2f000    C:\Windows\System32\bcryptprimitives.dll
0x00007ffe27bc0000 - 0x00007ffe27bcc000    C:\Windows\SYSTEM32\CRYPTBASE.dll
0x00007ffe22e80000 - 0x00007ffe22e97000    C:\Windows\SYSTEM32\dhcpcsvc6.DLL
0x00007ffe22e60000 - 0x00007ffe22e7d000    C:\Windows\SYSTEM32\dhcpcsvc.DLL
0x00007ffe13270000 - 0x00007ffe13294000    D:\soft\java8\jre\bin\sunec.dll
復制代碼

0x00007ff7c4fd0000 - 0x00007ff7c5007000 :記憶體區域

C:\Windows\System32\SHELL32.dll :檔案位置

十三、jvm啟動引數

VM Arguments:
jvm_args: -javaagent:D:\soft\IntelliJ IDEA Educational Edition 2020.1.2\lib\idea_rt.jar=63640:D:\soft\IntelliJ IDEA Educational Edition 2020.1.2\bin -Dfile.encoding=UTF-8 
java_command: com.xmiles.weather.ad.activity.Application
java_class_path (initial): D:\soft\java8\jre\lib\charsets.jar;D:\soft\java8\jre\lib\deploy.jar;D:\soft\java8\jre\lib\ext\access-bridge-64.jar;D:\soft\java8\jre\lib\ext\cldrdata.jar;D:\soft\java8\jre\lib\ext\dnsns.jar;D:\soft\java8\jre\lib\ext\jaccess.jar;D:\soft\java8\jre\lib\ext\jfxrt.jar;D:\soft\java8\jre\lib\ext\localedata.jar;D:\soft\java8\jre\lib\ext\nashorn.jar;D:\soft\java8\jre\lib\ext\sunec.jar;D:\soft\java8\jre\lib\ext\sunjce_provider.jar;D:\soft\java8\jre\lib\ext\sunmscapi.jar;D:\soft\java8\jre\lib\ext\sunpkcs11.jar;D:\soft\java8\jre\lib\ext\zipfs.jar;D:\soft\java8\jre\lib\javaws.jar;D:\soft\java8\jre\lib\jce.jar;D:\soft\java8\jre\lib\jfr.jar;D:\soft\java8\jre\lib\jfxswt.jar;D:\soft\java8\jre\lib\jsse.jar;D:\soft\java8\jre\lib\management-agent.jar;D:\soft\java8\jre\lib\plugin.jar;D:\soft\java8\jre\lib\resources.jar;D:\soft\java8\jre\lib\rt.jar;D:\xiaomaipro\ant_weather\ant-weather-main\weather-main-service-api\target\classes;D:\soft\apache-maven-3.5.4\rep\org\springframework\boot\spring-boot-starter-web\1.5.13.RELEASE\spring-boot-starter-web-1.5.13.RELEASE.jar;D:\soft\apache-maven-3.5.4\rep\org\springframework\boot\spring-boot-starter\1.5.13.RELEASE\spring-boot-starter-1.5.13.RELEASE.jar;D:\soft\apache-maven-3.5.4\rep\org\springframework\boot\spring-boot\1.5.13.RELEASE\spring-boot-1.5.13.RELEASE.jar;D:\soft\apache-maven-3.5.4\rep\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;D:\soft\apache-maven-3.5.4\rep\org\hibernate\hibernate-validator\5.3.6.Final\hibernate-validator-5.3.6.Final.jar;D:\soft\apache-maven-3.5.4\rep\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;D:\soft\apache-maven-3.5.4\rep\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\soft\apache-maven-3.5.4\rep\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;D:\soft\apache-maven-3.5.4\rep\com\fasterxml\jackson\core\jackson-databind\2.8.11.1\jackson-databind-2.8.11.1.jar;D:\soft\apache-maven-3.5.4\rep\com\fasterxml\jackson\core\jackson-annotati
Launcher Type: SUN_STANDARD
    
 Environment Variables:
JAVA_HOME=D:\soft\java8
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\soft\java8\lib;D:\soft\java8\lib\tools.jar;D:\soft\node14\;D:\soft\Git\cmd;D:\soft\gradle-5.4.1;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;D:\soft\mysql-8.0.21-winx64\bin;D:\soft\scala\bin;D:\soft\scala\bin;D:\soft\scala\lib;D:\soft\protoc-2.5.0-win32;C:\Windows\Microsoft.NET\Framework\v4.0.30319;D:\soft\ADB;D:\soft\java8\bin;;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;D:\soft\python38\Scripts\;D:\soft\python38\;C:\Users\GGF\AppData\Local\Microsoft\WindowsApps;D:\soft\IntelliJ IDEA 2020.2\bin;;D:\soft\bandizip\;C:\Users\GGF\AppData\Roaming\npm;D:\soft\IntelliJ IDEA Educational Edition 2020.1.2\bin;;D:\soft\gradle-6.5\bin;;D:\soft\Fiddler;C:\Users\GGF\.dotnet\tools
USERNAME=GGF
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 165 Stepping 3, GenuineIntel

復制代碼

jvm引數和環境變數

十四、服務器資訊

---------------  S Y S T E M  ---------------

OS: Windows 10.0 , 64 bit Build 19041 (10.0.19041.546)

CPU:total 12 (initial active 12) (6 cores per cpu, 2 threads per core) family 6 model 165 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx

Memory: 4k page, physical 16172248k(2670160k free), swap 36172884k(3088k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.231-b11) for windows-amd64 JRE (1.8.0_231-b11), built on Oct  5 2019 03:11:30 by "java_re" with MS VC++ 10.0 (VS2010)

time: Tue Nov 10 11:11:25 2020
timezone: 中國標準時間
elapsed time: 19 seconds (0d 0h 0m 19s)


作者:zzz666
鏈接:https://juejin.im/post/6894158777545654280
來源:掘金
著作權歸作者所有,商業轉載請聯系作者獲得授權,非商業轉載請注明出處,

轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/213511.html

標籤:其他

上一篇:Java訪問修飾符

下一篇:不用@Component怎么讓spring管理你的物件?

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 【C++】Microsoft C++、C 和匯編程式檔案

    ......

    uj5u.com 2020-09-10 00:57:23 more
  • 例外宣告

    相比于斷言適用于排除邏輯上不可能存在的狀態,例外通常是用于邏輯上可能發生的錯誤。 例外宣告 Item 1:當函式不可能拋出例外或不能接受拋出例外時,使用noexcept 理由 如果不打算拋出例外的話,程式就會認為無法處理這種錯誤,并且應當盡早終止,如此可以有效地阻止例外的傳播與擴散。 示例 //不可 ......

    uj5u.com 2020-09-10 00:57:27 more
  • Codeforces 1400E Clear the Multiset(貪心 + 分治)

    鏈接:https://codeforces.com/problemset/problem/1400/E 來源:Codeforces 思路:給你一個陣列,現在你可以進行兩種操作,操作1:將一段沒有 0 的區間進行減一的操作,操作2:將 i 位置上的元素歸零。最終問:將這個陣列的全部元素歸零后操作的最少 ......

    uj5u.com 2020-09-10 00:57:30 more
  • UVA11610 【Reverse Prime】

    本人看到此題沒有翻譯,就附帶了一個自己的翻譯版本 思考 這一題,它的第一個要求是找出所有 $7$ 位反向質數及其質因數的個數。 我們應該需要質數篩篩選1~$10^{7}$的所有數,這里就不慢慢介紹了。但是,重讀題,我們突然發現反向質數都是 $7$ 位,而將它反過來后的數字卻是 $6$ 位數,這就說明 ......

    uj5u.com 2020-09-10 00:57:36 more
  • 統計區間素數數量

    1 #pragma GCC optimize(2) 2 #include <bits/stdc++.h> 3 using namespace std; 4 bool isprime[1000000010]; 5 vector<int> prime; 6 inline int getlist(int ......

    uj5u.com 2020-09-10 00:57:47 more
  • C/C++編程筆記:C++中的 const 變數詳解,教你正確認識const用法

    1、C中的const 1、區域const變數存放在堆疊區中,會分配記憶體(也就是說可以通過地址間接修改變數的值)。測驗代碼如下: 運行結果: 2、全域const變數存放在只讀資料段(不能通過地址修改,會發生寫入錯誤), 默認為外部聯編,可以給其他源檔案使用(需要用extern關鍵字修飾) 運行結果: ......

    uj5u.com 2020-09-10 00:58:04 more
  • 【C++犯錯記錄】VS2019 MFC添加資源不懂如何修改資源宏ID

    1. 首先在資源視圖中,添加資源 2. 點擊新添加的資源,復制自動生成的ID 3. 在解決方案資源管理器中找到Resource.h檔案,編輯,使用整個專案搜索和替換的方式快速替換 宏宣告 4. Ctrl+Shift+F 全域搜索,點擊查找全部,然后逐個替換 5. 為什么使用搜索替換而不使用屬性視窗直 ......

    uj5u.com 2020-09-10 00:59:11 more
  • 【C++犯錯記錄】VS2019 MFC不懂的批量添加資源

    1. 打開資源頭檔案Resource.h,在其中預先定義好宏 ID(不清楚其實ID值應該設定多少,可以先新建一個相同的資源項,再在這個資源的ID值的基礎上遞增即可) 2. 在資源視圖中選中專案資源,按F7編輯資源檔案,按 ID 型別 相對路徑的形式添加 資源。(別忘了先把檔案拷貝到專案中的res檔案 ......

    uj5u.com 2020-09-10 01:00:19 more
  • C/C++編程筆記:關于C++的參考型別,專供新手入門使用

    今天要講的是C++中我最喜歡的一個用法——參考,也叫別名。 參考就是給一個變數名取一個變數名,方便我們間接地使用這個變數。我們可以給一個變數創建N個參考,這N + 1個變數共享了同一塊記憶體區域。(參考型別的變數會占用記憶體空間,占用的記憶體空間的大小和指標型別的大小是相同的。雖然參考是一個物件的別名,但 ......

    uj5u.com 2020-09-10 01:00:22 more
  • 【C/C++編程筆記】從頭開始學習C ++:初學者完整指南

    眾所周知,C ++的學習曲線陡峭,但是花時間學習這種語言將為您的職業帶來奇跡,并使您與其他開發人員區分開。您會更輕松地學習新語言,形成真正的解決問題的技能,并在編程的基礎上打下堅實的基礎。 C ++將幫助您養成良好的編程習慣(即清晰一致的編碼風格,在撰寫代碼時注釋代碼,并限制類內部的可見性),并且由 ......

    uj5u.com 2020-09-10 01:00:41 more
最新发布
  • Rust中的智能指標:Box<T> Rc<T> Arc<T> Cell<T> RefCell<T> Weak

    Rust中的智能指標是什么 智能指標(smart pointers)是一類資料結構,是擁有資料所有權和額外功能的指標。是指標的進一步發展 指標(pointer)是一個包含記憶體地址的變數的通用概念。這個地址參考,或 ” 指向”(points at)一些其 他資料 。參考以 & 符號為標志并借用了他們所 ......

    uj5u.com 2023-04-20 07:24:10 more
  • Java的值傳遞和參考傳遞

    值傳遞不會改變本身,參考傳遞(如果傳遞的值需要實體化到堆里)如果發生修改了會改變本身。 1.基本資料型別都是值傳遞 package com.example.basic; public class Test { public static void main(String[] args) { int ......

    uj5u.com 2023-04-20 07:24:04 more
  • [2]SpinalHDL教程——Scala簡單入門

    第一個 Scala 程式 shell里面輸入 $ scala scala> 1 + 1 res0: Int = 2 scala> println("Hello World!") Hello World! 檔案形式 object HelloWorld { /* 這是我的第一個 Scala 程式 * 以 ......

    uj5u.com 2023-04-20 07:23:58 more
  • 理解函式指標和回呼函式

    理解 函式指標 指向函式的指標。比如: 理解函式指標的偽代碼 void (*p)(int type, char *data); // 定義一個函式指標p void func(int type, char *data); // 宣告一個函式func p = func; // 將指標p指向函式func ......

    uj5u.com 2023-04-20 07:23:52 more
  • Django筆記二十五之資料庫函式之日期函式

    本文首發于公眾號:Hunter后端 原文鏈接:Django筆記二十五之資料庫函式之日期函式 日期函式主要介紹兩個大類,Extract() 和 Trunc() Extract() 函式作用是提取日期,比如我們可以提取一個日期欄位的年份,月份,日等資料 Trunc() 的作用則是截取,比如 2022-0 ......

    uj5u.com 2023-04-20 07:23:45 more
  • 一天吃透JVM面試八股文

    什么是JVM? JVM,全稱Java Virtual Machine(Java虛擬機),是通過在實際的計算機上仿真模擬各種計算機功能來實作的。由一套位元組碼指令集、一組暫存器、一個堆疊、一個垃圾回收堆和一個存盤方法域等組成。JVM屏蔽了與作業系統平臺相關的資訊,使得Java程式只需要生成在Java虛擬機 ......

    uj5u.com 2023-04-20 07:23:31 more
  • 使用Java接入小程式訂閱訊息!

    更新完微信服務號的模板訊息之后,我又趕緊把微信小程式的訂閱訊息給實作了!之前我一直以為微信小程式也是要企業才能申請,沒想到小程式個人就能申請。 訊息推送平臺🔥推送下發【郵件】【短信】【微信服務號】【微信小程式】【企業微信】【釘釘】等訊息型別。 https://gitee.com/zhongfuch ......

    uj5u.com 2023-04-20 07:22:59 more
  • java -- 緩沖流、轉換流、序列化流

    緩沖流 緩沖流, 也叫高效流, 按照資料型別分類: 位元組緩沖流:BufferedInputStream,BufferedOutputStream 字符緩沖流:BufferedReader,BufferedWriter 緩沖流的基本原理,是在創建流物件時,會創建一個內置的默認大小的緩沖區陣列,通過緩沖 ......

    uj5u.com 2023-04-20 07:22:49 more
  • Java-SpringBoot-Range請求頭設定實作視頻分段傳輸

    老實說,人太懶了,現在基本都不喜歡寫筆記了,但是網上有關Range請求頭的文章都太水了 下面是抄的一段StackOverflow的代碼...自己大修改過的,寫的注釋挺全的,應該直接看得懂,就不解釋了 寫的不好...只是希望能給視頻網站開發的新手一點點幫助吧. 業務場景:視頻分段傳輸、視頻多段傳輸(理 ......

    uj5u.com 2023-04-20 07:22:42 more
  • Windows 10開發教程_編程入門自學教程_菜鳥教程-免費教程分享

    教程簡介 Windows 10開發入門教程 - 從簡單的步驟了解Windows 10開發,從基本到高級概念,包括簡介,UWP,第一個應用程式,商店,XAML控制元件,資料系結,XAML性能,自適應設計,自適應UI,自適應代碼,檔案管理,SQLite資料庫,應用程式到應用程式通信,應用程式本地化,應用程式 ......

    uj5u.com 2023-04-20 07:22:35 more