Compacting code so that annotate won't be too long in perf report