Presentation is loading. Please wait.

Presentation is loading. Please wait.

SSCLI workshop, Redmond 19 September 2005 Richard Jones, Hanspeter Johner, Marion Sébastien University of Kent GCspy.

Similar presentations


Presentation on theme: "SSCLI workshop, Redmond 19 September 2005 Richard Jones, Hanspeter Johner, Marion Sébastien University of Kent GCspy."— Presentation transcript:

1 SSCLI workshop, Redmond 19 September 2005 Richard Jones, Hanspeter Johner, Marion Sébastien University of Kent R.E.Jones@kent.ac.uk sm244@kent.ac.uk GCspy for Rotor

2 SSCLI workshop, Redmond 19 September 2005 2 GCspy Heap Visualisation Framework 1.Motivation & requirements 2.Abstractions & Architecture 3.Benefits 4.Rotor implementation 5.New views 6.Conclusion Developed by Richard Jones and Tony Printezis

3 SSCLI workshop, Redmond 19 September 2005 3 Motivation GCs have (almost) chaotic behaviour! Visualisation allows concise insight into GCs behaviour profiling / debugging Avoid collecting / analysing very large traces a picture is worth a thousand awk invocations! T.Printezis

4 SSCLI workshop, Redmond 19 September 2005 4 Requirements 1.Portability 2.Adaptability 3.Extensibility 4.Scalability 5.Responsiveness

5 SSCLI workshop, Redmond 19 September 2005 5 Abstractions Event e.g. start mark phase StreamAttribute e.g. used space TileBlock e.g. memory block SpaceComponent e.g. generation VisualiserGC

6 SSCLI workshop, Redmond 19 September 2005 MSR Rotor Presentation Day 6 Architecture GC/VM dependent GCspy generic Virtual Machine Application Socket Communications Event filters Used Roots Objects Cards Marked Copy DriverMS Driver Server-Interpreter Copy GCMS GC Data collectionInit Visualiser Communications Event filters Control Stream 0 Stream 1 Space 0Space 1 Client-Interpreter Space Renderer 0 Space Renderer 1 Control Stream 0 Stream 1 Stream 2

7 SSCLI workshop, Redmond 19 September 2005 7 GCspy Tile Information 8 Streams Magnifier 6 Spaces History view of the Mature M-S space Histogram view of the Mature spaces free-lists Appel-style Nursery space - separators show history View selectors Event

8 SSCLI workshop, Redmond 19 September 2005 CLR Profiler Available since 2003 for the.NET platform Strengths: Intended for the application developer Detailed exploration of the applications memory behaviour Different views Weaknesses: Slows down programs execution from 10 to 100 times Huge log file (can consume gigabytes of space) Needs the application to be compiled in debug mode Not portable (only for.NET on windows)

9 SSCLI workshop, Redmond 19 September 2005 9 GCspy Benefits Loosely coupled to VM rapid development of visualisation of new algorithms. Visualise a variety of data structures (card-tables, free-lists, trains…). Variety of dynamic views. Connect/disconnect to running VMs on the fly. No overhead outside data gathering periods. Designed for very large heaps. Small trace files (can store and replay).

10 SSCLI workshop, Redmond 19 September 2005 Rotor Server RMTk (MMTk for Rotor): What is MMTk (Memory Management Toolkit)? –Extensible and portable framework –Permits efficient and reliable build of Garbage Collectors –Originally developed for JVMs What is RMTk –Port of MMtk to Rotor by Andrew Gray –Relies on GCJ (Java compiler developed by the GCC team)

11 SSCLI workshop, Redmond 19 September 2005 Why RMTk? Wider range of GCs Easy and efficient implementation of new GCs Currently implemented: –Mark-Sweep –Semispace Copying –Generational Copying (copy both generations) –Generational Mark-Sweep (copy young gen, M-S old gen)

12 SSCLI workshop, Redmond 19 September 2005 Technical details Rotor's implementation: –Use of different GCs –Requires one build per GC Builds: –With GCspy support or not –With MMTk optimizations turned on or not –One RMTk library per collector: – Contains the GCspy drivers specific to that collector – Adds wrappers to handle communication between RMTk and GCspy –Only one GCspy server library

13 SSCLI workshop, Redmond 19 September 2005 13 MMTk's integration Application Communications Event filters Server-Interpreter Rotor Virtual Machine Copy GCMS GC Used Roots Objects Cards Marked Copy DriverMS Driver Init Data collection MMTk GC 0 MMTk GC 1 Used Roots Copy DriverMS Driver Init Objects Cards Marked GCspy abstractions allow easy replacement of data gathering mechanisms, collectors and VMs. other methods possible GCspy synchronous

14 SSCLI workshop, Redmond 19 September 2005 Components interaction GCSpy ServerClient RMTk mmtk mmtktransform jmtkbuild gcjmmtk RMTk library gcspyglue Rotor (Modified) SSCLI VM libgcspy.so : a is used and modified by b a b Legend: : a generates b a b : a composes b a b : a interacts with b a b

15 SSCLI workshop, Redmond 19 September 2005 Components instrumented A variety of different data structures have been instrumented Copy spaces (contiguous allocation) Mark-Sweep spaces Remembered sets Segregated free-lists

16 SSCLI workshop, Redmond 19 September 2005 GCspy client New plugin view mechanism: –Easy development and incorporation of new views –History is now just another plugin Writing a new plugin view: –Extend PluginListener (trivial 9 lines of code) –Extend PluginFrame (depends on complexity of the view) –Save as a jar file in the plugins directory Plugin manager: –Discovers available plugins –Maintains a list of activated plugins –Menu to choose the views to enable

17 SSCLI workshop, Redmond 19 September 2005 Benchmarks We need better benchmarks! Synthetic programs OK as stress tests Real programs for real understanding Documented Open source Existing benchmarks Zorn Krintz

18 SSCLI workshop, Redmond 19 September 2005 Methodology 1) RMTk without GCspy 2) RMTk + GCspy compiled in, GCspy client not connected 3) RMTk + GCspy compiled in, GCspy client connected Object-level data acquisition Performance overhead GCspy client connected: –8.47% average –36.1% worst case GCspy client disconnected: –Less than 2.5% average Caveat: –Rotor/RMTk is significantly slower than native Rotor.

19 SSCLI workshop, Redmond 19 September 2005 Performance

20 SSCLI workshop, Redmond 19 September 2005 20 Conclusion 1.GCspy incorporated into Rotor through RMTk. 2.Several GCs available, all instrumented for GCspy. 3.New GCspy views. 4.Good performance. 5.Documentation: Server API, GCspy client. 6.Need interesting, open source benchmarks

21 SSCLI workshop, Redmond 19 September 2005 Demo Play traceLaunch gcspy

22 SSCLI workshop, Redmond 19 September 2005 Questions?


Download ppt "SSCLI workshop, Redmond 19 September 2005 Richard Jones, Hanspeter Johner, Marion Sébastien University of Kent GCspy."

Similar presentations


Ads by Google