Performance bugs cannot be easily debugged in the same way correctness bugs are debugged. They are debugged mostly by analyzing execution profiles which is slow, tedious, and heavily involved. As a result, even for a mature program, performance bugs often slip into production systems. This paper presents a hardware based approach, called Prometheus, that detects loop related performance bugs during production runs with negligible overhead. Prometheus works by detecting redundant memory read accesses in loop iterations. If many loop iterations access the same set of memory locations and the same set of values, then Prometheus reports a performance bug. Prometheus detects the redundant accesses in hardware using bloom filter based signatures. Prometheus is automatic and does not require a programmer to analyze large execution profiles. Moreover, Prometheus is parameterized to achieve different levels of accuracy and detection ability. Prometheus is the first hardware based scheme for automatically detecting performance bugs related to redundant accesses. This paper presents a detailed design and implementation of Prometheus hardware. Prometheus is evaluated on a variety of real world performance bugs. It detects 8 out of 10 performance bugs. Once the bugs are fixed, Prometheus does not falsely detect any bug except in one case. It has a negligible execution overhead of 1.87%. Last but not the least, Prometheus requires only (≈) Kbyte of extra hardware structures.
['Abdullah Muzahid']
Hardware support for production run diagnosis of performance bugs