Instrumentation Software Profiling



Similar documents
Profiling and Testing with Test and Performance Tools Platform (TPTP)

ARM-BASED PERFORMANCE MONITORING FOR THE ECLIPSE PLATFORM

Using and Extending the Test and Performance Tools Platform (TPTP)

Leveraging the Eclipse TPTP* Agent Infrastructure

Trace-Based and Sample-Based Profiling in Rational Application Developer

IBM Tivoli Composite Application Manager for WebSphere

IBM Tivoli Composite Application Manager for WebSphere

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc.

What s Cool in the SAP JVM (CON3243)

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

Implementing Java Distributed Objects with JDBC

Oracle JRockit Mission Control Overview

Seminar Informatik im Rahmen des Master-Studiengangs Technische Informatik

Running a Program on an AVD

SOA management challenges. After completing this topic, you should be able to: Explain the challenges of managing an SOA environment

Example of Standard API

Tool - 1: Health Center

WebSphere Server Administration Course

Java Application Development using Eclipse. Jezz Kelway Java Technology Centre, z/os Service IBM Hursley Park Labs, United Kingdom

BEAJRockit Mission Control. Using JRockit Mission Control in the Eclipse IDE

Eclipse Visualization and Performance Monitoring

THE BUSY DEVELOPER'S GUIDE TO JVM TROUBLESHOOTING

IBM WebSphere Server Administration

An Oracle White Paper September Advanced Java Diagnostics and Monitoring Without Performance Overhead

IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM

Zing Vision. Answering your toughest production Java performance questions

SOFTWARE TESTING TRAINING COURSES CONTENTS

11.1 inspectit inspectit

How To Improve Performance On An Asa 9.4 Web Application Server (For Advanced Users)

IBM Software Group. SW5706 JVM Tools IBM Corporation 4.0. This presentation will act as an introduction to JVM tools.

User's Guide - Beta 1 Draft

JProfiler: Code Coverage Analysis Tool for OMP Project

Section 1.4. Java s Magic: Bytecode, Java Virtual Machine, JIT,

Monitoring, Tracing, Debugging (Under Construction)

<Insert Picture Here> Java Application Diagnostic Expert

Chapter 1 - Web Server Management and Cluster Topology

D83167 Oracle Data Integrator 12c: Integration and Administration

J2EE-JAVA SYSTEM MONITORING (Wily introscope)

IBM Tivoli Composite Application Manager for Microsoft Applications: Microsoft Hyper-V Server Agent Version Fix Pack 2.

IBM Tivoli Monitoring for Databases

A standards-based approach to application integration

NetBeans Profiler is an

Acknowledgments. p. 55

Monitoring HP OO 10. Overview. Available Tools. HP OO Community Guides

How To Use Java On An Ipa (Jspa) With A Microsoft Powerbook (Jempa) With An Ipad And A Microos 2.5 (Microos)

IBM WebSphere Operational Decision Management Improve business outcomes with real-time, intelligent decision automation

IBM Tivoli Monitoring V6.2.3, how to debug issues with Windows performance objects issues - overview and tools.

Enhanced Diagnostics Improve Performance, Configurability, and Usability

User's Guide - Beta 1 Draft

Performance Improvement In Java Application

Deploying to WebSphere Process Server and WebSphere Enterprise Service Bus

For Introduction to Java Programming, 5E By Y. Daniel Liang

BI xpress Product Overview

System Structures. Services Interface Structure

Monitoring and Managing a JVM

HeapStats: Your Dependable Helper for Java Applications, from Development to Operation

WEBLOGIC ADMINISTRATION

z/vm and Linux on zseries Performance Monitoring An Update on How and With What Products

Application Servers - BEA WebLogic. Installing the Application Server

Software Development Kit

WebSphere Application Server V7: Monitoring the Runtime

Integrating TAU With Eclipse: A Performance Analysis System in an Integrated Development Environment

Java Troubleshooting and Performance

OWB Users, Enter The New ODI World

JBOSS OPERATIONS NETWORK (JBOSS ON) MONITORING

2015 ej-technologies GmbH. All rights reserved. JProfiler Manual

