{"id":84445,"date":"2020-05-15T19:00:43","date_gmt":"2020-05-15T11:00:43","guid":{"rendered":"http:\/\/4563.org\/?p=84445"},"modified":"2020-05-15T19:00:43","modified_gmt":"2020-05-15T11:00:43","slug":"hotspot-%e4%b8%ad%e4%b8%80%e4%b8%aa%e5%8f%98%e9%87%8f%e6%a7%bd%e5%ba%94%e8%af%a5%e4%b8%ba%e5%a4%9a%e5%b0%91%e5%ad%97%e8%8a%82%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=84445","title":{"rendered":"Hotspot \u4e2d\u4e00\u4e2a\u53d8\u91cf\u69fd\u5e94\u8be5\u4e3a\u591a\u5c11\u5b57\u8282\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Hotspot \u4e2d\u4e00\u4e2a\u53d8\u91cf\u69fd\u5e94\u8be5\u4e3a\u591a\u5c11\u5b57\u8282\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zzkde <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>Java \u865a\u62df\u673a\u89c4\u8303\u5e76\u6ca1\u6709\u5b9a\u4e49\u53d8\u91cf\u69fd\u7684\u5927\u5c0f\uff0c\u90a3\u4e48\u5728\u5177\u4f53\u865a\u62df\u673a\uff0c\u6bd4\u5982 Hotspot \u4e0a\u4e00\u4e2a slot \u591a\u5927\u5462\uff1f<\/p>\n<p>Java \u865a\u62df\u673a\u89c4\u8303\u8981\u6c42\u4e00\u4e2a reference \u5360\u7528\u4e00\u4e2a slot\uff0c\u53ea\u6709 long \u548c double \u8fd9\u7c7b 64 \u4f4d\u7684\u6570\u636e\u624d\u4f7f\u7528\u4e24\u4e2a slot \u3002\u5047\u8bbe\u4e00\u4e2a slot \u4e3a 4 \u5b57\u8282\uff0c\u5728 64 \u4f4d\u673a\u5668\u4e0a\u4e00\u4e2a 32 \u4f4d\u7684 slot \u7684 reference \u600e\u4e48\u5229\u7528\u8d85\u8fc7 4G \u7684\u5185\u5b58\uff1f<\/p>\n<p>\u867d\u7136\u538b\u7f29\u6307\u9488\u53ef\u4ee5\u5b9e\u73b0 32G \u7684\u5bfb\u5740\uff0c\u4f46\u662f\u6211\u770b\u6587\u6863 https:\/\/wiki.openjdk.java.net\/display\/HotSpot\/CompressedOops \u4e2d\u8bf4\u5728\u53d8\u91cf\u8868\u4e0a\u5e76\u4e0d\u542f\u7528\u538b\u7f29<\/p>\n<blockquote>\n<p>In the interpreter, oops are never compressed. These include JVM locals and stack elements, outgoing call arguments, and return values. The interpreter eagerly decodes oops loaded from the heap, and encodes them before storing them to the heap.<\/p>\n<\/blockquote><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1549431\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wushigejiajia01 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u83dc\u9e21\u89c2\u6469\u4e0b\u5927\u4f6c\u7ed9\u4e2a\u7b54\u6848                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1549432\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 1194129822 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7ea0\u7ed3 slot \u65e0\u610f\u4e49\uff0cslot \u662f class \u5c42\u9762\u7684\uff0c\u7c7b\u52a0\u8f7d\u540e\u5c31\u53d8\u4e0d\u5b58\u5728\u4e86\u3002JVM \u89c4\u8303\u5e76\u6ca1\u6709\u89c4\u5b9a slot \u5927\u5c0f\uff0c\u5c40\u90e8\u53d8\u91cf\u7684\u5927\u5c0f 32 \u4f4d\u673a\u5668\u9664\u4e86 long \u548c double \u90fd\u662f 32 \u4f4d\uff0c64 \u4f4d\u673a\u5668\u6240\u6709\u5c40\u90e8\u53d8\u91cf\u90fd\u662f 64 \u4f4d\uff08\u4e00\u4e2a\u5b57\u957f\uff09\u5373\u4f7f long \u548c double \u5728 class \u5c42\u9762\u5360\u4e24\u4e2a slot\uff0c\u52a0\u8f7d\u540e 64 \u4f4d JVM \u5bf9 long \u548c double \u5c40\u90e8\u53d8\u91cf\u53ea\u5206\u914d\u4e00\u4e2a\u5b57\u957f\u5e76\u6ca1\u6709\u8fdd\u53cd JVM \u89c4\u8303\uff0c\u4f7f\u7528 SA \u5de5\u5177 HSDB \u5c31\u80fd\u770b\u5230 Java \u6808\u5e27\u7684\u5e03\u5c40\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1549433\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zzkde <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @1194129822 \u6211\u53bb\u8bd5\u4e86 hsdb\uff0c\u4f46\u662f\u521a\u8fde\u63a5\u4e0a\u53bb\u5c31\u62a5\u4e86\u4e0b\u9762\u7684\u5f02\u5e38<\/p>\n<p>&#8220;`<br \/>Exception in thread &#8220;AWT-EventQueue-0&#8221; java.lang.RuntimeException: Unable to deduce type of thread from address 0x00007fc30016f800 (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread or CodeCacheSweeperThread)<br \/> at jdk.hotspot.agent\/sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:172)<br \/> at jdk.hotspot.agent\/sun.jvm.hotspot.runtime.Threads.first(Threads.java:156)<br \/> at jdk.hotspot.agent\/sun.jvm.hotspot.ui.JavaThreadsPanel.cache(JavaThreadsPanel.java:463)<br \/> at jdk.hotspot.agent\/sun.jvm.hotspot.ui.JavaThreadsPanel.&lt;init&gt;(JavaThreadsPanel.java:89)<br \/> at jdk.hotspot.agent\/sun.jvm.hotspot.HSDB$45.run(HSDB.java:1380)<br \/> at java.desktop\/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)<br \/> at java.desktop\/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)<br \/> at java.desktop\/java.awt.EventQueue$4.run(EventQueue.java:721)<br \/> at java.desktop\/java.awt.EventQueue$4.run(EventQueue.java:715)<br \/> at java.base\/java.security.AccessController.doPrivileged(Native Method)<br \/> at java.base\/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)<br \/> at java.desktop\/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)<br \/> at java.desktop\/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)<br \/> at java.desktop\/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)<br \/> at java.desktop\/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)<br \/> at java.desktop\/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)<br \/> at java.desktop\/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)<br \/> at java.desktop\/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)<br \/>Caused by: sun.jvm.hotspot.types.WrongTypeException: No suitable match for type of address 0x00007fc30016f800<br \/> at jdk.hotspot.agent\/sun.jvm.hotspot.runtime.InstanceConstructor.newWrongTypeException(InstanceConstructor.java:62)<br \/> at jdk.hotspot.agent\/sun.jvm.hotspot.runtime.VirtualConstructor.instantiateWrapperFor(VirtualConstructor.java:80)<br \/> at jdk.hotspot.agent\/sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:168)<br \/> &#8230; 17 more<br \/>&#8220;`<\/p>\n<p>\u6211\u7684\u73af\u5883\uff1aarchliunx \u3001openjdk8 \u548c openjdk11 \u90fd\u8bd5\u8fc7\u4e86\u3002\u662f\u4ee5\u540c\u4e00\u4e2a\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u7684\u3002<br \/>\u5728\u7f51\u4e0a\u67e5\u8be2\u4e86\u5f88\u4e45\u6ca1\u5565\u89e3\u51b3\u65b9\u6848\uff0c\u4e0d\u77e5\u9053\u5927\u4f6c\u600e\u4e48\u89e3\u51b3\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Hotspot \u4e2d\u4e00\u4e2a\u53d8\u91cf\u69fd\u5e94\u8be5\u4e3a&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/84445"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=84445"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/84445\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=84445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=84445"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=84445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}