Lines Matching refs:adb
40 adb = AdbHelper()
41 enable_profiling_on_device(adb, args)
42 upload_simpleperf_to_device(adb)
43 run_simpleperf_prepare_cmd(adb)
46 def enable_profiling_on_device(adb, args): argument
47 android_version = adb.get_android_version()
49 adb.set_property('debug.perf_event_max_sample_rate', str(args.max_sample_rate[0]))
50 adb.set_property('debug.perf_cpu_time_max_percent', str(args.max_cpu_percent[0]))
51 adb.set_property('debug.perf_event_mlock_kb', str(args.max_memory_in_kb[0]))
52 adb.set_property('security.perf_harden', '0')
55 def upload_simpleperf_to_device(adb): argument
56 device_arch = adb.get_device_arch()
58 adb.check_run(['push', simpleperf_binary, '/data/local/tmp'])
59 adb.check_run(['shell', 'chmod', 'a+x', '/data/local/tmp/simpleperf'])
62 def run_simpleperf_prepare_cmd(adb): argument
63 adb.check_run(['shell', '/data/local/tmp/simpleperf', 'api-prepare'])
67 adb = AdbHelper()
70 download_recording_data(adb, args)
74 def download_recording_data(adb, args): argument
76 upload_simpleperf_to_device(adb)
77 adb.check_run(['shell', '/data/local/tmp/simpleperf', 'api-collect', '--app', args.app[0],
79 adb.check_run(['pull', '/data/local/tmp/simpleperf_data.zip', args.out_dir])
80 adb.check_run(['shell', 'rm', '-rf', '/data/local/tmp/simpleperf_data'])