Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
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  
  Questions regarding (VisualVM) profiling  (Read 576 times)
0 Members and 1 Guest are viewing this topic.
Offline greenOwl

Junior Devvie


Medals: 1


from Germany


« Posted 2013-03-03 21:57:33 »

Hello,

today I tested the VisualVM Profiler on my current project and was quite suprised by the data it gave me. To understand the results I got I have some questions:

  • Watching the heap memory usage (monitor tab) I observed that my programm's used heap memory steadily increases until it hits ~25 MB used the drops to 3-5 MB within seconds and increases again. Is this normal behavior and why does it happen?
  • Watching the thread dispatching I noticed something strange: My gameloop is looping permanently with 1 MS sleep delay build in. I've got no other threads and my console output / fps-data suggests that the loop does what it is supposed to do. But the profiler says my loop-thread sleeps ~75% of the time. I think thats quite contradicting. Can someone explain this?
  • The profiler says that a thread called "RMI TCP Connection" allocates A LOT (75%) of data. Also the largest amount of data is char[] ... why?

Thanks in advance!

elfeck
Offline sproingie

JGO Kernel


Medals: 202



« Reply #1 - Posted 2013-03-03 22:14:32 »

The behavior you're seeing is normal garbage collection.  It's only a concern if the graph steadily rises -- that is, if the low point of the graph keeps rising.  The RMI connection is probably the profiler itself. 

If your thread is fast enough to run the rest of its logic under 1ms, then a 1ms sleep is indeed going to account for more than half the time.  Profiling isn't very useful for measuring a single method, more for finding the hot spots in a larger program.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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 (29 views)
2014-12-15 09:26:44

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

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

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

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

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

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

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

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

toopeicgaming1999 (30 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!