Lines Matching refs:self
33 def __init__(self): argument
34 self.local_cache_dir = os.path.join(ABS_PATH, 'binary_cache')
35 if not os.path.isdir(self.local_cache_dir):
36 os.makedirs(self.local_cache_dir)
37 self.binary_map = {}
39 def recv_binary_cache(self, perf_data, lib_dirs): argument
40 self.get_used_binaries(perf_data)
41 self.copy_binaries_from_lib_dirs(lib_dirs)
42 self.hdc = HdcInterface()
43 self.recv_binaries_from_device()
44 self.recv_kernel_symbols()
46 def get_used_binaries(self, perf_data): argument
66 self.binary_map = dso_dict
69 def copy_binaries_from_lib_dirs(self, lib_dirs): argument
76 self.get_local_bin_map(file_dict)
80 self.confirm_copy_file(root, files, file_dict)
82 def get_local_bin_map(self, file_dict): argument
83 for bin_file in self.binary_map:
91 def confirm_copy_file(self, root, files, file_dict): argument
102 req_build_id = self.binary_map.get(bin_file)
104 self.copy_to_binary_cache(
108 def copy_to_binary_cache(self, from_path, target_file): argument
113 target_file = os.path.join(self.local_cache_dir, target_file)
121 def recv_binaries_from_device(self): argument
123 for binary in self.binary_map:
130 local_cache_file = os.path.join(self.local_cache_dir,
132 self.check_and_recv_binary(binary, local_cache_file)
134 def check_and_recv_binary(self, binary, local_cache_file): argument
138 req_build_id = self.binary_map[binary]
155 self.pull_file_from_device(binary, local_cache_file)
158 self.confirm_del_file(binary,local_cache_file)
163 def pull_file_from_device(self, device_path, host_path): argument
164 if self.hdc.run_hdc_cmd(['file recv', device_path, host_path]):
169 if (self.hdc.run_hdc_cmd(['shell', 'cp', device_path,
171 self.hdc.run_hdc_cmd(['file recv',
174 self.hdc.run_hdc_cmd(['shell', 'rm',
180 def confirm_del_file(self, device_path,host_path): argument
184 req_build_id = self.binary_map.get(device_path)
191 def recv_kernel_symbols(self): argument
192 file_path = os.path.join(self.local_cache_dir, 'kallsyms')
195 if self.hdc.switch_root():
197 self.hdc.run_hdc_cmd(['shell',
199 self.hdc.run_hdc_cmd(['file recv', '/proc/kallsyms', file_path])
200 self.hdc.run_hdc_cmd(['shell',