Multithreading introduces a degree of complexity that is often difficult to grasp by beginners both because of many false assumptions made about the scheduling process and because it is not possible to adopt a trial and error strategy aimed at figuring out what exactly happens during the execution, as a consequence of the intrinsic non determinism of threaded execution. This article describes JThreadSpy, a tool for dynamic instrumentation of Java programs, aimed at registering execution traces of each thread and displaying them with a selectable level of detail. JThreadSpy relies on the ASM framework to dynamically instrument methods during class loading, in order to insert suitable method calls that produce an execution trace that is later used to display an annotated UML sequence diagram, highlighting different threads and synchronization constructs. JThreadSpy proved to be a valuable tool for students engaged in an object-oriented programming course at Politecnico di Torino. By graphically analysing execution flows, students could understand, in an easier way, the non-determinism introduced by the scheduler, the effects of synchronization constructs, the impact of multicore processor architectures, as well as identify critical sections, deadlocks and other anomalies of concurrent programs.

JThreadSpy: Teaching Multithreading Programming by Analyzing Execution Traces / Malnati, Giovanni; Cuva, CATERINA MARIA; Barberis, Claudia. - (2007), pp. 3-13. (Intervento presentato al convegno 2007 ACM workshop on Parallel and distributed systems: testing and debugging tenutosi a London, United Kingdom nel July 9-12, 2007).

JThreadSpy: Teaching Multithreading Programming by Analyzing Execution Traces

MALNATI, GIOVANNI;CUVA, CATERINA MARIA;BARBERIS, CLAUDIA
2007

Abstract

Multithreading introduces a degree of complexity that is often difficult to grasp by beginners both because of many false assumptions made about the scheduling process and because it is not possible to adopt a trial and error strategy aimed at figuring out what exactly happens during the execution, as a consequence of the intrinsic non determinism of threaded execution. This article describes JThreadSpy, a tool for dynamic instrumentation of Java programs, aimed at registering execution traces of each thread and displaying them with a selectable level of detail. JThreadSpy relies on the ASM framework to dynamically instrument methods during class loading, in order to insert suitable method calls that produce an execution trace that is later used to display an annotated UML sequence diagram, highlighting different threads and synchronization constructs. JThreadSpy proved to be a valuable tool for students engaged in an object-oriented programming course at Politecnico di Torino. By graphically analysing execution flows, students could understand, in an easier way, the non-determinism introduced by the scheduler, the effects of synchronization constructs, the impact of multicore processor architectures, as well as identify critical sections, deadlocks and other anomalies of concurrent programs.
2007
9781595937483
File in questo prodotto:
Non ci sono file associati a questo prodotto.
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11583/1628422
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo