jvm-hotspot

JMap.java - Timed out while attempting to connect to debug server - SwDbgSrv.exe

最后都变了- 提交于 2019-12-24 04:12:35
问题 I'm trying to run and debug the utilies from sun.jvm.hotspot.tools and sun.jvm.hotspot.utilities (like JMap.java) in order to understand better what is going on. Unfortunately I get stuck very early with the following error message and don't even get to debug a lot: Attaching to process ID 5144, please wait... Error attaching to process: Timed out while attempting to connect to debug server (please start SwDbgSrv.exe) It seems like for whatever reason the tools are trying to connect to a

JMap.java - Timed out while attempting to connect to debug server - SwDbgSrv.exe

孤街醉人 提交于 2019-12-24 04:12:22
问题 I'm trying to run and debug the utilies from sun.jvm.hotspot.tools and sun.jvm.hotspot.utilities (like JMap.java) in order to understand better what is going on. Unfortunately I get stuck very early with the following error message and don't even get to debug a lot: Attaching to process ID 5144, please wait... Error attaching to process: Timed out while attempting to connect to debug server (please start SwDbgSrv.exe) It seems like for whatever reason the tools are trying to connect to a

is it possible to remove jumps with final boolean on java jit?

空扰寡人 提交于 2019-12-24 03:48:12
问题 As we know some people say java JIT is faster then C++. I had some idea to utilize JIT and remove some instructions at runtime code. Here is sample code i tried: /** * Created by kadirbasol on 4/6/14. */ public class RemoveJump { public final boolean test; private static RemoveJump instance = new RemoveJump(); public static final RemoveJump getInstance() { return instance; } private RemoveJump() { //set the test on the constructor once and //remove this if statement forever from testLoop test

Locate and read objects of a specific type from memory of a running java program

99封情书 提交于 2019-12-24 03:37:36
问题 I have to evaluate how difficult it would be to extract some object (e.g. java.security.PrivateKey ) from memory of a running java program. I'm not very into this low level memory stuff, so I started out with small C programs and familiarized myself with gdb , /proc/<pid>/maps , /proc/<pid>/mem and a script that dumps all the memory areas. However, things change when switching to java. Memory is allocated and managed very differently with java thanks to garbage collection. In C programs I'd

Dynamic Bytecode Instrumentation fails without any error

北慕城南 提交于 2019-12-24 01:07:17
问题 Objective I'm doing dynamic bytecode instrumentation using a JVMTI agent. I have to instrument those methods which are "hot", that is, the methods which invoke JIT compiler. To do so I listen to a CompiledLoadEvent and inside its call back function, call RetransformClasses . This in turn invokes ClassFileLoadHook on the class containing "hot" function and actual instrumentation begins. Problem Premises Currently I'm instrumenting my class to spawn some threads. I also listen to thread starts

Adding javaagent to process id or JVM start up

眉间皱痕 提交于 2019-12-24 00:48:53
问题 I want to add a java agent to process ID of the already running java application. Is there any way doing that using command line, something like java -jar java agent.jar process_id or if i can edit the hotspot JVM start up script directly to add the java agent there itself, but how can i edit the hotspot JVM start up script. I am using UNIX. 回答1: If you are working with the sun JVM you can use the dynamic attach agent. http://docs.oracle.com/javase/7/docs/technotes/guides/attach/index.html 来源

How to understand Java Hotspot Errors

你离开我真会死。 提交于 2019-12-23 07:49:45
问题 Guys when the JVM Crashes it writes an Error Log hs_err_pid.log. I want to find out what caused the JVM to crash ? How to understand these Logs, is it documented anywhere on how this Log is arranged. I tried to search on the Net but to no avail :-( Pointing out to relevant URL's will be appreciated. Thanks. 回答1: Unless you are calling native code (JNI), nothing in your code should ever make JVM crash; so the stack trace information in that log file is probably not meant to be very useful to

Bounds Checking in Java

核能气质少年 提交于 2019-12-23 07:27:42
问题 "Hotspot can remove bounds checking in Java." Can any one explain this please? Actually im analysing the differences between C++ and Java. It is not a homework and im analysing on my own interest. 回答1: After googling "hotspot bounds checking", a Paper with the Title "Array Bounds Check Elimination for the Java HotSpot™ Client Compiler" shows up (as the first result) and gives us some insight: Abstract: Whenever an array element is accessed, Java virtual machines execute a compare instruction

Where is variablilty in stack consumption coming from?

不打扰是莪最后的温柔 提交于 2019-12-23 03:10:16
问题 Whilst running test code from this question and fiddling with the JVM's thread stack size, I found that results were not necessarily repeatable: there were values of stack size for which the program would sometimes throw java.lang.StackOverflowError , but sometimes not . My question is: "What is causing the variation in stack space consumption?" Also, can an interrupt's stack be put on this program's main thread? Will results be similarly non-deterministic for other JVM implementations and/or

Java create wifi hotspot in Windows 8

旧时模样 提交于 2019-12-22 10:40:15
问题 I need to create a wifi hotspot and a DHCP server in Windows 7-8 with Java. I'm developing a software that could be for the user less intrusive and simple that i could. For the first part of my work, I thought to use netsh to create the hosted network and to set static the ip. my current code is this: String[] command = { "cmd", }; Process p = Runtime.getRuntime().exec(command); new Thread(new SyncPipe(p.getErrorStream(), System.err)).start(); new Thread(new SyncPipe(p.getInputStream(),