Fix some issues in safetynet_measure.py with Python 3.

Decode subprocess.check_output() result.

Bug: pdfium:1674
Change-Id: I59292bfe19500c0d63c8967bb9c59d071d6f18a8
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/84010
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/testing/tools/safetynet_measure.py b/testing/tools/safetynet_measure.py
index 35f1832..be61aa8 100755
--- a/testing/tools/safetynet_measure.py
+++ b/testing/tools/safetynet_measure.py
@@ -86,7 +86,8 @@
         '--instr-atstart=%s' % instrument_at_start,
         '--callgrind-out-file=%s' % output_path
     ] + self._BuildTestHarnessCommand())
-    output = subprocess.check_output(valgrind_cmd, stderr=subprocess.STDOUT)
+    output = subprocess.check_output(
+        valgrind_cmd, stderr=subprocess.STDOUT).decode('utf-8')
 
     # Match the line with the instruction count, eg.
     # '==98765== Collected : 12345'
@@ -102,7 +103,8 @@
     # -einstructions: print only instruction count
     cmd_to_run = (['perf', 'stat', '--no-big-num', '-einstructions'] +
                   self._BuildTestHarnessCommand())
-    output = subprocess.check_output(cmd_to_run, stderr=subprocess.STDOUT)
+    output = subprocess.check_output(
+        cmd_to_run, stderr=subprocess.STDOUT).decode('utf-8')
 
     # Match the line with the instruction count, eg.
     # '        12345      instructions'