Home
last modified time | relevance | path

Searched refs:s (Results 1 – 25 of 307) sorted by relevance

12345678910>>...13

/tools/lib/traceevent/
Dtrace-seq.c22 #define TRACE_SEQ_CHECK(s) \ argument
24 if (WARN_ONCE((s)->buffer == TRACE_SEQ_POISON, \
26 (s)->state = TRACE_SEQ__BUFFER_POISONED; \
29 #define TRACE_SEQ_CHECK_RET_N(s, n) \ argument
31 TRACE_SEQ_CHECK(s); \
32 if ((s)->state != TRACE_SEQ__GOOD) \
36 #define TRACE_SEQ_CHECK_RET(s) TRACE_SEQ_CHECK_RET_N(s, ) argument
37 #define TRACE_SEQ_CHECK_RET0(s) TRACE_SEQ_CHECK_RET_N(s, 0) argument
43 void trace_seq_init(struct trace_seq *s) in trace_seq_init() argument
45 s->len = 0; in trace_seq_init()
[all …]
Dtrace-seq.h38 void trace_seq_init(struct trace_seq *s);
39 void trace_seq_reset(struct trace_seq *s);
40 void trace_seq_destroy(struct trace_seq *s);
42 extern int trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
44 extern int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args)
47 extern int trace_seq_puts(struct trace_seq *s, const char *str);
48 extern int trace_seq_putc(struct trace_seq *s, unsigned char c);
50 extern void trace_seq_terminate(struct trace_seq *s);
52 extern int trace_seq_do_fprintf(struct trace_seq *s, FILE *fp);
53 extern int trace_seq_do_printf(struct trace_seq *s);
/tools/vm/
Dslabinfo.c203 static void set_obj(struct slabinfo *s, const char *name, int n) in set_obj() argument
208 snprintf(x, 100, "%s/%s", s->name, name); in set_obj()
217 static unsigned long read_slab_obj(struct slabinfo *s, const char *name) in read_slab_obj() argument
223 snprintf(x, 100, "%s/%s", s->name, name); in read_slab_obj()
299 static void slab_validate(struct slabinfo *s) in slab_validate() argument
301 if (strcmp(s->name, "*") == 0) in slab_validate()
304 set_obj(s, "validate", 1); in slab_validate()
307 static void slab_shrink(struct slabinfo *s) in slab_shrink() argument
309 if (strcmp(s->name, "*") == 0) in slab_shrink()
312 set_obj(s, "shrink", 1); in slab_shrink()
[all …]
/tools/testing/selftests/powerpc/stringloops/
Dstrlen.c12 int test_strlen(const void *s);
15 static void test_one(char *s) in test_one() argument
23 y = strlen(s + offset); in test_one()
24 x = test_strlen(s + offset); in test_one()
27 printf("strlen() returned %d, should have returned %d (%p offset %ld)\n", x, y, s, offset); in test_one()
30 printf("%02x ", s[i]); in test_one()
36 static void bench_test(char *s) in bench_test() argument
44 test_strlen(s); in bench_test()
48 …printf("len %3.3d : time = %.6f\n", test_strlen(s), ts_end.tv_sec - ts_start.tv_sec + (ts_end.tv_n… in bench_test()
53 char *s; in testcase() local
[all …]
/tools/lib/traceevent/plugins/
Dplugin_sched_switch.c27 static void write_state(struct trace_seq *s, int val) in write_state() argument
38 trace_seq_putc(s, '|'); in write_state()
41 trace_seq_putc(s, states[i]); in write_state()
45 trace_seq_putc(s, 'R'); in write_state()
50 struct trace_seq *s, int pid) in write_and_save_comm() argument
56 len = s->len; in write_and_save_comm()
57 trace_seq_printf(s, "%.*s", in write_and_save_comm()
61 trace_seq_terminate(s); in write_and_save_comm()
62 comm = &s->buffer[len]; in write_and_save_comm()
68 static int sched_wakeup_handler(struct trace_seq *s, in sched_wakeup_handler() argument
[all …]
Dplugin_hrtimer.c28 static int timer_expire_handler(struct trace_seq *s, in timer_expire_handler() argument
32 trace_seq_printf(s, "hrtimer="); in timer_expire_handler()
34 if (tep_print_num_field(s, "0x%llx", event, "timer", in timer_expire_handler()
36 tep_print_num_field(s, "0x%llx", event, "hrtimer", in timer_expire_handler()
39 trace_seq_printf(s, " now="); in timer_expire_handler()
41 tep_print_num_field(s, "%llu", event, "now", record, 1); in timer_expire_handler()
43 tep_print_func_field(s, " function=%s", event, "function", in timer_expire_handler()
48 static int timer_start_handler(struct trace_seq *s, in timer_start_handler() argument
52 trace_seq_printf(s, "hrtimer="); in timer_start_handler()
54 if (tep_print_num_field(s, "0x%llx", event, "timer", in timer_start_handler()
[all …]
Dplugin_mac80211.c29 static void print_string(struct trace_seq *s, struct tep_event *event, in print_string() argument
37 trace_seq_printf(s, "NOTFOUND:%s", name); in print_string()
47 trace_seq_printf(s, "invalid_data_loc"); in print_string()
54 trace_seq_printf(s, "%.*s", length, (char *)data + offset); in print_string()
57 #define SF(fn) tep_print_num_field(s, fn ":%d", event, fn, record, 0)
58 #define SFX(fn) tep_print_num_field(s, fn ":%#x", event, fn, record, 0)
59 #define SP() trace_seq_putc(s, ' ')
61 static int drv_bss_info_changed(struct trace_seq *s, in drv_bss_info_changed() argument
67 print_string(s, event, "wiphy_name", data); in drv_bss_info_changed()
68 trace_seq_printf(s, " vif:"); in drv_bss_info_changed()
[all …]
Dplugin_kvm.c251 static int print_exit_reason(struct trace_seq *s, struct tep_record *record, in print_exit_reason() argument
258 if (tep_get_field_val(s, event, field, record, &val, 1) < 0) in print_exit_reason()
261 if (tep_get_field_val(s, event, "isa", record, &isa, 0) < 0) in print_exit_reason()
266 trace_seq_printf(s, "reason %s", reason); in print_exit_reason()
268 trace_seq_printf(s, "reason UNKNOWN (%llu)", val); in print_exit_reason()
272 static int kvm_exit_handler(struct trace_seq *s, struct tep_record *record, in kvm_exit_handler() argument
277 if (print_exit_reason(s, record, event, "exit_reason") < 0) in kvm_exit_handler()
280 tep_print_num_field(s, " rip 0x%lx", event, "guest_rip", record, 1); in kvm_exit_handler()
282 if (tep_get_field_val(s, event, "info1", record, &info1, 0) >= 0 in kvm_exit_handler()
283 && tep_get_field_val(s, event, "info2", record, &info2, 0) >= 0) in kvm_exit_handler()
[all …]
/tools/virtio/virtio-trace/
Dtrace-agent.c49 struct agent_info *s; in agent_info_new() local
52 s = zalloc(sizeof(struct agent_info)); in agent_info_new()
53 if (s == NULL) { in agent_info_new()
58 s->pipe_size = PIPE_INIT; in agent_info_new()
59 s->use_stdout = false; in agent_info_new()
60 s->cpus = get_total_cpus(); in agent_info_new()
61 s->ctl_fd = -1; in agent_info_new()
64 for (i = 0; i < s->cpus; i++) in agent_info_new()
65 s->rw_ti[i] = rw_thread_info_new(); in agent_info_new()
67 return s; in agent_info_new()
[all …]
/tools/io_uring/
Dio_uring-bench.c107 static int io_uring_register_buffers(struct submitter *s) in io_uring_register_buffers() argument
112 return io_uring_register(s->ring_fd, IORING_REGISTER_BUFFERS, s->iovecs, in io_uring_register_buffers()
116 static int io_uring_register_files(struct submitter *s) in io_uring_register_files() argument
123 s->fds = calloc(s->nr_files, sizeof(__s32)); in io_uring_register_files()
124 for (i = 0; i < s->nr_files; i++) { in io_uring_register_files()
125 s->fds[i] = s->files[i].real_fd; in io_uring_register_files()
126 s->files[i].fixed_fd = i; in io_uring_register_files()
129 return io_uring_register(s->ring_fd, IORING_REGISTER_FILES, s->fds, in io_uring_register_files()
130 s->nr_files); in io_uring_register_files()
138 static unsigned file_depth(struct submitter *s) in file_depth() argument
[all …]
/tools/testing/selftests/kvm/lib/
Dsparsebit.c205 static struct node *node_first(struct sparsebit *s) in node_first() argument
209 for (nodep = s->root; nodep && nodep->left; nodep = nodep->left) in node_first()
219 static struct node *node_next(struct sparsebit *s, struct node *np) in node_next() argument
247 static struct node *node_prev(struct sparsebit *s, struct node *np) in node_prev() argument
310 static struct node *node_find(struct sparsebit *s, sparsebit_idx_t idx) in node_find() argument
315 for (nodep = s->root; nodep; in node_find()
333 static struct node *node_add(struct sparsebit *s, sparsebit_idx_t idx) in node_add() argument
347 if (!s->root) { in node_add()
348 s->root = nodep; in node_add()
356 parentp = s->root; in node_add()
[all …]
/tools/lib/
Dstring.c48 int strtobool(const char *s, bool *res) in strtobool() argument
50 if (!s) in strtobool()
53 switch (s[0]) { in strtobool()
66 switch (s[1]) { in strtobool()
132 char *strim(char *s) in strim() argument
137 size = strlen(s); in strim()
139 return s; in strim()
141 end = s + size - 1; in strim()
142 while (end >= s && isspace(*end)) in strim()
146 return skip_spaces(s); in strim()
[all …]
/tools/lib/subcmd/
Dsigchain.c23 struct sigchain_signal *s = signals + sig; in sigchain_push() local
26 ALLOC_GROW(s->old, s->n + 1, s->alloc); in sigchain_push()
27 s->old[s->n] = signal(sig, f); in sigchain_push()
28 if (s->old[s->n] == SIG_ERR) in sigchain_push()
30 s->n++; in sigchain_push()
36 struct sigchain_signal *s = signals + sig; in sigchain_pop() local
38 if (s->n < 1) in sigchain_pop()
41 if (signal(sig, s->old[s->n - 1]) == SIG_ERR) in sigchain_pop()
43 s->n--; in sigchain_pop()
Dparse-options.h124 #define OPT_BIT(s, l, v, h, b) { .type = OPTION_BIT, .short_name = (s), .long_name = (l), .val… argument
125 #define OPT_BOOLEAN(s, l, v, h) { .type = OPTION_BOOLEAN, .short_name = (s), .long_name = (l), … argument
126 #define OPT_BOOLEAN_FLAG(s, l, v, h, f) { .type = OPTION_BOOLEAN, .short_name = (s), .long_name… argument
127 #define OPT_BOOLEAN_SET(s, l, v, os, h) \ argument
128 { .type = OPTION_BOOLEAN, .short_name = (s), .long_name = (l), \
131 #define OPT_INCR(s, l, v, h) { .type = OPTION_INCR, .short_name = (s), .long_name = (l), .va… argument
132 #define OPT_SET_UINT(s, l, v, h, i) { .type = OPTION_SET_UINT, .short_name = (s), .long_name = (l)… argument
133 #define OPT_SET_PTR(s, l, v, h, p) { .type = OPTION_SET_PTR, .short_name = (s), .long_name = (l), … argument
134 #define OPT_INTEGER(s, l, v, h) { .type = OPTION_INTEGER, .short_name = (s), .long_name = (l), … argument
135 #define OPT_UINTEGER(s, l, v, h) { .type = OPTION_UINTEGER, .short_name = (s), .long_name = (l),… argument
[all …]
/tools/testing/selftests/net/
Dsocket.c45 struct socket_testcase *s = &tests[i]; in run_tests() local
48 fd = socket(s->domain, s->type, s->protocol); in run_tests()
50 if (s->nosupport_ok && in run_tests()
54 if (s->expect < 0 && in run_tests()
55 errno == -s->expect) in run_tests()
58 strerror_r(-s->expect, err_string1, ERR_STRING_SZ); in run_tests()
63 s->domain, s->type, s->protocol, in run_tests()
71 if (s->expect < 0) { in run_tests()
76 s->domain, s->type, s->protocol, in run_tests()
/tools/perf/
Dbuiltin-list.c63 char *sep, *s; in cmd_list() local
98 s = strdup(argv[i]); in cmd_list()
99 if (s == NULL) in cmd_list()
102 s[sep_idx] = '\0'; in cmd_list()
103 print_tracepoint_events(s, s + sep_idx + 1, raw_dump); in cmd_list()
104 print_sdt_events(s, s + sep_idx + 1, raw_dump); in cmd_list()
105 metricgroup__print(true, true, s, raw_dump, details_flag); in cmd_list()
106 free(s); in cmd_list()
108 if (asprintf(&s, "*%s*", argv[i]) < 0) { in cmd_list()
112 print_symbol_events(s, PERF_TYPE_HARDWARE, in cmd_list()
[all …]
/tools/scripts/
DMakefile.arch2 HOSTARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
3 -e s/sun4u/sparc/ -e s/sparc64/sparc/ \
4 -e /arm64/!s/arm.*/arm/ -e s/sa110/arm/ \
5 -e s/s390x/s390/ -e s/parisc64/parisc/ \
6 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
7 -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ )
/tools/perf/util/
Dstrfilter.c38 static const char *get_token(const char *s, const char **e) in get_token() argument
42 s = skip_spaces(s); in get_token()
44 if (*s == '\0') { in get_token()
45 p = s; in get_token()
49 p = s + 1; in get_token()
50 if (!is_separator(*s)) { in get_token()
63 return s; in get_token()
81 static struct strfilter_node *strfilter_node__new(const char *s, in strfilter_node__new() argument
87 if (!s) in strfilter_node__new()
93 s = get_token(s, &e); in strfilter_node__new()
[all …]
Dstrlist.c17 const char *s = entry; in strlist__node_new() local
24 s = strdup(s); in strlist__node_new()
25 if (s == NULL) in strlist__node_new()
28 snode->s = s; in strlist__node_new()
42 zfree((char **)&snode->s); in str_node__delete()
60 return strcmp(snode->s, str); in strlist__node_cmp()
111 static int strlist__parse_list_entry(struct strlist *slist, const char *s, in strlist__parse_list_entry() argument
117 if (strncmp(s, "file://", 7) == 0) in strlist__parse_list_entry()
118 return strlist__load(slist, s + 7); in strlist__parse_list_entry()
122 if (asprintf(&subst, "%s/%s", subst_dir, s) < 0) in strlist__parse_list_entry()
[all …]
Dparse-regs-options.c17 char *s, *os = NULL, *p; in __parse_regs() local
38 s = os = strdup(str); in __parse_regs()
39 if (!s) in __parse_regs()
43 p = strchr(s, ','); in __parse_regs()
47 if (!strcmp(s, "?")) { in __parse_regs()
58 if ((r->mask & mask) && !strcasecmp(s, r->name)) in __parse_regs()
63 s, intr ? "-I" : "--user-regs="); in __parse_regs()
72 s = p + 1; in __parse_regs()
Dterm.c10 char *s = getenv("LINES"); in get_term_dimensions() local
12 if (s != NULL) { in get_term_dimensions()
13 ws->ws_row = atoi(s); in get_term_dimensions()
14 s = getenv("COLUMNS"); in get_term_dimensions()
15 if (s != NULL) { in get_term_dimensions()
16 ws->ws_col = atoi(s); in get_term_dimensions()
/tools/build/feature/
Dtest-cxx.cpp5 static void print_str(std::string s) in print_str() argument
7 std::cout << s << std::endl; in print_str()
12 std::string s("Hello World!"); in main() local
13 print_str(std::move(s)); in main()
14 std::cout << "|" << s << "|" << std::endl; in main()
/tools/testing/selftests/kvm/x86_64/
Dsync_regs_test.c147 compare_regs(&regs, &run->s.regs.regs); in main()
150 compare_sregs(&sregs, &run->s.regs.sregs); in main()
153 compare_vcpu_events(&events, &run->s.regs.events); in main()
156 run->s.regs.regs.rbx = 0xBAD1DEA; in main()
157 run->s.regs.sregs.apic_base = 1 << 11; in main()
167 TEST_ASSERT(run->s.regs.regs.rbx == 0xBAD1DEA + 1, in main()
169 run->s.regs.regs.rbx); in main()
170 TEST_ASSERT(run->s.regs.sregs.apic_base == 1 << 11, in main()
172 run->s.regs.sregs.apic_base); in main()
175 compare_regs(&regs, &run->s.regs.regs); in main()
[all …]
/tools/perf/arch/arm64/annotate/
Dinstructions.c16 char *s = strchr(ops->raw, ','), *target, *endptr; in arm64_mov__parse() local
18 if (s == NULL) in arm64_mov__parse()
21 *s = '\0'; in arm64_mov__parse()
23 *s = ','; in arm64_mov__parse()
28 target = ++s; in arm64_mov__parse()
37 s = strchr(endptr, '<'); in arm64_mov__parse()
38 if (s == NULL) in arm64_mov__parse()
40 endptr = strchr(s + 1, '>'); in arm64_mov__parse()
45 *s = ' '; in arm64_mov__parse()
46 ops->target.name = strdup(s); in arm64_mov__parse()
[all …]
/tools/virtio/linux/
Dkernel.h53 static inline void *kmalloc(size_t s, gfp_t gfp) in kmalloc() argument
57 return malloc(s); in kmalloc()
59 static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp) in kmalloc_array() argument
61 return kmalloc(n * s, gfp); in kmalloc_array()
64 static inline void *kzalloc(size_t s, gfp_t gfp) in kzalloc() argument
66 void *p = kmalloc(s, gfp); in kzalloc()
68 memset(p, 0, s); in kzalloc()
72 static inline void *alloc_pages_exact(size_t s, gfp_t gfp) in alloc_pages_exact() argument
74 return kmalloc(s, gfp); in alloc_pages_exact()
84 static inline void free_pages_exact(void *p, size_t s) in free_pages_exact() argument
[all …]

12345678910>>...13