Fix flamegraph generation step in GKE perf profiling scripts
The perf_flamegraph_for_*
scripts all shared the same flaw -- the expected toolbox
to propagate its standard input, output, and error file descriptors like a normal subshell would.
The profile capture worked find, but rendering it into a flamegraph by piping raw results into toolbox
didn't work -- the process inside toolbox hangs forever waiting for input on STDIN. Similarly, redirecting the toolbox output to a file didn't work as expected, because toolbox implicitly redirects its process's STDERR to STDOUT. This caused normal warning messages from stackcollapse to be included in the SVG file, which of course produced an invalid file.
To work around this, we stop relying on piping input/output to/from toolbox.
Testing results are in the parent issue: gitlab-com/gl-infra/scalability#2039 (comment 1191937976)