/tools/perf/util/ |
D | trigger.h | 36 #define TRIGGER_WARN_ONCE(t, exp) \ argument 37 WARN_ONCE(t->state != exp, "trigger '%s' state transist error: %d in %s()\n", \ 38 t->name, t->state, __func__) 40 static inline bool trigger_is_available(struct trigger *t) in trigger_is_available() argument 42 return t->state >= 0; in trigger_is_available() 45 static inline bool trigger_is_error(struct trigger *t) in trigger_is_error() argument 47 return t->state <= TRIGGER_ERROR; in trigger_is_error() 50 static inline void trigger_on(struct trigger *t) in trigger_on() argument 52 TRIGGER_WARN_ONCE(t, TRIGGER_OFF); in trigger_on() 53 t->state = TRIGGER_ON; in trigger_on() [all …]
|
/tools/testing/selftests/bpf/prog_tests/ |
D | btf_write.c | 9 const struct btf_type *t; in test_btf_write() local 33 t = btf__type_by_id(btf, 1); in test_btf_write() 35 ASSERT_EQ(t->name_off, str_off, "int_name_off"); in test_btf_write() 36 ASSERT_STREQ(btf__str_by_offset(btf, t->name_off), "int", "int_name"); in test_btf_write() 37 ASSERT_EQ(btf_kind(t), BTF_KIND_INT, "int_kind"); in test_btf_write() 38 ASSERT_EQ(t->size, 4, "int_sz"); in test_btf_write() 39 ASSERT_EQ(btf_int_encoding(t), BTF_INT_SIGNED, "int_enc"); in test_btf_write() 40 ASSERT_EQ(btf_int_bits(t), 32, "int_bits"); in test_btf_write() 60 t = btf__type_by_id(btf, 2); in test_btf_write() 61 ASSERT_EQ(btf_kind(t), BTF_KIND_PTR, "ptr_kind"); in test_btf_write() [all …]
|
D | btf_split.c | 18 const struct btf_type *t; in test_btf_split() local 45 t = btf__type_by_id(btf2, 1); in test_btf_split() 46 if (!ASSERT_OK_PTR(t, "int_type")) in test_btf_split() 48 ASSERT_EQ(btf_is_int(t), true, "int_kind"); in test_btf_split() 49 ASSERT_STREQ(btf__str_by_offset(btf2, t->name_off), "int", "int_name"); in test_btf_split() 57 t = btf__type_by_id(btf1, 4); in test_btf_split() 58 ASSERT_NULL(t, "split_type_in_main"); in test_btf_split() 60 t = btf__type_by_id(btf2, 4); in test_btf_split() 61 if (!ASSERT_OK_PTR(t, "split_struct_type")) in test_btf_split() 63 ASSERT_EQ(btf_is_struct(t), true, "split_struct_kind"); in test_btf_split() [all …]
|
D | rdonly_maps.c | 45 const struct rdonly_map_subtest *t = &subtests[i]; in test_rdonly_maps() local 47 if (!test__start_subtest(t->subtest_name)) in test_rdonly_maps() 50 prog = bpf_object__find_program_by_name(obj, t->prog_name); in test_rdonly_maps() 52 t->prog_name)) in test_rdonly_maps() 74 "prog '%s' didn't run?\n", t->prog_name)) in test_rdonly_maps() 76 if (CHECK(bss.iters != t->exp_iters, "check_iters", in test_rdonly_maps() 78 t->prog_name, bss.iters, t->exp_iters)) in test_rdonly_maps() 80 if (CHECK(bss.sum != t->exp_sum, "check_sum", in test_rdonly_maps() 82 t->prog_name, bss.sum, t->exp_sum)) in test_rdonly_maps()
|
D | sk_lookup.c | 599 static void run_lookup_prog(const struct test *t) in run_lookup_prog() argument 606 lookup_link = attach_lookup_prog(t->lookup_prog); in run_lookup_prog() 611 server_fds[i] = make_server(t->sotype, t->listen_at.ip, in run_lookup_prog() 612 t->listen_at.port, in run_lookup_prog() 613 t->reuseport_prog); in run_lookup_prog() 617 err = update_lookup_map(t->sock_map, i, server_fds[i]); in run_lookup_prog() 622 if (!t->reuseport_prog) in run_lookup_prog() 632 if (t->reuseport_has_conns) { in run_lookup_prog() 637 reuse_conn_fd = make_server(t->sotype, t->listen_at.ip, in run_lookup_prog() 638 t->listen_at.port, in run_lookup_prog() [all …]
|
/tools/lib/bpf/ |
D | btf.h | 215 static inline __u16 btf_kind(const struct btf_type *t) in btf_kind() argument 217 return BTF_INFO_KIND(t->info); in btf_kind() 220 static inline __u16 btf_vlen(const struct btf_type *t) in btf_vlen() argument 222 return BTF_INFO_VLEN(t->info); in btf_vlen() 225 static inline bool btf_kflag(const struct btf_type *t) in btf_kflag() argument 227 return BTF_INFO_KFLAG(t->info); in btf_kflag() 230 static inline bool btf_is_void(const struct btf_type *t) in btf_is_void() argument 232 return btf_kind(t) == BTF_KIND_UNKN; in btf_is_void() 235 static inline bool btf_is_int(const struct btf_type *t) in btf_is_int() argument 237 return btf_kind(t) == BTF_KIND_INT; in btf_is_int() [all …]
|
D | btf_dump.c | 309 const struct btf_type *t; in btf_dump_mark_referenced() local 313 t = btf__type_by_id(d->btf, i); in btf_dump_mark_referenced() 314 vlen = btf_vlen(t); in btf_dump_mark_referenced() 316 switch (btf_kind(t)) { in btf_dump_mark_referenced() 330 d->type_states[t->type].referenced = 1; in btf_dump_mark_referenced() 334 const struct btf_array *a = btf_array(t); in btf_dump_mark_referenced() 342 const struct btf_member *m = btf_members(t); in btf_dump_mark_referenced() 349 const struct btf_param *p = btf_params(t); in btf_dump_mark_referenced() 356 const struct btf_var_secinfo *v = btf_var_secinfos(t); in btf_dump_mark_referenced() 475 const struct btf_type *t; in btf_dump_order_type() local [all …]
|
D | btf.c | 283 static int btf_type_size(const struct btf_type *t) in btf_type_size() argument 286 __u16 vlen = btf_vlen(t); in btf_type_size() 288 switch (btf_kind(t)) { in btf_type_size() 314 pr_debug("Unsupported BTF_KIND:%u\n", btf_kind(t)); in btf_type_size() 319 static void btf_bswap_type_base(struct btf_type *t) in btf_bswap_type_base() argument 321 t->name_off = bswap_32(t->name_off); in btf_bswap_type_base() 322 t->info = bswap_32(t->info); in btf_bswap_type_base() 323 t->type = bswap_32(t->type); in btf_bswap_type_base() 326 static int btf_bswap_type_rest(struct btf_type *t) in btf_bswap_type_rest() argument 333 __u16 vlen = btf_vlen(t); in btf_bswap_type_rest() [all …]
|
/tools/perf/util/scripting-engines/ |
D | trace-event-python.c | 207 PyObject *t; in define_value() local 214 t = PyTuple_New(4); in define_value() 215 if (!t) in define_value() 220 PyTuple_SetItem(t, n++, _PyUnicode_FromString(ev_name)); in define_value() 221 PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_name)); in define_value() 222 PyTuple_SetItem(t, n++, _PyLong_FromLong(value)); in define_value() 223 PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_str)); in define_value() 225 try_call_object(handler_name, t); in define_value() 227 Py_DECREF(t); in define_value() 248 PyObject *t; in define_field() local [all …]
|
/tools/testing/selftests/tc-testing/ |
D | TdcResults.py | 73 return sum(1 for t in self._testsuite if t.result == ResultState.fail) 76 return sum(1 for t in self._testsuite if t.result == ResultState.skip) 93 for t in self._testsuite: 94 if t.result == ResultState.fail: 96 ftap += 'ok {} {} - {}'.format(str(index), t.test_id, t.test_name) 97 if t.result == ResultState.skip or t.result == ResultState.noresult: 98 ftap += ' # skipped - {}\n'.format(t.errormsg) 99 elif t.result == ResultState.fail: 100 if len(t.steps) > 0: 102 for step in t.steps: [all …]
|
/tools/testing/selftests/ |
D | kselftest_harness.h | 846 static inline void __register_test(struct __test_metadata *t) in __register_test() argument 848 __LIST_APPEND(t->fixture->tests, t); in __register_test() 864 struct __test_metadata *t = __active_test; in __timeout_handler() local 867 if (!t) { in __timeout_handler() 875 t->name, sig != SIGALRM ? sig : info->si_signo); in __timeout_handler() 879 t->timed_out = true; in __timeout_handler() 881 kill(-(t->pid), SIGKILL); in __timeout_handler() 884 void __wait_for_test(struct __test_metadata *t) in __wait_for_test() argument 894 t->passed = 0; in __wait_for_test() 897 t->name); in __wait_for_test() [all …]
|
/tools/testing/selftests/bpf/ |
D | btf_helpers.c | 64 static const char *btf_func_linkage_str(const struct btf_type *t) in btf_func_linkage_str() argument 66 switch (btf_vlen(t)) { in btf_func_linkage_str() 87 const struct btf_type *t; in fprintf_btf_type_raw() local 91 t = btf__type_by_id(btf, id); in fprintf_btf_type_raw() 92 if (!t) in fprintf_btf_type_raw() 95 vlen = btf_vlen(t); in fprintf_btf_type_raw() 96 kind = btf_kind(t); in fprintf_btf_type_raw() 98 fprintf(out, "[%u] %s '%s'", id, btf_kind_str(kind), btf_str(btf, t->name_off)); in fprintf_btf_type_raw() 103 t->size, btf_int_offset(t), btf_int_bits(t), in fprintf_btf_type_raw() 104 btf_int_enc_str(btf_int_encoding(t))); in fprintf_btf_type_raw() [all …]
|
/tools/testing/selftests/bpf/progs/ |
D | test_subprogs.c | 54 __noinline int get_task_tgid(uintptr_t t) in get_task_tgid() argument 57 return BPF_CORE_READ((struct task_struct *)(void *)t, tgid); in get_task_tgid() 71 struct task_struct *t = (void *)bpf_get_current_task(); in prog1() local 73 if (!BPF_CORE_READ(t, pid) || !get_task_tgid((uintptr_t)t)) in prog1() 83 struct task_struct *t = (void *)bpf_get_current_task(); in prog2() local 85 if (!BPF_CORE_READ(t, pid) || !get_task_tgid((uintptr_t)t)) in prog2() 96 struct task_struct *t = (void *)bpf_get_current_task(); in prog3() local 98 if (!BPF_CORE_READ(t, pid) || !get_task_tgid((uintptr_t)t)) in prog3() 109 struct task_struct *t = (void *)bpf_get_current_task(); in prog4() local 111 if (!BPF_CORE_READ(t, pid) || !get_task_tgid((uintptr_t)t)) in prog4()
|
/tools/usb/ |
D | ffs-test.c | 336 static ssize_t read_wrap(struct thread *t, void *buf, size_t nbytes); 337 static ssize_t write_wrap(struct thread *t, const void *buf, size_t nbytes); 338 static ssize_t ep0_consume(struct thread *t, const void *buf, size_t nbytes); 339 static ssize_t fill_in_buf(struct thread *t, void *buf, size_t nbytes); 340 static ssize_t empty_out_buf(struct thread *t, const void *buf, size_t nbytes); 379 static void init_thread(struct thread *t) in init_thread() argument 381 t->buf = malloc(t->buf_size); in init_thread() 382 die_on(!t->buf, "malloc"); in init_thread() 384 t->fd = open(t->filename, O_RDWR); in init_thread() 385 die_on(t->fd < 0, "%s", t->filename); in init_thread() [all …]
|
/tools/perf/bench/ |
D | sched-pipe.c | 84 int t; in bench_sched_pipe() local 101 for (t = 0; t < nr_threads; t++) { in bench_sched_pipe() 102 td = threads + t; in bench_sched_pipe() 104 td->nr = t; in bench_sched_pipe() 106 if (t == 0) { in bench_sched_pipe() 118 for (t = 0; t < nr_threads; t++) { in bench_sched_pipe() 119 td = threads + t; in bench_sched_pipe() 125 for (t = 0; t < nr_threads; t++) { in bench_sched_pipe() 126 td = threads + t; in bench_sched_pipe()
|
/tools/testing/selftests/powerpc/include/ |
D | instructions.h | 79 #define __PPC_RT(t) __PPC_RS(t) argument 98 #define PREFIX_MLS(instr, t, a, r, d) stringify_in_c(.balign 64, , 4;) \ argument 103 __PPC_RT(t) | \ 107 #define PREFIX_8LS(instr, t, a, r, d) stringify_in_c(.balign 64, , 4;) \ argument 112 __PPC_RT(t) | \ 117 #define PLBZ(t, a, r, d) PREFIX_MLS(PPC_INST_LBZ, t, a, r, d) argument 118 #define PLHZ(t, a, r, d) PREFIX_MLS(PPC_INST_LHZ, t, a, r, d) argument 119 #define PLHA(t, a, r, d) PREFIX_MLS(PPC_INST_LHA, t, a, r, d) argument 120 #define PLWZ(t, a, r, d) PREFIX_MLS(PPC_INST_LWZ, t, a, r, d) argument 121 #define PLWA(t, a, r, d) PREFIX_8LS(0xa4000000, t, a, r, d) argument [all …]
|
/tools/firewire/ |
D | nosy-dump.c | 162 struct link_transaction *t; in link_transaction_lookup() local 164 list_for_each_entry(t, &pending_transaction_list, link) { in link_transaction_lookup() 165 if (t->request_node == request_node && in link_transaction_lookup() 166 t->response_node == response_node && in link_transaction_lookup() 167 t->tlabel == tlabel) in link_transaction_lookup() 168 return t; in link_transaction_lookup() 171 t = malloc(sizeof *t); in link_transaction_lookup() 172 if (!t) in link_transaction_lookup() 174 t->request_node = request_node; in link_transaction_lookup() 175 t->response_node = response_node; in link_transaction_lookup() [all …]
|
D | decode-fcp.c | 145 decode_avc(struct link_transaction *t) in decode_avc() argument 148 (struct avc_frame *) t->request->packet.write_block.data; in decode_avc() 174 decode_fcp(struct link_transaction *t) in decode_fcp() argument 177 (struct avc_frame *) t->request->packet.write_block.data; in decode_fcp() 179 ((unsigned long long) t->request->packet.common.offset_high << 32) | in decode_fcp() 180 t->request->packet.common.offset_low; in decode_fcp() 182 if (t->request->packet.common.tcode != TCODE_WRITE_BLOCK_REQUEST) in decode_fcp() 188 decode_avc(t); in decode_fcp()
|
/tools/testing/selftests/net/ |
D | rxtimestamp.c | 128 void print_test_case(struct test_case *t) in print_test_case() argument 133 if (t->sockopt.so_timestamp) in print_test_case() 135 if (t->sockopt.so_timestampns) in print_test_case() 137 if (t->sockopt.so_timestamping) { in print_test_case() 140 if (t->sockopt.so_timestamping & sof_flags[f].mask) in print_test_case() 145 if (t->expected.tstamp) in print_test_case() 147 if (t->expected.tstampns) in print_test_case() 149 if (t->expected.swtstamp || t->expected.hwtstamp) { in print_test_case() 151 if (t->expected.swtstamp) in print_test_case() 153 if (t->expected.swtstamp && t->expected.hwtstamp) in print_test_case() [all …]
|
/tools/testing/nvdimm/test/ |
D | nfit.c | 202 int (*alloc)(struct nfit_test *t); 203 void (*setup)(struct nfit_test *t); 233 static int nd_intel_test_get_fw_info(struct nfit_test *t, in nd_intel_test_get_fw_info() argument 237 struct device *dev = &t->pdev.dev; in nd_intel_test_get_fw_info() 238 struct nfit_test_fw *fw = &t->fw[idx]; in nd_intel_test_get_fw_info() 241 __func__, t, nd_cmd, buf_len, idx); in nd_intel_test_get_fw_info() 259 static int nd_intel_test_start_update(struct nfit_test *t, in nd_intel_test_start_update() argument 263 struct device *dev = &t->pdev.dev; in nd_intel_test_start_update() 264 struct nfit_test_fw *fw = &t->fw[idx]; in nd_intel_test_start_update() 267 __func__, t, nd_cmd, buf_len, idx); in nd_intel_test_start_update() [all …]
|
/tools/bpf/bpftool/ |
D | btf_dumper.c | 100 const struct btf_type *t, in btf_dumper_ptr() argument 110 ptr_type_id = btf__resolve_type(d->btf, t->type); in btf_dumper_ptr() 140 const struct btf_type *t, in btf_dumper_enum() argument 143 const struct btf_enum *enums = btf_enum(t); in btf_dumper_enum() 147 switch (t->size) { in btf_dumper_enum() 164 for (i = 0; i < btf_vlen(t); i++) { in btf_dumper_enum() 216 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_array() local 217 struct btf_array *arr = (struct btf_array *)(t + 1); in btf_dumper_array() 361 static int btf_dumper_int(const struct btf_type *t, __u8 bit_offset, in btf_dumper_int() argument 368 int_type = (__u32 *)(t + 1); in btf_dumper_int() [all …]
|
/tools/accounting/ |
D | getdelays.c | 195 #define average_ms(t, c) (t / 1000000ULL / (c ? c : 1)) argument 197 static void print_delayacct(struct taskstats *t) in print_delayacct() argument 211 (unsigned long long)t->cpu_count, in print_delayacct() 212 (unsigned long long)t->cpu_run_real_total, in print_delayacct() 213 (unsigned long long)t->cpu_run_virtual_total, in print_delayacct() 214 (unsigned long long)t->cpu_delay_total, in print_delayacct() 215 average_ms((double)t->cpu_delay_total, t->cpu_count), in print_delayacct() 217 (unsigned long long)t->blkio_count, in print_delayacct() 218 (unsigned long long)t->blkio_delay_total, in print_delayacct() 219 average_ms(t->blkio_delay_total, t->blkio_count), in print_delayacct() [all …]
|
/tools/perf/tests/ |
D | builtin-test.c | 453 #define for_each_test(j, t) \ argument 455 for (t = &tests[j][0]; t->func; t++) 457 static int test_and_print(struct test *t, bool force_skip, int subtest) in test_and_print() argument 463 err = run_test(t, subtest); in test_and_print() 470 if (!t->subtest.get_nr) in test_and_print() 471 pr_debug("%s:", t->desc); in test_and_print() 473 pr_debug("%s subtest %d:", t->desc, subtest + 1); in test_and_print() 481 if (t->subtest.skip_reason) in test_and_print() 482 skip_reason = t->subtest.skip_reason(subtest); in test_and_print() 653 struct test *t; in __cmd_test() local [all …]
|
D | is_printable_array.c | 16 } t[] = { in test__is_printable_array() local 27 for (i = 0; i < ARRAY_SIZE(t); i++) { in test__is_printable_array() 30 ret = is_printable_array((char *) t[i].buf, t[i].len); in test__is_printable_array() 31 if (ret != t[i].ret) { in test__is_printable_array()
|
/tools/power/cpupower/utils/helpers/ |
D | amd.c | 46 int t; in get_did() local 49 t = pstate.pstatedef.did; in get_did() 51 t = pstate.val & 0xf; in get_did() 53 t = pstate.pstate.did; in get_did() 55 return t; in get_did() 60 int t; in get_cof() local 68 t = 0x10; in get_cof() 71 t = 0x8; in get_cof() 72 cof = (100 * (fid + t)) >> did; in get_cof()
|