java profiler at source level?

I am wondering whether there exists a java profiler which identifies the hotspots internally inside a method?

I have my first iteration of my next java 4k entry however it is very slow. I want to profile it however since all the game logic is inside the constructor it the standard profilers are too coarse… i would like to know which line numbers are causing most of the slow downs…

Can you rewrite it to profile, then switch back?

Insert a few System.nanoTime()s here and there.

ah, bugger… that is what i thought i would have to do :stuck_out_tongue:

thanks anyway!

or move bits of code into their own private void doStuff()

Already suggested about 3 posts above :wink:

Well just be sure not to let System.out.print(s) or “”+"" mess with your timings!

[quote]Already suggested about 3 posts above
[/quote]
do you mean:

[quote]Can you rewrite it to profile, then switch back?
[/quote]
?
because that could have meant loads of things, especially for someone who’s never used a profiler (like me ;D)

[quote=“2playgames,post:7,topic:30399”]
lol, yeah! :slight_smile: