This paper presents FIT, a Flexible open-source binary code Instrumentation Toolkit. Unlike existing tools, FIT is truly portable, with existing backends for the Alpha, x86 and ARM architectures and the Tru64Unix, Linux and ARM Firmware execution environments. This paper focuses on some of the problems that needed to be addressed for providing this degree of portability. It also discusses the trade-off between instrumentation precision and low overhead. Categories and Subject Descriptors C.4 [Computer Systems Organization]: Performance of Systems—Measurement techniques; D.2.5 [Software Engineering]: Testing and Debugging—tracing;diagnostics; D.3.4 [Programming Languages]: Processors—code generation;compilers General Terms Experimentation, Performance Keywords nce, code abstraction, code compaction