hotspot

Exact state of committed memory in java

Im curious what the exact meaning of "committed" memory is when the value is queried from the MemoryUsage class. That class explains it as "committed represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine." Does this mean that the memory is in use by the jvm process and NOT ava...

Class.getConstantPool()

If you decompile the java.lang.Class class in java from the rt.jar library you will notice there is a native method declaration: native ConstantPool getConstantPool(); I played a while ago with class decompilation using Sun's .class file specification and I was able to obtain the constant pool record from each .class file. But that wa...

How do I write a correct micro-benchmark in Java?

As the title says. How do you write (and run) a correct micro-benchmark in Java? I'm looking here for code samples and comments illustrating various things to think about. Example: Should the benchmark measure time/iteration or iterations/time, and why? Near Duplicate of: http://stackoverflow.com/questions/410437/is-stopwatch-benchmar...

How do I programmatically find out my PermGen space usage?

I'm trying to diagnose a java.lang.OutOfMemoryError: PermGen Space error when running on Sun's Hotspot JVM, and would like to know how much PermGen space my program is using at various points. Is there a way of finding out this information programmatically? ...

What happens to a branch of an OS project covered by software patents?

I was looking through patents authored by Lars Bak, when I realized a lot of them cover components of the the Sun JVM, HotSpot, etc. Now that parts Sun's stack is being released under FLOSS licenses, how does this affect people who are forking or using forks of this open source software? Are they not in violation of Sun's patents? ...

Regarding HotSpot optimization in Java

I've done some HotSpot optimization in Java. However, I'm now concerned about space in relation to loading classes (ie. only need one method in a class, don't want to load others). How would I go about doing so? ...

How do I use an image Hot Spot in C#?

I'm trying to use Hot Spots in C# to detect a mouse click on a betting table. ...

Java task runtime

Hi! First of all I have to admit that these are very basic and primitive questions... I want to demonstrate different Algorithms in Java for sorting and searching, and to get a value for the runtime. There're issues I cannot solve: there's Hotspot compiling - which is a runtime optimization I need to deactivate (I guess). How do I ge...

How to understand Java Hotspot Errors

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. ...

First time a Java loop is run SLOW, why? [Sun HotSpot 1.5, sparc]

In benchmarking some Java code on a Solaris SPARC box, I noticed that the first time I call the benchmarked function it runs EXTREMELY slowly (10x difference): First | 1 | 25295.979 ms Second | 1 | 2256.990 ms Third | 1 | 2250.575 ms Why is this? I suspect the JIT compiler, is there any wa...

Why does Java code generated to perform an operation run more slowly than an "interpreter loop"?

I have some Java code which performs bitwise operations on a BitSet. I have a list of operations and can "interpret" them by looping over them, but it's important to me that I can perform these operations as quickly as possible, so I've been trying to dynamically generate code to apply them. I generate Java source to perform the operat...

Bluetooth hotspots

Where should you start when your next application was a bluetooth hotspot implementation? Any help (link, e-book, guide) would be gratefully appreciated ...

Is there a Java bytecode optimizer that removes useless gotos?

Problem: I have a method that compiles to over 8000 bytes of Java bytecode. HotSpot has a magic limit that makes the JIT not kick in for methods that exceed 8000 bytes. (Yes, it is reasonable to have a huge method. This is a tokenizer loop.) The method is in a library and I don't want to require users of the library to have to configure ...

JVM -XX:+StringCache argument?

I was recently reading about all the JVM arguments available in JRE 6 [Java VM Options] and saw this : -XX:+StringCache : Enables caching of commonly allocated strings. Now I was always under the impression that Java kept a pool of interned (correct word?) Strings and when doing something like String concatenation with literals it...

Java Applet failure

I am running a Java web applet on one of my servers. For some reason a particular user cannot access it (an error text appears in place of the applet that reads "Error. Click for details"; it is not text I placed between the tags, i.e., his JRE is installed and appears to at the very least be installed correctly but for some reason it i...

Creating HotSpots in C#

... Is it possible to create hot-spots in C# so that when the mouse is over a certain area an event gets triggered? Thank you :o) ...

Java Class.getSimpleName() and .getName() behaving differently on Cacao versus Sun Java

Does any one have any idea why this would be happening? This is some modified lines from the Java DBus bindings (2.6) // don't let people import things which don't have a // valid D-Bus interface name System.out.println("type.getName: " + type.getName() + " type.getSimpleName: " + type.getSimpleName() ); if (type.getName().eq...

How can I code Java to allow SSE use and bounds-check elimination (or other advanced optimizations)?

The Situation: I'm optimizing a pure-java implementation of the LZF compression algorithm, which involves a lot of byte[] access and basic int mathematics for hashing and comparison. Performance really matters, because the goal of the compression is to reduce I/O requirements. I am not posting code because it isn't cleaned up yet, and...

Debugging java obfuscated code

We are going to obfuscate our project but don't want to lose the ability of remote debugging and hotswapping. Is it possible? Which tools can handle this? I'd be happy with simple obfuscation - just renaming classes/methods/variables. [Edited] We're using Intellij IDEA but wasn't able to find any plugin for this task. ...

Change background of image maps on mouse hover

Hi, Iam new to CSS and Javascript. In my website I have an image as the navigation bar and have created hotspots to link them to different pages. The problem is since the text is a part of the image, I cannot change the style of the text on hover. Whereas I want the text/the hotspot to stand out on mouseover, so I learn the background c...