Download IBM blue-and-black template with image

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Eclipse* TPTP Project
Profiling Java applications using
Eclipse* Test and Performance Tools Platform
© 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0 | February, 2008 |
Eclipse* TPTP Project
Instructors
Mikhail Voronin
Intel Corporation
[email protected]
Alexander Alexeev
Intel Corporation
TPTP Committer
[email protected]
2
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Agenda
 Unit 1 – Eclipse* TPTP Overview
 Unit 2 – Using the TPTP Java Profiler
 Profiler Architecture
 Profiling and Logging Perspective
 Launch and Attach
 Profiling options and views
 Demo
 Profiler Preferences
 Conclusion, Opens and Limitations
3
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Participants
Tell me a little about yourselves…







4
From where
Company or academic institution
Users or Adopters
Eclipse* and TPTP experience
Java* experience
Have you used a Java* profiler before?
Tutorial expectations
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
 Unit 1 – Eclipse* TPTP Overview
 Unit 2 – Using the TPTP Java Profiler
 Profiler Architecture
 Profiling and Logging Perspective
 Launch and Attach
 Profiling options and views
 Demo
 Integration with BIRT
 Profiler Preferences
 Conclusion, Opens and Limitations
5
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Eclipse* TPTP Overview
 Eclipse* Tools Project, Hyades, Dec 2002
 Promoted to Eclipse* project, 2005
 Open-source platform for Automated
Software Quality (ASQ) tools including
reference implementations for testing,
tracing and monitoring software systems
 Addresses the entire test and
performance life cycle, from early testing
to production application monitoring,
including test recording, editing and
execution, monitoring, tracing and
profiling, and log analysis capabilities
 Reduce the cost and complexity of
implementing effective automated
software quality control processes
 Share data through an OMG-defined
trace, log, statistical and test model
implemented via the Eclipse* Modeling
Framework (EMF)
 Active participants:
IBM, Intel(R), OC Systems
 Former participants:
Compuware, SAP, Scapa
Technologies
 Integration with tools used in the other
processes of a software lifecycle under
Eclipse* environment
6
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Eclipse* TPTP Overview
 Composed of 4 sub projects:
 Platform
 Test
 Trace and Profiling
 Monitoring
 Principles:
 Extension of the Eclipse* Value Proposition
 Vendor Ecosystem
 Vendor Neutrality
 Standards-Based Innovation
 Agile Development
 Inclusiveness & Diversity
 TPTP is highly extensible.
7
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Presentation System
Distributed
Control
Framework
Agent
Control Interface
Artifact
Management
Test Creation
and Execution
Trace Analysis
And Profiling
Runtime
Monitor / log
Agent
Control Interface
Eclipse* TPTP GUI
Target System
Reference Perspectives
And Workflow
EMF Data Models
Trace Collection
Log Collection
Execution
Environment
JVMPI Monitor
Correlation
Eclipse* Platform
Application
Injection
Distributed
Data Collection
Framework
Data Collection
Interface
Data Loader
Statistical
Log
Test
XMI
Trace
Real Time
Export
Testability Interface
Data Collection
Standard Widgets and
Core Plug-ins
Test Engine
System Performance
Monitor
JVMTI Monitor
TPTP Architecture
8
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Eclipse* TPTP Profiling Tool Overview
 Broadly useful for performance analysis and for gaining a deeper
understanding of a Java* program
 Consists of the Profiling and Logging Perspective and a number of
graphical and tabular views
 Visualize program execution and threading behavior; Pinpoints
operations that taking most resources; Explore patterns of program
behavior
 Enables you to test your application's performance early in the
programming development cycle for improvements
 Option to run application with agent at near full speed (enabled
mode) and attach to it to gathering details at certain phase.
 Assorted filtering functionality which can help to localize problem
and reduce overhead for large long run applications
9
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Eclipse* TPTP Agent Controller Overview
 A daemon process that resides on each deployment host and
enables client applications to launch host processes and interact
with agents that coexist within host processes
 Contains a server that has the capability to launch and manage
local or remote applications from a local TPTP workbench
 The Java* profiler is a managed agent that can be used to profile
local or remote Java* applications from a local TPTP workbench
10
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
JVMTI-based Java* Profiler vs. JVMPI-based
 Java* 5.0 has introduced new standards for profiling
 Prior to Java* 5.0 (Java* 1.4-) the standards and the interfaces to support
profiling (JVMPI) were experimental
 Java* J2SE 6 eliminated JVMPI interface
 The new standard (JVMTI) is an innovative solution to profiling and enables
you control precisely which parts of an application are profiled
 Eclipse* TPTP has embraced this innovation and the new Java* profiler is
