Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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 8981 times)
0 Members and 2 Guests are viewing this topic.
Offline Roquen
« Posted 2014-02-26 15:39:01 »

I ran across this:

https://github.com/AdoptOpenJDK/jitwatch

looks like it could be interesting, but haven't tried it out.
Offline Roquen
« 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.
Online Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
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
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Roquen
« 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:
1  
2  
#!/bin/bash
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: https://github.com/AdoptOpenJDK/jitwatch/wiki

I haven't tried this yet: https://groups.google.com/forum/#!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  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (32 views)
2014-12-15 09:26:44

Mr.CodeIt (23 views)
2014-12-14 19:50:38

BurntPizza (50 views)
2014-12-09 22:41:13

BurntPizza (84 views)
2014-12-08 04:46:31

JscottyBieshaar (45 views)
2014-12-05 12:39:02

SHC (59 views)
2014-12-03 16:27:13

CopyableCougar4 (58 views)
2014-11-29 21:32:03

toopeicgaming1999 (123 views)
2014-11-26 15:22:04

toopeicgaming1999 (114 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org 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‑gaming.org
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!