SlideShare ist ein Scribd-Unternehmen logo
1 von 98
Downloaden Sie, um offline zu lesen
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Debuggers
A Peek Under the Hood
David Buck
Principal Member of Technical Staff
Java SE Sustaining Engineering
September, 2016
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
4
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
About Me
David Buck
• Java SE Sustaining Engineering
• Mostly JRockit fixes
• OpenJDK 8 Updates
Project Maintainer
• Hobbies: Programming
5
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Introduction
Java Platform Debug Architecture
Java Debug Wire Protocol
JVM Tool Interface
Wrap-up
1
2
3
4
5
6
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Introduction
7
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
The Elephant in the Room
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• 2 JavaOne Debugger “under the
hood talks” this year
9
The Elephant in the Room
By Peter H. Wrege (Own work) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0) or GFDL (http://www.gnu.org/copyleft/fdl.html)], via Wikimedia Commons
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• 2 JavaOne Debugger “under the
hood talks” this year
• Martin’s talk is really good!
10
The Elephant in the Room
By Peter H. Wrege (Own work) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0) or GFDL (http://www.gnu.org/copyleft/fdl.html)], via Wikimedia Commons
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 11
Buck’s Talk Martin’s talk
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 12
JVM TI
JDWP
JDI
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 13
JVM TI
JDWP
JDI
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• Both talks needed for full picture
• Video and slides from a past
version of Martin’s talk are
available online
• No particular order to the content
14
JDI
AKA Martin’s Talk
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 15
JDI
JVM TI
JDWP
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 16
JDI?
JVM TI?
JDWP?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 17
JDI?
JVM TI?
JDWP?
Java Platform Debugger Architecture
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
18
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
• Facilitate writing a debugger in Java
• Impact Debuggee application as little as possible
• Allow native-level / in-process tooling
19
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Heisenbugs
Bug Heisenberg
Heisenbug
picture: Bundesarchiv, Bild 183-R57262 / Unknown / CC-BY-SA 3.0 [CC BY-SA 3.0 de (http://creativecommons.org/licenses/by-sa/3.0/de/deed.en)]
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Observer Effect
picture: Christian Schirm (Own work) [CC0]
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• Debugging, at the same level of
abstraction (Java), in the same
process, will cause problems
– Stop-the-world
– debugger heap overhead
22
Strange Loop Problems
Picture By Maurizio Codogno, it:Utente:.mau. (Own work) [GFDL (http://www.gnu.org/copyleft/fdl.html), CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/) or CC BY 2.5 (http://creativecommons.org/licenses/by/2.5)], via Wikimedia Commons
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
• Facilitate writing a debugger in Java
– Java API
• Impact Debuggee application as little as possible
– Out-of-process debugger
• Allow native-level / in-process tooling
– Native in-process debugger
23
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 24
Java vs. Native
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 25
In-process vs. Out-of-process
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 26
Why not both?
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 27
By Libertinus (http://www.flickr.com/photos/libertinus/5807760586) [CC BY-SA 2.0 (http://creativecommons.org/licenses/by-sa/2.0)], via Wikimedia Commons
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
28
Target
JVM
Debugger JVM
Events
JDI
Debugger
Target Application
(Debuggee)
JVM
TI
Agent
JDWP
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
• Since Java 1.3
• Modular design
• 3 components
– JVM Tool Interface
– Java Debug Wire Protocol
– Java Debug Interface
29
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
30
Target
JVM
Debugger JVM
JDI
Debugger
Target Application
(Debuggee)
JVM
TI
Agent
JDWP
Commands
Events
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
31
Target
JVM
Debugger JVM
JDI
Debugger
Target Application
(Debuggee)
JVM
DI
Agent
JDWP
Commands
Events
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
32
Target
JVM
Native Debugger Tool
Target Application
(Debuggee)
JVM
TI
Agent
JDWP
Commands
Events
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
33
Target
JVM
Debugger JVM
JDI
Debugger
Target Application
(Debuggee)
JVM
TI
Agent
JDWP
Commands
Events
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
34
Target
JVM
Target Application
(Debuggee)
JVM
TI
Agent
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
35
Target
JVM
Debugger JVM
JDI
Debugger
Target Application
(Debuggee)
JVM
TI
Agent
JDWP
Commands
Events
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
36
Target
JVM
Debugger JVM
JDI
JShell
Target Application
(Debuggee)
JVM
TI
Agent
JDWP
Commands
Events
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Debug Interface (JDI)
• Reference implementation lives in
– tools.jar (JDK 6/7/8)
– jdk.jdi module (JDK 9)
• Pure Java implementation
• “speaks” JDWP on behalf of Java client code
37
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Debug Wire Protocol
38
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Debug Wire Protocol (JDWP)
• Binary protocol between target JVM and debugger processes
• Does not specify transport
• Asynchronous
• Tailored to JDI
39
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Debug Wire Protocol
40
Target
JVM
Debugger JVM
JDI
Debugger
Target Application
(Debuggee)
JVM
TI
Agent
JDWP
Commands
Events
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Debug Wire Protocol
41
Target
JVM
Debugger
Target Application
(Debuggee)
JDWP
Commands
Events
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP Handshake
42
Target
JVM
Debugger
Target Application
(Debuggee)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP Handshake
43
Target
JVM
Debugger
Target Application
(Debuggee)
JDWP-
Handshake
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP Handshake
44
Target
JVM
Debugger
Target Application
(Debuggee)
JDWP-
Handshake
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP
Java Debug Wire Protocol
45
Target
JVM
Debugger
Target Application
(Debuggee)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Debug Wire Protocol
• All Packets have 11 byte header
• Some packets have data
– Optional
– Variable length
46
Header
Data
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• Command • Reply
47
JDWP Packets
Length
ID
Flags
Command
set
Command
Data
(optional, variable length)
Length
ID
Flags Error Code
Data
(optional, variable length)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP Header Fields
• length (4 bytes)
• id (4 bytes)
• flags (1 byte)
• command set (1 byte)
• command (1 byte)
• error code (2 bytes)
48
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP Length Field
• 32-bit value
• Size of entire packet in bytes (including header)
• Up to a 4GB packet size!
49
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP ID Field
• 32-bit value
• Only used to match command and reply packets
• Each “direction” (debugger <-> target) has it’s own ID-space
• Over 4 billion in flight packets per direction
50
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP Flags Field
• 8-bit value (but only one bit currently used)
• Only used to distinguish between Command / Reply packets
– 0x80 == Reply Packet
– 0x00 == Command Packet
• Additional flags may be added in the future
51
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP Command Fields
• Only in command packets
• Command Set Field
– 8 bit
– Each set corresponds to a JDI class
• 0 - 63 debugger -> target VM
• 64 - 127 target VM -> debugger
• 128 - 256 Vendor-defined
• Command Field
– 8 bit
– Each command corresponds to a JDI method
52
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP Error Code Field
• 16 bit value
• Only in reply packets
53
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP Data
• Variable size
• Optional
• Examples:
– Requested field ID (command)
– Requested field vale (reply)
54
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JDWP Commands
55
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
What about transport?!
• In practice, this somewhat couples debugger / debuggee
• Socket transport
– All Oracle JDK supported platforms
– Supports remote debugging
– JVM TI agent currently only support IPv4
• Shared memory transport
– Only on Windows
• Service provider interface available for implementing your own transport /
connectors
56
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Security Implications of JDWP
• Zero Authentication
• JDWP access == Remote Code Execution
• As of yesterday www.shodan.io reports two IP sending JDWP handshake
• Many more are passively waiting for incoming connections
57
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JVM Tool Interface
58
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• JVM Debug Interface (JVM DI)
• JDK 1.1 ~ JDK 1.5
JVM Profiler Interface (JVM PI)
• JDK 1.1 ~ JDK 1.5
• Never officially supported
• Stability issues (esp. with HS)
• Hard to use with JNI
• Very invasive
– Not all GC supported
– Performance impact
59
A Tail of Two APIs
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• JVM Debug Interface (JVM DI)
• JDK 1.1 ~ JDK 1.5
JVM Profiler Interface (JVM PI)
• JDK 1.1 ~ JDK 1.5
• Never officially supported
• Stability issues (esp. with HS)
• Hard to use with JNI
• Very invasive
– Not all GC supported
– Performance impact
60
A Tail of Two APIs
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JVM Tool Interface (JVM TI)
• Introduced in JDK 5
• Replaced
– JVM PI (Removed in JDK 6)
– JVM DI (Removed in JDK 6)
• Many use cases outside of JPDA
• Fully supported
• Pay-as-you-go performance impact
• Based on JNI
61
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JVM TI Agents
• Native code that runs in JVM’s address space
• Multiple concurrent agents supported
• Can be
– Statically linked into JVM
– Loaded at startup
– Loaded during runtime
• Can take command line arguments
-agentlib:<agent_lib_name>=<name1>[=<value1>],<name2>[=<value2>]...
62
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Native Agent
• JVM TI
• Command line options:
– agentlib
– agentpath
Java Agent
• java.lang.instrument
• Comand line option:
– javaagent
63
A note about “agents”
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Native Agent
• JVM TI
• Command line options:
– agentlib
– agentpath
Java Agent
• java.lang.instrument
• Comand line option:
– javaagent
64
A note about “agents”
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
65
Target
JVM
Debugger JVM
JDI
Debugger
Target Application
(Debuggee)
JVM
TI
Agent
JDWP
Commands
Events
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Platform Debugger Architecture
66
Target
JVM
Debugger JVM
JDI
Debugger
Target Application
(Debuggee)
JVM
TI
Agent
JDWP
Commands
Events
libjdwp.so
jdwp.dll
libjdwp.dylib
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JVM TI based on Java Native Interface
• JVM TI Callbacks have JNI environment pointer
• Very hard to make a useful JVM TI agent without JNI calls
• JNI data types used (e.g. jint, jdouble)
• Same “modified UTF-8” for strings
• Not simply an extension of JNI, many important differences
67
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Native Interface
68
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Native Interface
jdouble Java_pkg_Cls_f__ILjava_lang_String_2 (JNIEnv *env,
jobject obj, jint i, jstring s) {
const char *str = (*env)->GetStringUTFChars(env, s, 0);
...
(*env)->ReleaseStringUTFChars(env, s, str);
return ...
}
69
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Java Native Interface
jdouble Java_pkg_Cls_f__ILjava_lang_String_2 (JNIEnv *env,
jobject obj, jint i, jstring s) {
const char *str = (*env)->GetStringUTFChars(env, s, 0);
...
(*env)->ReleaseStringUTFChars(env, s, str);
return ...
}
70
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JVM TI Environment
• event callbacks
• enabled events
• enabled capabilities
• memory allocation/deallocation hooks
71
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JVM TI
Created dynamically and works
across threads
JNI
One environment per thread
72
JVM TI Environment vs. JNI Environment
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Capabilities
• Flags that represent JVM TI functionality
• Allows “negotiation” between agent and JVM
– Lets agent tell JVM what it needs
– Lets JVM tell agent what it supports
73
Picture: David Monniaux / Mai-Linh Doan (GFDL / cc-by-sa-2.0-fr)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• Only “pay” for the features you
want / use
• Can be set dynamically
– Some can only be enabled before
startup
• 2 levels of cost
– Enabling
– Using
74
Capabilities
Picture: David Monniaux / Mai-Linh Doan (GFDL / cc-by-sa-2.0-fr)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Bytecode Insertion (BCI)
• Many JVM PI use-cases replaced by BCI in JVM TI
• Instrumentation at the bytecode level is automatically compatible with all
JVM technologies.
– Allows instrumented code to be JIT-compiled
– Use any GC collector
75
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JVM TI Agent Lifecycle
• Initialize
– Agent_OnLoad()
– Agent_OnAttach()
• Probe / request capabilities
• Set callback functions
• Enable events
• Process events via callbacks
• Shutdown on Agent_OnUnload()
76
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
JVM TI Example
• Agent_OnLoad()
– Setup global data for agent’s private use
– Probe/request capabilities
– Modify JRE environment
– Set callback functions
– Enable few events, including VMInit
• VMInit callback
– Enable rest of events
• Process events via callbacks
• Cleanup on Agent_OnUnload()
77
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Peaking under the hood of JVM TI:
78
-XX:TraceJVMTI
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Peaking under the hood of JVM TI:
79
-XX:TraceJVMTI
XX:TraceJVMTI= desc {, desc } ...
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Peaking under the hood of JVM TI:
80
-XX:TraceJVMTI
XX:TraceJVMTI= desc {, desc } ...
domain action kind
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Peaking under the hood of JVM TI:
81
-XX:TraceJVMTI
XX:TraceJVMTI= desc {, desc } ...
domain action kind
name a particular function or event name
all all functions and events
func all major functions
allfunc all functions
event all events
ec event controller
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Peaking under the hood of JVM TI:
82
-XX:TraceJVMTI
XX:TraceJVMTI= desc {, desc } ...
domain action kind
+ add
- remove
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Peaking under the hood of JVM TI:
83
-XX:TraceJVMTI
XX:TraceJVMTI= desc {, desc } ...
domain action kind
i input parameters
e error returns
o output
t event triggered (posted)
s event sent
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Full Speed Debugging
84
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Full Speed Debugging
85
• 1.4.0 with client (c1) JIT compiler
• 1.4.1 with both client (c1) and server (c2) JIT compilers
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Full Speed Debugging
86
O RLY?
By pe_ha45 - originally posted to Flickr as Snowy Owl - Schnee-Eule, CC BY 2.0, https://commons.wikimedia.org/w/index.php?curid=11400326
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Full Speed Debugging
Depends on your definition of “Full Speed”…
Pre-1.4: -Xdebug == -Xint
87
By Charles Homler - Own work, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=29896748
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Required
can_access_local_variables
can_generate_single_step_events
can_generate_exception_events
can_generate_frame_pop_events
can_generate_breakpoint_events
can_suspend
can_generate_method_entry_events
can_generate_method_exit_events
can_generate_garbage_collection_events
can_maintain_original_method_order
can_generate_monitor_events
can_tag_objects
can_get_source_debug_extension
can_get_source_file_name
can_get_line_numbers
Optional
can_force_early_return
can_force_early_return
can_generate_field_modification_events
can_generate_field_access_events
can_get_bytecodes
can_get_synthetic_attribute
can_get_owned_monitor_info
can_get_current_contended_monitor
can_get_monitor_info
can_pop_frame
can_redefine_classes
can_redefine_any_class
can_get_owned_monitor_stack_depth_info
can_get_constant_pool
can_signal_thread
88
Capabilities Used by JDWP Agent
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Full Speed Debugging
• Only methods with breakpoints are required to be interpreted
• But JVM TI capabilities used by jdwp agent do have a cost
89
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Full Speed Debugging
• Only methods with breakpoints are required to be interpreted
• But JVM TI capabilities used by jdwp agent do have a cost
• Usually not a noticeable impact, but YMMV. There is no free lunch.
90
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Wrap-up
91
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Takeaways
• These APIs are
– Stable
– Officially supported
– Very flexible
• There are limitless new tools you can write and still a lot of room for new
ideas
• Not simply for debugging
92
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Resources
[ Martin Skarsaune’s JDI talk ]
video: https://www.youtube.com/watch?v=lNR4bEzYaH4
slides: https://prezi.com/ahspfg2wdkwt/jvm-debugging-under-the-hood-jdays/
[ JDWP Connection and Invocation Details ]
https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/conninv.html
[ JDWP Specification ]
https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/jdwp-spec.html
[ JVM TI Specification ]
https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html
[ Kelly O'Hair's Weblog ]
Use the search tool to find posts about “jvmti”
https://blogs.oracle.com/kto/
93
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 94
Thank You!
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
95
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 96
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]

Weitere ähnliche Inhalte

Was ist angesagt?

Open hours home security | Episode 70
Open hours home security | Episode 70Open hours home security | Episode 70
Open hours home security | Episode 70Robert Wolff
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityDanHeidinga
 
Codestrong 2012 breakout session exploring the new titanium command line in...
Codestrong 2012 breakout session   exploring the new titanium command line in...Codestrong 2012 breakout session   exploring the new titanium command line in...
Codestrong 2012 breakout session exploring the new titanium command line in...Axway Appcelerator
 
Graal and Truffle: One VM to Rule Them All
Graal and Truffle: One VM to Rule Them AllGraal and Truffle: One VM to Rule Them All
Graal and Truffle: One VM to Rule Them AllThomas Wuerthinger
 
Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1Fraser Chadburn
 
Groovy Tutorial
Groovy TutorialGroovy Tutorial
Groovy TutorialPaul King
 
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...Thomas Wuerthinger
 
Eclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimesEclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimesMark Stoodley
 
J9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVMJ9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVMDanHeidinga
 
Java 40 versions_sgp
Java 40 versions_sgpJava 40 versions_sgp
Java 40 versions_sgpmichaelisvy
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java RatnaJava
 
Graal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformGraal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformThomas Wuerthinger
 
Creating a Python Microservice Tier in Four Sprints with Cassandra, Kafka, an...
Creating a Python Microservice Tier in Four Sprints with Cassandra, Kafka, an...Creating a Python Microservice Tier in Four Sprints with Cassandra, Kafka, an...
Creating a Python Microservice Tier in Four Sprints with Cassandra, Kafka, an...Jeffrey Carpenter
 
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Embarcadero Technologies
 
Introduction to Java Part-2
Introduction to Java Part-2Introduction to Java Part-2
Introduction to Java Part-2RatnaJava
 
FOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRFOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRCharlie Gracie
 
Randstad Docker meetup - Serverless
Randstad Docker meetup - ServerlessRandstad Docker meetup - Serverless
Randstad Docker meetup - ServerlessDavid Delabassee
 
LCA14: George Grey Keynote - LCA14
LCA14: George Grey Keynote - LCA14LCA14: George Grey Keynote - LCA14
LCA14: George Grey Keynote - LCA14Linaro
 
Graal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian WimmerGraal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian WimmerThomas Wuerthinger
 
JavaOne 2017: Eclipse OpenJ9: Under the hood of the JVM
JavaOne 2017: Eclipse OpenJ9: Under the hood of the JVMJavaOne 2017: Eclipse OpenJ9: Under the hood of the JVM
JavaOne 2017: Eclipse OpenJ9: Under the hood of the JVMDanHeidinga
 

Was ist angesagt? (20)

Open hours home security | Episode 70
Open hours home security | Episode 70Open hours home security | Episode 70
Open hours home security | Episode 70
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
 
Codestrong 2012 breakout session exploring the new titanium command line in...
Codestrong 2012 breakout session   exploring the new titanium command line in...Codestrong 2012 breakout session   exploring the new titanium command line in...
Codestrong 2012 breakout session exploring the new titanium command line in...
 
Graal and Truffle: One VM to Rule Them All
Graal and Truffle: One VM to Rule Them AllGraal and Truffle: One VM to Rule Them All
Graal and Truffle: One VM to Rule Them All
 
Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1
 
Groovy Tutorial
Groovy TutorialGroovy Tutorial
Groovy Tutorial
 
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
 
Eclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimesEclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimes
 
J9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVMJ9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVM
 
Java 40 versions_sgp
Java 40 versions_sgpJava 40 versions_sgp
Java 40 versions_sgp
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java
 
Graal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformGraal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution Platform
 
Creating a Python Microservice Tier in Four Sprints with Cassandra, Kafka, an...
Creating a Python Microservice Tier in Four Sprints with Cassandra, Kafka, an...Creating a Python Microservice Tier in Four Sprints with Cassandra, Kafka, an...
Creating a Python Microservice Tier in Four Sprints with Cassandra, Kafka, an...
 
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
 
Introduction to Java Part-2
Introduction to Java Part-2Introduction to Java Part-2
Introduction to Java Part-2
 
FOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRFOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMR
 
Randstad Docker meetup - Serverless
Randstad Docker meetup - ServerlessRandstad Docker meetup - Serverless
Randstad Docker meetup - Serverless
 
LCA14: George Grey Keynote - LCA14
LCA14: George Grey Keynote - LCA14LCA14: George Grey Keynote - LCA14
LCA14: George Grey Keynote - LCA14
 
Graal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian WimmerGraal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian Wimmer
 
JavaOne 2017: Eclipse OpenJ9: Under the hood of the JVM
JavaOne 2017: Eclipse OpenJ9: Under the hood of the JVMJavaOne 2017: Eclipse OpenJ9: Under the hood of the JVM
JavaOne 2017: Eclipse OpenJ9: Under the hood of the JVM
 

Ähnlich wie Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]

Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]David Buck
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]David Buck
 
Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018CodeOps Technologies LLP
 
Java and Serverless - A Match Made In Heaven, Part 1
Java and Serverless - A Match Made In Heaven, Part 1Java and Serverless - A Match Made In Heaven, Part 1
Java and Serverless - A Match Made In Heaven, Part 1Curity
 
Java Day Tokyo 2016 feedback at Kumamoto
Java Day Tokyo 2016 feedback at KumamotoJava Day Tokyo 2016 feedback at Kumamoto
Java Day Tokyo 2016 feedback at KumamotoTakashi Ito
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureJavaDayUA
 
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]David Buck
 
Diagnose Your Microservices
Diagnose Your MicroservicesDiagnose Your Microservices
Diagnose Your MicroservicesMarcus Hirt
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsDavid Delabassee
 
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěJaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěDevelcz
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsDavid Delabassee
 
Japanese Introduction to Oracle JET
Japanese Introduction to Oracle JETJapanese Introduction to Oracle JET
Japanese Introduction to Oracle JETGeertjan Wielenga
 
What's new in the Java API for JSON Binding
What's new in the Java API for JSON BindingWhat's new in the Java API for JSON Binding
What's new in the Java API for JSON BindingDmitry Kornilov
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Shaun Smith
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9Deepu Xavier
 
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...Bart Jonkers
 

Ähnlich wie Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503] (20)

Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
 
Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018
 