based on this new standard
 In Eclipse* TPTP old Java* profiler (JVMPI) still exists
 Only for backward compatibility with Java* 1.4
 Because of JVMPI/JVMTI interface differences there are some differences
in behavior between old and new profiler
 Old Java* profiler will eventually be removed from Eclipse* TPTP
11
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
 Unit 1 – Eclipse* TPTP Overview
 Unit 2 – Using the TPTP Java* Profiler
 Profiler Architecture
 Profiling and Logging Perspective
 Launch and Attach
 Profiling options and views
 Demo
 Integration with BIRT
 Profiler Preferences
 Conclusion, Opens and Limitations
12
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
JVMTI-based Java* Profiler
 A set of libraries that attach to a JVM for recording Java*
application's behavior
 An extensible framework, consisting of a core runtime
component (Martini), an agent managed by the Agent Controller
(JPIAgent), and a set of data collection libraries built on top of
the Martini runtime.
 Can be used to identify performance details such as classes or
methods responsible for execution bottlenecks, analyze
application heap to find memory leaks and visualize threading
behavior.
 Output in the form of XML fragments (XML4Profiling)
 Can be launched from the Eclipse* IDE or as a standalone
program using JVM command-line options
 Applications under test can reside in Eclipse* workspace,
binaries on file system, or hosted in a J2EE application server.
13
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
JVMTI-based Java* Profiler Architecture
Application Under Test (Java* Virtual Machine)
Java* Virtual Machine Tools Interface (JVMTI)
Martini Framework for Java*
Martini-based Data Collectors
Agent Control and
Data Collection module
(JPIAgent)
Call Graph
(CGProf)
Heap
(HeapProf)
Thread
(ThreadProf)
Distributed
Control and
Data Collection
Framework
Presentation System
(Eclipse* Workbench)
14
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Profiling and Logging Perspective
 Profiling and Logging perspective provides resources for starting
a profiling session as well as obtaining comprehensive
information on the performance of the monitored application
 The profiling tool provides information pertaining to
 Execution analysis
 Method execution performance
 Object allocations
 Thread interactions
15
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Profiling and Logging Perspective
 Combinations of views and editors that are best suited to perform
application profiling
 Profiling Monitor view
 Administrate profiling resources and manage activities
 Profiling views
 Visualize and analyze profiling data
 Profiling actions
 Control profiling resources
 Actions are resource sensitive
 Choice of action depending on type and status of the object in selection
 Attach and Detach the agent from process
 Start and Stop monitoring on an agent
 Terminate a process
16
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Monitor actions
Monitor and Navigator view
17
Open view actions
View level actions
Profiling views
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Host: system
under profile
Process:
application under
profile
Profiling Agent
& Analysis
types
18
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Launch and Attach
 Profiling session is started by launching an application or by
attaching to a running application
 Launch : start an application with a profiling agent
 Attach : attach to an application which is already started and
invoked with a profiling agent
 How? Launch configuration is where you start the session.
19
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Launch and Attach - Configuration
 A place to create, run and manage profiling
sessions.
 Configure the details of a profiling session
 Target host
 Application to profile
 Scope of the profile
 Profile data destination
 Select launch configuration type according to
the location of the target Java* application:
 Within Workbench > “Java Application”
launch configuration
 Outside Workbench > “External Java
Application” launch configuration
20
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Launch and Attach – Configuration Tabs
 Collect and display detail information about a configuration
 Tabs for profiling:
 Monitor tab : defines detail of data collection on a profiling session
 Destination tab : defines the destination of the profiling data
 Host tab : for external application configurations only, defines the
location of process to be launched or attached
 Agents tab : for attach configurations only, lists agents available for
attach
21
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Launch and Attach – Monitor Tab
Data Collectors
Analysis Types
22
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Launch and Attach – Profiling Options
23
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Profiling Options – Filter Set
 Limit the scope of a profiling
session
 Ensure that only relevant details
are collected
 Especially useful when speed
and efficiency is critical
Excluded classes and methods
are not instrumented and execute
in full speed
 Only the first applicable filter is
applied. When you are specifying
filters, ensure that you declare
the most specific filter criteria first
24
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Launch and Attach – Execution Analysis Options
25
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Execution Time Analysis Options
 Specifies the type of information
to collect during execution time
analysis
 Use the “Show execution
statistics” option to identify the
most time-consuming methods
 Low-overhead. Can be used
without extensive filtering
 Use the “Show execution flow
graphical details” option to
identify the relationships between
executing methods (call-tree).
 High-overhead. Filtering is
recommended.
26
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Launch and Attach – Memory Analysis Options
27
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Memory Analysis Options
 Specifies the type of
information to collect during
memory analysis
 Use the “Track object
