Bridging the Observability Gap for Java and Scripting Applic

时间:2022-11-22 16:28:35 作者:壹号 字数:6131字

2009 sun tech days

DTrace: Bridging the Observability Gap for Java and Scripting ApplicationsAlex Peng Technology Evangelist Sun Microsystems1

2009 sun tech days

Agenda Introduction to DTrace The DVM provider The hotspot provider Scripting language providers DTrace and MySQL Summary and Resources

2009 sun tech days

Traditional Analysis: System Observability My application doesn't work or doesn't perform

as well as it needs to

What tools do I have? What information can I get? How can I relate this to the problem?

2009 sun tech days

What is instrumentation?? Question: How do you typically do

instrumentation?? Answer:

#ifdef DEBUG printf(“Value of Q:%d”, Q);

Question: What do you need to do to add new

instrumentation? Answer: edit, compile, link, deploy ........ the system and your own code??

What if you could do this dynamically, both on4

2009 sun tech days

DTrace Approach My application doesn't work or doesn't perform as

well as it needs to

hypothesis→ instrumentation→ data gathering→ analysis→ hypothesis ........

2009 sun tech days

DTrace Basics DTrace is a dynamic instrumentation framework

that was introduced in Solaris 10 Allows for dynamic instrumentation of the OS and applications (including Java-based applications as well as some scripting languages, as we will see later) Available out of the box; a typical system has more than 50,000 probes> Other systems also instrumented

Includes D, a dynamically interpreted language,

that allows for arbitrary actions and predicates

2009 sun tech days

DTrace Basics Designed explicitly for use on production

systems Zero performance impact when not in use Completely safe; no way to cause panics, crashes, data corruption or pathological performance degradation Powerful data management primitives eliminate need for most postprocessing

2009 sun tech days

…… 此处隐藏2962字 ……

Python PHP JavaScript in Firefox 3.0 Ruby More to come

2009 sun tech days

DTrace and Python Two probes, simple function entry/exit> function-entry> function-return Three arguments available> arg1: filename> arg2: subroutine name> arg3: line number

2009 sun tech days

DTrace and Python ustack() works well on these probes These probes are available in OpenSolaris

2008.05 and later DTrace toolkit

has a set of scripts for Python