Different Way of Instrumenting Object.∗

The paper I read also uses a different approach for instrumenting Object.∗. I chose to add a wrapper that logs and forwards, and then to change all calls to Object.∗ to point to Object.∗<Wrapper>.

The advantage of that is that only the bytecode size of the Object class increases. The other classes have to be touched, but it’s just a change in the reference. Unfortunately, it also means that I need to touch Java’s private parts.

Georges, et al chose to leave the Object.∗ methods unchanged and then add the logging calls at every call site. That increases the bytecode size of all classes, but it might be easier to do.

I’ll give it a shot.

Share

About Mathias

Software development engineer. Principal developer of DrJava. Recent Ph.D. graduate from the Department of Computer Science at Rice University.
This entry was posted in Concurrent Unit Testing. Bookmark the permalink.

Leave a Reply