Lines Matching refs:adb
39 adb = AdbHelper()
40 enable_profiling_on_device(adb, args)
41 upload_simpleperf_to_device(adb)
42 run_simpleperf_prepare_cmd(adb)
44 def enable_profiling_on_device(adb, args): argument
45 android_version = adb.get_android_version()
47 adb.set_property('debug.perf_event_max_sample_rate', str(args.max_sample_rate[0]))
48 adb.set_property('debug.perf_cpu_time_max_percent', str(args.max_cpu_percent[0]))
49 adb.set_property('debug.perf_event_mlock_kb', str(args.max_memory_in_kb[0]))
50 adb.set_property('security.perf_harden', '0')
52 def upload_simpleperf_to_device(adb): argument
53 device_arch = adb.get_device_arch()
55 adb.check_run(['push', simpleperf_binary, '/data/local/tmp'])
56 adb.check_run(['shell', 'chmod', 'a+x', '/data/local/tmp/simpleperf'])
58 def run_simpleperf_prepare_cmd(adb): argument
59 adb.check_run(['shell', '/data/local/tmp/simpleperf', 'api-prepare'])
63 adb = AdbHelper()
66 download_recording_data(adb, args)
69 def download_recording_data(adb, args): argument
71 upload_simpleperf_to_device(adb)
72 adb.check_run(['shell', '/data/local/tmp/simpleperf', 'api-collect', '--app', args.app[0],
74 adb.check_run(['pull', '/data/local/tmp/simpleperf_data.zip', args.out_dir])
75 adb.check_run(['shell', 'rm', '-rf', '/data/local/tmp/simpleperf_data'])