Lines Matching full:size

26 static int __do_read(int fd, void *buf, int size)  in __do_read()  argument
28 int rsize = size; in __do_read()
30 while (size) { in __do_read()
31 int ret = read(fd, buf, size); in __do_read()
45 size -= ret; in __do_read()
52 static int do_read(void *data, int size) in do_read() argument
56 r = __do_read(input_fd, data, size); in do_read()
58 pr_debug("reading input file (size expected=%d received=%d)", in do_read()
59 size, r); in do_read()
69 static void skip(int size) in skip() argument
74 while (size) { in skip()
75 r = size > BUFSIZ ? BUFSIZ : size; in skip()
77 size -= r; in skip()
103 int size = 0; in read_string() local
128 buf[size++] = c; in read_string()
134 trace_data_size += size; in read_string()
136 str = malloc(size); in read_string()
138 memcpy(str, buf, size); in read_string()
145 unsigned int size; in read_proc_kallsyms() local
147 size = read4(pevent); in read_proc_kallsyms()
148 if (!size) in read_proc_kallsyms()
161 lseek(input_fd, size, SEEK_CUR); in read_proc_kallsyms()
162 trace_data_size += size; in read_proc_kallsyms()
168 unsigned int size; in read_ftrace_printk() local
171 /* it can have 0 size */ in read_ftrace_printk()
172 size = read4(pevent); in read_ftrace_printk()
173 if (!size) in read_ftrace_printk()
176 buf = malloc(size + 1); in read_ftrace_printk()
180 if (do_read(buf, size) < 0) { in read_ftrace_printk()
185 buf[size] = '\0'; in read_ftrace_printk()
187 parse_ftrace_printk(pevent, buf, size); in read_ftrace_printk()
195 unsigned long long size; in read_header_files() local
208 size = read8(pevent); in read_header_files()
210 header_page = malloc(size); in read_header_files()
214 if (do_read(header_page, size) < 0) { in read_header_files()
220 if (!tep_parse_header_page(pevent, header_page, size, in read_header_files()
238 size = read8(pevent); in read_header_files()
239 skip(size); in read_header_files()
244 static int read_ftrace_file(struct tep_handle *pevent, unsigned long long size) in read_ftrace_file() argument
249 buf = malloc(size); in read_ftrace_file()
255 ret = do_read(buf, size); in read_ftrace_file()
261 ret = parse_ftrace_file(pevent, buf, size); in read_ftrace_file()
270 unsigned long long size) in read_event_file() argument
275 buf = malloc(size); in read_event_file()
281 ret = do_read(buf, size); in read_event_file()
285 ret = parse_event_file(pevent, buf, size, sys); in read_event_file()
295 unsigned long long size; in read_ftrace_files() local
303 size = read8(pevent); in read_ftrace_files()
304 ret = read_ftrace_file(pevent, size); in read_ftrace_files()
313 unsigned long long size; in read_event_files() local
330 size = read8(pevent); in read_event_files()
331 ret = read_event_file(pevent, sys, size); in read_event_files()
344 unsigned long long size; in read_saved_cmdline() local
348 /* it can have 0 size */ in read_saved_cmdline()
349 size = read8(pevent); in read_saved_cmdline()
350 if (!size) in read_saved_cmdline()
353 buf = malloc(size + 1); in read_saved_cmdline()
359 ret = do_read(buf, size); in read_saved_cmdline()
365 parse_saved_cmdline(pevent, buf, size); in read_saved_cmdline()
380 ssize_t size = -1; in trace_report() local
461 size = trace_data_size; in trace_report()
476 return size; in trace_report()