[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/1273647.1273650acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
Article

JThreadSpy: teaching multithreading programming by analyzing execution traces

Published: 09 July 2007 Publication History

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.

References

[1]
ASM Home page: http://asm.objectweb.org.
[2]
BCEL Byte Code Engineering Library: http://jakarta.apache.org/bcel/manual.html.
[3]
Binder, W. and Hulaas, J. "Flexible and efficient measurement of dynamic bytecode metrics" in Proceedings of the 5th international Conference on Generative Programming and Component Engineering (Portland, Oregon, USA, October 22 - 26, 2006), GPCE '06, ACM Press, New York, pp. 171--180, 2006.
[4]
Gamma, E., Helm, R., Johnson, R., and Vlissides, J. "Design Patterns", Addison Wesley, 1995.
[5]
Java Profiler To Monitor Java Performance with JProbe Profiler from Quest Software: http://www.quest.com/jprobe/performance-home.aspx.
[6]
Leroux, H., Réquilé-Romanczuk, A., and Mingins, C. "JACOT: a tool to dynamically visualise the execution of concurrent Java programs," in Proceedings of the 2nd international Conference on Principles and Practice of Programming in Java. ACM International Conference Proceeding Series, vol. 42. Computer Science Press, pp. 201--206, 2003.
[7]
Lindholm, T. and Yellin, F. "The JavaTM Virtual Machine Specification, Second Edition", Sun Microsystems, Inc., 1999, http://java.sun.com/docs/books/jvms/second_edition/html/VMSpecTOC.doc.html.
[8]
Mehner, K. "JaVis: A UML-Based Visualization and Debugging Environment for Concurrent Java Programs" in Ed. Lecture Notes In Computer Science, vol. 2269. Springer-Verlag, London, pp. 163--175, 2002.
[9]
Oechsle, R. and Schmitt, T. "JAVAVIS: Automatic Program Visualization with Object and Sequence Diagrams Using the Java Debug Interface (JDI)", in Ed. Lecture Notes In Computer Science, vol. 2269, Springer-Verlag, London, pp. 176--190, 2002.
[10]
The Java Tutorials: Deadlocks: http://java.sun.com/docs/books/tutorial/essential/concurrency/deadlock.html.

Cited By

View all
  • (2021)ArchViMP – a Framework for Automatic Extraction of Concurrency-related Software Architectural Properties50th International Conference on Parallel Processing Workshop10.1145/3458744.3473349(1-10)Online publication date: 9-Aug-2021
  • (2020)Enhanced Visualization of Method Invocations by Extending Reverse-engineered Sequence Diagrams2020 Working Conference on Software Visualization (VISSOFT)10.1109/VISSOFT51673.2020.00010(49-60)Online publication date: Sep-2020
  • (2018)Program comprehension through reverse‐engineered sequence diagramsJournal of Software: Evolution and Process10.1002/smr.196530:11Online publication date: 14-Nov-2018
  • Show More Cited By

Index Terms

  1. JThreadSpy: teaching multithreading programming by analyzing execution traces

                Recommendations

                Comments

                Please enable JavaScript to view thecomments powered by Disqus.

                Information & Contributors

                Information

                Published In

                cover image ACM Conferences
                PADTAD '07: Proceedings of the 2007 ACM workshop on Parallel and distributed systems: testing and debugging
                July 2007
                72 pages
                ISBN:9781595937483
                DOI:10.1145/1273647
                Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                Sponsors

                In-Cooperation

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                Published: 09 July 2007

                Permissions

                Request permissions for this article.

                Check for updates

                Author Tags

                1. concurrent programming
                2. education
                3. execution trace analysis
                4. object-oriented
                5. runtime code instrumentation
                6. software visualization

                Qualifiers

                • Article

                Conference

                ISSTA07
                Sponsor:

                Upcoming Conference

                ISSTA '25

                Contributors

                Other Metrics

                Bibliometrics & Citations

                Bibliometrics

                Article Metrics

                • Downloads (Last 12 months)9
                • Downloads (Last 6 weeks)0
                Reflects downloads up to 13 Dec 2024

                Other Metrics

                Citations

                Cited By

                View all
                • (2021)ArchViMP – a Framework for Automatic Extraction of Concurrency-related Software Architectural Properties50th International Conference on Parallel Processing Workshop10.1145/3458744.3473349(1-10)Online publication date: 9-Aug-2021
                • (2020)Enhanced Visualization of Method Invocations by Extending Reverse-engineered Sequence Diagrams2020 Working Conference on Software Visualization (VISSOFT)10.1109/VISSOFT51673.2020.00010(49-60)Online publication date: Sep-2020
                • (2018)Program comprehension through reverse‐engineered sequence diagramsJournal of Software: Evolution and Process10.1002/smr.196530:11Online publication date: 14-Nov-2018
                • (2017)Explaining multi-threaded task scheduling using tangible user interfaces in higher educational contexts2017 IEEE Global Engineering Education Conference (EDUCON)10.1109/EDUCON.2017.7943028(1383-1390)Online publication date: Apr-2017
                • (2015)FerbJmon Tools - Visualizing Thread Access on Java Objects using Lightweight Runtime MonitoringEuro-Par 2015: Parallel Processing Workshops10.1007/978-3-319-27308-2_13(147-159)Online publication date: 18-Dec-2015
                • (2013)Synchrovis: 3D visualization of monitoring traces in the city metaphor for analyzing concurrency2013 First IEEE Working Conference on Software Visualization (VISSOFT)10.1109/VISSOFT.2013.6650520(1-4)Online publication date: Sep-2013
                • (2011)Formal Aspects of Specification and Validation of Dynamic Adaptive System by Analyzing Execution Traces2011 Eighth IEEE International Conference and Workshops on Engineering of Autonomic and Autonomous Systems10.1109/EASe.2011.14(49-58)Online publication date: Apr-2011
                • (2011)Collecting the Inter Component Interactions in Multithreaded EnvironmentAdvances in Computer Science and Information Technology10.1007/978-3-642-17857-3_44(452-461)Online publication date: 2011
                • (2009)Execution Traces: A New Domain That Requires the Creation of a Standard MetamodelAdvances in Software Engineering10.1007/978-3-642-10619-4_31(253-263)Online publication date: 2009
                • (2008)JThreadSpyProceedings of the 2008 International Conference on Computer Science and Software Engineering - Volume 0510.1109/CSSE.2008.11(549-552)Online publication date: 12-Dec-2008

                View Options

                Login options

                View options

                PDF

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader

                Media

                Figures

                Other

                Tables

                Share

                Share

                Share this Publication link

                Share on social media