JThreadSpy: teaching multithreading programming by analyzing execution traces

G. Malnati, Caterina Maria Cuva, Claudia Barberis
{"title":"JThreadSpy: teaching multithreading programming by analyzing execution traces","authors":"G. Malnati, Caterina Maria Cuva, Claudia Barberis","doi":"10.1145/1273647.1273650","DOIUrl":null,"url":null,"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.\n 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.\n 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.\n 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.","PeriodicalId":291507,"journal":{"name":"Parallel and Distributed Systems: Testing, Analysis, and Debugging","volume":"31 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2007-07-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"18","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Parallel and Distributed Systems: Testing, Analysis, and Debugging","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1273647.1273650","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 18

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.
JThreadSpy:通过分析执行轨迹来教授多线程编程
多线程引入了一定程度的复杂性,初学者通常很难掌握,这是因为对调度过程做出了许多错误的假设,而且由于线程执行的内在不确定性,不可能采用旨在弄清楚执行过程中究竟发生了什么的试错策略。本文描述了JThreadSpy,这是一个用于动态插装Java程序的工具,旨在注册每个线程的执行跟踪,并以可选择的详细程度显示它们。JThreadSpy依靠ASM框架在类加载期间动态地检测方法,以便插入合适的方法调用,这些方法调用产生执行跟踪,该跟踪稍后用于显示带注释的UML序列图,突出显示不同的线程和同步构造。事实证明,JThreadSpy对于参加都灵理工大学面向对象编程课程的学生来说是一个很有价值的工具。通过图形化地分析执行流,学生可以更容易地理解调度器引入的不确定性、同步结构的影响、多核处理器架构的影响,以及识别并发程序的临界区、死锁和其他异常。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书