Hotspot & AOT
Hotspot & AOTHotspot & AOT
Hotspot & AOT
 
Java and Serverless - A Match Made In Heaven, Part 1
Java and Serverless - A Match Made In Heaven, Part 1Java and Serverless - A Match Made In Heaven, Part 1
Java and Serverless - A Match Made In Heaven, Part 1
 
Java Day Tokyo 2016 feedback at Kumamoto
Java Day Tokyo 2016 feedback at KumamotoJava Day Tokyo 2016 feedback at Kumamoto
Java Day Tokyo 2016 feedback at Kumamoto
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and Architecture
 
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
 
Diagnose Your Microservices
Diagnose Your MicroservicesDiagnose Your Microservices
Diagnose Your Microservices
 
Java 101
Java 101Java 101
Java 101
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
 
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěJaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Japanese Introduction to Oracle JET
Japanese Introduction to Oracle JETJapanese Introduction to Oracle JET
Japanese Introduction to Oracle JET
 
What's new in the Java API for JSON Binding
What's new in the Java API for JSON BindingWhat's new in the Java API for JSON Binding
What's new in the Java API for JSON Binding
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9
 
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
 

Mehr von David Buck

JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]David Buck
 
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...David Buck
 
Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]David Buck
 
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...David Buck
 
invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]David Buck
 
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...David Buck
 
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]David Buck
 
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]David Buck
 
