1 / 18

Dynamic Event Generation for Runtime Checking Using the JDI

Dynamic Event Generation for Runtime Checking Using the JDI. Introduction. Jassda. Performance. Summary. Dynamic Event Generation for Runtime Checking U sing the JDI. MARK BRÖRKENS OFFIS, GERMANY. Dynamic Event Generation for Runtime Checking Using the JDI. Introduction. Jassda.

kolton
Télécharger la présentation

Dynamic Event Generation for Runtime Checking Using the JDI

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary Dynamic Event Generation for Runtime Checking Using the JDI MARK BRÖRKENS OFFIS, GERMANY

  2. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary • Motivation • Runtime Checking • Architecture • JDI • Modules • Logger • Trace Checker • Bubblesort - • Benchmark • Conclusion • Future Work overview

  3. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary Software systems are getting more complex Formal methods are being researched to prove the correctness of a system Successfully applied to domain specific areas in software engineering Often restricted to experts motivation

  4. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary client supplier • Proposed by Bertrand Meyer for Eiffel • For Java: iContract, jContractor, Runtime Checker of JML, Jass • Code is inserted for checking of assertions • Sequence of method invocations can’t be checked runtime checking: design by contract

  5. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary init stop start destroy Applet • Track the execution of an application • Decide, whether the current trace is correct runtime checking

  6. Logger Trace- Checker modules jassda GUI Broker other core components core JDI Debuggee (1) Debuggee (n) Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary Jassda – Java with Assertions Debugger Architecture

  7. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary • explicit control over a virtual machine's execution • suspend and resume threads • set breakpoints and watchpoints • notification of • method invocation • method termination • exceptions • class loading • vm died • breakpoint reached • variable read/changed • remote access • introspective access to a running virtual machine • loaded classes and their variables, methods • bytecode of methods JDI - Features

  8. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary • For full functionality code has to be compiled with debuginformation • Add generic debug information in class files using the Byte Code Engineering Library (BCEL) • Direct access to return values of methods missing • Write return value into local variable and set breakpoint before method termination Solution Solution JDI – Problems and Solutions

  9. suspend configure basic events get all classes get event types {Applet} {begin, end} analyse class {init, start, ....} listens on event? configure events true resume Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary debuggee broker module Configuraion of Event Generation

  10. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary • Writes sequence of events into a file • The set of events can be customized in an XML-based configuration-file Module: Logger

  11. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary • <?xml version="1.0" encoding="UTF-8"?> • <logger> • <file name="sequence.log"/> • <event> • <template>%method%(%arguments%) = %returnvalue%</template> • </event> • <include> • <eventset class="de.jassda.core.event.GenericSet" • field="class" • argument="de.jassda.examples.*"/> • </include> • <exclude> • <eventset class="de.jassda.core.event.GenericSet" • field="class" • argument=“de.jassda.examples.test.*"/> • </exclude> • </logger> Module: Logger

  12. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary • Check sequence of events against CSP-like specification (CSPjassda) Module: TraceChecker

  13. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary • eventset applet { instanceof="java.applet.Applet" } • eventset init { method="init" } • ..... • applets() { • ||i:[instance] @ • applet.i.init.begin • -> applet.i.init.end • -> appletrun(i)} • appletrun(i) { • ( applet.i.start.begin -> applet.i.start.end • -> applet.i.stop.begin -> applet.i.stop.end -> appletrun(i) • ) [] appletdestroy(i) • } • appletdestroy(inst) { • applet.inst.destroy.begin -> applet.inst.destroy.end -> STOP • } Alphabet: {applet.init.begin, applet.init.end, applet.start.begin, applet.start.end, applet.stop.begin, applet.stop.end, applet.destroy.begin, applet.destroy,end} TraceChecker: CSPjassda

  14. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary Jassda: GUI

  15. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary • Bubblesort • sort 10000 numbers • 2 implementations: • 1 method invocation • 10001 method invocations • Platform • Windows 2000 • Pentium 1.2GHz • jdk1.3 classic • jdk1.3 hotspot • jdk1.4 • Scenarios • standalone • debug-mode enabled • jassda tool attached seconds jdk1.3 classic jdk1.3 hotspot jdk1.4 Performance

  16. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary • Using the JDI is a viable method to trace the execution of (distributed) Java applications • No or little modification on code is necessary • Jassda works fine for limited number of events • The set of events that are generated can be changed during the debug run Conclusion

  17. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary • Improve jassda • performance • usability of GUI • add modules e.g DbC • Improve CSPjassda • Case studies: expressiveness of CSPjassda, scalability and overhead of debug architecture Future Work

  18. Dynamic Event Generation for Runtime Checking Using the JDI Introduction Jassda Performance Summary http://jassda.sourceforge.net

More Related