PMaC Binary Instrumentation Library for PowerPC/AIX

The decommissioning of Alpha AXP-based systems carrying the ATOM toolkit has left the need for an efficient, flexible binary instrumentation tool-building framework for another platform. PMaCinst is a binary instrumentation toolkit that operates on XCOFF binaries on AIX for PowerPC processors. PMaCinst has a C++ API that provides the means to inject code and data into a binary file In this paper, we first present the mechanisms for performing these modifications along with the key parts of the API. We then present three example rewriting tools that have been built using PMaCinst, which help to highlight some of the correctness and efficiency issues that can be encountered by tool writers. Finally, we show that programs instrumented with PMaCinst slow down at rates that are comparable to equivalently instrumented programs created with ATOM.