allocation sites” option to
identify the source line where
each object is allocated
May slightly increase
analysis overhead
28
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Launch and Attach – Destination Tab
 Specify the destination of the profile data
 Workbench : Visualize and analyze in profiling views (default)
 File : export to XML file, available for import.
 Import profiling file
 File > Import ... > Profiling file
29
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Profiling an External Application – Host Tab
30
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Attaching to a Running Application – Monitor Tab
31
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Profiling Views
 A collection of views to visualize and analyze profiling data
 Memory Statistic view (tabular)
 Execution Statistic view (tabular)
 Coverage Statistic view (tabular)
 Method Invocation Detail view (tabular)
 Execution Flow view and table (graphical + tabular)
 Method Invocation view and table (graphical + tabular)
 Execution Call Tree (graphical + tabular)
 UML2 Trace Interactions view (graphical)
32
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Recommendations for effective profiling
 Using filters to collect only needed data
 Pause/resume to select activities to profile
 Attach/Detach to eliminate overhead when we don’t profile
33
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
A few words on filtering in TPTP
 Collection Time Filtering
 Pro: Reduce data volume and instrumentation overhead (critical)
 Con: Data for excluded classes/method can never be seen
 Model Import Filtering
 Pro: Reduce workbench memory footprint (critical on 32bit OSes)
 Con: Can only see data that is in the model
 View Level Filtering
 Pro: Remove items from being visualized in the workbench
 Con: Does not reduce data volume or model footprint
34
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Access to Attach/Detach and Pause/Resume
Pause
Detach
Resume
Attach
35
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Java* Profiling - Demo
 Profiling a local Java* application
 Execution Time Analysis
 Memory Analysis
 Thread Analysis
 Profiling an External Java* Application
 Profiling an Eclipse* Plugin (RCP Application)
 Profiling a J2EE (Server) Application
36
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Java* Profiling - Preference
 Dialog to set user
preference
Window >
Preferences...
 Set default profiling
values
 Add host
 Configure view
preferences
37
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Java* Profiling - Attach
 Start application under profile in standalone mode
 Invoke the Java* Profiling Agent, a library that attaches to a Java* virtual
machine (JVM) to capture and record the behavior of the Java*
application
 Use the -agentlib JVM option to invoke the Java* Profiling Agent:
 -agentlib:JPIBootLoader=JPIAgent:server=enabled;{profiler}
 Communication with the agent invoked is done using a client workbench
by means of the Agent Controller on the host machine.
 Attach to the agent : Profile Configuration... > Attach to Agent
38
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
 Unit 1 – Eclipse* TPTP Overview
 Unit 2 – Using the TPTP Java* Profiler
 Profiler Architecture
 Profiling and Logging Perspective
 Launch and Attach
 Profiling options and views
 Demo
 Integration with BIRT
 Profiler Preferences
 Conclusion, Opens and Limitations
39
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
TPTP Profiler Future
Updates for Ganymede
 Improve overall usability via assorted fixes
Using feedback from users
 Reduce usability diffs between JVMPI and JVMTI…
e.g., SSL for secure communications
e.g., Reduce overuse of dynamic attach/detach
 Enhancements
e.g., Better multithread analysis
Improved visualization
Contended lock analysis
Track more thread states (e.g., join points)
e.g., Efficient binary transfer format
e.g., Better Java* 6 support
Long-term
 JVM Heap analysis and trends
 Object reference analysis
 Graphic representation of profiling data and JVM telemetry
40
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Resources
 TPTP (Documentation, Download, CVS, Newsgroups, mailing list,etc..)
http://www.eclipse.org/tptp/
 TPTP Online Help
http://help.eclipse.org/
41
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Q&A
42
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
TPTP @ EclipseCon2008
Short Tutorials (2 hours)
Profiling Java* applications using Eclipse* TPTP
Alexander Alexeev, Mikhail Voronin, Monday, 08:00, Great America Meeting Room 1
Long Talk (50 mins)
A Harmonious Combo : Experiences Profiling Apache* Harmony with Eclipse*
TPTP
Chris Elford, Sergey Kuksenko, Thursday, 14:30, Grand Ballroom C
Functional Testing with the Eclipse* TPTP Project
Eric Long, Tuesday, 14:30, Room 206
Extending TPTP for database unit testing
Wei Liu, Der Ping Chou, Hong-Lee Yu, Don Clare, Thursday, 13:30, Theatre
Short Talk (10 mins)
Extending TPTP for TTCN-3.
Paul Slauenwhite, Wednesday, 15:30, Room 209/210
43
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
44
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0
Eclipse* TPTP Project
Legal Notices:

45
Other company, product, or service names may be trademarks or service marks of
others.
Profiling Java* applications using Eclipse* TPTP | © 2008 IBM Corporation and Intel Corporation; made available under the EPL v1.0