• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

JVM option -Xrunhprof

 
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 22700
129
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic