Experimental Tools for Serviceability. S es s ion 3280

Similar documents
De igning for Data a e Fairne

Wireless Portable Karaoke Speaker NDS-1510

The Grid Where we ve been, Where We Are and Where We re Going

M C I T P UNIT 9 W I N D O W S. Virtualization S E R V E R. DPW Donna Warren DPW

Page 1 of 29. PADS Viewer

Metric for Micro ervice

DDo : eparating Friend from Foe

Graph S eparators Part II

Virtual Reality based Visualization

JDB - QUICK GUIDE JDB - INTRODUCTION

A High Integrity Distributed Deterministic Java Environment. WORDS 2002 January 7, San Diego CA

MODULE 1 JAVA PLATFORMS. Identifying Java Technology Product Groups

Image-Bas ed R endering Using Image Warping. Conventional 3-D Graphics

T his article is downloaded from

Oracle Developer Day

A Modular Degree-of-Interest Specification for the Visual Analysis of Large Dynamic Networks

Technical Bulletin TB1554. Class: INFO. JVM Software Update Procedure

Bugloo: A Source Level Debugger for Scheme Programs Compiled into JVM Bytecode

Windows Server 2012 r2

Single Minute Exchange Of Dies

Technical Bulletin TB1554. Class: INFO. JVM Software Update Procedure

DNWSH - Version: 2.3..NET Performance and Debugging Workshop

Ryan Sciampacone Senior Software Developer August 1 st Multitenant JVM. JVM Languages Summit IBM Corporation

Introduction to Programming (Java) 2/12

Before you start with this tutorial, you need to know basic Java programming.

Debug for GDB Users. Action Description Debug GDB $debug <program> <args> >create <program> <args>

18.2 Software update (NOS 60)

Embedded System Design - Linux Device Driver Development

BEAMJIT, a Maze of Twisty Little Traces

Debugging and profiling in R

Fast, Scalable and Energy Efficient IO Solutions: Accelerating infrastructure SoC time-to-market

High-Level Language VMs

LLVM Summer School, Paris 2017

C UNIT 3. Global Catalog & Flexible Single Master Operations (FSMO)

Class #509 The Heisenberg Principal of Debugging

Basics of Cryptography & Digital Certificates. Trusted Internet Services from VeriSign and SafeScrypt.

Remote Access, VPNs and Terminal Services

SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine p. 1

An Introduction to Tilde

Technical Bulletin TB1570. Class: INFO. Subject JVM Software Update Procedure. Series V-Range (501,651,801)

T his article is downloaded from

JAVA PERFORMANCE. PR SW2 S18 Dr. Prähofer DI Leopoldseder

What run-time services could help scientific programming?

BEAMJIT: An LLVM based just-in-time compiler for Erlang. Frej Drejhammar

Complex, concurrent software. Precision (no false positives) Find real bugs in real executions

Optimising Multicore JVMs. Khaled Alnowaiser

JamaicaVM Java for Embedded Realtime Systems

ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK

FILESIGNER PLUS V7.3.1 USER GUIDE

Hardware-Supported Pointer Detection for common Garbage Collections

` Hispanic / Latino ` Not Hispanic / Latino A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Zing Vision. Answering your toughest production Java performance questions

Present but unreachable

hepic. Lorenzo Mangani CEO, QXIP BV

Scalable Post-Mortem Debugging Abel Mathew. CEO -

A JAVA VIRTUAL MACHINE FOR RISC-V PORTING THE JIKES RESEARCH VM

Notes of the course - Advanced Programming. Barbara Russo

Database Connectivity, Web Technologies & the Cloud

Part I. Integrated Development Environment. Chapter 2: The Solution Explorer, Toolbox, and Properties. Chapter 3: Options and Customizations

Java Internals. Frank Yellin Tim Lindholm JavaSoft

Implementing Symmetric Multiprocessing in LispWorks

Programming Assignment IV Due Thursday, November 18th, 2010 at 11:59 PM

<Insert Picture Here>

MAT 155: Describing, Exploring, and Comparing Data Page 1 of NotesCh2-3.doc

NightStar. NightView Source Level Debugger. Real-Time Linux Debugging and Analysis Tools BROCHURE

Turbo IC, Inc. 24C128/24C256

Managing Array of SSDs When the Storage Device is No Longer the Performance Bottleneck

Grade 8. ` Hispanic / Latino ` Not Hispanic / Latino A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

After The Lead. Increasing LTV and Reducing Time To Break Even On New Leads

code://rubinius/technical

Programming Assignment IV Due Thursday, June 1, 2017 at 11:59pm

NUMA in High-Level Languages. Patrick Siegler Non-Uniform Memory Architectures Hasso-Plattner-Institut

Prototyping Architectural Support for Program Rollback Using FPGAs

Oracle Developer Studio 12.6

Systems software design. Software build configurations; Debugging, profiling & Quality Assurance tools

Runtime Application Self-Protection (RASP) Performance Metrics

Evolution of Virtual Machine Technologies for Portability and Application Capture. Bob Vandette Java Hotspot VM Engineering Sept 2004

Solution Seamless automatic media adaptation allows sophisticated responses to mobile delivery challenges

Advanced Object-Oriented Programming Introduction to OOP and Java

Running class Timing on Java HotSpot VM, 1

Architectural Design

Multi-Level Virtual Machine Debugging using the Java Platform Debugger Architecture

Java: framework overview and in-the-small features

Testing Reactive Programs. Designing Programmable debugger easily

Lab6 GDB debugging. Conventions. Department of Computer Science and Information Engineering National Taiwan University

Garbage-First Garbage Collection by David Detlefs, Christine Flood, Steve Heller & Tony Printezis. Presented by Edward Raff

Debugging Reinvented: Asking and Answering Why and Why Not Questions about Program Behavior

The G1 GC in JDK 9. Erik Duveblad Senior Member of Technical Staf Oracle JVM GC Team October, 2017

Method-Level Phase Behavior in Java Workloads

Enterprise Architect. User Guide Series. Profiling

Enterprise Architect. User Guide Series. Profiling. Author: Sparx Systems. Date: 10/05/2018. Version: 1.0 CREATED WITH

Runtime. The optimized program is ready to run What sorts of facilities are available at runtime

Common Lisp. In Practical Usage

Performance Analysis of Large-Scale OpenMP and Hybrid MPI/OpenMP Applications with Vampir NG

Programming Multicore Systems

Exploiting the Behavior of Generational Garbage Collector

Chapter 13 Non Sampling Errors

Keywords Cloud Computing, Service Level Agreements (SLA), CloudSim, Monitoring & Controlling SLA Agent, JADE

ECE 274 Digital Logic Fall 2008

Administering Windows Server 2003 & Data Backup

Transcription:

Experimental Tools for Serviceability Tony Printezis L ecturer Univers ity of G las gow Kenneth Russell Member of T ech S taff S un Micros ys tems

Overall Presentation Goal G et an ins ight into examining, debugging, and profiling different as pects of a J ava technology- bas ed V irtual Machine (J V M /J ava V M) us ing two new experimental tools 2

Learning Objectives A s a res ult of this pres entation, you will be convinced that: J ava V M debugging is hard! C urrent debugging tools are not always adequate T here is a need for s pecialis ed tools to help the J ava V M implementor......which might als o be us ed to help application programmers too 3

Speakers Qualifications T ony P rintezis L ecturer, Univers ity of G las gow He has been writing garbage collectors for J ava V Ms for four years K enneth R us s ell Member of tech s taff, S un Micros ys tems He has worked on the J ava HotS pot runtime and compiler for over two years 4

Bug Hunting Ain t Fun! How many all- nighters have you pulled becaus e of a bug in your native code? Now imagine debugging the G C or the J ava V M its elf... 5

Java VM Debugging Facility 6

Some Proper Debugging Tools! G C s py T ony P rintezis Heap vis ualis ation for J ava V Ms L ow impact, high level vis ualis ation J ava HotS pot S erviceability A gent K enneth R us s ell E xaminer and debugger for J ava HotS pot V M P os t mortem analys is of J ava V M 7

GCspy A daptable heap vis ualis ation framework Incorporated into s everal J ava V Ms D eveloped to vis ualis e the behaviour of G arbage C ollectors (G C s ) S calable L arge heap s izes V ery long running applications D ynamic W orks while J ava V M is executing 8

Why Heap Visualisation? G C s have (almos t) chaotic behaviour! O ne s mall change in the application behaviour can have a large effect in the G C performance G C debugging and profiling facilities S till very primitive V is ualis ation provides a convenient way to get an ins ight into the G C s behaviour D ebugging and profiling 9

Visualisation Granularity C oars e granularity Heap blocks, not objects S maller data volumes F as ter to collect / s end / s tore data B ut... L ower level of detail Information los s C an adjus t block s ize to deal with s calability and s creen s ize limitations 10

Client Server Model C lient S erver J ava V M is the s erver V is ualis er is the client F lexibility C an be run as different proces s es C an be run on different machines C an connect / dis connect the vis ualis er during J ava V M execution 12

Portability F ramework is J ava V M and G C independent B ut (s mall) modifications to the J ava V M are needed V is ualis er operates over s ome abs tractions Need to map the G C s s tate to thos e abs tractions A G C s py D river does this O nly the s erver s ide of the framework needs to be cus tomis ed 13

Architecture Server Client Java Application Visualiser Java VM S-S GC Space Space Renderer Renderer 0 1 M&C GC Data Collection S-S Driver M&C Driver Used Roots Objects Cards Marked Server Infrastructure Comms 14 Space 0 Space 1 Stream 0 Stream 1 Socket Stream 0 Stream 1 Stream 2 Client Infrastructure Comms

Performance Impact D ata collection can take a long time S everal s econds for each G C in the cas e of large heaps J ava V M performance is affected No performance penalty when the vis ualis er is not connected! 15

