MethodProxies: A Safe and Fast Message-Passing Control Library - INRIA Chile
Communication Dans Un Congrès Année : 2024

MethodProxies: A Safe and Fast Message-Passing Control Library

Résumé

The injection of monitoring code allows for real-time observation of the program, which has proven instrumental in developing tools that assist developers with various programming tasks. In dynamic languages such as Pharo, renowned for their rich meta-programming capabilities and dynamic method dispatch, such monitoring capabilities are particularly valuable. Message-passing control techniques are commonly used to monitor program execution at the method level, involving the execution of specific code before and after each method invocation. Implementing message-passing control techniques, however, poses many challenges, notably in terms of instrumentation overhead. Additionally, it is crucial for the message-passing mechanism to be safe: i.e., to accommodate recursive and reflective scenarios to ensure that it does not alter the execution of the monitored program, which could potentially lead to infinite loops or other unintended consequences.

Over the years, numerous techniques have been proposed to optimize message-passing control. This paper introduces MethodProxies, a message-passing instrumentation library that offers minimal overhead and is safe. We conduct a comparison between MethodProxies and two commonly used techniques implemented in the Pharo programming language: method substitution using the run:with:in:hook and source code modification. Our results demonstrate that MethodProxies offers significantly lower overhead compared to the other two techniques and is safe against infinite recursion.

Fichier principal
Vignette du fichier
main.pdf (439.11 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04708729 , version 1 (25-09-2024)

Identifiants

  • HAL Id : hal-04708729 , version 1

Citer

Sebastian Jordan Montaño, Juan Pablo Sandoval Alcocer, Guillermo Polito, Stéphane Ducasse, Pablo Tesone. MethodProxies: A Safe and Fast Message-Passing Control Library. IWST 2024: International Workshop on Smalltalk Technologies, July 8-11, 2024, Lille, France, Jul 2024, Lille, France. ⟨hal-04708729⟩
0 Consultations
0 Téléchargements

Partager

More