jvm-hotspot

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

Setting -XX:MaxRam

你。 提交于 2020-04-06 04:38:01
问题 According to this link, there is an option to set MaxRamSize manually to restrict the JVM to not use memory beyond this. But I have not seen any documentation of the same. I've never known this. Is there anything like this or anything similar? PS. I know and I'm not looking to set heap/stack/metaspace/native memory sizes. I just would like to know if there is an overall memory limiting option. Trying it did not help as It errored out: Improperly specified VM option 'MaxRAM=1073741824B' Could

Setting -XX:MaxRam

北城以北 提交于 2020-04-06 04:35:28
问题 According to this link, there is an option to set MaxRamSize manually to restrict the JVM to not use memory beyond this. But I have not seen any documentation of the same. I've never known this. Is there anything like this or anything similar? PS. I know and I'm not looking to set heap/stack/metaspace/native memory sizes. I just would like to know if there is an overall memory limiting option. Trying it did not help as It errored out: Improperly specified VM option 'MaxRAM=1073741824B' Could

VarHandle get/setOpaque

此生再无相见时 提交于 2020-02-27 23:29:14
问题 I keep fighting to understand what VarHandle::setOpaque and VarHandle::getOpaque are really doing. It has not been easy so far - there are some things I think I get (but will not present them in the question itself, not to muddy the waters), but overall this is miss-leading at best for me. The documentation: Returns the value of a variable, accessed in program order... Well in my understanding if I have: int xx = x; // read x int yy = y; // read y These reads can be re-ordered. On the other

How to set JVM parameter values in a java program

筅森魡賤 提交于 2020-02-25 23:52:12
问题 I have a long list of JVM parameter values: -XX:+UseSerialGC -XX:+ResizePLAB -XX:-ResizeOldPLAB -XX:-AlwaysPreTouch -XX:-ParallelRefProcEnabled -XX:+ParallelRefProcBalancingEnabled -XX:+UseTLAB -XX:-ResizeTLAB -XX:-ZeroTLAB -XX:-FastTLABRefill -XX:+NeverActAsServerClassMachine -XX:-AlwaysActAsServerClassMachine -XX:+UseAutoGCSelectPolicy -XX:+UseAdaptiveSizePolicy -XX:+UsePSAdaptiveSurvivorSizePolicy -XX:-UseAdaptiveGenerationSizePolicyAtMinorCollection -XX:

Returning two values from Java function efficiently

删除回忆录丶 提交于 2020-02-02 12:01:28
问题 Does anybody know if there is a way to return two values from Java with (close to) zero overhead? I'm only looking for two values - I have a couple use cases from processing an array of bytes (and need the return value and the next starting position) to trying to return a value with an error code to doing some ugliness with fixed-point calculations and need the whole and fractional part. I'm not below some really ugly hacks. The function is small and Hotspot happily inlines it. So now, I just

Garbage Collection not running for Code Cache Memory Pool

China☆狼群 提交于 2020-01-25 02:51:07
问题 When I am printing the details of garbage collection using GarbageCollectorMXBean the output shows me the following information:- Name: PS ScavengeCollection count: 72 Collection time: 3041 Memory Pools: PS Eden Space PS Survivor Space Name: PS MarkSweepCollection count: 5 Collection time: 4922 Memory Pools: PS Eden Space PS Survivor Space PS Old Gen Now quite rightly the ScavengeCollection and MarkSweep collection covers 4 of the 5 available memory pool excluding Code Cache (Non Heap Memory)

JDK9 Hotspot debug using gdb, causing SIGSEGV Segmentation fault in eclipse/Ubuntu terminal

社会主义新天地 提交于 2020-01-23 02:11:52
问题 I am trying to debug JDK9. I want to trace source code and see the control flow of JDK/Hotspot code. I use gdb and Eclipse but there is a problem SIGSEGV Segmentation fault . I follow Buildme.md from JDK official document to configure JDK9, bash ./configure --with-debug-level=slowdebug --with-target-bits=64 --disable-warnings-as-errors Then, make all I get my customized debug version: /images/jdk/bin/java -version openjdk version "9-internal" OpenJDK Runtime Environment (build 9-internal+0

Method Area and PermGen

旧街凉风 提交于 2020-01-19 23:07:07
问题 I was trying to understand the memory structure of HotSpot JVM and got confused with the two terms "Method Area" and "PermGen" space. The docs I referred to say that Method Area contains the definition of classes and methods including the byte code. Some other docs say that they are stored in the PermGen space. So can I conclude that these two memory areas are same ? 回答1: You should take a look at Java Memory Types and optionally at this doc about the Garbage Collection in Java. The latter is