Questions tagged [jvm-hotspot]

HotSpot is the standard Java virtual machine used by both the Oracle and OpenJDK Java runtime environments.

HotSpot is the standard Java virtual machine used by both the Oracle and OpenJDK Java runtime environments for Java SE and EE environments.

This makes it the most widely deployed Java virtual machine in the world.

It is capable of running code from any language which can emit a Java .class file, as well as interpreted languages (e.g. JRuby) which have implemented their interpreters in Java (or another JVM language).

As of 2012, there are at least 200 languages which can run on top of the JVM - including Scala, Groovy, Clojure, JRuby, Jython and many smaller, niche languages.

HotSpot gets its name from the ability to dynamically profile running code and detect the "hot spots" of execution - the most commonly executing methods.

As, under most circumstances, programs spend most of their time in a small percentage of their methods, this focusing of optimization effort on the hot methods is very efficient.

HotSpot compiles and aggressively optimizes these hottest methods to highly platform-specific machine code which is specialized for the exact environment the code is running on.

This ability to use information about the runtime environment (precise instruction sets supported, memory and core configuration, etc) allows HotSpot to perform optimization tricks that are just not possible with a generic ahead-of-time strategy for "i386" or "i686" as is commonly seen in C/C++ environments.

This (along with the JVMs advanced memory management and garbage collection subsystem) makes the performance analysis of HotSpot-hosted programs more difficult compared to well-known techniques for C/C++. Direct comparison between the two environments is difficult - they each have individual strengths, and each has areas where they have definite advantages.

696 questions
0
votes
1 answer

ant xmlbean task behavior differs from Oracle HotSpot to IBM J9

I have ant xmlbean task that works fine under HotSpot 1.8 but fails under IBM J9 with exception IO Error java.nio.charset.UnmappableCharacterException: Input length = 1 How may I fix that? Here is my ant task:
Andrew
  • 319
  • 2
  • 16
0
votes
1 answer

Adobe Experience Manager (AEM), Java garbage collection tuning and memory management

I am currently using the Adobe Experience Manager for a Client's site (Java language). It uses openJDK: #java -version java version "1.7.0_65" OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17) OpenJDK 64-Bit Server VM (build…
nabello
  • 716
  • 11
  • 29
0
votes
1 answer

Thymeleaf Not Hot Swapping Intellij

I am having some issues getting my Thymeleaf templates to hot swap / update using Intellij. At the moment I have to do a full server restart in order to see my changes, which is rather tedious and slows down my work flow. I am using Gradle, Intellij…
jkratz55
  • 821
  • 2
  • 13
  • 27
0
votes
1 answer

Why is "PrintThreads" vm op causing long vm pauses in the application?

I am running jvm with -XX:+PrintSafepointStatistics, -XX:+PrintGCApplicationStoppedTime and -XX:+PrintGCApplicationConcurrentTime among others to investigate gc pauses. I noticed that The vm pauses are much larger than gc pauses at 90% of…
0
votes
2 answers

Loading of java hotspot classes in jvm

Oracle documentation describes /jdk1.7.0/jre/lib/rt.jar as bootstrap classes for java runtime, I am curious if these are ever loaded when running a JDK rather than a JRE and if so how these get replaced with hotspot classes at runtime? For example…
MilesHampson
  • 2,069
  • 24
  • 43
0
votes
3 answers

how to optimisation garbage collection for new generation?

I want to speed up my JAVA app, and come up with the following questions. Thanks in advance. 1 For HotSpot JVM young generation, is it possible to skip garbage collection (gc) for the most newly allocated objects in eden? For example, we skip the…
Wen-Hua
  • 11
0
votes
2 answers

Why does HotSpot need register allocation?

Here's what I have read about the JVM. HotSpot is stack based and Dalvik is register based. If HotSpot is stack based, why do we need t have register allocation done once we have IT respresentation of code into Blocks? Also, where does llvm fit into…
karmanaut
  • 628
  • 1
  • 6
  • 17
0
votes
1 answer

JVM crash stacktrace

We are developing a java application that runs on tomcat. This scenario is not reproducible but for the customer, the application crashes with a jvm crash # # A fatal error has been detected by the Java Runtime Environment: # # …
user496934
  • 3,822
  • 10
  • 45
  • 64
0
votes
1 answer

How does jconsole get all the information he needs?

I want to make a system to gather some data of the JVM and notify me at certain levels, jconsole have this data, but I have no idea how it collects such data. Does someone know a way to gather this data programatically with java?
danillosl
  • 519
  • 3
  • 7
  • 13
0
votes
0 answers

How does start() method invoke threads in Java?

With an example code shown to create a thread by invoking start() method of java.lang.Thread class, public class MyThread extends Thread{ public void run(){ //code to run goes here } } MyThread myThread = new…
overexchange
  • 15,768
  • 30
  • 152
  • 347
0
votes
1 answer

Does the JVM cache assembly code?

Assuming that a system is running the standard JVM (HotSpot) with JIT enabled, is jitted assembly code in any way cached between runs of the same program? I can find no information demonstrating this would be the case, but the contrary seems to be a…
csvan
  • 8,782
  • 12
  • 48
  • 91
0
votes
1 answer

strange looking allocation and some description for String concatenation optimization code

I was reviewing OpenJDK JVM's String concatentation optimization code when I encountered the following: cnode = recv->isa_CallStaticJava(); if (cnode == NULL) { alloc = recv->isa_Allocate(); if (alloc == NULL) { break; …
damat-perdigannat
  • 5,780
  • 1
  • 17
  • 33
0
votes
0 answers

Is there a name for the algorithm used by HotSpot for class herarchy analysis?

I see that some optimizations used by Hotspot have names, e.g. chaitin for graph coloring. What is the name of the algorithm used by Hotspot for class hierarchy analysis?
damat-perdigannat
  • 5,780
  • 1
  • 17
  • 33
0
votes
0 answers

Investigating JIT source code for String concatenation optimization

Are there common Hotspot JIT optimizations for its String concatenations especially when using the + operator? Where do I look and what tools do I use in order to investigate JIT source code for String concatenation optimization? I was looking for…
damat-perdigannat
  • 5,780
  • 1
  • 17
  • 33
0
votes
1 answer

the default MaxInlineSize for java methods is 35 bytes of bytecode

I am starting to develop with google app engine. Does google change the default size of MaxInlineSize ? Can I set jvm options with google app engine ? Looked in the obvious place, could not find an answer :…
NimChimpsky
  • 46,453
  • 60
  • 198
  • 311