pmc-cloud-tools
pmc-cloud-tools copied to clipboard
remove 2>&1 from perf stat to display errors
Redirecting stderr to stdout causes perf errors to be redirected to awk as normal stdin input. Then, awk silently discards them. This makes it hard to troubleshoot issues like unavailable counters or system configuration.
I had to remove '2>&1' manually from all scripts to troubleshoot silent termination with no errors. Turns out one metric was not available for my system and that causes 'perf stat' to terminate immediately. I think there's no reason to silence errors. When the script works fine, there's no error output and it works equally well.
Great PRs. I found the error by removing this