An Introduction To Java Profiling

8,026 views

Published on

Published in: Technology, Education
0 Comments
9 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
8,026
On SlideShare
0
From Embeds
0
Number of Embeds
32
Actions
Shares
0
Downloads
300
Comments
0
Likes
9
Embeds 0
No embeds

No notes for slide

An Introduction To Java Profiling

  1. 1. An Introduction to Java Profiling <ul><ul><li>Developer's Day 2008 </li></ul></ul><ul><ul><li>Patrick Schlebusch </li></ul></ul>
  2. 2. Overview An Introduction to Java Profiling <ul><li>An Introduction to Profiling </li></ul><ul><li>YourKit Java Profiler </li></ul><ul><li>Demonstration </li></ul><ul><li>Additional information </li></ul>
  3. 3. What is Profiling? An Introduction to Profiling <ul><li>A development tool </li></ul><ul><li>Dynamic performance analysis at runtime </li></ul><ul><li>Implicit: Performance optimization based on analysis results </li></ul>
  4. 4. Development Process An Introduction to Profiling Problem analysis Design Development Testing Deployment Profiling
  5. 5. Goals An Introduction to Profiling <ul><li>Measuring and locating performance „bottlenecks“ </li></ul><ul><ul><li>Time-expensive functions or code parts </li></ul></ul><ul><ul><li>Memory leaks and unnecessary memory allocation </li></ul></ul><ul><ul><li>Deadlocks </li></ul></ul><ul><li>Useful interpretation of analysis results </li></ul><ul><li>Software performance improvements </li></ul><ul><li>Provide a detailed view on runtime behaviour </li></ul>
  6. 6. Problems An Introduction to Profiling <ul><li>Profiling produces overhead </li></ul><ul><li>Interpretation of results can be difficult </li></ul><ul><ul><li>Identifying the „crucial“ parts of the software </li></ul></ul><ul><ul><li>Recognizing potential for improvements </li></ul></ul>
  7. 7. YourKit Java Profiler yourKit Java Profiler <ul><li>Commercial Java Profiling Tool </li></ul><ul><ul><li>Free tryout and Open Source licenses are available </li></ul></ul><ul><li>Used by Open Source projects such as various Apache projects, Azureus (many more..) </li></ul><ul><li>Also used by Sun Microsystems, Google, SAP and at i5 </li></ul>
  8. 8. Features yourKit Java Profiler <ul><li>On-Demand Profiling </li></ul><ul><li>CPU, Memory and Concurrency profiling methods </li></ul><ul><li>IDE Integration </li></ul><ul><li>Profiling API </li></ul><ul><li>Support of many different Java versions and OSs </li></ul>
  9. 9. CPU Profiling yourKit Java Profiler <ul><li>Sampling </li></ul><ul><ul><li>Low overhead </li></ul></ul><ul><ul><li>Useful to find slow parts of the code </li></ul></ul><ul><li>Tracing </li></ul><ul><ul><li>Significant overhead </li></ul></ul><ul><ul><li>Exact CPU time and method invokation counts </li></ul></ul><ul><li>CPU Usage graphs </li></ul>
  10. 10. Memory Profiling yourKit Java Profiler <ul><li>Memory telemetry graphs </li></ul><ul><ul><li>Heap / Non-Heap memory </li></ul></ul><ul><ul><li>Class loading statistics </li></ul></ul><ul><li>Object count and size of classes </li></ul><ul><li>Explicit garbage collection </li></ul><ul><li>Object allocation recording </li></ul>
  11. 11. Thread Profiling yourKit Java Profiler <ul><li>Deadlock detection </li></ul><ul><li>Synchronization analysis </li></ul><ul><ul><li>For which synchronized blocks or methods are Threads waiting? </li></ul></ul><ul><ul><li>How long? </li></ul></ul>
  12. 12. Demonstration
  13. 13. Additional Information <ul><li>YourKit Java Profiler </li></ul><ul><ul><li>www.yourkit.com </li></ul></ul><ul><li>Jprobe </li></ul><ul><ul><li>www.quest.com/jprobe/ </li></ul></ul><ul><li>JProfiler </li></ul><ul><ul><li>www.ej-technologies.com/products/jprofiler/ </li></ul></ul><ul><li>Various Open Source Profilers </li></ul><ul><ul><li>java-source.net/open-source/profilers </li></ul></ul>
  14. 14. Thank you.

×