/linux/tools/perf/scripts/python/ |
H A D | exported-sql-viewer.py | 194 def __init__(self, task, param=None, parent=None): argument 195 super(Thread, self).__init__(parent) 196 self.task = task 197 self.param = param 199 def run(self): argument 201 if self.param is None: 202 done, result = self.task() 204 done, result = self.task(self.param) 205 self.done.emit(result) 213 def __init__(self, glb, params, parent=None): argument [all …]
|
H A D | parallel-perf.py | 26 def __init__(self, quiet=False, verbose=False, debug=False): argument 27 self.normal = True 28 self.verbose = verbose 29 self.debug = debug 30 self.self_test = True 31 if self.debug: 32 self.verbose = True 33 if self.verbose: 36 self.normal = False 41 def __init__(self, cmd, pipe_to, output_dir="."): argument [all …]
|
/linux/scripts/gdb/linux/ |
H A D | mm.py | 24 def __init__(self): argument 28 self.ops = aarch64_page_ops() 33 def __init__(self): argument 34 self.SUBSECTION_SHIFT = 21 35 self.SEBSECTION_SIZE = 1 << self.SUBSECTION_SHIFT 36 self.MODULES_VSIZE = 2 * 1024 * 1024 * 1024 39 self.SECTION_SIZE_BITS = 29 41 self.SECTION_SIZE_BITS = 27 42 self.MAX_PHYSMEM_BITS = constants.LX_CONFIG_ARM64_VA_BITS 44 self.PAGE_SHIFT = constants.LX_CONFIG_PAGE_SHIFT [all …]
|
/linux/tools/net/ynl/lib/ |
H A D | nlspec.py | 31 def __init__(self, family, yaml): argument 32 self.yaml = yaml 33 self.family = family 35 if 'name' in self.yaml: 36 self.name = self.yaml['name'] 37 self.ident_name = self.name.replace('-', '_') 39 self._super_resolved = False 40 family.add_unresolved(self) 42 __getitem__(self, key) global() argument 45 __contains__(self, key) global() argument 48 get(self, key, default=None) global() argument 51 resolve_up(self, up) global() argument 56 resolve(self) global() argument 72 __init__(self, enum_set, yaml, prev, value_start) global() argument 87 has_doc(self) global() argument 90 raw_value(self) global() argument 93 user_value(self, as_flags=None) global() argument 113 __init__(self, family, yaml) global() argument 128 new_entry(self, entry, prev_entry, value_start) global() argument 131 has_doc(self) global() argument 139 get_mask(self, as_flags=None) global() argument 167 __init__(self, family, attr_set, yaml, value) global() argument 198 __init__(self, family, yaml) global() argument 223 new_attr(self, elem, value) global() argument 226 __getitem__(self, key) global() argument 229 __contains__(self, key) global() argument 232 __iter__(self) global() argument 235 items(self) global() argument 253 __init__(self, family, yaml) global() argument 271 __init__(self, family, yaml) global() argument 278 new_member(self, family, elem) global() argument 281 __iter__(self) global() argument 284 items(self) global() argument 298 __init__(self, family, yaml) global() argument 306 new_format(self, family, format) global() argument 320 __init__(self, family, yaml) global() argument 347 __init__(self, family, yaml, req_value, rsp_value) global() argument 364 resolve(self) global() argument 395 __init__(self, family, yaml) global() argument 425 __init__(self, spec_path, schema_path=None, exclude_ops=None) global() argument 488 new_enum(self, elem) global() argument 491 new_attr_set(self, elem) global() argument 494 new_struct(self, elem) global() argument 497 new_sub_message(self, elem) global() argument 500 new_operation(self, elem, req_val, rsp_val) global() argument 503 new_mcast_group(self, elem) global() argument 506 add_unresolved(self, elem) global() argument 509 _dictify_ops_unified(self) global() argument 521 _dictify_ops_directional(self) global() argument 563 find_operation(self, name) global() argument 572 resolve(self) global() argument [all...] |
H A D | ynl.py | 104 def __init__(self, nl_msg): argument 105 self.nl_msg = nl_msg 106 self.error = -nl_msg.error 108 def __str__(self): argument 129 def __init__(self, raw, offset): argument 130 self._len, self._type = struct.unpack("HH", raw[offset : offset + 4]) 131 self.type = self._type & ~Netlink.NLA_TYPE_MASK 132 self.is_nest = self._type & Netlink.NLA_F_NESTED 133 self.payload_len = self._len 134 self.full_len = (self.payload_len + 3) & ~3 [all …]
|
/linux/tools/testing/selftests/drivers/net/lib/py/ |
H A D | env.py | 41 def __init__(self, src_path, **kwargs): argument 42 self._ns = None 44 self.env = _load_env_file(src_path) 46 if 'NETIF' in self.env: 47 self.dev = ip("link show dev " + self.env['NETIF'], json=True)[0] 49 self._ns = NetdevSimDev(**kwargs) 50 self.dev = self._ns.nsims[0].dev 51 self.ifindex = self.dev['ifindex'] 53 def __enter__(self): argument 56 return self [all …]
|
/linux/tools/crypto/ccp/ |
H A D | test_dbc.py | 34 def __init__(self, data) -> None: argument 35 self.d = None 36 self.signature = b"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" 37 self.uid = b"1111111111111111" 40 def setUp(self) -> None: argument 41 self.d = open(DEVICE_NODE) 44 def tearDown(self) -> None: argument 45 if self.d: 46 self.d.close() 51 def setUp(self) -> None: argument [all …]
|
/linux/tools/testing/selftests/bpf/ |
H A D | json_writer.c | 29 static void jsonw_indent(json_writer_t *self) in jsonw_indent() argument 32 for (i = 0; i < self->depth; ++i) in jsonw_indent() 33 fputs(" ", self->out); in jsonw_indent() 37 static void jsonw_eol(json_writer_t *self) in jsonw_eol() argument 39 if (!self->pretty) in jsonw_eol() 42 putc('\n', self->out); in jsonw_eol() 43 jsonw_indent(self); in jsonw_eol() 47 static void jsonw_eor(json_writer_t *self) in jsonw_eor() argument 49 if (self->sep != '\0') in jsonw_eor() 50 putc(self->sep, self->out); in jsonw_eor() [all …]
|
/linux/tools/bpf/bpftool/ |
H A D | json_writer.c | 29 static void jsonw_indent(json_writer_t *self) in jsonw_indent() argument 32 for (i = 0; i < self->depth; ++i) in jsonw_indent() 33 fputs(" ", self->out); in jsonw_indent() 37 static void jsonw_eol(json_writer_t *self) in jsonw_eol() argument 39 if (!self->pretty) in jsonw_eol() 42 putc('\n', self->out); in jsonw_eol() 43 jsonw_indent(self); in jsonw_eol() 47 static void jsonw_eor(json_writer_t *self) in jsonw_eor() argument 49 if (self->sep != '\0') in jsonw_eor() 50 putc(self->sep, self->out); in jsonw_eor() [all …]
|
/linux/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/ |
H A D | SchedGui.py | 23 def __init__(self, sched_tracer, title, parent = None, id = -1): argument 24 wx.Frame.__init__(self, parent, id, title) 26 (self.screen_width, self.screen_height) = wx.GetDisplaySize() 27 self.screen_width -= 10 28 self.screen_height -= 10 29 self.zoom = 0.5 30 self.scroll_scale = 20 31 self.sched_tracer = sched_tracer 32 self.sched_tracer.set_root_win(self) 33 (self.ts_start, self.ts_end) = sched_tracer.interval() [all …]
|
/linux/scripts/ |
H A D | rust_is_available_test.py | 122 def run_script(self, expected, override_env): 124 "RUSTC": self.default_rustc, 125 "BINDGEN": self.default_bindgen, 126 "CC": self.default_cc, 138 self.assertEqual(result.stdout, b"") 140 if expected == self.Expected.SUCCESS: 143 self.assertEqual(result.returncode, 0) 144 self.assertEqual(result.stderr, b"") 145 elif expected == self.Expected.SUCCESS_WITH_EXTRA_OUTPUT: 150 self 115 run_script(self, expected, override_env) global() argument 162 test_rustc_unset(self) global() argument 167 test_bindgen_unset(self) global() argument 172 test_cc_unset(self) global() argument 177 test_rustc_missing(self) global() argument 181 test_bindgen_missing(self) global() argument 185 test_rustc_nonexecutable(self) global() argument 189 test_rustc_unexpected_binary(self) global() argument 193 test_rustc_unexpected_name(self) global() argument 198 test_rustc_unexpected_version(self) global() argument 203 test_rustc_no_minor(self) global() argument 208 test_rustc_old_version(self) global() argument 213 test_bindgen_nonexecutable(self) global() argument 217 test_bindgen_unexpected_binary(self) global() argument 221 test_bindgen_unexpected_name(self) global() argument 226 test_bindgen_unexpected_version(self) global() argument 231 test_bindgen_no_minor(self) global() argument 236 test_bindgen_old_version(self) global() argument 241 test_bindgen_bad_version_0_66_0_and_0_66_1(self) global() argument 248 test_bindgen_bad_version_0_66_0_and_0_66_1_patched(self) global() argument 254 test_bindgen_libclang_failure(self) global() argument 260 test_bindgen_libclang_unexpected_version(self) global() argument 266 test_bindgen_libclang_old_version(self) global() argument 271 test_clang_matches_bindgen_libclang_different_bindgen(self) global() argument 276 test_clang_matches_bindgen_libclang_different_clang(self) global() argument 281 test_rustc_src_core_krustflags(self) global() argument 285 test_rustc_src_core_rustlibsrc(self) global() argument 289 test_success_cc_unknown(self) global() argument 293 test_success_cc_multiple_arguments_ccache(self) global() argument 301 test_success_rustc_version(self) global() argument 311 test_success_bindgen_version(self) global() argument 321 test_success_bindgen_libclang(self) global() argument 339 test_success_clang_version(self) global() argument 350 test_success_real_programs(self) global() argument [all...] |
/linux/tools/testing/selftests/damon/ |
H A D | _damon_sysfs.py | 43 def __init__(self, size=None, nr_accesses=None, age=None): argument 44 self.size = size 45 self.nr_accesses = nr_accesses 46 self.age = age 48 if self.size is None: 49 self.size = [0, 2**64 - 1] 50 if self.nr_accesses is None: 51 self.nr_accesses = [0, 2**64 - 1] 52 if self.age is None: 53 self.age = [0, 2**64 - 1] [all …]
|
/linux/tools/verification/dot2/ |
H A D | dot2c.py | 25 def __init__(self, file_path): argument 27 self.line_length = 100 29 def __buff_to_string(self, buff): argument 38 def __get_enum_states_content(self): argument 40 buff.append("\t%s%s = 0," % (self.initial_state, self.enum_suffix)) 41 for state in self.states: 42 if state != self.initial_state: 43 buff.append("\t%s%s," % (state, self.enum_suffix)) 44 buff.append("\tstate_max%s" % (self.enum_suffix)) 48 def get_enum_states_string(self): argument [all …]
|
H A D | dot2k.py | 20 def __init__(self, file_path, MonitorType): argument 23 self.monitor_type = self.monitor_types.get(MonitorType) 24 if self.monitor_type == None: 27 self.monitor_type = MonitorType 28 self.__fill_rv_templates_dir() 29 self.main_c = self.__open_file(self.monitor_templates_dir + "main_" + MonitorType + ".c") 30 self.enum_suffix = "_%s" % self.name 32 def __fill_rv_templates_dir(self): argument 34 if os.path.exists(self.monitor_templates_dir) == True: 43 self.monitor_templates_dir = kernel_path [all …]
|
/linux/tools/testing/selftests/hid/tests/ |
H A D | base_device.py | 44 def __init__(self, path): argument 45 self.path = path 47 def __set_value(self, value): argument 48 with open(self.path, "w") as f: 51 def __get_value(self): argument 52 with open(self.path) as f: 56 def int_value(self) -> int: argument 57 return int(self.__get_value()) 60 def int_value(self, v: int) -> None: argument 61 self.__set_value(v) [all …]
|
/linux/tools/testing/kunit/ |
H A D | kunit_tool_test.py | 44 def test_is_subset_of(self): argument 46 self.assertTrue(kconfig0.is_subset_of(kconfig0)) 50 self.assertTrue(kconfig1.is_subset_of(kconfig1)) 51 self.assertTrue(kconfig0.is_subset_of(kconfig1)) 52 self.assertFalse(kconfig1.is_subset_of(kconfig0)) 54 def test_read_from_file(self): argument 66 self.assertEqual(kconfig, expected_kconfig) 68 def test_write_to_file(self): argument 81 self.assertEqual(actual_kconfig, expected_kconfig) 84 def setUp(self): argument [all …]
|
/linux/tools/perf/pmu-events/ |
H A D | metric.py | 13 def ToPerfJson(self) -> str: argument 17 def ToPython(self) -> str: argument 21 def Simplify(self): argument 25 def Equals(self, other) -> bool: argument 29 def Substitute(self, name: str, expression: 'Expression') -> 'Expression': argument 32 def __str__(self) -> str: argument 33 return self.ToPerfJson() 35 def __or__(self, other: Union[int, float, 'Expression']) -> 'Operator': argument 36 return Operator('|', self, other) 38 def __ror__(self, other: Union[int, float, 'Expression']) -> 'Operator': argument [all …]
|
/linux/tools/kvm/kvm_stat/ |
H A D | kvm_stat | 336 def tracepoint_is_child(self, field): argument 343 def __init__(self, exit_reasons): argument 344 self.sc_perf_evt_open = 298 345 self.ioctl_numbers = IOCTL_NUMBERS 346 self.exit_reason_field = 'exit_reason' 347 self.exit_reasons = exit_reasons 349 def debugfs_is_child(self, field): argument 355 def __init__(self): argument 356 self.sc_perf_evt_open = 319 357 self.ioctl_numbers = IOCTL_NUMBERS [all …]
|
/linux/drivers/net/ethernet/aquantia/atlantic/hw_atl/ |
H A D | hw_atl_utils.c | 58 static int hw_atl_utils_mpi_set_state(struct aq_hw_s *self, 60 static u32 hw_atl_utils_get_mpi_mbox_tid(struct aq_hw_s *self); 61 static u32 hw_atl_utils_mpi_get_state(struct aq_hw_s *self); 62 static u32 hw_atl_utils_mif_cmd_get(struct aq_hw_s *self); 63 static u32 hw_atl_utils_mif_addr_get(struct aq_hw_s *self); 64 static u32 hw_atl_utils_rpc_state_get(struct aq_hw_s *self); 65 static u32 aq_fw1x_rpc_get(struct aq_hw_s *self); 67 int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops) in hw_atl_utils_initfw() argument 71 hw_atl_utils_hw_chip_features_init(self, in hw_atl_utils_initfw() 72 &self->chip_features); in hw_atl_utils_initfw() [all …]
|
/linux/tools/testing/selftests/sgx/ |
H A D | main.c | 259 encl_delete(&self->encl); in FIXTURE_TEARDOWN() 287 ASSERT_TRUE(setup_test_encl(ENCL_HEAP_SIZE_DEFAULT, &self->encl, _metadata)); in TEST_F() 289 memset(&self->run, 0, sizeof(self->run)); in TEST_F() 290 self->run.tcs = self->encl.encl_base; in TEST_F() 295 EXPECT_EQ(ENCL_CALL(&put_op, &self->run, false), 0); in TEST_F() 297 EXPECT_EEXIT(&self->run); in TEST_F() 298 EXPECT_EQ(self->run.user_data, 0); in TEST_F() 303 EXPECT_EQ(ENCL_CALL(&get_op, &self->run, false), 0); in TEST_F() 306 EXPECT_EEXIT(&self->run); in TEST_F() 307 EXPECT_EQ(self->run.user_data, 0); in TEST_F() [all …]
|
/linux/tools/testing/selftests/pidfd/ |
H A D | pidfd_setns_test.c | 182 self->nsfds[i] = -EBADF; in FIXTURE_SETUP() 183 self->child_nsfds1[i] = -EBADF; in FIXTURE_SETUP() 184 self->child_nsfds2[i] = -EBADF; in FIXTURE_SETUP() 185 self->child_pidfd_derived_nsfds[i] = -EBADF; in FIXTURE_SETUP() 186 self->child_pidfd_derived_nsfds1[i] = -EBADF; in FIXTURE_SETUP() 187 self->child_pidfd_derived_nsfds2[i] = -EBADF; in FIXTURE_SETUP() 195 self->pid = getpid(); in FIXTURE_SETUP() 196 self->pidfd = sys_pidfd_open(self->pid, 0); in FIXTURE_SETUP() 197 EXPECT_GT(self->pidfd, 0) { in FIXTURE_SETUP() 198 TH_LOG("%m - Failed to open pidfd for process %d", self->pid); in FIXTURE_SETUP() [all …]
|
/linux/tools/perf/tests/shell/lib/ |
H A D | perf_metric_validation.py | 11 …def __init__(self, metric: list[str], wl: str, value: list[float], low: float, up=float('nan'), de… argument 12 self.metric: list = metric # multiple metrics in relationship type tests 13 self.workloads = [wl] # multiple workloads possible 14 self.collectedValue: list = value 15 self.valueLowBound = low 16 self.valueUpBound = up 17 self.description = description 19 def __repr__(self) -> str: argument 20 if len(self.metric) > 1: 25 … self.valueLowBound, self.valueUpBound, self.description) [all …]
|
/linux/drivers/net/ethernet/aquantia/atlantic/ |
H A D | aq_vec.c | 30 struct aq_vec_s *self = container_of(napi, struct aq_vec_s, napi); in aq_vec_poll() local 38 if (!self) { in aq_vec_poll() 41 for (i = 0U; self->tx_rings > i; ++i) { in aq_vec_poll() 42 ring = self->ring[i]; in aq_vec_poll() 46 if (self->aq_hw_ops->hw_ring_tx_head_update) { in aq_vec_poll() 47 err = self->aq_hw_ops->hw_ring_tx_head_update( in aq_vec_poll() 48 self->aq_hw, in aq_vec_poll() 60 err = self->aq_hw_ops->hw_ring_rx_receive(self->aq_hw, in aq_vec_poll() 80 err = self->aq_hw_ops->hw_ring_rx_fill( in aq_vec_poll() 81 self->aq_hw, in aq_vec_poll() [all …]
|
/linux/tools/testing/selftests/drivers/s390x/uvdevice/ |
H A D | test_uvdevice.c | 40 self->uv_fd = open(UV_PATH, O_ACCMODE); in FIXTURE_SETUP() 42 self->uvio_ioctl.argument_addr = (__u64)self->buffer; in FIXTURE_SETUP() 43 self->uvio_ioctl.argument_len = variant->arg_size; in FIXTURE_SETUP() 44 self->fault_page = in FIXTURE_SETUP() 50 if (self->uv_fd) in FIXTURE_TEARDOWN() 51 close(self->uv_fd); in FIXTURE_TEARDOWN() 52 munmap((void *)self->fault_page, (size_t)getpagesize()); in FIXTURE_TEARDOWN() 59 rc = ioctl(self->uv_fd, variant->ioctl_cmd, NULL); in TEST_F() 64 rc = ioctl(self->uv_fd, variant->ioctl_cmd, self->fault_page); in TEST_F() 74 self->uvio_ioctl.argument_addr = 0; in TEST_F() [all …]
|
/linux/tools/perf/tests/ |
H A D | attr.py |
|