Trace Storing / Replaying G oal S tore trans mis s ions from a J ava V M R eplay them at a later time R eplay tool behaves e xactly like the J ava V M C ompact trace files C ompres s ion 16

Current Implementations T hree J ava technology bas ed V Ms J ava HotS pot V M S un s R es earchv M IB M s J ikes R V M A t leas t eight different G C s O ther s ys tems too Not only limited to J ava V Ms! 18

Future Work B etter, more flexible vis ualis ations O ther vis ualis ation s tyles e.g. S catter plots, His tograms R ewind facilities C onditional breakpoints 19

Java HotSpot Serviceability Agent E xaminer and debugger for J ava HotS pot virtual machine O riginally des igned for pos t mortem analys is R uns no code in target J V M R ecovers high level J ava programming language s tate 20

Motivation J ava HotS pot V M group needed better debugging tools C urrent debuggers not targeted toward debugging the J V M C /C + + debuggers R equire debug info not pres ent in product D o not unders tand J ava language, objects J ava programming language debuggers G ather information via J V M D I D o not work with cras hed J ava V Ms 21

Mechanisms J ava HotS pot S erviceability A gent (S A ) Unders tands layouts of key HotS pot data s tructures T hread lis t S tack frames C ontains code to walk thes e data s tructures D ebugger tuned for J ava HotS pot V M R ecovers s ame information as J V M D I / J D W P - bas ed debuggers 22

Features J ava programming language A P Is Implemented almos t entirely in J ava programming language A ll the way down to read proces s memory E nables cros s O S and cros s C P U debugging C an be bound to exis ting J D I interfaces in J P D A (in progres s ; more later) 23

Features F ine grained heap analys is O bject by object iteration Iteration through objects S tack walking A cces s to local variables, expres s ion s tack, monitors F allback mechanis ms for analyzing cras hes in interpreter or in compiled code 24

Architectural Diagram Target HotSpot JVM /proc dbx Socket Dbx APIs SA's Java VM import module Note that no code is being run in target J ava V M C urrent J P D A runs J V M D I- bas ed code there 25

Evolution F irs t debugger A ttach to running J V M or open core file E xamine all J V M s tate at very low level P roces s s us pended during examination T ools for developers of J V M technology S tack memory dump with annotations O bject ins pection E nd us er tools Heap dumps, livenes s analys is 26

Evolution F irs t debugger Mos t us eful to developers of J ava HotS pot technology Mos t us eful on the S olaris O perating E nvironment B uilt on dbx E s cape hatch to s ee non J V M s tate P orted to W in32 No interaction with proces s No s us pend, res ume No breakpoint s etting, exception catching 28

Observation S A built on very low level debugging primitives read proces s memory fetch thread regis ter s et S ame primitives as C /C + + debuggers W hy not extend to look at more than jus t J ava programming language s tate? 29

Extensions S A A P Is extended: F etch all O S level threads F etch all dynamically loaded objects More platform dependent J ava code : C - level s tack walking (all frames on s tack) P ars ing of C /C + + debug information E nable complete proces s examination s ys tem to be written in J ava programming language 30

Extensions F urther extens ions : R es ume/s us pend proces s P oll for event (s eg fault, etc.) S et breakpoint at machine ins truction R elatively little additional code E nable mos tly complete C /C + + debugger to be written in J ava programming language 31

Extensions C ommunication with J V M D I module S tart with - X run E nables J ava programming language breakpoint s etting and exception catching T his is the only code run in target J ava V M Mos t functionality available without it 32

Observation Now have all primitives neces s ary to build both C /C + + and J ava programming language debuggers S ys tem was originally des igned for pos t mortem analys is of J ava V M Ideally pos ed for building mixed language debugger C an handle cras hes in native code gracefully 33

Current Status E xperimental C /C + + and J ava programming language debugger has been built W ritten in J ava programming language S upports breakpoints in both C and J ava code (J ava technology bas ed code) S upports exception catching D egrades gracefully Mos t of debugger s till works even if target proces s cras hes 34

Availability S A is currently available to s ource licens ees of J ava HotS pot virtual machine 36

Future Work C omplete ports to all S un s upported platforms J D I binding in development A llow current tools to acces s J ava programming language s tate of J ava HotS pot core files via S A D is cus s prototype C /C + + debugging A P Is with tool vendors O ptional extens ions to J D I E nable all tool vendors to build mixed language debuggers 37

Presentation Summary J ava V M debugging is hard! W e pres ented two new debugging tools Heap vis ualis ation with G C s py P os t mortem analys is with the J ava HotS pot S erviceability A gent T hey are us ed by J ava V M implementors T hey operate at two different levels T hey improve debugging effectivenes s 38

Call to Action Need feedback on thes e tools and A P Is W hether they would be us eful F eatures which are needed S hould we s hip them (uns upported) F eedback on G C s py tony@dcs.gla.ac.uk F eedback on the J ava HotS pot S erviceability A gent s a- feedback@s un.com 39