title: How to calculate return instructions after a period of the program (based on the aspect of computer hardware)
body: <p>I've been working on rop recently. When using perf to count hardware information, I want to measure the number of return instructions executed by a given piece of code. But the perf interface only provides branch instructions.</p>