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

Unified Diff: tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py

Issue 358993003: [Android] Switch to DeviceUtils versions of file functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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/core/platform/profiler/android_profiling_helper.py
diff --git a/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py b/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py
index 1b7d578f5ebcddc10d633d5c9ca74c0ca7e77456..f8944fcb1878b272b5701d769fccb7a2278cec9c 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py
@@ -197,12 +197,12 @@ def CreateSymFs(device, symfs_dir, libraries, use_symlinks=True):
if not os.path.exists(output_lib) or lib in mismatching_files[device_dir]:
logging.info('Pulling %s to %s' % (lib, output_lib))
- device.old_interface.PullFileFromDevice(lib, output_lib)
+ device.PullFile(lib, output_lib)
# Also pull a copy of the kernel symbols.
output_kallsyms = os.path.join(symfs_dir, 'kallsyms')
if not os.path.exists(output_kallsyms):
- device.old_interface.PullFileFromDevice('/proc/kallsyms', output_kallsyms)
+ device.PullFile('/proc/kallsyms', output_kallsyms)
return output_kallsyms
@@ -217,8 +217,7 @@ def PrepareDeviceForPerf(device):
"""
android_prebuilt_profiler_helper.InstallOnDevice(device, 'perf')
# Make sure kernel pointers are not hidden.
- device.old_interface.SetProtectedFileContents(
- '/proc/sys/kernel/kptr_restrict', '0')
+ device.WriteFile('/proc/sys/kernel/kptr_restrict', '0', as_root=True)
return android_prebuilt_profiler_helper.GetDevicePath('perf')

Powered by Google App Engine
This is Rietveld 408576698