This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Question on Java profiler  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a JAVA profiler available which gives the number of machine cycles required to process a certain method, instead of just the total time spent on executing a certain method on a certain machine at a certain instant. If yes which one? If no why?
 
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt if you can get the number of processor cycles from any Java debugger. I don't think I've seen it in any debugger for any language, actually.

You can get the amount of CPU time taken, which is different to the amount of time that elapsed. The elapsed time might have been increased by I/O waits etc, whereas the CPU time measures only the amount of time doing actual computation.

I suppose you could just divide the CPU time by the clock cycle time to estimate the number of cycles. Whether that's what you want depends on whether you think things like cache misses - which stall the processor - should count.

JProfiler is the one I used and it certainly does offer to measure CPU time.
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Vaishali Gulve:
Is there a JAVA profiler available which gives the number of machine cycles required to process a certain method, instead of just the total time spent on executing a certain method on a certain machine at a certain instant. If yes which one? If no why?




I'm curious what kind of Java application needs such low level info. Of course, one could just be curious.

Or maybe you need to compare performance on machines of different configuration???
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!