Program Profiling - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Program Profiling

Description:

Layman: a tool for sampling a program during execution so that you can determine ... http://cc.borland.com/ccweb.exe/listing?id=17681 ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 11
Provided by: net154
Category:

less

Transcript and Presenter's Notes

Title: Program Profiling


1
Program Profiling
  • GroupMaciej, Reiman, Shaohua, Jason, Corey

2
What is it?
  • Layman a tool for sampling a program during
    execution so that you can determine where your
    program spends most of its time.
  • Formal A profiler is a program that benchmarks
    the execution of one or more pieces of procedural
    code to help the user understand where the time
    is being spent in terms of code execution.

3
What it does in one sentence.
  • Profiling is used to improve a programs
    performance.

4
Questions a Profiler helps Answer
  • What lines of code are responsible for the bulk
    of execution time?
  • How many times is this looping construct
    executed?
  • How many times a method is called and what of
    total program run time it consumes?
  • Which approach to coding a block of logic is more
    efficient?

5
What a Profiler does
  • A profiler can
  • measure the elapsed time taken to run source code
  • Provide coverage analysis
  • Show programs execution history
  • How many times a piece of code has been exec.
  • Time spent by all exec. of that piece of code
  • It is a great way to find where bottlenecks
    occur, so we can make our code more efficient

6
What profiling is used for ?
  • Profiling is used to help programmers to identify
  • which areas of the program are causing sluggish
    bottlenecks.
  • which parts of the code are being called the most
    often.
  • A Java profiler is used to optimize the
    performance of Java programs, by helping to find
    and tune away expensive parts of them.

7
How ?
  • JVMPI (JVM Profiler Interface)
  • Interface to the JVM where profilers can access
    the state of JVM via an in-process native agent.
  • Notifies of events like object allocations,
    method invocations, getCurrentThreadCpuTime()ns.
  • It scales very badly. (apps having 100s of
    threads and GB sized heaps.)
  • Tools most based on JVMPI

8
Tools
  • JProbe Identify method and line-level
    performance bottlenecks, also detect deadlocks.
  • Extensible Java Profiler - Extensible Java
    Profiler (EJP) is a profiling tool for Java with
    a scalable and extensible architecture. Based on
    JVMPI.
  • JProfiler
  • Open Source Tools
  • http//java-source.net/open-source/profilers

9
Demo
  • JProbe
  • EJP (if time permits)

10
References
  • JProbe (www.quest.com)
  • www.webopedia.com
  • Javaworld.com
  • http//www.dbta.com/in-depth/jan05/schumacher.html
  • http//cc.borland.com/ccweb.exe/listing?id17681
Write a Comment
User Comments (0)
About PowerShow.com