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

Issue 1254843002: telemetry: Fix killing the perf profiler (Closed)

Created:
5 years, 5 months ago by Sami
Modified:
5 years, 4 months ago
Reviewers:
perezju, jbudorick
CC:
chromium-reviews, jbudorick+watch_chromium.org, klundberg+watch_chromium.org, telemetry-reviews_chromium.org, yfriedman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

telemetry: Fix killing the perf profiler Telemetry was failing to kill the perf profiler on Android because pylib's KillAll command didn't account for multiple instances of the same binary being running. The KillAll function would randomly kill one of the running instances and then time out waiting for the instances to go away. This patch changes pylib's KillAll helper send the signal to all running instances instead of just one. To do that we need to extend the GetPids function to return all running instances of a binary instead of just one. BUG=512564 Committed: https://crrev.com/e5c729f794a24ba5195f8e56bd90a8b179097bdb Cr-Commit-Position: refs/heads/master@{#340496}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Refactoring. #

Total comments: 1

Patch Set 3 : Change GetPids instead. #

Total comments: 4

Patch Set 4 : More descriptive errors. #

Patch Set 5 : Update monkey test runner. #

Total comments: 4

Patch Set 6 : Review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -20 lines) Patch
M build/android/pylib/device/device_utils.py View 1 2 3 4 chunks +7 lines, -6 lines 0 comments Download
M build/android/pylib/device/device_utils_test.py View 1 2 3 5 chunks +32 lines, -10 lines 0 comments Download
M build/android/pylib/monkey/test_runner.py View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/internal/backends/android_browser_backend_settings.py View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M tools/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M tools/telemetry/telemetry/internal/platform/profiler/perf_profiler.py View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M tools/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 20 (3 generated)
Sami
PTAL. Open to other suggestions for fixing this.
5 years, 5 months ago (2015-07-24 12:33:41 UTC) #2
perezju
Good catch! I just have some comments about the implementation. Also, do you think maybe ...
5 years, 5 months ago (2015-07-24 14:03:10 UTC) #3
Sami
Thanks! On 2015/07/24 14:03:10, perezju wrote: > Good catch! I just have some comments about ...
5 years, 5 months ago (2015-07-24 14:36:35 UTC) #4
Sami
https://codereview.chromium.org/1254843002/diff/1/build/android/pylib/device/device_utils.py File build/android/pylib/device/device_utils.py (right): https://codereview.chromium.org/1254843002/diff/1/build/android/pylib/device/device_utils.py#newcode1570 build/android/pylib/device/device_utils.py:1570: multiple_instances=False): On 2015/07/24 14:03:10, perezju wrote: > I don't ...
5 years, 5 months ago (2015-07-24 14:36:41 UTC) #5
jbudorick
+1, nice catch here. https://codereview.chromium.org/1254843002/diff/20001/build/android/pylib/device/device_utils.py File build/android/pylib/device/device_utils.py (right): https://codereview.chromium.org/1254843002/diff/20001/build/android/pylib/device/device_utils.py#newcode1567 build/android/pylib/device/device_utils.py:1567: def _GetProcessPidPairs(self, process_name): I think ...
5 years, 5 months ago (2015-07-24 17:10:56 UTC) #6
Sami
On 2015/07/24 17:10:56, jbudorick wrote: > +1, nice catch here. > > https://codereview.chromium.org/1254843002/diff/20001/build/android/pylib/device/device_utils.py > File ...
5 years, 5 months ago (2015-07-24 17:37:03 UTC) #7
perezju
The new interface seems fine to me, in principle, but there are a few things ...
5 years, 4 months ago (2015-07-27 09:56:32 UTC) #8
perezju
btw, I think we also need to update the client here: https://code.google.com/p/chromium/codesearch#chromium/src/build/android/pylib/monkey/test_runner.py&l=64
5 years, 4 months ago (2015-07-27 09:58:55 UTC) #9
Sami
https://codereview.chromium.org/1254843002/diff/40001/build/android/pylib/device/device_utils.py File build/android/pylib/device/device_utils.py (right): https://codereview.chromium.org/1254843002/diff/40001/build/android/pylib/device/device_utils.py#newcode741 build/android/pylib/device/device_utils.py:741: for pid in pids] On 2015/07/27 09:56:32, perezju wrote: ...
5 years, 4 months ago (2015-07-27 11:37:00 UTC) #10
Sami
On 2015/07/27 09:56:32, perezju wrote: > The new interface seems fine to me, in principle, ...
5 years, 4 months ago (2015-07-27 11:43:33 UTC) #11
perezju
On 2015/07/27 11:43:33, Sami wrote: > I dunno, I think there's some value in forcing ...
5 years, 4 months ago (2015-07-27 12:51:37 UTC) #12
Sami
> Well the code will now end up comparing two lists of pids and, if ...
5 years, 4 months ago (2015-07-27 14:17:25 UTC) #13
jbudorick
lgtm w/ nits https://codereview.chromium.org/1254843002/diff/80001/build/android/pylib/monkey/test_runner.py File build/android/pylib/monkey/test_runner.py (right): https://codereview.chromium.org/1254843002/diff/80001/build/android/pylib/monkey/test_runner.py#newcode69 build/android/pylib/monkey/test_runner.py:69: if len(before_pids[self._package]) > 1: This should ...
5 years, 4 months ago (2015-07-27 15:25:32 UTC) #14
Sami
https://codereview.chromium.org/1254843002/diff/80001/build/android/pylib/monkey/test_runner.py File build/android/pylib/monkey/test_runner.py (right): https://codereview.chromium.org/1254843002/diff/80001/build/android/pylib/monkey/test_runner.py#newcode69 build/android/pylib/monkey/test_runner.py:69: if len(before_pids[self._package]) > 1: On 2015/07/27 15:25:32, jbudorick wrote: ...
5 years, 4 months ago (2015-07-27 15:33:23 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1254843002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1254843002/100001
5 years, 4 months ago (2015-07-27 16:12:57 UTC) #18
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 4 months ago (2015-07-27 17:36:47 UTC) #19
commit-bot: I haz the power
5 years, 4 months ago (2015-07-27 17:37:43 UTC) #20
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/e5c729f794a24ba5195f8e56bd90a8b179097bdb
Cr-Commit-Position: refs/heads/master@{#340496}

Powered by Google App Engine
This is Rietveld 408576698