/system/media/camera/docs/ |
D | metadata_model.py | 53 def __init__(self): argument 54 self._parent = None 55 self._name = None 58 def parent(self): argument 59 return self._parent 62 def name(self): argument 63 return self._name 65 def find_all(self, pred): argument 76 if pred(self): 77 yield self [all …]
|
/system/extras/simpleperf/scripts/test/ |
D | java_app_test.py | 36 def test_app_profiler(self): argument 37 self.common_test_app_profiler() 39 def test_app_profiler_profile_from_launch(self): argument 40 self.run_app_profiler(start_activity=True, build_binary_cache=False) 41 self.run_cmd(["report.py", "-g", "-o", "report.txt"]) 42 self.check_strings_in_file("report.txt", [ 46 def test_app_profiler_multiprocesses(self): argument 47 self.adb.check_run(['shell', 'am', 'force-stop', self.package_name]) 48 self.adb.check_run(['shell', 'am', 'start', '-n', 49 self.package_name + '/.MultiProcessActivity']) [all …]
|
D | report_lib_test.py | 26 def setUp(self): argument 27 super(TestReportLib, self).setUp() 28 self.report_lib = ReportLib() 30 def tearDown(self): argument 31 self.report_lib.Close() 32 super(TestReportLib, self).tearDown() 34 def test_build_id(self): argument 35 self.report_lib.SetRecordFile(TestHelper.testdata_path('perf_with_symbols.data')) 36 build_id = self.report_lib.GetBuildIdForPath('/data/t2') 37 self.assertEqual(build_id, '0x70f1fe24500fc8b0d9eb477199ca1ca21acca4de') [all …]
|
D | app_test.py | 63 def setUp(self): argument 64 super(TestExampleBase, self).setUp() 66 'ExampleJava' in self.id() or 'ExampleKotlin' in self.id()): 67 self.skipTest('Profiling java code needs wrap.sh on Android O (8.x)') 68 if 'TraceOffCpu' in self.id() and not TestHelper.is_trace_offcpu_supported(): 69 self.skipTest('trace-offcpu is not supported on device') 72 if not os.path.isdir(self.testcase_dir): 73 os.makedirs(self.testcase_dir) 74 os.chdir(self.testcase_dir) 75 self.run_app_profiler(compile_java_code=self.use_compiled_java_code) [all …]
|
D | cpp_app_test.py | 30 def test_app_profiler(self): argument 31 self.common_test_app_profiler() 33 def test_app_profiler_profile_from_launch(self): argument 34 self.run_app_profiler(start_activity=True, build_binary_cache=False) 35 self.run_cmd(["report.py", "-g", "-o", "report.txt"]) 36 self.check_strings_in_file("report.txt", ["BusyLoopThread", "__start_thread"]) 38 def test_report(self): argument 39 self.common_test_report() 40 self.run_cmd(["report.py", "-g", "-o", "report.txt"]) 41 self.check_strings_in_file("report.txt", ["BusyLoopThread", "__start_thread"]) [all …]
|
D | app_profiler_test.py | 25 def setUp(self): argument 26 super(TestNativeProfiling, self).setUp() 27 self.is_rooted_device = TestHelper.adb.switch_to_root() 29 def test_profile_cmd(self): argument 30 self.run_cmd(["app_profiler.py", "-cmd", "pm -l", "--disable_adb_root"]) 31 self.run_cmd(["report.py", "-g", "-o", "report.txt"]) 33 def test_profile_native_program(self): argument 34 if not self.is_rooted_device: 36 self.run_cmd(["app_profiler.py", "-np", "surfaceflinger"]) 37 self.run_cmd(["report.py", "-g", "-o", "report.txt"]) [all …]
|
D | kotlin_app_test.py | 32 def test_app_profiler(self): argument 33 self.common_test_app_profiler() 35 def test_app_profiler_profile_from_launch(self): argument 36 self.run_app_profiler(start_activity=True, build_binary_cache=False) 37 self.run_cmd(["report.py", "-g", "-o", "report.txt"]) 38 self.check_strings_in_file("report.txt", [ 42 def test_report(self): argument 43 self.common_test_report() 44 self.run_cmd(["report.py", "-g", "-o", "report.txt"]) 45 self.check_strings_in_file("report.txt", [ [all …]
|
D | pprof_proto_generator_test.py | 31 def run_generator(self, options=None, testdata_file='perf_with_interpreter_frames.data'): argument 34 self.run_cmd(['pprof_proto_generator.py', '-i', testdata_path] + options) 35 return self.run_cmd(['pprof_proto_generator.py', '--show'], return_output=True) 37 def generate_profile(self, options: Optional[List[str]], testdata_files: List[str]): argument 40 self.run_cmd(['pprof_proto_generator.py', '-i'] + testdata_paths + options) 43 def test_show_art_frames(self): argument 46 self.assertNotIn(art_frame_str, self.run_generator()) 48 self.assertIn(art_frame_str, self.run_generator(['--show_art_frames'])) 50 def test_pid_filter(self): argument 52 self.assertIn(key, self.run_generator()) [all …]
|
D | debug_unwind_reporter_test.py | 23 def run_reporter(self, options: List[str]) -> str: argument 25 return self.run_cmd(['debug_unwind_reporter.py', '-i', 28 def test_show_callchain_fixed_by_joiner_option(self): argument 29 output = self.run_reporter([]) 30 self.assertFalse('__start_thread' in output) 31 output = self.run_reporter(['--show-callchain-fixed-by-joiner']) 32 self.assertTrue('__start_thread' in output) 34 def test_summary_option(self): argument 35 output = self.run_reporter(['--summary']) 36 self.assertTrue('Error Code' in output) [all …]
|
/system/extras/tests/bootloader/ |
D | haltest.py | 23 def __init__(self, *args, **kwargs): argument 24 super(HalTest, self).__init__(*args, **kwargs) 25 self.bootctl = bootctl.Bootctl(self.device) 27 def test_slots(self): argument 30 self.device.root() 31 self.device.wait() 32 num_slots = self.bootctl.get_number_slots() 35 suffix = self.bootctl.get_suffix(slot) 36 self.assertNotEqual(suffix, "(null)") 38 self.assertEqual(len(suffixes), num_slots) [all …]
|
D | bootloadertest.py | 31 def exists_validvals(self, varname, varlist, validlist): argument 32 self.assertIn(varname, varlist) 33 self.assertIn(varlist[varname], validlist) 36 def exists_yes_no(self, varname, varlist): argument 37 return self.exists_validvals(varname, varlist, ["yes", "no"]) 39 def exists_nonempty(self, varname, varlist): argument 40 self.assertIn(varname, varlist) 41 self.assertGreater(len(varlist[varname]), 0) 44 def exists_integer(self, varname, varlist, base=10): argument 46 self.assertIn(varname, varlist) [all …]
|
/system/update_engine/scripts/update_payload/ |
D | payload.py | 77 def __init__(self): argument 78 self.version = None 79 self.manifest_len = None 80 self.metadata_signature_len = None 81 self.size = None 83 def ReadFromPayload(self, payload_file, hasher=None): argument 101 magic = common.Read(payload_file, len(self._MAGIC), hasher=hasher) 102 if magic != self._MAGIC: 105 self.version = _ReadInt(payload_file, self._VERSION_SIZE, True, 107 self.manifest_len = _ReadInt(payload_file, self._MANIFEST_LEN_SIZE, True, [all …]
|
/system/extras/simpleperf/scripts/ |
D | app_profiler.py | 44 def __init__(self, path, name, score): argument 45 self.path = path 46 self.name = name 47 self.score = score 49 def __repr__(self): argument 50 return self.__str__() 52 def __str__(self): argument 53 return '[path: %s, name %s, score %s]' % (self.path, self.name, self.score) 64 def __init__(self, ndk_path, device_arch, adb): argument 65 self.adb = adb [all …]
|
D | simpleperf_report_lib.py | 76 def thread_comm(self) -> str: argument 77 return _char_pt_to_str(self._thread_comm) 80 def in_kernel(self) -> bool: argument 81 return bool(self._in_kernel) 103 def name(self) -> str: argument 104 return _char_pt_to_str(self._name) 106 def parse_value(self, data: ct.c_char_p) -> Union[str, bytes, List[bytes]]: argument 112 if self.is_dynamic: 113 offset, max_len = struct.unpack('<HH', data[self.offset:self.offset + 4]) 119 if self.elem_count > 1 and self.elem_size == 1: [all …]
|
D | pprof_proto_generator.py | 66 def __init__(self, profile): argument 67 self.profile = profile 68 self.string_table = profile.string_table 70 def show(self): argument 71 p = self.profile 77 self.show_value_type(p.sample_type[i]) 81 self.show_sample(p.sample[i], sub_space) 85 self.show_mapping(p.mapping[i], sub_space) 89 self.show_location(p.location[i], sub_space) 92 self.show_function(p.function[i], sub_space) [all …]
|
/system/update_engine/scripts/ |
D | paycheck_unittest.py | 48 def setUp(self): argument 49 self.tmpdir = os.getenv('T') 51 self._full_payload = os.path.join(self.tmpdir, 'full_payload.bin') 52 self._delta_payload = os.path.join(self.tmpdir, 'delta_payload.bin') 54 self._new_kernel = os.path.join(self.tmpdir, 'disk_ext2_4k.img') 55 self._new_root = os.path.join(self.tmpdir, 'disk_sqfs_default.img') 56 self._old_kernel = os.path.join(self.tmpdir, 58 self._old_root = os.path.join(self.tmpdir, 'disk_sqfs_empty.img') 61 self._kernel_part = os.path.join(self.tmpdir, 'kern.part') 62 self._root_part = os.path.join(self.tmpdir, 'root.part') [all …]
|
D | payload_info_unittest.py | 48 def __init__(self, **kwargs): argument 49 self.list_ops = False 50 self.stats = False 51 self.signatures = False 53 setattr(self, key, val) 54 if not hasattr(self, 'payload_file'): 55 self.payload_file = None 61 def __init__(self, src_extents, dst_extents, op_type, **kwargs): argument 62 self.src_extents = src_extents 63 self.dst_extents = dst_extents [all …]
|
/system/extras/perf2cfg/perf2cfg/ |
D | edit.py | 99 def __init__(self, argument 114 self.analyzer = analyzer 115 self.input_stream = input_stream 116 self.output_stream = output_stream 117 self.primary_event = primary_event 119 self.basic_block_event_counts: DefaultDict[ 121 self.buffer: List[str] = [] 122 self.current_method: analyze.Method 123 self.event_names = events.sort_event_names(self.analyzer.event_counts) 124 self.flags_offset = 0 [all …]
|
/system/tools/aidl/tests/ |
D | aidl_integration_test.py | 36 def __init__(self, exit_status, stdout, stderr): argument 44 self.stdout = stdout 45 self.stderr = stderr 46 self.exit_status = exit_status 48 def printable_string(self): argument 52 for line in self.stdout.splitlines(): 55 for line in self.stderr.splitlines(): 63 def run(self, command, background=False, ignore_status=False): argument 79 return self.adb('shell %s' % pipes.quote(command), 82 def adb(self, command, ignore_status=False): argument [all …]
|
/system/extras/simpleperf/scripts/inferno/ |
D | data_types.py | 20 def __init__(self, method, dso): argument 21 self.method = method 22 self.dso = dso 27 def __init__(self, tid, pid): argument 28 self.tid = tid 29 self.pid = pid 30 self.name = "" 31 self.samples = [] 32 self.flamegraph = FlameGraphCallSite("root", "", 0) 33 self.num_samples = 0 [all …]
|
/system/extras/boottime_tools/io_analysis/ |
D | check_io_trace_all.py | 41 def __init__(self, block_num, start_time, size): argument 42 self.block_num = block_num 43 self.start_time = start_time 44 self.size = size 53 def __init__(self, name): argument 54 self.name = name 55 self.reads = {} # k : dev_num, v : [] of reads 56 self.per_device_total_reads = {} 57 self.writes = {} 58 self.per_device_total_writes = {} [all …]
|
D | check_file_read.py | 49 def __init__(self, file): argument 50 self.file = file 51 self.accesses = [] 52 self.total_access = 0 53 self.ext4_access_size_histogram = {} #key: read size, value: occurrence 54 self.block_access_size_histogram = {} 55 self.ext4_single_block_accesses = {} # process name, occurrence 56 self.block_single_block_accesses = {} # process name, occurrence 57 self.blocks_histogram = {} # K: offset, V: read counter 59 def add_if_single_block(self, container, size, offset, process_name): argument [all …]
|
/system/extras/perf_tools/bats/ |
D | lcan.py | 17 def __init__(self, lCTimeProcessor): argument 18 self.dateTime = 0 19 self.relativeTime = 0 20 self.key = "" 21 self.moduleName = "" 22 self.keyword = "" 23 self.valueMsec = 0 24 self.lCTimeProcessor = lCTimeProcessor 25 self.lines = [] 27 def set(self, dateTime, moduleName, keyText, valueMsec): argument [all …]
|
/system/extras/boottime_tools/bootanalyze/ |
D | bugreport_anayze.py | 70 def __init__(self): argument 71 self.events = collections.OrderedDict() #K: keyword, V:time in ms 72 self.timings = collections.OrderedDict() 73 self.shutdown_events = collections.OrderedDict() 74 self.java_crash = collections.OrderedDict() #K:time, V:list of crash infos, each entry per line 75 self.native_crash = collections.OrderedDict() 77 def reset_events_time(self, delta): argument 79 for entry in self.events.iteritems(): 81 self.events = new_events 82 if len(self.native_crash) > 0: [all …]
|
/system/extras/perf_tools/ |
D | sbtpull.py | 17 def __init__(self): argument 18 self.lineNum = 0 19 self.timeStamp = 0 20 self.delta = 0 21 self.deltaDiff = 0 22 self.text = "none" 23 self.textKey = "none" 25 def parse(self, index, line, priorTimeStamp): argument 29 self.lineNum = index 30 self.timeStamp = float(timeString) [all …]
|