Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 66) sorted by relevance

123

/tools/bpf/bpftool/
Djson_writer.c29 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 …]
Djson_writer.h28 void jsonw_pretty(json_writer_t *self, bool on);
31 void jsonw_name(json_writer_t *self, const char *name);
34 void __printf(2, 0) jsonw_vprintf_enquote(json_writer_t *self, const char *fmt,
36 void __printf(2, 3) jsonw_printf(json_writer_t *self, const char *fmt, ...);
37 void jsonw_string(json_writer_t *self, const char *value);
38 void jsonw_bool(json_writer_t *self, bool value);
39 void jsonw_float(json_writer_t *self, double number);
40 void jsonw_float_fmt(json_writer_t *self, const char *fmt, double num);
41 void jsonw_uint(json_writer_t *self, uint64_t number);
42 void jsonw_hu(json_writer_t *self, unsigned short number);
[all …]
/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
DSchedGui.py23 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 …]
DEventClass.py38 def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_GENERIC): argument
39 self.name = name
40 self.comm = comm
41 self.dso = dso
42 self.symbol = symbol
43 self.raw_buf = raw_buf
44 self.ev_type = ev_type
47 def show(self): argument
49 (self.name, self.symbol, self.comm, self.dso))
58 def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_PEBS): argument
[all …]
DCore.py103 def __init__(self, common_cpu, common_secs, common_nsecs, argument
105 self.cpu = common_cpu
106 self.secs = common_secs
107 self.nsecs = common_nsecs
108 self.pid = common_pid
109 self.comm = common_comm
110 self.callchain = common_callchain
112 def ts(self): argument
113 return (self.secs * (10 ** 9)) + self.nsecs
115 def ts_format(self): argument
[all …]
/tools/perf/scripts/python/
Dexported-sql-viewer.py190 def __init__(self, task, param=None, parent=None): argument
191 super(Thread, self).__init__(parent)
192 self.task = task
193 self.param = param
195 def run(self): argument
197 if self.param is None:
198 done, result = self.task()
200 done, result = self.task(self.param)
201 self.done.emit(result)
209 def __init__(self, glb, params, parent=None): argument
[all …]
Dsched-migration.py41 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
63 def __repr__(self): argument
64 return "%s woke up" % thread_name(self.wakee)
71 def __init__(self, child): argument
[all …]
Dcompaction-times.py29 def __init__(self, re): argument
30 self.re = re
32 def filter(self, pid, comm): argument
33 m = self.re.search(comm)
37 def __init__(self, low, high): argument
38 self.low = (0 if low == "" else int(low))
39 self.high = (0 if high == "" else int(high))
41 def filter(self, pid, comm): argument
42 return not (pid >= self.low and (self.high == 0 or pid <= self.high))
55 def __init__(self, aval, bval, alabel = None, blabel = None): argument
[all …]
/tools/testing/selftests/tc-testing/
DTdcPlugin.py4 def __init__(self): argument
6 print(' -- {}.__init__'.format(self.sub_class))
8 def pre_suite(self, testcount, testidlist): argument
10 self.testcount = testcount
11 self.testidlist = testidlist
12 if self.args.verbose > 1:
13 print(' -- {}.pre_suite'.format(self.sub_class))
15 def post_suite(self, index): argument
18 if self.args.verbose > 1:
19 print(' -- {}.post_suite'.format(self.sub_class))
[all …]
DTdcResults.py12 def __init__(self, test_id="", test_name=""): argument
13 self.test_id = test_id
14 self.test_name = test_name
15 self.result = ResultState.noresult
16 self.failmsg = ""
17 self.errormsg = ""
18 self.steps = []
20 def set_result(self, result): argument
22 self.result = result
27 def get_result(self): argument
[all …]
/tools/kvm/kvm_stat/
Dkvm_stat263 def tracepoint_is_child(self, field): argument
270 def __init__(self, exit_reasons): argument
271 self.sc_perf_evt_open = 298
272 self.ioctl_numbers = IOCTL_NUMBERS
273 self.exit_reason_field = 'exit_reason'
274 self.exit_reasons = exit_reasons
276 def debugfs_is_child(self, field): argument
282 def __init__(self): argument
283 self.sc_perf_evt_open = 319
284 self.ioctl_numbers = IOCTL_NUMBERS
[all …]
/tools/testing/selftests/tc-testing/plugin-lib/
DnsPlugin.py11 def __init__(self): argument
12 self.sub_class = 'ns/SubPlugin'
15 def pre_suite(self, testcount, testidlist): argument
19 if self.args.namespace:
20 self._ns_create()
22 self._ports_create()
24 def post_suite(self, index): argument
27 if self.args.verbose:
28 print('{}.post_suite'.format(self.sub_class))
30 if self.args.namespace:
[all …]
DvalgrindPlugin.py22 def __init__(self): argument
23 self.sub_class = 'valgrind/SubPlugin'
24 self.tap = ''
25 self._tsr = TestSuiteReport()
28 def pre_suite(self, testcount, testidlist): argument
31 if self.args.verbose > 1:
32 print('{}.pre_suite'.format(self.sub_class))
33 if self.args.valgrind:
34 self._add_to_tap('1..{}\n'.format(self.testcount))
36 def post_suite(self, index): argument
[all …]
DbuildebpfPlugin.py14 def __init__(self): argument
15 self.sub_class = 'buildebpf/SubPlugin'
16 self.tap = ''
19 def pre_suite(self, testcount, testidlist): argument
22 if self.args.buildebpf:
23 self._ebpf_makeall()
25 def post_suite(self, index): argument
28 self._ebpf_makeclean()
30 def add_args(self, parser): argument
33 self.argparser_group = self.argparser.add_argument_group(
[all …]
DscapyPlugin.py21 def __init__(self): argument
22 self.sub_class = 'scapy/SubPlugin'
25 def post_execute(self): argument
26 if 'scapy' not in self.args.caseinfo:
27 if self.args.verbose:
28 print('{}.post_execute: no scapy info in test case'.format(self.sub_class))
32 scapyinfo = self.args.caseinfo['scapy']
42 .format(self.sub_class))
/tools/testing/selftests/tpm2/
Dtpm2_tests.py14 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)
28 self.assertEqual(data, result)
[all …]
Dtpm2.py203 def __init__(self, alg): argument
204 self.alg = alg
206 def __str__(self): argument
211 def __init__(self, name): argument
212 self.name = name
214 def __str__(self): argument
219 def __init__(self, alg): argument
220 self.alg = alg
222 def __str__(self): argument
227 def __init__(self, cc, rc): argument
[all …]
/tools/perf/tests/
Dattr.py33 def __init__(self, test, msg): argument
34 self.msg = msg
35 self.test = test
36 def getMsg(self): argument
37 return '\'%s\' - %s' % (self.test.path, self.msg)
40 def __init__(self, test, arch): argument
41 self.arch = arch
42 self.test = test
43 def getMsg(self): argument
44 return '[%s] \'%s\'' % (self.arch, self.test.path)
[all …]
/tools/cgroup/
Diocost_monitor.py67 def walk(self, blkcg, q_id, parent_path): argument
68 if not self.include_dying and \
79 self.blkgs.append((path if path else '/', blkg))
83 self.walk(c, q_id, path)
85 def __init__(self, root_blkcg, q_id, include_dying=False): argument
86 self.include_dying = include_dying
87 self.blkgs = []
88 self.walk(root_blkcg, q_id, '')
90 def __iter__(self): argument
91 return iter(self.blkgs)
[all …]
/tools/power/pm-graph/
Dsleepgraph.py280 def __init__(self): argument
281 self.archargs = 'args_'+platform.machine()
282 self.hostname = platform.node()
283 if(self.hostname == ''):
284 self.hostname = 'localhost'
291 self.rtcpath = rtc
293 self.ansi = True
294 self.testdir = datetime.now().strftime('suspend-%y%m%d-%H%M%S')
297 self.sudouser = os.environ['SUDO_USER']
298 def vprint(self, msg): argument
[all …]
/tools/testing/selftests/rtc/
Drtctest.c31 self->fd = open(rtc_file, O_RDONLY); in FIXTURE_SETUP()
32 ASSERT_NE(-1, self->fd); in FIXTURE_SETUP()
36 close(self->fd); in FIXTURE_TEARDOWN()
44 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm); in TEST_F()
57 rc = ioctl(self->fd, RTC_UIE_ON, 0);
66 rc = read(self->fd, &data, sizeof(data));
73 rc = ioctl(self->fd, RTC_UIE_OFF, 0);
82 rc = ioctl(self->fd, RTC_UIE_ON, 0); in TEST_F()
94 FD_SET(self->fd, &readfds); in TEST_F()
96 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv); in TEST_F()
[all …]
/tools/testing/selftests/net/
Dtls.c40 self->notls = false; in FIXTURE_SETUP()
47 self->fd = socket(AF_INET, SOCK_STREAM, 0); in FIXTURE_SETUP()
58 ret = connect(self->fd, &addr, sizeof(addr)); in FIXTURE_SETUP()
61 self->cfd = accept(sfd, &addr, &len); in FIXTURE_SETUP()
62 ASSERT_GE(self->cfd, 0); in FIXTURE_SETUP()
66 ret = setsockopt(self->fd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in FIXTURE_SETUP()
69 self->notls = true; in FIXTURE_SETUP()
74 ret = setsockopt(self->cfd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in FIXTURE_SETUP()
80 close(self->fd); in FIXTURE_TEARDOWN()
81 close(self->cfd); in FIXTURE_TEARDOWN()
[all …]
/tools/testing/selftests/seccomp/
Dseccomp_bpf.c919 memset(&self->prog, 0, sizeof(self->prog)); in FIXTURE_SETUP()
920 self->prog.filter = malloc(sizeof(filter)); in FIXTURE_SETUP()
921 ASSERT_NE(NULL, self->prog.filter); in FIXTURE_SETUP()
922 memcpy(self->prog.filter, filter, sizeof(filter)); in FIXTURE_SETUP()
923 self->prog.len = (unsigned short)ARRAY_SIZE(filter); in FIXTURE_SETUP()
928 if (self->prog.filter) in FIXTURE_TEARDOWN()
929 free(self->prog.filter); in FIXTURE_TEARDOWN()
939 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->prog); in TEST_F_SIGNAL()
954 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->prog); in TEST_F_SIGNAL()
990 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->prog); in TEST_F()
[all …]
/tools/testing/selftests/proc/
D.gitignore6 /proc-self-map-files-001
7 /proc-self-map-files-002
8 /proc-self-syscall
9 /proc-self-wchan
13 /self
16 /thread-self
DMakefile11 TEST_GEN_PROGS += proc-self-map-files-001
12 TEST_GEN_PROGS += proc-self-map-files-002
13 TEST_GEN_PROGS += proc-self-syscall
14 TEST_GEN_PROGS += proc-self-wchan
18 TEST_GEN_PROGS += self
21 TEST_GEN_PROGS += thread-self

123