IBM Tivoli Monitoring for Virtual Environments: Dashboard, Reporting, and Capacity Planning Version 7.2 Fix Pack 2. User s Guide SC

User's Guide - Beta 1 Draft

SCA-based Enterprise Service Bus WebSphere ESB

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

An Easier Way for Cross-Platform Data Acquisition Application Development

VMware Server 2.0 Essentials. Virtualization Deployment and Management

How to analyse your system to optimise performance and throughput in IIBv9

A Practical Method to Diagnose Memory Leaks in Java Application Alan Yu

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

U.S. Navy Automated Software Testing

Tutorial: Load Testing with CLIF

Basics of VTune Performance Analyzer. Intel Software College. Objectives. VTune Performance Analyzer. Agenda

WEBLOGIC SERVER MANAGEMENT PACK ENTERPRISE EDITION

IBM Tivoli Monitoring for Applications

CSCI E 98: Managed Environments for the Execution of Programs

NetIQ AppManager for WebLogic Server UNIX. Management Guide

Holistic Performance Analysis of J2EE Applications

NetIQ AppManager for IBM WebSphere Application Server UNIX Management Guide

REMOTE DEVELOPMENT OPTION

HP Diagnostics. Java Agent Guide. For the Windows, Solaris and Linux operating systems. Software Version: Document Release Date: May 2014

FileNet System Manager Dashboard Help

Cloud Computing. Adam Barker

Oracle Data Integrator 12c: Integration and Administration

Computing Concepts with Java Essentials

TDA - Thread Dump Analyzer

Oracle Data Integrator 11g: Integration and Administration

ELEC 377. Operating Systems. Week 1 Class 3

Performance Monitoring and Visualization of Large-Sized and Multi- Threaded Applications with the Pajé Framework

Performance Best Practices Guide for SAP NetWeaver Portal 7.3

Using jvmstat and visualgc to Solve Memory Management Problems

Tivoli Log File Agent Version Fix Pack 2. User's Guide SC

Transcription:

Instrumentation Software Profiling

Software Profiling Instrumentation of a program so that data related to runtime performance (e.g execution time, memory usage) is gathered for one or more pieces of the code during the program's execution Used to analyze and improve a program's performance

Software Profiling Typically questions answered using profiling 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?

