Title | ||
---|---|---|
Automatic microbenchmark generation to prevent dead code elimination and constant folding. |
Abstract | ||
---|---|---|
Microbenchmarking evaluates, in isolation, the execution time of small code segments that play a critical role in large applications. The accuracy of a microbenchmark depends on two critical tasks: wrap the code segment into a payload that faithfully recreates the execution conditions of the large application; build a scaffold that runs the payload a large number of times to get a statistical estimate of the execution time. While recent frameworks such as the Java Microbenchmark Harness (JMH) address the scaffold challenge, developers have very limited support to build a correct payload. This work focuses on the automatic generation of payloads, starting from a code segment selected in a large application. Our generative technique prevents two of the most common mistakes made in microbenchmarks: dead code elimination and constant folding. A microbenchmark is such a small program that can be “over-optimized” by the JIT and result in distorted time measures, if not designed carefully. Our technique automatically extracts the segment into a compilable payload and generates additional code to prevent the risks of “over-optimization”. The whole approach is embedded in a tool called AutoJMH, which generates payloads for JMH scaffolds. We validate the capabilities AutoJMH, showing that the tool is able to process a large percentage of segments in real programs. We also show that AutoJMH can match the quality of payloads handwritten by performance experts and outperform those written by professional Java developers without experience in microbenchmarking. |
Year | DOI | Venue |
---|---|---|
2016 | 10.1145/2970276.2970346 | ASE |
Keywords | Field | DocType |
Performace evaluation, microbencharking, text tagging | Dead code elimination,Constant folding,Computer science,Code segment,Software,Java,Code (cryptography),Benchmark (computing),Payload,Embedded system | Conference |
ISSN | ISBN | Citations |
1527-1366 | 978-1-5090-5571-5 | 1 |
PageRank | References | Authors |
0.35 | 16 | 3 |
Name | Order | Citations | PageRank |
---|---|---|---|
Marcelino Rodriguez-Cancio | 1 | 6 | 2.45 |
Benoît Combemale | 2 | 423 | 46.61 |
Benoit Baudry | 3 | 2000 | 118.08 |