• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JVM option -Xrunhprof

 
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is it true that the JVM option -Xrunhprof would slow down the JVM? Would there be any performance degradation if we add this JVM option?

Eg. java -Xrunhprof:file=dump.hprof HelloWorld

Thanks,
Guru
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It likely will impact performance, since recording all that data takes time and uses up memory. I don't think one can know in general whether that's enough to be noticeable, though.
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

(Source)
The profile option literally logs every object created on the heap, so even just starting and stopping the small TableExample3 program results in a four megabyte report file.



So, i would be hesitant to use this option in any production scenario.
If you concur on the thought, then is there any point in worrying about the performance thing?
[ October 23, 2008: Message edited by: Nitesh Kant ]
 
Sheriff
Posts: 22002
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've used Valgrind with some C programs I've written, and that one has a real big impact on performance. I doubt that this one have much less of an impact. Like Ulf said, it needs to record a lot of information for a lot of statements.
 
He's dead Jim. Grab his tricorder. I'll get his wallet and this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic