Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (778)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JitWatch  (Read 30164 times)
0 Members and 1 Guest are viewing this topic.
Offline Roquen

JGO Kernel

Medals: 518

« Posted 2014-02-26 15:39:01 »

I ran across this:

looks like it could be interesting, but haven't tried it out.
Offline Roquen

JGO Kernel

Medals: 518

« Reply #1 - Posted 2014-06-25 13:11:21 »

Bump.  This is nice.  Not the best UI on the planet but way easier than looking at the raw logs.
Offline Riven

« JGO Overlord »

Medals: 1357
Projects: 4
Exp: 16 years

Hand over your head.

« Reply #2 - Posted 2014-06-25 17:40:25 »

At least tell us why said thingy is 'nice' Pointing

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Roquen

JGO Kernel

Medals: 518

« Reply #3 - Posted 2014-06-26 07:50:30 »

Pretty easy to set up.  You'll need the extra dll/so for PrintAssembly (I think I put the links on the hotspot options wiki page).  Grab the app jar itself and one thing their setup doesn't mention is you also need sl4j logging tools.

Make a shell script/batch file/alias, mine on windows looks like this:
java -cp "C:\Program Files\Java\jdk1.8.0_05\lib\tools.jar;C:\Program Files\Java\jdk1.8.0_05/jre/lib/jfxrt.jar;C:\cygwin64\usr\local\tools\jitwatch-1.0.0-SNAPSHOT.jar;C:\cygwin64\usr\local\tools\slf4j-api-1.7.7.jar" com.chrisnewland.jitwatch.launch.LaunchUI

Launch your program with:
-XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading -XX:+LogCompilation -XX:+PrintAssembly

This will spit out a log file, typically "hotspot_pid{NUM}.log"

Launch the app with your whatever method, set-up where the class & source files live (Config button).
Load the log file with (surprise) Open Log button.
Click the Start button to process the Log.

My reason to try it out (finally) was to see what actual assembly is being used.  This is in the triview which shows (side-by-side) source / bytecode and native assembly.  You can double click on a JVM op and get a description and mouse hovering over a native opcode give a brief of the opcode.

It looks like it could be handy in a number of ways (well assuming you care about the performance of something).  Like seeing if a method isn't getting inlined and giving a clue of how to restructure your code to fix it.

Actually skimming the wiki for it is a better overview:

I haven't tried this yet:!topic/jitwatch/VrkZ2vyzXow

I've attempted on some toy code and there seems to be some additional tools in the jar which I also haven't looked at.

Pages: [1]
  ignore  |  Print  

hadezbladez (353 views)
2018-11-16 13:46:03

hadezbladez (187 views)
2018-11-16 13:41:33

hadezbladez (358 views)
2018-11-16 13:35:35

hadezbladez (88 views)
2018-11-16 13:32:03

EgonOlsen (2181 views)
2018-06-10 19:43:48

EgonOlsen (2223 views)
2018-06-10 19:43:44

EgonOlsen (1380 views)
2018-06-10 19:43:20

DesertCoockie (2013 views)
2018-05-13 18:23:11

nelsongames (1672 views)
2018-04-24 18:15:36

nelsongames (2312 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!