Home
last modified time | relevance | path

Searched refs:bytes_read (Results 1 – 12 of 12) sorted by relevance

/tools/power/acpi/tools/ec/
A Dec_access.c129 int byte_off, bytes_read; in dump_ec() local
131 bytes_read = read(fd, buf, EC_SPACE_SIZE); in dump_ec()
133 if (bytes_read == -1) in dump_ec()
136 if (bytes_read != EC_SPACE_SIZE) in dump_ec()
137 fprintf(stderr, "Could only read %d bytes\n", bytes_read); in dump_ec()
140 for (byte_off = 0; byte_off < bytes_read; byte_off++) { in dump_ec()
154 bytes_read = read(fd, buf2, EC_SPACE_SIZE); in dump_ec()
156 if (bytes_read == -1) in dump_ec()
159 if (bytes_read != EC_SPACE_SIZE) in dump_ec()
160 fprintf(stderr, "Could only read %d bytes\n", bytes_read); in dump_ec()
[all …]
/tools/perf/scripts/perl/
A Drwtop.pl44 $reads{$common_pid}{bytes_read} += $ret;
46 if (!defined ($reads{$common_pid}{bytes_read})) {
47 $reads{$common_pid}{bytes_read} = 0;
136 foreach my $pid (sort { ($reads{$b}{bytes_read} || 0) <=>
137 ($reads{$a}{bytes_read} || 0) } keys %reads) {
141 my $bytes_read = $reads{$pid}{bytes_read} || 0;
144 $total_reads, $bytes_requested, $bytes_read);
A Drw-by-pid.pl31 $reads{$common_pid}{bytes_read} += $ret;
33 if (!defined ($reads{$common_pid}{bytes_read})) {
34 $reads{$common_pid}{bytes_read} = 0;
82 foreach my $pid (sort { ($reads{$b}{bytes_read} || 0) <=>
83 ($reads{$a}{bytes_read} || 0) } keys %reads) {
87 my $bytes_read = $reads{$pid}{bytes_read} || 0;
90 $total_reads, $bytes_requested, $bytes_read);
/tools/testing/selftests/sparc64/drivers/
A Dadi-test.c182 int ret, bytes_read = 0; in read_adi() local
187 ret = read(fd, buf + bytes_read, buf_sz - bytes_read); in read_adi()
194 bytes_read += ret; in read_adi()
196 } while (bytes_read < buf_sz); in read_adi()
201 return bytes_read; in read_adi()
207 int ret, i, bytes_read = 0; in pread_adi() local
214 ret = pread(fd, buf + bytes_read, buf_sz - bytes_read, in pread_adi()
222 bytes_read += ret; in pread_adi()
225 } while (bytes_read < buf_sz); in pread_adi()
229 bytes_read, offset); in pread_adi()
[all …]
/tools/testing/selftests/coredump/
A Dstackdump_test.c349 if (bytes_read < 0) in TEST_F()
352 if (bytes_read == 0) in TEST_F()
800 if (bytes_read < 0) in TEST_F()
803 if (bytes_read == 0) in TEST_F()
917 ssize_t bytes_read; in TEST_F() local
920 if (bytes_read > 0) in TEST_F()
923 if (bytes_read < 0) in TEST_F()
926 if (bytes_read == 0) in TEST_F()
1030 ssize_t bytes_read; in TEST_F() local
1033 if (bytes_read > 0) in TEST_F()
[all …]
/tools/testing/vsock/
A Dvsock_perf.c219 ssize_t bytes_read; in run_receiver() local
223 bytes_read = read(fds.fd, data, buf_size_bytes); in run_receiver()
227 if (!bytes_read) in run_receiver()
230 if (bytes_read < 0) { in run_receiver()
235 total_recv += bytes_read; in run_receiver()
/tools/perf/tests/
A Dcode-reading.c50 size_t bytes_read = 0; in read_objdump_chunk() local
69 bytes_read++; in read_objdump_chunk()
84 if (bytes_read > 1 && !host_is_bigendian()) { in read_objdump_chunk()
85 unsigned char *chunk_end = chunk_start + bytes_read - 1; in read_objdump_chunk()
97 return bytes_read; in read_objdump_chunk()
104 size_t ret, bytes_read = 0; in read_objdump_line() local
121 bytes_read += ret; in read_objdump_line()
126 return bytes_read; in read_objdump_line()
/tools/testing/selftests/proc/
A Dproc-maps-race.c109 ssize_t bytes_read; in read_two_pages() local
114 bytes_read = read(self->maps_fd, self->page1.data, self->page_size); in read_two_pages()
115 if (bytes_read <= 0) in read_two_pages()
118 self->page1.size = bytes_read; in read_two_pages()
120 bytes_read = read(self->maps_fd, self->page2.data, self->page_size); in read_two_pages()
121 if (bytes_read <= 0) in read_two_pages()
124 self->page2.size = bytes_read; in read_two_pages()
/tools/power/acpi/os_specific/service_layers/
A Dosunixxf.c52 acpi_status acpi_ut_read_line(char *buffer, u32 buffer_length, u32 *bytes_read);
440 acpi_status acpi_os_get_line(char *buffer, u32 buffer_length, u32 *bytes_read) in acpi_os_get_line() argument
469 if (bytes_read) { in acpi_os_get_line()
470 *bytes_read = end_of_line; in acpi_os_get_line()
/tools/perf/util/
A Devlist.c2023 size_t bytes_read = 0; in evlist__ctlfd_recv() local
2034 cmd_data[bytes_read++] = c; in evlist__ctlfd_recv()
2035 if (bytes_read == data_size) in evlist__ctlfd_recv()
2050 bytes_read == data_size ? "" : c == '\n' ? "\\n" : "\\0"); in evlist__ctlfd_recv()
2052 if (bytes_read > 0) { in evlist__ctlfd_recv()
2075 return bytes_read ? (int)bytes_read : err; in evlist__ctlfd_recv()
/tools/testing/selftests/kvm/lib/
A Dkvm_util.c76 ssize_t bytes_read; in get_module_param() local
89 bytes_read = read(fd, buffer, buffer_size); in get_module_param()
90 TEST_ASSERT(bytes_read > 0, "read(%s) returned %ld, wanted %ld bytes", in get_module_param()
91 path, bytes_read, buffer_size); in get_module_param()
95 return bytes_read; in get_module_param()
/tools/power/x86/turbostat/
A Dturbostat.c4534 int bytes_read; in read_perf_counter_info() local
4546 bytes_read = read(fdmt, buf, sizeof(buf) - 1); in read_perf_counter_info()
4547 if (bytes_read <= 0 || bytes_read >= (int)sizeof(buf)) { in read_perf_counter_info()
4554 buf[bytes_read] = '\0'; in read_perf_counter_info()

Completed in 68 milliseconds