Building a Java Tracer Rahul Revo
Sequence <ul><ul><li>Java Bytecode </li></ul></ul><ul><ul><li>JNI + JVMTI </li></ul></ul><ul><ul><li>ASM </li></ul></ul><u...
Java Bytecode <ul><ul><li>What's Bytecode </li></ul></ul><ul><ul><li>Class Format </li></ul></ul><ul><ul><li>Opcode + Argu...
JNI + JVMTI <ul><ul><li>Java + C => JNI </li></ul></ul><ul><ul><li>javah, gcc => libFoo.so </li></ul></ul><ul><ul><li>JVM ...
ASM <ul><ul><li>Model for the Class File format </li></ul></ul><ul><ul><li>Bytecode analysis </li></ul></ul><ul><ul><li>By...
JVMTI meets ASM <ul><ul><li>ClassFileLoadHook </li></ul></ul><ul><ul><li>Method In and Out trace </li></ul></ul>
Demo <ul><ul><li>Trace &quot;Hello, World&quot; </li></ul></ul>
What's Next <ul><ul><li>Better visualization </li></ul></ul><ul><ul><li>VS Historical debugger </li></ul></ul><ul><ul><li>...
Questions
Upcoming SlideShare
Loading in...5
×

Building a java tracer

889

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
889
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Building a java tracer"

  1. 1. Building a Java Tracer Rahul Revo
  2. 2. Sequence <ul><ul><li>Java Bytecode </li></ul></ul><ul><ul><li>JNI + JVMTI </li></ul></ul><ul><ul><li>ASM </li></ul></ul><ul><ul><li>Demo </li></ul></ul><ul><ul><li>What's Next </li></ul></ul><ul><ul><li>Questions </li></ul></ul>
  3. 3. Java Bytecode <ul><ul><li>What's Bytecode </li></ul></ul><ul><ul><li>Class Format </li></ul></ul><ul><ul><li>Opcode + Argument(s) => Instruction </li></ul></ul><ul><ul><li>Stack based generic VM => Thread, stack, frames </li></ul></ul><ul><ul><li>Tools: hexdump, javap, Bytecode Outline </li></ul></ul>
  4. 4. JNI + JVMTI <ul><ul><li>Java + C => JNI </li></ul></ul><ul><ul><li>javah, gcc => libFoo.so </li></ul></ul><ul><ul><li>JVM Tool Interface </li></ul></ul><ul><ul><li>-agentpath -javaagent </li></ul></ul><ul><ul><li>Events - ExceptionCatch, Thread start, Field Modification </li></ul></ul><ul><ul><li>Functions - Thread, Heap, Timer </li></ul></ul>
  5. 5. ASM <ul><ul><li>Model for the Class File format </li></ul></ul><ul><ul><li>Bytecode analysis </li></ul></ul><ul><ul><li>Bytecode manipulation </li></ul></ul>
  6. 6. JVMTI meets ASM <ul><ul><li>ClassFileLoadHook </li></ul></ul><ul><ul><li>Method In and Out trace </li></ul></ul>
  7. 7. Demo <ul><ul><li>Trace &quot;Hello, World&quot; </li></ul></ul>
  8. 8. What's Next <ul><ul><li>Better visualization </li></ul></ul><ul><ul><li>VS Historical debugger </li></ul></ul><ul><ul><li>Omniscient debugger </li></ul></ul>
  9. 9. Questions

×