Home
last modified time | relevance | path

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

12345678910>>...42

/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
44 return (bit_start, bit_end), data >> bit_start & ((1 << (1 + bit_end - bit_start)) - 1)
66 def __init__(self, cr3, page_levels): argument
67 self.cr3 = cr3
68 self.page_levels = page_levels
69 self.page_level_write_through = is_bit_defined_tupled(cr3, 3)
70 self.page_level_cache_disabled = is_bit_defined_tupled(cr3, 4)
71 self.next_entry_physical_address = cr3 & PHYSICAL_ADDRESS_MASK & page_mask()
73 def next_entry(self, va): argument
74 next_level = self.page_levels
[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/net/ynl/lib/
H A Dnlspec.py1 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
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 def __getitem__(self, key): argument
[all …]
H A Dynl.py1 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
96 'binary', 'string', 'nul-string',
97 'nested', 'nested-array',
101 def __init__(self, nl_msg): argument
102 self.nl_msg = nl_msg
103 self.error = -nl_msg.error
105 def __str__(self): argument
106 return f"Netlink error: {os.strerror(self.error)}\n{self.nl_msg}"
126 def __init__(self, raw, offset): argument
127 self._len, self._type = struct.unpack("HH", raw[offset : offset + 4])
[all …]
/linux/tools/testing/selftests/drivers/net/lib/py/
H A Denv.py1 # SPDX-License-Identifier: GPL-2.0
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
[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/scripts/
H A Drust_is_available_test.py2 # SPDX-License-Identifier: GPL-2.0
40 if "-E" in " ".join(sys.argv):
50 if "--print sysroot" in " ".join(sys.argv):
102 …cls.rustc_default_version = subprocess.check_output(("scripts/min-tool-version.sh", "rustc")).deco…
103 …cls.bindgen_default_version = subprocess.check_output(("scripts/min-tool-version.sh", "bindgen")).…
104 …cls.llvm_default_version = subprocess.check_output(("scripts/min-tool-version.sh", "llvm")).decode…
105 …cls.rust_default_sysroot = subprocess.check_output(("rustc", "--print", "sysroot")).decode().strip…
109 …gen_libclang.h:2:9: warning: clang version {cls.llvm_default_version} [-W#pragma-messages], err: f…
115 def run_script(self, expected, override_env): argument
117 "RUSTC": self.default_rustc,
[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/tools/testing/selftests/hid/tests/
H A Dbase_device.py2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8 -*-
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())
[all …]
/linux/tools/testing/kunit/
H A Dkunit_tool_test.py2 # SPDX-License-Identifier: GPL-2.0
43 def test_is_subset_of(self): argument
45 self.assertTrue(kconfig0.is_subset_of(kconfig0))
49 self.assertTrue(kconfig1.is_subset_of(kconfig1))
50 self.assertTrue(kconfig0.is_subset_of(kconfig1))
51 self.assertFalse(kconfig1.is_subset_of(kconfig0))
53 def test_read_from_file(self): argument
65 self.assertEqual(kconfig, expected_kconfig)
67 def test_write_to_file(self): argument
80 self.assertEqual(actual_kconfig, expected_kconfig)
[all …]
/linux/tools/verification/dot2/
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): 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/tools/testing/selftests/damon/
H A D_damon_sysfs.py1 # SPDX-License-Identifier: GPL-2.0
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:
[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'), description=str()): 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
19 __repr__(self) global() argument
38 __init__(self, rulefname, reportfname='', t=5, debug=False, datafname='', fullrulefname='', workload='true', metrics='') global() argument
70 __set_metrics(self, metrics='') global() argument
76 read_json(self, filename: str) global() argument
86 json_dump(self, data, output_file) global() argument
97 get_results(self, idx: int = 0) global() argument
100 get_bounds(self, lb, ub, error, alias={}, ridx: int = 0) global() argument
141 get_value(self, name: str, ridx: int = 0) global() argument
161 check_bound(self, val, lb, ub, err) global() argument
165 pos_val_test(self) global() argument
203 evaluate_formula(self, formula: str, alias: dict, ridx: int = 0) global() argument
247 relationship_test(self, rule: dict) global() argument
286 single_test(self, rule: dict) global() argument
334 create_report(self) global() argument
345 check_rule(self, testtype, metric_list) global() argument
360 convert(self, data: list, metricvalues: dict) global() argument
375 _run_perf(self, metric, workload: str) global() argument
387 collect_perf(self, workload: str) global() argument
419 second_test(self, collectlist, second_results) global() argument
428 parse_perf_metrics(self) global() argument
453 remove_unsupported_rules(self, rules) global() argument
465 create_rules(self) global() argument
501 _storewldata(self, key) global() argument
511 _init_data(self) global() argument
521 test(self) global() argument
[all...]
/linux/drivers/net/ethernet/aquantia/atlantic/
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/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/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 in FIXTURE_SETUP()
186 att_inval_sizes_test(uint32_t * size,uint32_t max_size,bool test_zero,struct __test_metadata * _metadata,FIXTURE_DATA (attest_fixture)* self) att_inval_sizes_test() argument
234 att_inval_addr_test(__u64 * addr,struct __test_metadata * _metadata,FIXTURE_DATA (attest_fixture)* self) att_inval_addr_test() argument
[all...]
/linux/tools/net/ynl/
H A Dynl-gen-c.py2 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
17 return name.upper().replace('-', '_')
21 return name.lower().replace('-', '_')
26 Turn a string limit like u32-max or s64-min into its numerical value
28 if name[0] == 'u' and name.endswith('-min'):
30 width = int(name[1:-4])
32 width -= 1
33 value = (1 << width) - 1
34 if name[0] == 's' and name.endswith('-min'):
35 value = -value - 1
[all …]
/linux/drivers/net/ethernet/aquantia/atlantic/hw_atl/
H A Dhw_atl_utils.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (C) 2014-2019 aQuantia Corporation
5 * Copyright (C) 2019-2020 Marvell International Ltd.
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);
[all …]
/linux/tools/testing/selftests/tpm2/
H A Dtpm2_tests.py1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
14 def setUp(self): argument
15 self.client = tpm2.Client()
16 self.root_key = self.client.create_root_key()
18 def tearDown(self): argument
19 self.client.flush_context(self.root_key)
20 self.client.close()
22 def test_seal_with_auth(self): argument
26 blob = self.client.seal(self.root_key, data, auth, None)
27 result = self.client.unseal(self.root_key, blob, auth, None)
[all …]

12345678910>>...42