Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 42) sorted by relevance

12

/tools/lib/traceevent/
Dtrace-seq.c36 if (WARN_ONCE((s)->buffer == TRACE_SEQ_POISON, \
60 s->buffer = malloc(s->buffer_size); in trace_seq_init()
61 if (s->buffer != NULL) in trace_seq_init()
91 free(s->buffer); in trace_seq_destroy()
92 s->buffer = TRACE_SEQ_POISON; in trace_seq_destroy()
99 buf = realloc(s->buffer, s->buffer_size + TRACE_SEQ_BUF_SIZE); in expand_buffer()
105 s->buffer = buf; in expand_buffer()
136 ret = vsnprintf(s->buffer + s->len, len, fmt, ap); in trace_seq_printf()
171 ret = vsnprintf(s->buffer + s->len, len, fmt, args); in trace_seq_vprintf()
206 memcpy(s->buffer + s->len, str, len); in trace_seq_puts()
[all …]
Dplugin_scsi.c157 const char *ret = p->buffer + p->len; in scsi_trace_rw6()
174 const char *ret = p->buffer + p->len; in scsi_trace_rw10()
198 const char *ret = p->buffer + p->len; in scsi_trace_rw12()
220 const char *ret = p->buffer + p->len; in scsi_trace_rw16()
250 const char *ret = p->buffer + p->len, *cmd; in scsi_trace_rw32()
304 const char *ret = p->buffer + p->len; in scsi_trace_unmap()
315 const char *ret = p->buffer + p->len, *cmd; in scsi_trace_service_action_in()
369 const char *ret = p->buffer + p->len; in scsi_trace_misc()
/tools/perf/util/
Dauxtrace.c225 struct auxtrace_buffer *buffer) in auxtrace_queues__add_buffer() argument
240 queue->tid = buffer->tid; in auxtrace_queues__add_buffer()
241 queue->cpu = buffer->cpu; in auxtrace_queues__add_buffer()
244 buffer->buffer_nr = queues->next_buffer_nr++; in auxtrace_queues__add_buffer()
246 list_add_tail(&buffer->list, &queue->head); in auxtrace_queues__add_buffer()
259 struct auxtrace_buffer *buffer) in auxtrace_queues__split_buffer() argument
261 u64 sz = buffer->size; in auxtrace_queues__split_buffer()
267 b = memdup(buffer, sizeof(struct auxtrace_buffer)); in auxtrace_queues__split_buffer()
277 buffer->data_offset += BUFFER_LIMIT_FOR_32_BIT; in auxtrace_queues__split_buffer()
282 buffer->size = sz; in auxtrace_queues__split_buffer()
[all …]
Dintel-bts.c74 struct auxtrace_buffer *buffer; member
194 if (!btsq->on_heap && !btsq->buffer) { in intel_bts_setup_queue()
197 btsq->buffer = auxtrace_buffer__next(queue, NULL); in intel_bts_setup_queue()
198 if (!btsq->buffer) in intel_bts_setup_queue()
202 btsq->buffer->reference); in intel_bts_setup_queue()
419 struct auxtrace_buffer *buffer) in intel_bts_process_buffer() argument
426 if (buffer->use_data) { in intel_bts_process_buffer()
427 sz = buffer->use_size; in intel_bts_process_buffer()
428 branch = buffer->use_data; in intel_bts_process_buffer()
430 sz = buffer->size; in intel_bts_process_buffer()
[all …]
Dordered-events.c103 } else if (oe->buffer) { in alloc_event()
104 new = oe->buffer + oe->buffer_idx; in alloc_event()
106 oe->buffer = NULL; in alloc_event()
110 oe->buffer = malloc(size); in alloc_event()
111 if (!oe->buffer) { in alloc_event()
120 list_add(&oe->buffer->list, &oe->to_free); in alloc_event()
124 new = oe->buffer + 1; in alloc_event()
Dintel-pt.c116 struct auxtrace_buffer *buffer; member
208 struct auxtrace_buffer *buffer) in intel_pt_use_buffer_pid_tid() argument
210 if (queue->cpu == -1 && buffer->cpu != -1) in intel_pt_use_buffer_pid_tid()
211 ptq->cpu = buffer->cpu; in intel_pt_use_buffer_pid_tid()
213 ptq->pid = buffer->pid; in intel_pt_use_buffer_pid_tid()
214 ptq->tid = buffer->tid; in intel_pt_use_buffer_pid_tid()
236 struct auxtrace_buffer *buffer = ptq->buffer, *old_buffer = buffer; in intel_pt_get_trace() local
246 buffer = auxtrace_buffer__next(queue, buffer); in intel_pt_get_trace()
247 if (!buffer) { in intel_pt_get_trace()
254 ptq->buffer = buffer; in intel_pt_get_trace()
[all …]
Dauxtrace.h401 struct auxtrace_buffer *buffer);
402 void *auxtrace_buffer__get_data(struct auxtrace_buffer *buffer, int fd);
403 void auxtrace_buffer__put_data(struct auxtrace_buffer *buffer);
404 void auxtrace_buffer__drop_data(struct auxtrace_buffer *buffer);
405 void auxtrace_buffer__free(struct auxtrace_buffer *buffer);
Dsvghelper.c452 static char buffer[1024]; in HzToHuman() local
455 memset(buffer, 0, 1024); in HzToHuman()
460 sprintf(buffer, "%9lli", Hz); in HzToHuman()
463 sprintf(buffer, " %6lli Mhz", (Hz+500)/1000); in HzToHuman()
466 sprintf(buffer, " %6.2f Ghz", (Hz+5000.0)/1000000); in HzToHuman()
469 sprintf(buffer, "Turbo"); in HzToHuman()
471 return buffer; in HzToHuman()
Dordered-events.h36 struct ordered_event *buffer; member
/tools/perf/arch/powerpc/util/
Dheader.c19 get_cpuid(char *buffer, size_t sz) in get_cpuid() argument
26 nb = scnprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr)); in get_cpuid()
29 if (strchr(buffer, '$')) { in get_cpuid()
30 buffer[nb-1] = '\0'; in get_cpuid()
/tools/power/acpi/tools/acpidump/
Dapfiles.c198 struct acpi_table_header *buffer = NULL; in ap_get_table_from_file() local
222 buffer = ACPI_ALLOCATE_ZEROED(file_size); in ap_get_table_from_file()
223 if (!buffer) { in ap_get_table_from_file()
231 actual = acpi_os_read_file(file, buffer, 1, file_size); in ap_get_table_from_file()
234 ACPI_FREE(buffer); in ap_get_table_from_file()
235 buffer = NULL; in ap_get_table_from_file()
243 return (buffer); in ap_get_table_from_file()
/tools/perf/arch/x86/util/
Dheader.c23 get_cpuid(char *buffer, size_t sz) in get_cpuid() argument
51 nb = scnprintf(buffer, sz, "%s,%u,%u,%u$", vendor, family, model, step); in get_cpuid()
54 if (strchr(buffer, '$')) { in get_cpuid()
55 buffer[nb-1] = '\0'; in get_cpuid()
Dauxtrace.c68 char buffer[64]; in auxtrace_record__init() local
73 ret = get_cpuid(buffer, sizeof(buffer)); in auxtrace_record__init()
79 if (!strncmp(buffer, "GenuineIntel,", 13)) in auxtrace_record__init()
/tools/testing/selftests/vm/
Dcompaction_test.c27 char buffer[256] = {0}; in read_memory_info() local
31 if (!(fgets(buffer, sizeof(buffer), cmdfile))) { in read_memory_info()
38 *memfree = atoll(buffer); in read_memory_info()
42 if (!(fgets(buffer, sizeof(buffer), cmdfile))) { in read_memory_info()
48 *hugepagesize = atoll(buffer); in read_memory_info()
/tools/power/acpi/os_specific/service_layers/
Doslibcfs.c123 acpi_os_read_file(ACPI_FILE file, void *buffer, acpi_size size, acpi_size count) in acpi_os_read_file() argument
127 length = fread(buffer, size, count, file); in acpi_os_read_file()
152 void *buffer, acpi_size size, acpi_size count) in acpi_os_write_file() argument
156 length = fwrite(buffer, size, count, file); in acpi_os_write_file()
Dosunixxf.c89 acpi_status acpi_ut_read_line(char *buffer, u32 buffer_length, u32 *bytes_read);
402 char buffer[ACPI_VPRINTF_BUFFER_SIZE]; in acpi_os_vprintf() local
414 vsnprintf(buffer, ACPI_VPRINTF_BUFFER_SIZE, fmt, args); in acpi_os_vprintf()
425 fputs(buffer, acpi_gbl_debug_file); in acpi_os_vprintf()
434 fputs(buffer, acpi_gbl_output_file); in acpi_os_vprintf()
455 acpi_status acpi_os_get_line(char *buffer, u32 buffer_length, u32 *bytes_read) in acpi_os_get_line() argument
475 buffer[end_of_line] = (char)input_char; in acpi_os_get_line()
480 buffer[end_of_line] = 0; in acpi_os_get_line()
/tools/usb/usbip/libsrc/
Dvhci_driver.c170 char *buffer, *start, *end; in read_record() local
175 buffer = malloc(buffer_len); in read_record()
176 if (!buffer) in read_record()
184 free(buffer); in read_record()
188 if (fgets(buffer, buffer_len, file) == NULL) { in read_record()
190 free(buffer); in read_record()
197 start = buffer; in read_record()
201 free(buffer); in read_record()
207 if (sscanf(buffer, "%s %s %s\n", host, port, busid) != 3) { in read_record()
209 free(buffer); in read_record()
[all …]
/tools/perf/arch/s390/util/
Dheader.c19 int get_cpuid(char *buffer, size_t sz) in get_cpuid() argument
26 strcpy(buffer, cpuid); in get_cpuid()
/tools/firewire/
Ddecode-fcp.c150 char buffer[32]; in decode_avc() local
155 snprintf(buffer, sizeof(buffer), in decode_avc()
157 name = buffer; in decode_avc()
/tools/vm/
Dslabinfo.c62 char buffer[4096]; variable
151 buffer[0] = 0; in read_obj()
153 if (!fgets(buffer, sizeof(buffer), f)) in read_obj()
154 buffer[0] = 0; in read_obj()
156 if (buffer[strlen(buffer)] == '\n') in read_obj()
157 buffer[strlen(buffer)] = 0; in read_obj()
159 return strlen(buffer); in read_obj()
171 return atol(buffer); in get_obj()
185 result = strtoul(buffer, &p, 10); in get_obj_and_str()
216 buffer[0] = 0; in read_slab_obj()
[all …]
/tools/hv/
Dhv_fcopy_daemon.c152 char *buffer[4096 * 2]; in main() local
205 len = pread(fcopy_fd, buffer, (4096 * 2), 0); in main()
216 kernel_modver = *(__u32 *)buffer; in main()
223 in_msg = (struct hv_fcopy_hdr *)buffer; in main()
Dhv_kvp_daemon.c739 struct hv_kvp_ipaddr_value *buffer) in kvp_get_ipconfig_info() argument
755 kvp_process_ipconfig_file(cmd, (char *)buffer->gate_way, in kvp_get_ipconfig_info()
767 kvp_process_ipconfig_file(cmd, (char *)buffer->gate_way, in kvp_get_ipconfig_info()
791 kvp_process_ipconfig_file(cmd, (char *)buffer->dns_addr, in kvp_get_ipconfig_info()
816 buffer->dhcp_enabled = 1; in kvp_get_ipconfig_info()
818 buffer->dhcp_enabled = 0; in kvp_get_ipconfig_info()
834 int family, char *buffer, in kvp_process_ip_address() argument
856 strcpy(buffer, "inet_ntop failed\n"); in kvp_process_ip_address()
860 strcpy(buffer, tmp); in kvp_process_ip_address()
862 strcat(buffer, ";"); in kvp_process_ip_address()
[all …]
/tools/perf/
Dbuiltin-help.c60 struct strbuf buffer = STRBUF_INIT; in check_emacsclient_version() local
74 strbuf_read(&buffer, ec_process.err, 20); in check_emacsclient_version()
83 if (prefixcmp(buffer.buf, "emacsclient")) { in check_emacsclient_version()
85 strbuf_release(&buffer); in check_emacsclient_version()
89 strbuf_remove(&buffer, 0, strlen("emacsclient")); in check_emacsclient_version()
90 version = atoi(buffer.buf); in check_emacsclient_version()
96 strbuf_release(&buffer); in check_emacsclient_version()
100 strbuf_release(&buffer); in check_emacsclient_version()
/tools/usb/ffs-aio-example/simple/host_app/
Dtest.c170 static unsigned char buffer[BUF_LEN]; in main() local
172 libusb_bulk_transfer(state.handle, in_addr, buffer, BUF_LEN, in main()
174 libusb_bulk_transfer(state.handle, out_addr, buffer, BUF_LEN, in main()
/tools/usb/ffs-aio-example/multibuff/host_app/
Dtest.c169 static unsigned char buffer[BUF_LEN]; in main() local
171 libusb_bulk_transfer(state.handle, addr, buffer, BUF_LEN, in main()

12