This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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: 43011
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: 21842
105
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.
 
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!