perf stat: Introduce print_shadow_stats function