Lines Matching refs:size
28 static int __do_read(int fd, void *buf, int size) in __do_read() argument
30 int rsize = size; in __do_read()
32 while (size) { in __do_read()
33 int ret = read(fd, buf, size); in __do_read()
47 size -= ret; in __do_read()
54 static int do_read(void *data, int size) in do_read() argument
58 r = __do_read(input_fd, data, size); in do_read()
61 size, r); in do_read()
71 static void skip(int size) in skip() argument
76 while (size) { in skip()
77 r = size > BUFSIZ ? BUFSIZ : size; in skip()
79 size -= r; in skip()
105 int size = 0; in read_string() local
130 buf[size++] = c; in read_string()
136 trace_data_size += size; in read_string()
138 str = malloc(size); in read_string()
140 memcpy(str, buf, size); in read_string()
147 unsigned int size; in read_proc_kallsyms() local
149 size = read4(pevent); in read_proc_kallsyms()
150 if (!size) in read_proc_kallsyms()
163 lseek(input_fd, size, SEEK_CUR); in read_proc_kallsyms()
164 trace_data_size += size; in read_proc_kallsyms()
170 unsigned int size; in read_ftrace_printk() local
174 size = read4(pevent); in read_ftrace_printk()
175 if (!size) in read_ftrace_printk()
178 buf = malloc(size + 1); in read_ftrace_printk()
182 if (do_read(buf, size) < 0) { in read_ftrace_printk()
187 buf[size] = '\0'; in read_ftrace_printk()
189 parse_ftrace_printk(pevent, buf, size); in read_ftrace_printk()
197 unsigned long long size; in read_header_files() local
210 size = read8(pevent); in read_header_files()
212 header_page = malloc(size); in read_header_files()
216 if (do_read(header_page, size) < 0) { in read_header_files()
222 if (!tep_parse_header_page(pevent, header_page, size, in read_header_files()
240 size = read8(pevent); in read_header_files()
241 skip(size); in read_header_files()
246 static int read_ftrace_file(struct tep_handle *pevent, unsigned long long size) in read_ftrace_file() argument
251 buf = malloc(size); in read_ftrace_file()
257 ret = do_read(buf, size); in read_ftrace_file()
263 ret = parse_ftrace_file(pevent, buf, size); in read_ftrace_file()
272 unsigned long long size) in read_event_file() argument
277 buf = malloc(size); in read_event_file()
283 ret = do_read(buf, size); in read_event_file()
287 ret = parse_event_file(pevent, buf, size, sys); in read_event_file()
297 unsigned long long size; in read_ftrace_files() local
305 size = read8(pevent); in read_ftrace_files()
306 ret = read_ftrace_file(pevent, size); in read_ftrace_files()
315 unsigned long long size; in read_event_files() local
332 size = read8(pevent); in read_event_files()
333 ret = read_event_file(pevent, sys, size); in read_event_files()
346 unsigned long long size; in read_saved_cmdline() local
351 size = read8(pevent); in read_saved_cmdline()
352 if (!size) in read_saved_cmdline()
355 buf = malloc(size + 1); in read_saved_cmdline()
361 ret = do_read(buf, size); in read_saved_cmdline()
368 parse_saved_cmdline(pevent, buf, size); in read_saved_cmdline()
383 ssize_t size = -1; in trace_report() local
464 size = trace_data_size; in trace_report()
479 return size; in trace_report()