identifying occasional stuttering in a game

Questions about YourKit Java Profiler
Locked
emzic
Posts: 9
Joined: Wed Apr 18, 2007 12:54 pm

identifying occasional stuttering in a game

Post by emzic »

hello,

i am profiling a game which suffers from occassional stuttering. i can rule out that it is the garbage collection, since i could already minimize garbage collection to a minimum. (the yourkit profile shows that no major garbage collections happen and the minor collections happen only every 5 to 10 seconds)

how can i use the yourkit profiler to identify this occasional stuttering. the problem is, that the game runs in a gameloop, so what happens in this loop is happening A LOT and will show up in the profiling results at the top. however the source that is causing the stuttering is only happening once every 30 seconds, so although it is consuming CPU a lot it is still only a few percent of the total CPU time of the profiling session.

does anyone know how i can identify this occasional stuttering? thanks a lot!
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Garbage collection can be the reason.
Please try recording object allocations as described here:
http://www.yourkit.com/docs/70/help/per ... ive_gc.jsp
emzic
Posts: 9
Joined: Wed Apr 18, 2007 12:54 pm

Post by emzic »

thanks, but as i already said, i can rule out garbage collection, since it does almost not happen anymore according to yourkit profiler.

also "time spend in GC" == 0%
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Which Java version do you use (java -version)?
What is your OS?
emzic
Posts: 9
Joined: Wed Apr 18, 2007 12:54 pm

Post by emzic »

java 6 update 4
i am using both, winXP SP2 and vista

thank you!
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Could you please look in Task Manager what is CPU consumption of 'java' process when it stutters.

If it doesn't consume CPU, you can try "Monitor profiling" to see if this is a synchronization issue: http://www.yourkit.com/docs/70/help/thr ... filing.jsp
emzic
Posts: 9
Joined: Wed Apr 18, 2007 12:54 pm

Post by emzic »

since it is a game, the CPU consumption is always at maximum, since the gameloop tries to run as fast as possible.

i already had a look at the monitor profiling to check for synchronization issues but i couldnt find anything.

i am really pretty sure that the problem is some function that is taking extraordinally long, but it doesnt show up in the CPU monitoring results, since overall it is still taking only very little time compared to the other gameloop functions which happen all the time.
Locked