FerbJmon Tools - Visualizing Thread Access on Java Objects using Lightweight Runtime Monitoring
Learning and teaching parallel programming in Java can sometimes be tedious, because the correct behavior of a parallel program can hardly be debugged. A runtime monitoring can help to gather information on the behavior of a parallel program. As Java Bytecode is executed inside a JVM, a runtime monitoring can be applied with almost no changes to the source code. In this paper, FerbJmon tools for monitoring Java objects at runtime are proposed. FerbJmon tools also include a tool for call graph creation and a tool for visualizing chronological accesses of threads on Java objects in a timeline diagram. A lightweight monitoring is necessary to minimize the influence of the monitoring on the program behavior itself. FerbJmon tools address this issue by selecting only one class for the monitoring at the same time and by a fast logging implementation. A producer/consumer program and a program for cooperative task execution are used to demonstrate the applicability and the performance of the logging. FerbJmon tools can be used to understand and optimize thread synchronization in Java programs.
KeywordsJava Runtime monitoring Parallel computing Distributed computing Education
The development of FerbJmon tools was improved by many contributors, in particular Sascha Hunold, Thomas Reichel, Björn Krellner, Matthias Korch, and Thomas Rauber are named. Thanks for the discussions and notes.
- 1.Javashot Java Dynamic Call Graph. https://code.google.com/p/javashot/. Accessed 31 May 2015
- 2.Javassist Java Bytecode Engineering Toolkit. http://jboss-javassist.github.io/javassist/. Accessed 31 May 2015
- 3.VisualVM. https://visualvm.java.net/. Accessed 31 May 2015
- 4.Brown, R., Shoop, E., Adams, J., Clifton, C., Gardner, M., Haupt, M., Hinsbeeck, P.: Strategies for preparing computer science students for the multicore world. In: Proceedings of the 2010 ITiCSE Working Group Reports, pp. 97–115. ACM (2010)Google Scholar
- 6.Goetz, B., Peierls, T., Bloch, J., Bowbeer, J., Holmes, D., Lea, D.: Java Concurrency in Practice. Addison-Wesley Professional, Reading (2006) Google Scholar
- 7.Grossman, D., Anderson, R.E.: introducing parallelism and concurrency in the data structures course. In: Proceedings of the Technical Symposium on Computer Science Education, pp. 505–510. ACM (2012)Google Scholar
- 8.Leroux, H., Réquilé-Romanczuk, A., Mingins, C.: JACOT: A Tool to dynamically visualise the execution of concurrent Java programs. In: Proceedings of the International Conference on Principles and Practice of Programming in Java, pp. 201–206. Computer Science Press, Inc. (2003)Google Scholar
- 9.Malnati, G., Cuva, C.M., Barberis, C.: JThreadSpy: teaching multithreading programming by analyzing execution traces. In: Proceedings of the Workshop on Parallel and Distributed Systems: Testing and Debugging, pp. 3–13. ACM (2007)Google Scholar
- 10.Mattson, T.G., Sanders, B.A., Massingill, B.L.: Patterns for Parallel Programming. Addison Wesley, Reading (2004) Google Scholar
- 11.Torbert, S., Vishkin, U., Tzur, R., Ellison, D.J.: Is Teaching parallel algorithmic thinking to high school students possible?: one teacher’s experience. In: Proceedings of the Technical Symposium on Computer Science Education, pp. 290–294. ACM (2010)Google Scholar