how to save ouput of perf (Linux tool) to a file? how to save ouput of perf (Linux tool) to a file? unix unix

how to save ouput of perf (Linux tool) to a file?


strace shows that perf writes to file descriptor 0, so this should work:

perf stat -B dd if=/dev/zero of=/dev/null count=1000000 0> result1