Home
last modified time | relevance | path

Searched +full:self +full:- (Results 1 – 25 of 1023) sorted by relevance

12345678910>>...41

/linux/tools/perf/scripts/python/
H A Dexported-sql-viewer.py2 # SPDX-License-Identifier: GPL-2.0
3 # exported-sql-viewer.py: view data from sql database
4 # Copyright (c) 2014-2018, Intel Corporation.
7 # export-to-sqlite.py or the export-to-postgresql.py script. Refer to those
11 # call-graph can be displayed for the pt_example database like this:
13 # python tools/perf/scripts/python/exported-sql-viewer.py pt_example
18 # python tools/perf/scripts/python/exported-sql-viewer.py "hostname=myhost username=myuser password…
20 # The result is a GUI window with a tree representing a context-sensitive
21 # call-graph. Expanding a couple of levels of the tree and adjusting column
26 # v- ls
[all …]
H A Dsched-migration.py5 # perf script event handlers have been generated by perf script -g python
23 '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
24 sys.path.append('scripts/python/Perf-Trace-Util/lib/Perf/Trace')
41 def __repr__(self): argument
49 def __init__(self, sleeper): argument
50 self.sleeper = sleeper
52 def __repr__(self): argument
53 return "%s gone to sleep" % thread_name(self.sleeper)
60 def __init__(self, wakee): argument
61 self.wakee = wakee
[all …]
/linux/scripts/gdb/linux/
H A Dmm.py1 # SPDX-License-Identifier: GPL-2.0
6 # Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
14 return ((n) + (d) - 1) // (d)
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
[all …]
H A Dpgtable.py1 # SPDX-License-Identifier: GPL-2.0-only
42 return (bit_start, bit_end), data >> bit_start & ((1 << (1 + bit_end - bit_start)) - 1)
64 def __init__(self, cr3, page_levels):
65 self.cr3 = cr3
66 self.page_levels = page_levels argument
67 self
73 next_entry(self, va) global() argument
77 mk_string(self) global() argument
89 __init__(self, address, level) global() argument
136 next_entry(self, va) global() argument
144 mk_string(self) global() argument
204 __init__(self) global() argument
207 invoke(self, arg, from_tty) global() argument
[all...]
/linux/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
H A DSchedGui.py1 # SchedGui.py - Python extension for perf script, basic GUI code for
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)
[all …]
/linux/tools/crypto/ccp/
H A Dtest_dbc.py2 # SPDX-License-Identifier: GPL-2.0
25 def system_is_secured() -> bool:
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:
[all …]
/linux/tools/testing/selftests/drivers/net/lib/py/
H A Denv.py1 # SPDX-License-Identifier: GPL-2.0
21 def __init__(self, src_path): argument
22 self.src_path = Path(src_path)
23 self.test_dir = self.src_path.parent.resolve()
24 self.net_lib_dir = (Path(__file__).parent / "../../../../net/lib").resolve()
26 self.env = self
28 _load_env_file(self) global() argument
56 __init__(self, src_path, nsim_test=None, **kwargs) global() argument
75 __enter__(self) global() argument
80 __exit__(self, ex_type, ex_value, ex_tb) global() argument
86 __del__(self) global() argument
105 __init__(self, src_path, nsim_test=None) global() argument
166 create_local(self) global() argument
186 _check_env(self) global() argument
210 resolve_remote_ifc(self) global() argument
222 __enter__(self) global() argument
225 __exit__(self, ex_type, ex_value, ex_tb) global() argument
231 __del__(self) global() argument
245 require_ipver(self, ipver) global() argument
249 _require_cmd(self, comm, key, host=None) global() argument
257 require_cmd(self, comm, local=True, remote=False) global() argument
265 wait_hw_stats_settle(self) global() argument
[all...]
/linux/tools/testing/selftests/bpf/
H A Djson_writer.c1 // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
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()
[all …]
/linux/tools/bpf/bpftool/
H A Djson_writer.c1 // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
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()
[all …]
/linux/tools/perf/pmu-events/
H A Dmetric.py1 # SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
13 def ToPerfJson(self) -> str: argument
17 def ToPython(self) -> str: argument
21 def Simplify(self): argument
22 """Returns a simplified version of self."""
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
[all …]
/linux/drivers/net/ethernet/aquantia/atlantic/
H A Daq_nic.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (C) 2014-2019 aQuantia Corporation
5 * Copyright (C) 2019-2020 Marvell International Ltd.
43 static void aq_nic_update_ndev_stats(struct aq_nic_s *self);
45 static void aq_nic_rss_init(struct aq_nic_s *self, unsigned int num_rss_queues) in aq_nic_rss_init() argument
54 struct aq_nic_cfg_s *cfg = &self->aq_nic_cfg; in aq_nic_rss_init()
58 rss_params = &cfg->aq_rss; in aq_nic_rss_init()
60 rss_params->hash_secret_key_size = sizeof(rss_key); in aq_nic_rss_init()
61 memcpy(rss_params->hash_secret_key, rss_key, sizeof(rss_key)); in aq_nic_rss_init()
62 rss_params->indirection_table_size = AQ_CFG_RSS_INDIRECTION_TABLE_MAX; in aq_nic_rss_init()
[all …]
H A Daq_vec.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (C) 2014-2019 aQuantia Corporation
5 * Copyright (C) 2019-2020 Marvell International Ltd.
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()
39 err = -EINVAL; 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()
[all …]
H A Daq_ring.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (C) 2014-2019 aQuantia Corporation
5 * Copyright (C) 2019-2020 Marvell International Ltd.
32 for (i = 0; i < sinfo->nr_frags; i++) { in aq_get_rxpages_xdp()
33 skb_frag_t *frag = &sinfo->frags[i]; in aq_get_rxpages_xdp()
38 page_ref_inc(buff->rxdata.page); in aq_get_rxpages_xdp()
43 unsigned int len = PAGE_SIZE << rxpage->order; in aq_free_rxpage()
45 dma_unmap_page(dev, rxpage->daddr, len, DMA_FROM_DEVICE); in aq_free_rxpage()
48 __free_pages(rxpage->page, rxpage->order); in aq_free_rxpage()
49 rxpage->page = NULL; in aq_free_rxpage()
[all …]
/linux/tools/verification/rvgen/rvgen/
H A Dgenerator.py2 # SPDX-License-Identifier: GPL-2.0-only
4 # Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org>
15 def __init__(self, extra_params={}): argument
16 self.name = extra_params.get("model_name")
17 self.parent = extra_params.get("parent")
18 self.abs_template_dir = \
19 os.path.join(os.path.dirname(__file__), "templates", self.template_dir)
20 self.main_c = self._read_template_file("main.c")
21 self.kconfig = self._read_template_file("Kconfig")
22 self.description = extra_params.get("description", self.name) or "auto-generated"
[all …]
H A Dltl2ba.py2 # SPDX-License-Identifier: GPL-2.0-only
6 # Simple On-the-fly Automatic Verification of Linear Temporal Logic.
7 # https://doi.org/10.1007/978-0-387-34892-6_1
17 # true, false, user-defined names
55 t_VARIABLE = r'[A-Z_0-9]+'
72 def __init__(self, incoming: set['GraphNode'], new, old, _next): argument
73 self.init = False
74 self.outgoing = set()
75 self.labels = set()
76 self.incoming = incoming.copy()
[all …]
H A Ddot2c.py2 # SPDX-License-Identifier: GPL-2.0-only
4 # Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org>
25 def __init__(self, file_path, model_name=None): argument
27 self.line_length = 100
29 def __buff_to_string(self, buff): argument
36 return string[:-1]
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:
[all …]
/linux/scripts/lib/kdoc/
H A Dkdoc_output.py2 # SPDX-License-Identifier: GPL-2.0
8 Implement output filters to print kernel-doc documentation.
30 type_constant2 = KernRe(r"\%([-_*\w]+)", cache=False)
32 type_param_ref = KernRe(r"([\!~\*]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)", cache=False)
38 type_fp_param2 = KernRe(r"\@(\w+->\S+)\(\)", cache=False)
45 type_member = KernRe(r"\&([_\w]+)(\.|->)([_\w]+)", cache=False)
52 Base class for OutputFormat. If used as-is, it means that only
60 OUTPUT_INTERNAL = 3 # output non-exporte
65 __init__(self) global() argument
78 set_config(self, config) global() argument
85 set_filter(self, export, internal, symbol, nosymbol, function_table, enable_lineno, no_doc_sections) global() argument
112 highlight_block(self, block) global() argument
122 out_warnings(self, args) global() argument
132 check_doc(self, name, args) global() argument
152 check_declaration(self, dtype, name, args) global() argument
180 msg(self, fname, name, args) global() argument
220 out_doc(self, fname, name, args) global() argument
223 out_function(self, fname, name, args) global() argument
226 out_enum(self, fname, name, args) global() argument
229 out_typedef(self, fname, name, args) global() argument
232 out_struct(self, fname, name, args) global() argument
263 __init__(self) global() argument
274 print_lineno(self, ln) global() argument
281 output_highlight(self, args) global() argument
333 out_section(self, args, out_docblock=False) global() argument
363 out_doc(self, fname, name, args) global() argument
368 out_function(self, fname, name, args) global() argument
455 out_enum(self, fname, name, args) global() argument
487 out_typedef(self, fname, name, args) global() argument
505 out_struct(self, fname, name, args) global() argument
591 __init__(self, modulename) global() argument
617 output_highlight(self, block) global() argument
638 out_doc(self, fname, name, args) global() argument
651 out_function(self, fname, name, args) global() argument
702 out_enum(self, fname, name, args) global() argument
738 out_typedef(self, fname, name, args) global() argument
754 out_struct(self, fname, name, args) global() argument
[all...]
/linux/tools/testing/selftests/hid/tests/
H A Dbase_device.py2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8 -*-
46 def __init__(self, path): argument
47 self.path = path
49 def __set_value(self, value): argument
50 with open(self.path, "w") as f:
53 def __get_value(self): argument
54 with open(self.path) as f:
58 def int_value(self) -> int: argument
59 return int(self.__get_value())
[all …]
/linux/tools/testing/kunit/
H A Dkunit_tool_test.py2 # SPDX-License-Identifier: GPL-2.0
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)
[all …]
/linux/tools/perf/tests/shell/lib/
H A Dperf_metric_validation.py1 # SPDX-License-Identifier: GPL-2.0
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:
[all …]
/linux/tools/net/ynl/pyynl/lib/
H A Dynl.py1 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
98 'binary', 'string', 'nul-string',
99 'nested', 'nested-array',
103 def __init__(self, nl_msg):
104 self.nl_msg = nl_msg argument
105 self
108 __str__(self) global() argument
129 __init__(self, raw, offset) global() argument
145 as_scalar(self, attr_type, byte_order=None) global() argument
149 as_auto_scalar(self, attr_type, byte_order=None) global() argument
156 as_strz(self) global() argument
159 as_bin(self) global() argument
162 as_c_array(self, type) global() argument
166 __repr__(self) global() argument
171 __init__(self, msg, offset=0) global() argument
179 __iter__(self) global() argument
182 __repr__(self) global() argument
192 __init__(self, msg, offset, attr_space=None) global() argument
236 _decode_policy(self, raw) global() argument
260 annotate_extack(self, attr_space) global() argument
272 cmd(self) global() argument
275 __repr__(self) global() argument
285 __init__(self, data) global() argument
294 __iter__(self) global() argument
364 __init__(self, nl_msg) global() argument
369 cmd(self) global() argument
372 __repr__(self) global() argument
381 __init__(self, family_name, proto_num) global() argument
385 _message(self, nl_type, nl_flags, seq=None) global() argument
391 message(self, flags, command, version, seq=None) global() argument
394 _decode(self, nl_msg) global() argument
397 decode(self, ynl, nl_msg, op) global() argument
405 get_mcast_id(self, mcast_name, mcast_groups) global() argument
410 msghdr_size(self) global() argument
415 __init__(self, family_name) global() argument
425 message(self, flags, command, version, seq=None) global() argument
430 _decode(self, nl_msg) global() argument
433 get_mcast_id(self, mcast_name, mcast_groups) global() argument
438 msghdr_size(self) global() argument
445 __init__(self, attr_space, attrs, outer = None) global() argument
450 lookup(self, name) global() argument
467 __init__(self, def_path, schema=None, process_unknown=False, recv_size=0) global() argument
511 ntf_subscribe(self, mcast_name) global() argument
517 set_recv_dbg(self, enabled) global() argument
520 _recv_dbg_print(self, reply, nl_msgs) global() argument
528 _encode_enum(self, attr_spec, value) global() argument
540 _get_scalar(self, attr_spec, value) global() argument
550 _add_attr(self, space, name, value, search_attrs) global() argument
626 _get_enum_or_unknown(self, enum, raw) global() argument
636 _decode_enum(self, raw, attr_spec) global() argument
650 _decode_binary(self, attr, attr_spec) global() argument
666 _decode_array_attr(self, attr, attr_spec) global() argument
692 _decode_nest_type_value(self, attr, attr_spec) global() argument
702 _decode_unknown(self, attr) global() argument
708 _rsp_add(self, rsp, name, is_multi, decoded) global() argument
723 _resolve_selector(self, attr_spec, search_attrs) global() argument
737 _decode_sub_msg(self, attr, attr_spec, search_attrs) global() argument
752 _decode(self, attrs, space, outer_attrs = None) global() argument
812 _decode_extack_path(self, attrs, attr_set, offset, target, search_attrs) global() argument
848 _decode_extack(self, request, op, extack, vals) global() argument
861 _struct_size(self, name) global() argument
878 _decode_struct(self, data, name) global() argument
907 _encode_struct(self, name, vals) global() argument
931 _formatted_string(self, raw, display_hint) global() argument
947 _from_string(self, string, attr_spec) global() argument
959 handle_ntf(self, decoded) global() argument
972 check_ntf(self) global() argument
997 poll_ntf(self, duration=None) global() argument
1016 operation_do_attributes(self, name) global() argument
1027 _encode_message(self, op, vals, flags, req_seq) global() argument
1041 _ops(self, ops) global() argument
1110 _op(self, method, vals, flags=None, dump=False) global() argument
1118 do(self, method, vals, flags=None) global() argument
1121 dump(self, method, vals) global() argument
1124 do_multi(self, ops) global() argument
[all...]
/linux/tools/testing/selftests/damon/
H A D_damon_sysfs.py1 # SPDX-License-Identifier: GPL-2.0
47 def __init__(self, size=None, nr_accesses=None, age=None):
48 self.size = size
49 self.nr_accesses = nr_accesses
50 self.age = age
52 if self.size is None:
53 self.size = [0, 2**64 -
43 __init__(self, size=None, nr_accesses=None, age=None) global() argument
55 sysfs_dir(self) global() argument
58 stage(self) global() argument
96 __init__(self, metric, target_value=10000, current_value=0) global() argument
101 sysfs_dir(self) global() argument
104 stage(self) global() argument
126 __init__(self, sz=0, ms=0, goals=None, reset_interval_ms=0) global() argument
135 sysfs_dir(self) global() argument
138 stage(self) global() argument
171 __init__(self, nr_tried, sz_tried, nr_applied, sz_applied, qt_exceeds) global() argument
179 __init__(self, start, end, nr_accesses, age) global() argument
197 __init__(self, action='stat', access_pattern=DamosAccessPattern(), quota=DamosQuota(), apply_interval_us=0) global() argument
206 sysfs_dir(self) global() argument
210 stage(self) global() argument
244 __init__(self, pid) global() argument
247 sysfs_dir(self) global() argument
251 stage(self) global() argument
267 __init__(self, sample_us=5000, aggr_us=100000, update_us=1000000, min_nr_regions=10, max_nr_regions=1000) global() argument
275 interval_sysfs_dir(self) global() argument
279 nr_regions_range_sysfs_dir(self) global() argument
283 stage(self) global() argument
317 __init__(self, ops='paddr', monitoring_attrs=DamonAttrs(), targets=[], schemes=[]) global() argument
333 sysfs_dir(self) global() argument
337 stage(self) global() argument
382 __init__(self, contexts=[]) global() argument
388 sysfs_dir(self) global() argument
391 start(self) global() argument
409 stop(self) global() argument
413 update_schemes_tried_regions(self) global() argument
443 update_schemes_tried_bytes(self) global() argument
456 update_schemes_stats(self) global() argument
473 update_schemes_effective_quotas(self) global() argument
489 commit(self) global() argument
508 commit_schemes_quota_goals(self) global() argument
523 __init__(self, kdamonds=[]) global() argument
529 sysfs_dir(self) global() argument
532 start(self) global() argument
543 stop(self) global() argument
[all...]
/linux/tools/testing/selftests/drivers/s390x/uvdevice/
H A Dtest_uvdevice.c1 // SPDX-License-Identifier: GPL-2.0
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()
45 (__u64)mmap(NULL, (size_t)getpagesize(), PROT_NONE, MAP_ANONYMOUS, -1, 0); 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()
[all …]
/linux/tools/kvm/kvm_stat/
H A Dkvm_stat2 # SPDX-License-Identifier: GPL-2.0-only
4 # top-like utility for displaying kvm statistics
6 # Copyright 2006-2008 Qumranet Technologies
7 # Copyright 2008-2011 Red Hat, Inc.
15 - as a top-like text ui
16 - in a key -> value format
17 - in an all keys, all values format
336 def tracepoint_is_child(self, field): argument
343 def __init__(self, exit_reasons): argument
344 self.sc_perf_evt_open = 298
[all …]
/linux/tools/net/ynl/pyynl/
H A Dynl_gen_c.py2 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
20 return name.upper().replace('-', '_')
24 return name.lower().replace('-', '_')
29 Turn a string limit like u32-max or s64-min into its numerical value
31 if name[0] == 'u' and name.endswith('-min'):
33 width = int(name[1:-4])
35 width -= 1
36 value = (1 << width) - 1
37 if name[0] == 's' and name.endswith('-min'):
38 value = -value - 1
[all …]

12345678910>>...41