Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 178) sorted by relevance

12345678

/tools/perf/util/
Dtop.c31 size_t ret = 0; in perf_top__header_snprintf() local
47 ret = SNPRINTF(bf, size, in perf_top__header_snprintf()
56 ret = SNPRINTF(bf, size, in perf_top__header_snprintf()
75 ret += SNPRINTF(bf + ret, size - ret, "%" PRIu64 "%s ", in perf_top__header_snprintf()
80 ret += SNPRINTF(bf + ret, size - ret, "%s", perf_evsel__name(top->sym_evsel)); in perf_top__header_snprintf()
82 ret += SNPRINTF(bf + ret, size - ret, "], "); in perf_top__header_snprintf()
85 ret += SNPRINTF(bf + ret, size - ret, " (target_pid: %s", in perf_top__header_snprintf()
88 ret += SNPRINTF(bf + ret, size - ret, " (target_tid: %s", in perf_top__header_snprintf()
91 ret += SNPRINTF(bf + ret, size - ret, " (uid: %s", in perf_top__header_snprintf()
94 ret += SNPRINTF(bf + ret, size - ret, " (all"); in perf_top__header_snprintf()
[all …]
Dwrapper.c17 char *ret = strdup(str); in xstrdup() local
18 if (!ret) { in xstrdup()
20 ret = strdup(str); in xstrdup()
21 if (!ret) in xstrdup()
24 return ret; in xstrdup()
29 void *ret = realloc(ptr, size); in xrealloc() local
30 if (!ret && !size) in xrealloc()
31 ret = realloc(ptr, 1); in xrealloc()
32 if (!ret) { in xrealloc()
34 ret = realloc(ptr, size); in xrealloc()
[all …]
Dprobe-event.c62 int ret; in e_snprintf() local
65 ret = vsnprintf(str, size, format, ap); in e_snprintf()
67 if (ret >= (int)size) in e_snprintf()
68 ret = -E2BIG; in e_snprintf()
69 return ret; in e_snprintf()
79 int ret; in init_symbol_maps() local
82 ret = symbol__init(NULL); in init_symbol_maps()
83 if (ret < 0) { in init_symbol_maps()
98 ret = -1; in init_symbol_maps()
101 if (ret < 0) in init_symbol_maps()
[all …]
Dprobe-finder.c180 int ret; in convert_variable_location() local
189 ret = dwarf_entrypc(sp_die, &tmp); in convert_variable_location()
190 if (ret || addr != tmp || in convert_variable_location()
215 ret = strlen(dwarf_diename(vr_die)); in convert_variable_location()
216 tvar->value = zalloc(ret + 2); in convert_variable_location()
219 snprintf(tvar->value, ret + 2, "@%s", dwarf_diename(vr_die)); in convert_variable_location()
286 int ret; in convert_variable_type() local
302 ret = snprintf(buf, 16, "b%d@%d/%zd", bsize, boffs, in convert_variable_type()
317 ret = dwarf_tag(&type); in convert_variable_type()
318 if (ret != DW_TAG_pointer_type && in convert_variable_type()
[all …]
Ddwarf-aux.c37 int ret; in cu_find_realpath() local
42 ret = dwarf_getsrcfiles(cu_die, &files, &nfiles); in cu_find_realpath()
43 if (ret != 0) in cu_find_realpath()
116 int ret = -ENOENT; in cu_walk_functions_at() local
123 ret = callback(sc_die, data); in cu_walk_functions_at()
124 if (ret) in cu_walk_functions_at()
128 return ret; in cu_walk_functions_at()
156 Dwarf_Word ret; in die_get_call_lineno() local
161 dwarf_formudata(&attr, &ret); in die_get_call_lineno()
162 return (int)ret; in die_get_call_lineno()
[all …]
Dtarget.c18 enum target_errno ret = TARGET_ERRNO__SUCCESS; in target__validate() local
26 if (ret == TARGET_ERRNO__SUCCESS) in target__validate()
27 ret = TARGET_ERRNO__PID_OVERRIDE_CPU; in target__validate()
33 if (ret == TARGET_ERRNO__SUCCESS) in target__validate()
34 ret = TARGET_ERRNO__PID_OVERRIDE_UID; in target__validate()
40 if (ret == TARGET_ERRNO__SUCCESS) in target__validate()
41 ret = TARGET_ERRNO__UID_OVERRIDE_CPU; in target__validate()
47 if (ret == TARGET_ERRNO__SUCCESS) in target__validate()
48 ret = TARGET_ERRNO__PID_OVERRIDE_SYSTEM; in target__validate()
54 if (ret == TARGET_ERRNO__SUCCESS) in target__validate()
[all …]
Ddebug.c25 int ret = 0; in _eprintf() local
31 ret = vfprintf(stderr, fmt, args); in _eprintf()
34 return ret; in _eprintf()
40 int ret; in eprintf() local
43 ret = _eprintf(level, var, fmt, args); in eprintf()
46 return ret; in eprintf()
51 int ret = 0; in __eprintf_time() local
58 ret = fprintf(stderr, "[%13" PRIu64 ".%06" PRIu64 "] ", in __eprintf_time()
60 ret += vfprintf(stderr, fmt, args); in __eprintf_time()
61 return ret; in __eprintf_time()
[all …]
/tools/perf/tests/
Devsel-tp-sched.c11 int ret = 0; in perf_evsel__test_field() local
22 ret = -1; in perf_evsel__test_field()
28 ret = -1; in perf_evsel__test_field()
31 return ret; in perf_evsel__test_field()
37 int ret = 0; in test__perf_evsel__tp_sched_test() local
45 ret = -1; in test__perf_evsel__tp_sched_test()
48 ret = -1; in test__perf_evsel__tp_sched_test()
51 ret = -1; in test__perf_evsel__tp_sched_test()
54 ret = -1; in test__perf_evsel__tp_sched_test()
57 ret = -1; in test__perf_evsel__tp_sched_test()
[all …]
Dcode-reading.c78 ssize_t ret; in read_objdump_output() local
82 ret = getline(&line, &line_len, f); in read_objdump_output()
85 if (ret < 0) { in read_objdump_output()
90 read_objdump_line(line, ret, buf, len); in read_objdump_output()
104 int ret; in read_via_objdump() local
107 ret = snprintf(cmd, sizeof(cmd), fmt, "objdump", addr, addr + len, in read_via_objdump()
109 if (ret <= 0 || (size_t)ret >= sizeof(cmd)) in read_via_objdump()
123 ret = read_objdump_output(f, &buf, &len); in read_via_objdump()
126 if (!ret) in read_via_objdump()
127 ret = len; in read_via_objdump()
[all …]
/tools/perf/
Dbuiltin-probe.c71 int ret; in parse_probe_event() local
82 ret = parse_perf_probe_command(str, pev); in parse_probe_event()
85 return ret; in parse_probe_event()
118 int i, len, ret, found_target; in parse_probe_event_argv() local
147 ret = parse_probe_event(buf); in parse_probe_event_argv()
149 return ret; in parse_probe_event_argv()
177 int ret = -ENOENT; in opt_set_target() local
188 return ret; in opt_set_target()
195 return ret; in opt_set_target()
203 ret = 0; in opt_set_target()
[all …]
/tools/cgroup/
Dcgroup_event_listener.c28 int ret; in main() local
37 ret = snprintf(event_control_path, PATH_MAX, "%s/cgroup.event_control", in main()
39 if (ret >= PATH_MAX) in main()
50 ret = snprintf(line, LINE_MAX, "%d %d %s", efd, cfd, argv[2]); in main()
51 if (ret >= LINE_MAX) in main()
54 ret = write(event_control, line, strlen(line) + 1); in main()
55 if (ret == -1) in main()
61 ret = read(efd, &result, sizeof(result)); in main()
62 if (ret == -1) { in main()
67 assert(ret == sizeof(result)); in main()
[all …]
/tools/perf/ui/stdio/
Dhist.c12 int ret = fprintf(fp, " "); in callchain__fprintf_left_margin() local
15 ret += fprintf(fp, " "); in callchain__fprintf_left_margin()
17 return ret; in callchain__fprintf_left_margin()
24 size_t ret = callchain__fprintf_left_margin(fp, left_margin); in ipchain__fprintf_graph_line() local
28 ret += fprintf(fp, "| "); in ipchain__fprintf_graph_line()
30 ret += fprintf(fp, " "); in ipchain__fprintf_graph_line()
32 ret += fprintf(fp, "\n"); in ipchain__fprintf_graph_line()
34 return ret; in ipchain__fprintf_graph_line()
43 size_t ret = 0; in ipchain__fprintf_graph() local
45 ret += callchain__fprintf_left_margin(fp, left_margin); in ipchain__fprintf_graph()
[all …]
/tools/power/cpupower/utils/
Dcpuidle-set.c32 int ret = 0, cont = 1, param = 0, disabled; in cmd_idle_set() local
38 ret = getopt_long(argc, argv, "d:e:ED:", info_opts, NULL); in cmd_idle_set()
39 if (ret == -1) in cmd_idle_set()
41 switch (ret) { in cmd_idle_set()
52 param = ret; in cmd_idle_set()
61 param = ret; in cmd_idle_set()
70 param = ret; in cmd_idle_set()
83 param = ret; in cmd_idle_set()
120 ret = sysfs_idlestate_disable(cpu, idlestate, 1); in cmd_idle_set()
121 if (ret == 0) in cmd_idle_set()
[all …]
/tools/usb/usbip/src/
Dusbip_port.c23 int ret; in list_imported_devices() local
25 ret = usbip_vhci_driver_open(); in list_imported_devices()
26 if (ret < 0) { in list_imported_devices()
38 ret = -1; in list_imported_devices()
43 return ret; in list_imported_devices()
50 int ret; in usbip_port_show() local
52 ret = list_imported_devices(); in usbip_port_show()
53 if (ret < 0) in usbip_port_show()
56 return ret; in usbip_port_show()
Dusbip_detach.c46 int ret; in detach_port() local
67 ret = usbip_vhci_driver_open(); in detach_port()
68 if (ret < 0) { in detach_port()
73 ret = usbip_vhci_detach_device(portnum); in detach_port()
74 if (ret < 0) in detach_port()
79 return ret; in detach_port()
89 int ret = -1; in usbip_detach() local
99 ret = detach_port(optarg); in usbip_detach()
109 return ret; in usbip_detach()
Dusbip_network.c213 int ret; in usbip_net_set_reuseaddr() local
215 ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); in usbip_net_set_reuseaddr()
216 if (ret < 0) in usbip_net_set_reuseaddr()
219 return ret; in usbip_net_set_reuseaddr()
225 int ret; in usbip_net_set_nodelay() local
227 ret = setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val)); in usbip_net_set_nodelay()
228 if (ret < 0) in usbip_net_set_nodelay()
231 return ret; in usbip_net_set_nodelay()
237 int ret; in usbip_net_set_keepalive() local
239 ret = setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)); in usbip_net_set_keepalive()
[all …]
/tools/usb/ffs-aio-example/multibuff/host_app/
Dtest.c66 int i, ret; in test_init() local
75 ret = libusb_init(&state->ctx); in test_init()
76 if (ret) { in test_init()
77 printf("cannot init libusb: %s\n", libusb_error_name(ret)); in test_init()
90 ret = libusb_get_device_descriptor(dev, &desc); in test_init()
91 if (ret) { in test_init()
93 libusb_error_name(ret)); in test_init()
107 ret = libusb_open(state->found, &state->handle); in test_init()
108 if (ret) { in test_init()
109 printf("cannot open device: %s\n", libusb_error_name(ret)); in test_init()
[all …]
/tools/usb/ffs-aio-example/simple/host_app/
Dtest.c66 int i, ret; in test_init() local
75 ret = libusb_init(&state->ctx); in test_init()
76 if (ret) { in test_init()
77 printf("cannot init libusb: %s\n", libusb_error_name(ret)); in test_init()
90 ret = libusb_get_device_descriptor(dev, &desc); in test_init()
91 if (ret) { in test_init()
93 libusb_error_name(ret)); in test_init()
107 ret = libusb_open(state->found, &state->handle); in test_init()
108 if (ret) { in test_init()
109 printf("cannot open device: %s\n", libusb_error_name(ret)); in test_init()
[all …]
/tools/power/cpupower/utils/helpers/
Dmsr.c78 int ret; in msr_intel_get_perf_bias() local
83 ret = read_msr(cpu, MSR_IA32_ENERGY_PERF_BIAS, &val); in msr_intel_get_perf_bias()
84 if (ret) in msr_intel_get_perf_bias()
85 return ret; in msr_intel_get_perf_bias()
91 int ret; in msr_intel_set_perf_bias() local
96 ret = write_msr(cpu, MSR_IA32_ENERGY_PERF_BIAS, val); in msr_intel_set_perf_bias()
97 if (ret) in msr_intel_set_perf_bias()
98 return ret; in msr_intel_set_perf_bias()
105 int ret; in msr_intel_get_turbo_ratio() local
110 ret = read_msr(cpu, MSR_NEHALEM_TURBO_RATIO_LIMIT, &val); in msr_intel_get_turbo_ratio()
[all …]
/tools/testing/selftests/ipc/
Dmsgque.c33 int fd, ret, id, i; in restore_queue() local
43 ret = write(fd, buf, strlen(buf)); in restore_queue()
44 if (ret != strlen(buf)) { in restore_queue()
58 ret = -EFAULT; in restore_queue()
66 ret = -errno; in restore_queue()
75 return ret; in restore_queue()
81 int cnt = 0, ret; in check_and_destroy_queue() local
84 ret = msgrcv(msgque->msq_id, &message.mtype, MAX_MSG_SIZE, in check_and_destroy_queue()
86 if (ret < 0) { in check_and_destroy_queue()
90 ret = -errno; in check_and_destroy_queue()
[all …]
/tools/testing/selftests/net/
Dpsock_fanout.c141 int ret[2]; in sock_fanout_read() local
143 ret[0] = sock_fanout_read_ring(fds[0], rings[0]); in sock_fanout_read()
144 ret[1] = sock_fanout_read_ring(fds[1], rings[1]); in sock_fanout_read()
147 ret[0], ret[1], expect[0], expect[1]); in sock_fanout_read()
149 if ((!(ret[0] == expect[0] && ret[1] == expect[1])) && in sock_fanout_read()
150 (!(ret[0] == expect[1] && ret[1] == expect[0]))) { in sock_fanout_read()
212 int fds[2], fds_udp[2][2], ret; in test_datapath() local
231 ret = sock_fanout_read(fds, rings, expect1); in test_datapath()
236 ret |= sock_fanout_read(fds, rings, expect2); in test_datapath()
250 return ret; in test_datapath()
[all …]
/tools/perf/ui/gtk/
Dannotate.c28 int ret = 0; in perf_gtk__get_percent() local
43 ret += scnprintf(buf, size, "%s", markup); in perf_gtk__get_percent()
44 ret += scnprintf(buf + ret, size - ret, "%6.2f%%", percent); in perf_gtk__get_percent()
46 ret += scnprintf(buf + ret, size - ret, "</span>"); in perf_gtk__get_percent()
48 return ret; in perf_gtk__get_percent()
66 int ret = 0; in perf_gtk__get_line() local
79 ret += scnprintf(buf, size, "%s", markup); in perf_gtk__get_line()
80 ret += scnprintf(buf + ret, size - ret, "%s", line); in perf_gtk__get_line()
82 ret += scnprintf(buf + ret, size - ret, "</span>"); in perf_gtk__get_line()
85 return ret; in perf_gtk__get_line()
[all …]
/tools/testing/selftests/kcmp/
Dkcmp_test.c48 int ret; in main() local
73 ret = sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd1); in main()
74 if (ret) { in main()
76 ret, strerror(errno)); in main()
77 ret = -1; in main()
82 ret = sys_kcmp(pid1, pid1, KCMP_VM, 0, 0); in main()
83 if (ret) { in main()
85 ret, strerror(errno)); in main()
86 ret = -1; in main()
90 exit(ret); in main()
/tools/perf/bench/
Dsched-pipe.c59 int ret; in worker_thread() local
63 ret = read(td->pipe_read, &m, sizeof(int)); in worker_thread()
64 BUG_ON(ret != sizeof(int)); in worker_thread()
65 ret = write(td->pipe_write, &m, sizeof(int)); in worker_thread()
66 BUG_ON(ret != sizeof(int)); in worker_thread()
68 ret = write(td->pipe_write, &m, sizeof(int)); in worker_thread()
69 BUG_ON(ret != sizeof(int)); in worker_thread()
70 ret = read(td->pipe_read, &m, sizeof(int)); in worker_thread()
71 BUG_ON(ret != sizeof(int)); in worker_thread()
92 int __maybe_unused ret, wait_stat; in bench_sched_pipe() local
[all …]
/tools/virtio/virtio-trace/
Dtrace-agent-ctl.c53 int ret = 0; in wait_order() local
59 ret = poll(&poll_fd, 1, EVENT_WAIT_MSEC); in wait_order()
69 ret = -1; in wait_order()
73 if (ret < 0) { in wait_order()
78 if (ret) in wait_order()
82 return ret; in wait_order()
95 int ret; in rw_ctl_loop() local
104 ret = wait_order(ctl_fd); in rw_ctl_loop()
105 if (ret < 0) in rw_ctl_loop()

12345678