Quick question about JIT

R

Rhino

Given this as the output from java -version:

java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)

Is this a JIT compiler? How do you know? In other words, what wording is the
giveaway that this is or isn't a JIT compiler? Or do I need a different
command or technique to determine that it is JIT?
 
T

Thomas Hawtin

Rhino said:
Given this as the output from java -version:

java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)

Is this a JIT compiler? How do you know? In other words, what wording is the
giveaway that this is or isn't a JIT compiler? Or do I need a different
command or technique to determine that it is JIT?

HotSpot(TM) Client is the compiler in this case. JITs compile code on
first use. HotSpot is an adaptive compiler, and doesn't compile until
after the code has already run for a while.

You can switch the compiler off with -Xint, in which case the "mixed
mode" part of the message will change to "interpreted mode". -Xcomp will
turn off the compiler, giving "compiled mode".

There are much more recent versions of Java 1.4 than that, which should
have a number of security fixes present.

Tom Hawtin
 
C

Chris Uppal

Rhino said:
In other words, what wording is
the giveaway that this is or isn't a JIT compiler?

There isn't any; you just have to know.

There's usually information in the documentation which comes with the download
(not the JavaDoc), but quite often you have to know what the /previous/ version
was like to make sense of the changes they describe. Also you may have to read
between the lines a little -- for instance if there's an option to disable the
JIT, then it's a fair guess that there is a JIT in use normally ;-)

But the bottom line is you have to consume all the available information, /and/
remember it. A geek thing ;-)

Find your inner 13-y-o boy....

-- chris
 
R

Rhino

Chris Uppal said:
There isn't any; you just have to know.

There's usually information in the documentation which comes with the
download
(not the JavaDoc), but quite often you have to know what the /previous/
version
was like to make sense of the changes they describe. Also you may have to
read
between the lines a little -- for instance if there's an option to disable
the
JIT, then it's a fair guess that there is a JIT in use normally ;-)

But the bottom line is you have to consume all the available information,
/and/
remember it. A geek thing ;-)

Find your inner 13-y-o boy....

I suspected it was one of those kinds of things but thought I'd asked in
case there was a more obvious way to determine whether the compiler was JIT.
Thanks, Chris!
 
R

Rhino

Thomas Hawtin said:
HotSpot(TM) Client is the compiler in this case. JITs compile code on
first use. HotSpot is an adaptive compiler, and doesn't compile until
after the code has already run for a while.

You can switch the compiler off with -Xint, in which case the "mixed mode"
part of the message will change to "interpreted mode". -Xcomp will turn
off the compiler, giving "compiled mode".

There are much more recent versions of Java 1.4 than that, which should
have a number of security fixes present.
Thanks for the info, Thomas! I'm afraid I've never looked at the details of
Java compilers very closely :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top