Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: tools/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py

Issue 1254843002: telemetry: Fix killing the perf profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change GetPids instead. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py
diff --git a/tools/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py b/tools/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py
index e63124afddfabd87acd2dee0f079b19b7c0edc74..a8dc4f60d164eb42a4bed547c1c202dc06ca92ba 100644
--- a/tools/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py
+++ b/tools/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py
@@ -41,7 +41,8 @@ class _TCPDumpProfilerAndroid(object):
raise Exception('Unable to find TCPDump. Check your device is rooted '
'and tcpdump is installed at ' +
android_prebuilt_profiler_helper.GetDevicePath('tcpdump'))
- tcpdump_pid = int(tcpdump_pid['tcpdump'])
+ assert len(tcpdump_pid['tcpdump']) == 1
+ tcpdump_pid = int(tcpdump_pid['tcpdump'][0])
self._device.RunShellCommand('kill -term ' + tcpdump_pid)
perezju 2015/07/27 09:56:32 str + int? I know it was like that before, but how
Sami 2015/07/27 11:37:00 GetPids returns the pids as strings. Not sure why
self._proc.terminate()
host_dump = os.path.join(self._output_path,

Powered by Google App Engine
This is Rietveld 408576698