Instrumenting code to collect profiling information can canse substantial execution overhead. This overhead makes instrumentation difficult to perform at runt/me, often preventing many known o]fiine feedback-directed optimizations from being used in online systems. This paper presents a general framework for performing instrumentation sampling to reduce the overhead of previously expensive instrumentation. The framework is simple and effective, using codeduplication and counter-based sampling to allow switching between instrumented and non-instrumented code.Our framework does not rely on any hardware or operating system support, yet provides a high frequency sample rate that is tunable, allowing the tradeoff between overhead and accuracy to be adjusted easily at runt/me. Experimental results are presented to validate that our technique can collect accurate profiles (93-98% overlap with a perfect profile) with low overhead (averaging ,-,6% total overhead with a naive implementation). A Jalapefio-specific optimization is also presented that reduces overhead further, resulting in an average total overhead of ~3%.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.