Z Garbage Collector
Z Garbage CollectorZ Garbage Collector
Z Garbage CollectorDavid Buck
 
Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019David Buck
 
Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018David Buck
 
JDK 10 へようこそ
JDK 10 へようこそJDK 10 へようこそ
JDK 10 へようこそDavid Buck
 
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]David Buck
 
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]David Buck
 
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]David Buck
 
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]David Buck
 
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]David Buck
 
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]David Buck
 
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584] Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584] David Buck
 
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...David Buck
 

Mehr von David Buck (20)

JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
 
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
 
Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]
 
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
 
invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]
 
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
 
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
 
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
 
Z Garbage Collector
Z Garbage CollectorZ Garbage Collector
Z Garbage Collector
 
Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019
 
Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018
 
JDK 10 へようこそ
JDK 10 へようこそJDK 10 へようこそ
JDK 10 へようこそ
 
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
 
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
 
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
 
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
 
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
 
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
 
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584] Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
 
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
 

Kürzlich hochgeladen

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Kürzlich hochgeladen (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]

  • 1.
  • 2.
  • 3. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Debuggers A Peek Under the Hood David Buck Principal Member of Technical Staff Java SE Sustaining Engineering September, 2016
  • 4. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 4
  • 5. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | About Me David Buck • Java SE Sustaining Engineering • Mostly JRockit fixes • OpenJDK 8 Updates Project Maintainer • Hobbies: Programming 5
  • 6. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Program Agenda Introduction Java Platform Debug Architecture Java Debug Wire Protocol JVM Tool Interface Wrap-up 1 2 3 4 5 6
  • 7. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Introduction 7
  • 8. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | The Elephant in the Room 8
  • 9. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • 2 JavaOne Debugger “under the hood talks” this year 9 The Elephant in the Room By Peter H. Wrege (Own work) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0) or GFDL (http://www.gnu.org/copyleft/fdl.html)], via Wikimedia Commons
  • 10. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • 2 JavaOne Debugger “under the hood talks” this year • Martin’s talk is really good! 10 The Elephant in the Room By Peter H. Wrege (Own work) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0) or GFDL (http://www.gnu.org/copyleft/fdl.html)], via Wikimedia Commons
  • 11. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 11 Buck’s Talk Martin’s talk
  • 12. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 12 JVM TI JDWP JDI
  • 13. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 13 JVM TI JDWP JDI
  • 14. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • Both talks needed for full picture • Video and slides from a past version of Martin’s talk are available online • No particular order to the content 14 JDI AKA Martin’s Talk
  • 15. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 15 JDI JVM TI JDWP
  • 16. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 16 JDI? JVM TI? JDWP?
  • 17. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 17 JDI? JVM TI? JDWP? Java Platform Debugger Architecture
  • 18. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 18
  • 19. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture • Facilitate writing a debugger in Java • Impact Debuggee application as little as possible • Allow native-level / in-process tooling 19
  • 20. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Heisenbugs Bug Heisenberg Heisenbug picture: Bundesarchiv, Bild 183-R57262 / Unknown / CC-BY-SA 3.0 [CC BY-SA 3.0 de (http://creativecommons.org/licenses/by-sa/3.0/de/deed.en)]
  • 21. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Observer Effect picture: Christian Schirm (Own work) [CC0]
  • 22. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • Debugging, at the same level of abstraction (Java), in the same process, will cause problems – Stop-the-world – debugger heap overhead 22 Strange Loop Problems Picture By Maurizio Codogno, it:Utente:.mau. (Own work) [GFDL (http://www.gnu.org/copyleft/fdl.html), CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/) or CC BY 2.5 (http://creativecommons.org/licenses/by/2.5)], via Wikimedia Commons
  • 23. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture • Facilitate writing a debugger in Java – Java API • Impact Debuggee application as little as possible – Out-of-process debugger • Allow native-level / in-process tooling – Native in-process debugger 23
  • 24. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 24 Java vs. Native
  • 25. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 25 In-process vs. Out-of-process
  • 26. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 26 Why not both?
  • 27. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 27 By Libertinus (http://www.flickr.com/photos/libertinus/5807760586) [CC BY-SA 2.0 (http://creativecommons.org/licenses/by-sa/2.0)], via Wikimedia Commons
  • 28. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 28 Target JVM Debugger JVM Events JDI Debugger Target Application (Debuggee) JVM TI Agent JDWP
  • 29. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture • Since Java 1.3 • Modular design • 3 components – JVM Tool Interface – Java Debug Wire Protocol – Java Debug Interface 29
  • 30. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 30 Target JVM Debugger JVM JDI Debugger Target Application (Debuggee) JVM TI Agent JDWP Commands Events
  • 31. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 31 Target JVM Debugger JVM JDI Debugger Target Application (Debuggee) JVM DI Agent JDWP Commands Events
  • 32. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 32 Target JVM Native Debugger Tool Target Application (Debuggee) JVM TI Agent JDWP Commands Events
  • 33. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 33 Target JVM Debugger JVM JDI Debugger Target Application (Debuggee) JVM TI Agent JDWP Commands Events
  • 34. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 34 Target JVM Target Application (Debuggee) JVM TI Agent
  • 35. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 35 Target JVM Debugger JVM JDI Debugger Target Application (Debuggee) JVM TI Agent JDWP Commands Events
  • 36. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 36 Target JVM Debugger JVM JDI JShell Target Application (Debuggee) JVM TI Agent JDWP Commands Events
  • 37. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Debug Interface (JDI) • Reference implementation lives in – tools.jar (JDK 6/7/8) – jdk.jdi module (JDK 9) • Pure Java implementation • “speaks” JDWP on behalf of Java client code 37
  • 38. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Debug Wire Protocol 38
  • 39. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Debug Wire Protocol (JDWP) • Binary protocol between target JVM and debugger processes • Does not specify transport • Asynchronous • Tailored to JDI 39
  • 40. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Debug Wire Protocol 40 Target JVM Debugger JVM JDI Debugger Target Application (Debuggee) JVM TI Agent JDWP Commands Events
  • 41. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Debug Wire Protocol 41 Target JVM Debugger Target Application (Debuggee) JDWP Commands Events
  • 42. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Handshake 42 Target JVM Debugger Target Application (Debuggee)
  • 43. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Handshake 43 Target JVM Debugger Target Application (Debuggee) JDWP- Handshake
  • 44. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Handshake 44 Target JVM Debugger Target Application (Debuggee) JDWP- Handshake
  • 45. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Java Debug Wire Protocol 45 Target JVM Debugger Target Application (Debuggee)
  • 46. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Debug Wire Protocol • All Packets have 11 byte header • Some packets have data – Optional – Variable length 46 Header Data
  • 47. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • Command • Reply 47 JDWP Packets Length ID Flags Command set Command Data (optional, variable length) Length ID Flags Error Code Data (optional, variable length)
  • 48. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Header Fields • length (4 bytes) • id (4 bytes) • flags (1 byte) • command set (1 byte) • command (1 byte) • error code (2 bytes) 48
  • 49. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Length Field • 32-bit value • Size of entire packet in bytes (including header) • Up to a 4GB packet size! 49
  • 50. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP ID Field • 32-bit value • Only used to match command and reply packets • Each “direction” (debugger <-> target) has it’s own ID-space • Over 4 billion in flight packets per direction 50
  • 51. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Flags Field • 8-bit value (but only one bit currently used) • Only used to distinguish between Command / Reply packets – 0x80 == Reply Packet – 0x00 == Command Packet • Additional flags may be added in the future 51
  • 52. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Command Fields • Only in command packets • Command Set Field – 8 bit – Each set corresponds to a JDI class • 0 - 63 debugger -> target VM • 64 - 127 target VM -> debugger • 128 - 256 Vendor-defined • Command Field – 8 bit – Each command corresponds to a JDI method 52
  • 53. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Error Code Field • 16 bit value • Only in reply packets 53
  • 54. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Data • Variable size • Optional • Examples: – Requested field ID (command) – Requested field vale (reply) 54
  • 55. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JDWP Commands 55
  • 56. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | What about transport?! • In practice, this somewhat couples debugger / debuggee • Socket transport – All Oracle JDK supported platforms – Supports remote debugging – JVM TI agent currently only support IPv4 • Shared memory transport – Only on Windows • Service provider interface available for implementing your own transport / connectors 56
  • 57. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Security Implications of JDWP • Zero Authentication • JDWP access == Remote Code Execution • As of yesterday www.shodan.io reports two IP sending JDWP handshake • Many more are passively waiting for incoming connections 57
  • 58. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JVM Tool Interface 58
  • 59. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • JVM Debug Interface (JVM DI) • JDK 1.1 ~ JDK 1.5 JVM Profiler Interface (JVM PI) • JDK 1.1 ~ JDK 1.5 • Never officially supported • Stability issues (esp. with HS) • Hard to use with JNI • Very invasive – Not all GC supported – Performance impact 59 A Tail of Two APIs
  • 60. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • JVM Debug Interface (JVM DI) • JDK 1.1 ~ JDK 1.5 JVM Profiler Interface (JVM PI) • JDK 1.1 ~ JDK 1.5 • Never officially supported • Stability issues (esp. with HS) • Hard to use with JNI • Very invasive – Not all GC supported – Performance impact 60 A Tail of Two APIs
  • 61. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JVM Tool Interface (JVM TI) • Introduced in JDK 5 • Replaced – JVM PI (Removed in JDK 6) – JVM DI (Removed in JDK 6) • Many use cases outside of JPDA • Fully supported • Pay-as-you-go performance impact • Based on JNI 61
  • 62. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JVM TI Agents • Native code that runs in JVM’s address space • Multiple concurrent agents supported • Can be – Statically linked into JVM – Loaded at startup – Loaded during runtime • Can take command line arguments -agentlib:<agent_lib_name>=<name1>[=<value1>],<name2>[=<value2>]... 62
  • 63. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Native Agent • JVM TI • Command line options: – agentlib – agentpath Java Agent • java.lang.instrument • Comand line option: – javaagent 63 A note about “agents”
  • 64. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Native Agent • JVM TI • Command line options: – agentlib – agentpath Java Agent • java.lang.instrument • Comand line option: – javaagent 64 A note about “agents”
  • 65. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 65 Target JVM Debugger JVM JDI Debugger Target Application (Debuggee) JVM TI Agent JDWP Commands Events
  • 66. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Platform Debugger Architecture 66 Target JVM Debugger JVM JDI Debugger Target Application (Debuggee) JVM TI Agent JDWP Commands Events libjdwp.so jdwp.dll libjdwp.dylib
  • 67. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JVM TI based on Java Native Interface • JVM TI Callbacks have JNI environment pointer • Very hard to make a useful JVM TI agent without JNI calls • JNI data types used (e.g. jint, jdouble) • Same “modified UTF-8” for strings • Not simply an extension of JNI, many important differences 67
  • 68. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Native Interface 68
  • 69. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Native Interface jdouble Java_pkg_Cls_f__ILjava_lang_String_2 (JNIEnv *env, jobject obj, jint i, jstring s) { const char *str = (*env)->GetStringUTFChars(env, s, 0); ... (*env)->ReleaseStringUTFChars(env, s, str); return ... } 69
  • 70. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Java Native Interface jdouble Java_pkg_Cls_f__ILjava_lang_String_2 (JNIEnv *env, jobject obj, jint i, jstring s) { const char *str = (*env)->GetStringUTFChars(env, s, 0); ... (*env)->ReleaseStringUTFChars(env, s, str); return ... } 70
  • 71. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JVM TI Environment • event callbacks • enabled events • enabled capabilities • memory allocation/deallocation hooks 71
  • 72. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JVM TI Created dynamically and works across threads JNI One environment per thread 72 JVM TI Environment vs. JNI Environment
  • 73. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Capabilities • Flags that represent JVM TI functionality • Allows “negotiation” between agent and JVM – Lets agent tell JVM what it needs – Lets JVM tell agent what it supports 73 Picture: David Monniaux / Mai-Linh Doan (GFDL / cc-by-sa-2.0-fr)
  • 74. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • Only “pay” for the features you want / use • Can be set dynamically – Some can only be enabled before startup • 2 levels of cost – Enabling – Using 74 Capabilities Picture: David Monniaux / Mai-Linh Doan (GFDL / cc-by-sa-2.0-fr)
  • 75. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Bytecode Insertion (BCI) • Many JVM PI use-cases replaced by BCI in JVM TI • Instrumentation at the bytecode level is automatically compatible with all JVM technologies. – Allows instrumented code to be JIT-compiled – Use any GC collector 75
  • 76. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JVM TI Agent Lifecycle • Initialize – Agent_OnLoad() – Agent_OnAttach() • Probe / request capabilities • Set callback functions • Enable events • Process events via callbacks • Shutdown on Agent_OnUnload() 76
  • 77. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | JVM TI Example • Agent_OnLoad() – Setup global data for agent’s private use – Probe/request capabilities – Modify JRE environment – Set callback functions – Enable few events, including VMInit • VMInit callback – Enable rest of events • Process events via callbacks • Cleanup on Agent_OnUnload() 77
  • 78. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Peaking under the hood of JVM TI: 78 -XX:TraceJVMTI
  • 79. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Peaking under the hood of JVM TI: 79 -XX:TraceJVMTI XX:TraceJVMTI= desc {, desc } ...
  • 80. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Peaking under the hood of JVM TI: 80 -XX:TraceJVMTI XX:TraceJVMTI= desc {, desc } ... domain action kind
  • 81. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Peaking under the hood of JVM TI: 81 -XX:TraceJVMTI XX:TraceJVMTI= desc {, desc } ... domain action kind name a particular function or event name all all functions and events func all major functions allfunc all functions event all events ec event controller
  • 82. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Peaking under the hood of JVM TI: 82 -XX:TraceJVMTI XX:TraceJVMTI= desc {, desc } ... domain action kind + add - remove
  • 83. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Peaking under the hood of JVM TI: 83 -XX:TraceJVMTI XX:TraceJVMTI= desc {, desc } ... domain action kind i input parameters e error returns o output t event triggered (posted) s event sent
  • 84. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Full Speed Debugging 84
  • 85. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Full Speed Debugging 85 • 1.4.0 with client (c1) JIT compiler • 1.4.1 with both client (c1) and server (c2) JIT compilers
  • 86. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Full Speed Debugging 86 O RLY? By pe_ha45 - originally posted to Flickr as Snowy Owl - Schnee-Eule, CC BY 2.0, https://commons.wikimedia.org/w/index.php?curid=11400326
  • 87. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Full Speed Debugging Depends on your definition of “Full Speed”… Pre-1.4: -Xdebug == -Xint 87 By Charles Homler - Own work, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=29896748
  • 88. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Required can_access_local_variables can_generate_single_step_events can_generate_exception_events can_generate_frame_pop_events can_generate_breakpoint_events can_suspend can_generate_method_entry_events can_generate_method_exit_events can_generate_garbage_collection_events can_maintain_original_method_order can_generate_monitor_events can_tag_objects can_get_source_debug_extension can_get_source_file_name can_get_line_numbers Optional can_force_early_return can_force_early_return can_generate_field_modification_events can_generate_field_access_events can_get_bytecodes can_get_synthetic_attribute can_get_owned_monitor_info can_get_current_contended_monitor can_get_monitor_info can_pop_frame can_redefine_classes can_redefine_any_class can_get_owned_monitor_stack_depth_info can_get_constant_pool can_signal_thread 88 Capabilities Used by JDWP Agent
  • 89. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Full Speed Debugging • Only methods with breakpoints are required to be interpreted • But JVM TI capabilities used by jdwp agent do have a cost 89
  • 90. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Full Speed Debugging • Only methods with breakpoints are required to be interpreted • But JVM TI capabilities used by jdwp agent do have a cost • Usually not a noticeable impact, but YMMV. There is no free lunch. 90
  • 91. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Wrap-up 91
  • 92. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Takeaways • These APIs are – Stable – Officially supported – Very flexible • There are limitless new tools you can write and still a lot of room for new ideas • Not simply for debugging 92
  • 93. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Resources [ Martin Skarsaune’s JDI talk ] video: https://www.youtube.com/watch?v=lNR4bEzYaH4 slides: https://prezi.com/ahspfg2wdkwt/jvm-debugging-under-the-hood-jdays/ [ JDWP Connection and Invocation Details ] https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/conninv.html [ JDWP Specification ] https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/jdwp-spec.html [ JVM TI Specification ] https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html [ Kelly O'Hair's Weblog ] Use the search tool to find posts about “jvmti” https://blogs.oracle.com/kto/ 93
  • 94. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 94 Thank You!
  • 95. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 95
  • 96. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 96