Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 3.99 KB

README.md

File metadata and controls

68 lines (43 loc) · 3.99 KB

CI Status

Polyphemus

Polyphemus is a tool that gives a higher level representation of the object ordinary pointers (OOP) for the Pharo VM. It also proposes a visualization of the memory. Polyphemus can be used on a memory while developing the VM inside the simulator or to explore real images.

Usage

The simplest way to use is to execute the following:

  • using a simulated interpreter MemoryInspector openOn: anInterpreter.
  • using an image(MemoryInspector newFromImage: path) open.

The path should be provided as a string.
A small image is provided by default and its path is accessible through the message send: PharoImageAccessor pathToCandle64Bit..
You can also download the latests minimal & regular Pharo images using the class PharoImageAccessor..

UI Details

The Memory Inspector has 4 tabs: A scripter, a class and methods browser, and the new and the old space objects visualisation.

  • The scripter has direct binding to the memory to execute queries directly inside the presenter as well as allowing to script the two visualization tabs as well.
    It allows for example to write queries on the objects without vizualizing them.
    For example: ReifiedMemory select: [ :anOop | anOop isCompiledMethod ].

Screenshot 2022-08-14 at 14 57 43

  • The class browser allows to browse classes and methods objects similarly to the Calypso browser in Pharo (Method code is currently not implemented, but we are working on it).
    Using the right click on a given method or class allows you to inspect the selected object.

Screenshot 2022-08-14 at 14 59 49

  • The VM uses a new and a old space to work, both working with different allocators and garbage collection. Each space is displayed in its own tab. They also come with a few queries illustrating the possibilities of this visualization (Scale, Scope, Select, Statistics). These are applicable directly on the visualizations tabs.

Screenshot 2022-08-14 at 15 00 13

Note: An image is only the old space.
Therefore, loading an image into Polyphemus will display an empty new space !

Inspector

Clicking on a box opens an inspector on a reification of the oop (based on carolina's inspector).
We do as many guess as possible to provide the user with as many high level information as possible.
Particularly, string interpretation.
Moreover, the object in the inspector can be navigated just like Pharo objects.

Screenshot 2022-08-14 at 14 56 57

Concept

The main idea of Polyphemus is to provide a higher level vision of VMs OOPs.
However, this is meant to be a basis for Pharo tools.
Particularly we are investigating how to investigate memory corruptions and how to recover dead images.
We were able to save a dead image, see the other Ressources section.

Other Ressources

Video submited to the Esug'22 Innovation Technology Awards.
Report of how we used Polyphemus to resurrect a dead image.
Paper accepted at VMIL'22 (preprint)