Eclipse TPTP TPTP = Test and Performance Tools Platform (http://www.eclipse.org/tptp) Part of the open-source Eclipse project Project created in August 2004 Successor of the Eclipse Hyades tools sub-project (2002) Involves several participants: Compuware, IBM, Intel, OC Systems, SAP, Scapa Technologies Offers tool to create tools to automate software Quality Control Four major components / sub-projects: Platform Monitoring tools Testing tools Tracing and Profiling tools Most recent release: TPTP 4.6.1 (Sept. 2009)

TPTP Objectives Bring software test and performance tools into the Eclipse environment By providing a platform and a set of components to develop testing, profiling and monitoring tools for applications. In a consistent way that maximizes integration with tools used in the other processes of the software lifecycle. Addresses the entire test and performance life cycle, from early testing to production application monitoring, including test editing and execution, monitoring, tracing and profiling, and log analysis capabilities

TPTP Objectives Reduce the cost and complexity of implementing effective automated software quality control processes Support a broad spectrum of computing systems including embedded, standalone, enterprise, and high-performance Share data through an OMG-defined test profile model, Common Base Event (CBE) Model and trace model implemented via the Eclipse Modeling Framework (EMF)

TPTP Project Structure TPTP Platform Project Core framework upon which the development of the monitoring, testing and tracing and profiling tools relies. Common user interface, standard data models, data collection and communications control, as well as remote execution environments TPTP Monitoring Tools Project Monitoring and logging phases of the application lifecycle, collecting and analyzing system and application resources. Correlate disparate logs from multiple points across an environment. Monitoring of application servers and system performance (e.g. CPU and memory utilization).

TPTP Project Structure TPTP Testing Tools Project Addresses testing phase of the application lifecycle. Contains testing editors, deployment and execution of tests, execution environments and associated execution history analysis and reporting. Includes exemplary tools for JUnit based component testing tool, Web application performance testing tool, and a manual testing tool. Future TTCN-3 support?

TPTP Project Structure TPTP Tracing and Profiling Tools Project Addresses the tracing and profiling phases of the application lifecycle. Includes exemplary profiling tools for both singlesystem and distributed Java applications through a JVMPI monitoring agent that collects trace and profile data. Includes a generic tool kit for probe insertion.

TPTP Architecture Presentation System Target System TPTP Workbench Monitor Trace Platform Test Controller Interface Distributed Control Framework Controller Interface Agent Controller Standard Widgets Application Reference Perspectives Trace Collection Statistical EMF Data Models Log Trace Test Data Loader Distributed Data Collection Framework Data Collection Interface Data Collection Log Collection Execution Environment JVMPI JVMTI Performance Monitor Eclipse Platform Test Execution

TPTP Architectural Components (1) On the controller system: User interface: the graphical view from which test execution is directed. Data models: based on the Eclipse Modeling Framework (EMF) Includes models for: test execution data logs traces statistics Eclipse platform: used for windows, editors, etc. Interfaces to the agent controller, and data collection engine.

TPTP Architectural Components (2) On the target system: the application to be tested the application s execution environment: includes the Java virtual machine and additional monitoring via virtual machine tool interfaces the test engine, to start the application and its environment data collection

Models implemented by TPTP (1) Includes a reference implementation of the UML2 test profile (MOF). Test profile: definition model for the creation of: test suites test cases data pools invocation loops synchronization

Models implemented by TPTP (2) Definition model for the definition, creation, management and persisting of test executions over time including: Tests to be executed. Deployments. Locations. Verdicts. Messages and console output from the test execution. A collection of test execution traces and results: the test log.

Agent Controller 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 type of agent managed by AC that runs in the Java Virtual Machine process and receives notifications of JVM events. The Java profiling engine included uses the Java Virtual Machine Tool Interface to profile local or remote Java applications from a local TPTP workbench Launch and profile local or remote Java applications and import local or remote logs Platform support : Windows, Linux, Solaris, HP-UX, AIX, Z/OS, OS/400

Agent Controller Eclipse Workbench Agent Controller Java Profiling Agent Host process

Agent Controller Architecture Image 2006 IBM, made available under the EPL

Agent Controller Terminology Host process Agent Client The process that contains the application under test A reusable binary file that provides services to the host process, and more importantly, provides a portal by which application data can be forwarded to attached clients A local or remote application (e.g. Eclipse Workbench) that is the terminal destination of host process data that is externalized by an agent The Agent Controller A daemon process that resides on each deployment host and provides the mechanism by which client applications can either launch new host processes, or attach to agents that coexist within existing host processes. The client can reside on the same host as the Agent Controller, or it can be remote. The Agent Controller can only interact with processes on the same node, and it is required on the same machine the targeted JVM is

Virtual Machine (VM) Interface JVMTI, the Java Virtual Machine Tool Interface http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/index.html Provides interface for tools that monitor or control the virtual machine: debuggers, profilers, thread monitors, coverage analysis Capabilities: observation / control of memory threads stack frame memory heap local variables break points classes and object instances; methods timers

Versions of VM interfaces and the Agent Controller In versions of Java up to 1.4.2, there were two interfaces called JVMPI and JVMDI, where P = profiling and D = debugging These were deprecated in Java 5 and removed in Java 6. Both JVMPI and JVMDI have been replaced by JVMTI.

TPTP Java Profiling Tool 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 Enables to profile and interact with applications, to work with profiling resources, and to examine applications for performance and memory usage problems Help to visualize and understand program execution, pinpoint the operations that take the most resources, as well as to explore patterns of program behavior Enables to test application's performance early in the programming development cycle for improvements

TPTP Java Profiling Tool A library that attaches to a JVM to capture and record the Java application's behavior Is a type of agent managed by the Agent Controller Runs in the JVM (Java Virtual Machine) process and receives notifications of JVM events, based on the JVMTI (Java Virtual Machine Tool Interface). Best used to identify performance details such as classes or methods responsible for the poor execution performance, also be used to analyze application heap and find memory leaks Output from the profiling agent is in the form of XML fragments (XML4Profiling) Can be launched from the TPTP workbench, Applications can be in workbench's workspace, binaries that are on the file system or in a server Can also be invoked using the -Xrun JVM option in command line

Profiling and Logging Perspective The profiling tools available in the Profiling and Logging perspective provide comprehensive information about the performance of an application The profiling tool (in this scenario i.e. Java Profiling) provides information pertaining to JVM performance Object allocations and references Garbage collection Object methods performance Object->Object interactions Thread interactions to name a few

Monitor and Navigator View Profiling Views

Monitor and Navigation View Java process associated with a host Time of profile run Monitors

Monitor and Navigation View Profiling and Logging perspective provides resources to administering and managing profiling Profiling resources Project: Make a project of your profiling effort Monitor: Aggregate different processes and agents Host: The host you are profiling Process: The executing program Agent : Provides services to a process, a mechanism by which process data can be sent to (attached) clients Profiling Type: Group profile data collection

Monitor and Navigation View Project: Monitor: Host: Container of the profiling resources A logical container for the profiling information that is collected from a group of agents. The views at the monitor level show data from these agents. Monitors are useful for aggregating processes and agents from a distributed application Owns the processes that are profiled. A host runs processes. You can specify a host either by its name or by its IP address Process & Agent: In the Agent Controller architecture model, an agent is a binary file that provides services to the host process by which application data can be transferred to attached clients

Profiling Views Number of views to visualize and organize profiling data Memory Statistic view Execution Statistic view Coverage Statistic view Object Reference view Execution Flow view and table Method Invocation view and table UML2 Trace Interactions view

Memory Statistics View Shows: Total instances: total number of instances of each class. Live instances: The number of instances that are alive (i.e. instances that were not collected by the garbage collector). Total Size (bytes): The size of an instances associated with a specific class Active Size (bytes): The size of an instances associated with a specific class

Execution Statistics View

Execution Statistics View Shows base time, average time, cumulative, and number of method calls: Base Time: The amount of time (in seconds) a method has taken to execute. Not including the execution time of any other methods called from this method. Average base time: The average base time required to execute a method once. Cumulative base time: The amount of time (in seconds) a method took to execute. Including the execution time of any other methods called from this method. Calls: The number of times a method was invoked.

UML2 Execution Flow

Thread Analysis

Thread Analysis

Probe kit Instrumentation Tool in the Test and Performance Tools Platform project Scriptable Byte Code Instrumentation (BCI) engine for Java instrumentation. Probes contain fragments of Java code to be called from classes and at times specified by the programmer including: Method entry Method exit Exception handling Class loading Probes can be used to collect runtime data, including: Method arguments and the this object Exception objects Return values

Probe kit Instrumentation Runtime data collected by probes can be used for : Profiling Send any numeric data for graphing: heap size, CPU load, anything-per-second rates Report when a method takes more than X amount of time to run. Debugging target program runs at nearly full speed even while evaluating conditions, unlike running under the debugger. Code analysis Send any kind of call-and-return, parent/child information

Create Probe Source

Fragment Types entry exit run upon method entry. Will not run for methods that were inserted into the class by Probekit. run upon method exit: a normal exit, when the method throws an exception, or when a thrown exception propagates out of the method. Will not run for methods that were inserted into the class by Probekit. catch run at the beginning of a catch clause in the method, or at the beginning of a finally clause that runs as the result of an exception.

Fragment Types staticinitializer run inside the class initializer of every probed class. If the class does not already have a static initializer, one will be created. executableunit run before every executable unit of code in methods that match the probe's target and filter specification, and for which source code is available. If the method does not have source line information, it will appear to have a single executable unit, numbered zero.. beforecall run in the calling method immediately before the target method is called. Not valid for method probes. aftercall run in the calling method immediately after the target method exits: either a normal exit, or when the target method throws an exception. Not valid for method probes.

Creating Probes

Apply Probe

Probe results