jvm

Recent books on JVM? [closed]

﹥>﹥吖頭↗ 提交于 2020-07-04 05:41:08
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I'm after a book to learn about the internals of the Java virtual machine. I found this thread but it is two years old now. Are there

What's the cause of Unable to open socket file: process not responding while Dumping the JVM? [duplicate]

冷暖自知 提交于 2020-06-28 04:43:48
问题 This question already has answers here : Running jmap getting Unable to open socket file (4 answers) Closed 3 years ago . I am running the command: jstack 1234 > threadDump.tdump On an PID of a Java process. I keep getting the following message: Unable to open socket file: target process not responding or HotSpot VM not loaded The -F option can be used when the target process is not responding I am not asking just how to solve, but I want to understand why I am getting this message, since I

What's the cause of Unable to open socket file: process not responding while Dumping the JVM? [duplicate]

ε祈祈猫儿з 提交于 2020-06-28 04:43:07
问题 This question already has answers here : Running jmap getting Unable to open socket file (4 answers) Closed 3 years ago . I am running the command: jstack 1234 > threadDump.tdump On an PID of a Java process. I keep getting the following message: Unable to open socket file: target process not responding or HotSpot VM not loaded The -F option can be used when the target process is not responding I am not asking just how to solve, but I want to understand why I am getting this message, since I

Full GC (Heap Inspection Initiated GC)

人盡茶涼 提交于 2020-06-27 17:55:06
问题 I am struggling to hunt down the "Full GC" on our production JVM. Every day at around midnight the STW occurs without apparent reason, quite deadly for 10-11 sec. Here is the gc log: Java HotSpot(TM) 64-Bit Server VM (25.131-b11) for windows-amd64 JRE (1.8.0_131-b11), built on Mar 15 2017 01:23:53 by "java_re" with MS VC++ 10.0 (VS2010) Memory: 4k page, physical 16584284k(13074876k free), swap 23137624k(18439472k free) CommandLine flags: -XX:GCLogFileSize=1024000 -XX:InitialHeapSize

Java interface synthetic method generation while narrowing return type

≡放荡痞女 提交于 2020-06-27 16:39:08
问题 I have 2 interfaces, and 2 return types. interface interfaceA { Publisher<String> doSomething(); } interface interfaceB extends interfaceA { Flow<String> doSomething(); } interface Publisher<T>{} class Flow<T> implements Publisher<T>{} So at runtime, I can see 2 methods of interfaceB.class.getMethods() public default my.package.Publisher my.package.interfaceB.doSomething() public abstract my.package.Flow my.package.interfaceB.doSomething() Regarding the first one, it is Synthetic. (method

JVM crashes with problematic frame [libjvm.so+0x7f582e] PerfLongVariant::sample()+0x1e

寵の児 提交于 2020-06-27 15:24:26
问题 The application is basically a Servlet on top of Apaches Tomcat 8 and crashes every 3 to n days. The most interesting part is, that the last 3 crashes happened at 1.30 PM + 3 to 4 seconds. Every other crash happens at 15, 30, 45 or the full hour. The same application worked for months on Windows 7 with Java 7 something. I found this report so I checked the available space at /tmp and I have plenty of space here. However, the next time I ran the VM with: -XX:-UsePerfData -XX:

How to understand java.lang.management.MemoryMXBean and -Xms?

偶尔善良 提交于 2020-06-27 15:22:48
问题 MemoryMXBean.getHeapMemoryUsage() I have a jvm process that ran with -Xms512m -Xmx512m, and below show the MemoryMXBean.getHeapMemoryUsage() of this process: init = 512M used = 105M comitted = 491M max = 491M Why max is 491M(I expect it to be 512M)? MemoryMXBean.getNonHeapMemoryUsage() MemoryMXBean.getNonHeapMemoryUsage() of this process: init = 2M used = 25M comitted = 25M max = 0M What does the non-heap(who uses it) means? What kind of memory will be count into this non-heap? I only know

How to understand java.lang.management.MemoryMXBean and -Xms?

拜拜、爱过 提交于 2020-06-27 15:22:16
问题 MemoryMXBean.getHeapMemoryUsage() I have a jvm process that ran with -Xms512m -Xmx512m, and below show the MemoryMXBean.getHeapMemoryUsage() of this process: init = 512M used = 105M comitted = 491M max = 491M Why max is 491M(I expect it to be 512M)? MemoryMXBean.getNonHeapMemoryUsage() MemoryMXBean.getNonHeapMemoryUsage() of this process: init = 2M used = 25M comitted = 25M max = 0M What does the non-heap(who uses it) means? What kind of memory will be count into this non-heap? I only know

Who invokes the class initializer method <clinit> and when?

爷,独闯天下 提交于 2020-06-24 08:35:13
问题 I know that the new , dup , invokespecial and astore bytecode pattern will invoke the instance initializer method <init> when someone instance a Java class from the Java language point of view, but i never figure out who invoke the special <clinit> method and when does this happen? My guess is that <clinit> is invoked before <init> method. Can any body give me some information to prove it? Is this documented in the JVM Specification or Java Language Specification? 回答1: JVM spec §2.9. Special

sun.misc.Perf documentation or alternative

这一生的挚爱 提交于 2020-06-23 07:55:13
问题 I understand that the sun.* packages are not part of the official Java API. However, I need to use some functionality similar to what Perf offers: specifically Basic JVM Metrics (Heap, Threads, PermGen, etc), JvmStat counters to GC, etc. Does anybody know a wrapper library around Perf and PerfInstrumentation which comes with a good documentation. I need to use it as an API so e.g. the VisualVM's Tracer plugin is not good enough. Anybody has a comment on that? 回答1: There are wrapper around JVM