• Home
  • Raw
  • Download

Lines Matching refs:buf

180 int tracing_set_tracer(struct trace_array *tr, const char *buf);
769 static u64 buffer_ftrace_now(struct array_buffer *buf, int cpu) in buffer_ftrace_now() argument
774 if (!buf->buffer) in buffer_ftrace_now()
777 ts = ring_buffer_time_stamp(buf->buffer); in buffer_ftrace_now()
778 ring_buffer_normalize_time_stamp(buf->buffer, cpu, &ts); in buffer_ftrace_now()
1037 memcpy(&entry->buf, str, size); in __trace_array_puts()
1040 if (entry->buf[size - 1] != '\n') { in __trace_array_puts()
1041 entry->buf[size] = '\n'; in __trace_array_puts()
1042 entry->buf[size + 1] = '\0'; in __trace_array_puts()
1044 entry->buf[size] = '\0'; in __trace_array_puts()
1220 static void set_buffer_entries(struct array_buffer *buf, unsigned long val);
1688 static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt) in trace_seq_to_buffer() argument
1698 memcpy(buf, s->buffer + s->seq.readpos, cnt); in trace_seq_to_buffer()
2172 static void tracing_reset_cpu(struct array_buffer *buf, int cpu) in tracing_reset_cpu() argument
2174 struct trace_buffer *buffer = buf->buffer; in tracing_reset_cpu()
2188 void tracing_reset_online_cpus(struct array_buffer *buf) in tracing_reset_online_cpus() argument
2190 struct trace_buffer *buffer = buf->buffer; in tracing_reset_online_cpus()
2200 buf->time_start = buffer_ftrace_now(buf, buf->cpu); in tracing_reset_online_cpus()
3409 memcpy(entry->buf, tbuffer, sizeof(u32) * len); in trace_vbprintk()
3467 memcpy(&entry->buf, tbuffer, len + 1); in __trace_array_vprintk()
3761 char buf[16]; in test_can_verify_check() local
3775 vsnprintf(buf, 16, "%d", ap); in test_can_verify_check()
4180 get_total_entries_cpu(struct array_buffer *buf, unsigned long *total, in get_total_entries_cpu() argument
4185 count = ring_buffer_entries_cpu(buf->buffer, cpu); in get_total_entries_cpu()
4191 if (per_cpu_ptr(buf->data, cpu)->skipped_entries) { in get_total_entries_cpu()
4192 count -= per_cpu_ptr(buf->data, cpu)->skipped_entries; in get_total_entries_cpu()
4197 ring_buffer_overrun_cpu(buf->buffer, cpu); in get_total_entries_cpu()
4202 get_total_entries(struct array_buffer *buf, in get_total_entries() argument
4212 get_total_entries_cpu(buf, &t, &e, cpu); in get_total_entries()
4255 static void print_event_info(struct array_buffer *buf, struct seq_file *m) in print_event_info() argument
4260 get_total_entries(buf, &total, &entries); in print_event_info()
4266 static void print_func_help_header(struct array_buffer *buf, struct seq_file *m, in print_func_help_header() argument
4271 print_event_info(buf, m); in print_func_help_header()
4277 static void print_func_help_header_irq(struct array_buffer *buf, struct seq_file *m, in print_func_help_header_irq() argument
4284 print_event_info(buf, m); in print_func_help_header_irq()
4300 struct array_buffer *buf = iter->array_buffer; in print_trace_header() local
4301 struct trace_array_cpu *data = per_cpu_ptr(buf->data, buf->cpu); in print_trace_header()
4307 get_total_entries(buf, &total, &entries); in print_trace_header()
4318 buf->cpu, in print_trace_header()
5463 char *buf = trace_boot_options_buf; in apply_trace_boot_options() local
5467 option = strsep(&buf, ","); in apply_trace_boot_options()
5476 if (buf) in apply_trace_boot_options()
5477 *(buf - 1) = ','; in apply_trace_boot_options()
5487 char buf[64]; in tracing_trace_options_write() local
5490 if (cnt >= sizeof(buf)) in tracing_trace_options_write()
5493 if (copy_from_user(buf, ubuf, cnt)) in tracing_trace_options_write()
5496 buf[cnt] = 0; in tracing_trace_options_write()
5498 ret = trace_set_options(tr, buf); in tracing_trace_options_write()
5926 char buf[TASK_COMM_LEN]; in saved_cmdlines_show() local
5929 __trace_find_cmdline(*pid, buf); in saved_cmdlines_show()
5930 seq_printf(m, "%d %s\n", *pid, buf); in saved_cmdlines_show()
5963 char buf[64]; in tracing_saved_cmdlines_size_read() local
5968 r = scnprintf(buf, sizeof(buf), "%u\n", savedcmd->cmdline_num); in tracing_saved_cmdlines_size_read()
5972 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_saved_cmdlines_size_read()
6206 char buf[MAX_TRACER_SIZE+2]; in tracing_set_trace_read() local
6210 r = sprintf(buf, "%s\n", tr->current_trace->name); in tracing_set_trace_read()
6213 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_set_trace_read()
6222 static void set_buffer_entries(struct array_buffer *buf, unsigned long val) in set_buffer_entries() argument
6227 per_cpu_ptr(buf->data, cpu)->entries = val; in set_buffer_entries()
6230 static void update_buffer_entries(struct array_buffer *buf, int cpu) in update_buffer_entries() argument
6233 set_buffer_entries(buf, ring_buffer_size(buf->buffer, 0)); in update_buffer_entries()
6235 per_cpu_ptr(buf->data, cpu)->entries = ring_buffer_size(buf->buffer, cpu); in update_buffer_entries()
6416 int tracing_set_tracer(struct trace_array *tr, const char *buf) in tracing_set_tracer() argument
6435 if (strcmp(t->name, buf) == 0) in tracing_set_tracer()
6530 char buf[MAX_TRACER_SIZE+1]; in tracing_set_trace_write() local
6540 if (copy_from_user(buf, ubuf, cnt)) in tracing_set_trace_write()
6543 buf[cnt] = 0; in tracing_set_trace_write()
6545 name = strim(buf); in tracing_set_trace_write()
6560 char buf[64]; in tracing_nsecs_read() local
6563 r = snprintf(buf, sizeof(buf), "%ld\n", in tracing_nsecs_read()
6565 if (r > sizeof(buf)) in tracing_nsecs_read()
6566 r = sizeof(buf); in tracing_nsecs_read()
6567 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_nsecs_read()
7045 char buf[64]; in tracing_entries_read() local
7070 r = sprintf(buf, "%lu (expanded: %lu)\n", in tracing_entries_read()
7074 r = sprintf(buf, "%lu\n", size >> 10); in tracing_entries_read()
7076 r = sprintf(buf, "X\n"); in tracing_entries_read()
7078 r = sprintf(buf, "%lu\n", per_cpu_ptr(tr->array_buffer.data, cpu)->entries >> 10); in tracing_entries_read()
7082 ret = simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_entries_read()
7119 char buf[64]; in tracing_total_entries_read() local
7130 r = sprintf(buf, "%lu\n", size); in tracing_total_entries_read()
7132 r = sprintf(buf, "%lu (expanded: %lu)\n", size, expanded_size); in tracing_total_entries_read()
7135 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_total_entries_read()
7212 len = __copy_from_user_inatomic(&entry->buf, ubuf, cnt); in tracing_mark_write()
7214 memcpy(&entry->buf, FAULTED_STR, FAULTED_SIZE); in tracing_mark_write()
7222 entry->buf[cnt] = '\0'; in tracing_mark_write()
7226 if (entry->buf[cnt - 1] != '\n') { in tracing_mark_write()
7227 entry->buf[cnt] = '\n'; in tracing_mark_write()
7228 entry->buf[cnt + 1] = '\0'; in tracing_mark_write()
7230 entry->buf[cnt] = '\0'; in tracing_mark_write()
7290 memcpy(&entry->buf, FAULTED_STR, FAULTED_SIZE); in tracing_mark_raw_write()
7354 char buf[64]; in tracing_clock_write() local
7358 if (cnt >= sizeof(buf)) in tracing_clock_write()
7361 if (copy_from_user(buf, ubuf, cnt)) in tracing_clock_write()
7364 buf[cnt] = 0; in tracing_clock_write()
7366 clockstr = strstrip(buf); in tracing_clock_write()
7814 char buf[U64_STR_SIZE]; in trace_min_max_read() local
7823 if (cnt > sizeof(buf)) in trace_min_max_read()
7824 cnt = sizeof(buf); in trace_min_max_read()
7826 len = snprintf(buf, sizeof(buf), "%llu\n", val); in trace_min_max_read()
7828 return simple_read_from_buffer(ubuf, cnt, ppos, buf, len); in trace_min_max_read()
8278 struct pipe_buffer *buf) in buffer_pipe_buf_release() argument
8280 struct buffer_ref *ref = (struct buffer_ref *)buf->private; in buffer_pipe_buf_release()
8283 buf->private = 0; in buffer_pipe_buf_release()
8287 struct pipe_buffer *buf) in buffer_pipe_buf_get() argument
8289 struct buffer_ref *ref = (struct buffer_ref *)buf->private; in buffer_pipe_buf_get()
8548 char *buf; in tracing_read_dyn_info() local
8552 buf = kmalloc(256, GFP_KERNEL); in tracing_read_dyn_info()
8553 if (!buf) in tracing_read_dyn_info()
8556 r = scnprintf(buf, 256, "%ld pages:%ld groups: %ld\n", in tracing_read_dyn_info()
8561 ret = simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_read_dyn_info()
8562 kfree(buf); in tracing_read_dyn_info()
8827 char *buf; in trace_options_read() local
8830 buf = "1\n"; in trace_options_read()
8832 buf = "0\n"; in trace_options_read()
8834 return simple_read_from_buffer(ubuf, cnt, ppos, buf, 2); in trace_options_read()
8935 char *buf; in trace_options_core_read() local
8940 buf = "1\n"; in trace_options_core_read()
8942 buf = "0\n"; in trace_options_core_read()
8944 return simple_read_from_buffer(ubuf, cnt, ppos, buf, 2); in trace_options_core_read()
9142 char buf[64]; in rb_simple_read() local
9146 r = sprintf(buf, "%d\n", r); in rb_simple_read()
9148 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in rb_simple_read()
9200 char buf[64]; in buffer_percent_read() local
9204 r = sprintf(buf, "%d\n", r); in buffer_percent_read()
9206 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in buffer_percent_read()
9245 allocate_trace_buffer(struct trace_array *tr, struct array_buffer *buf, int size) in allocate_trace_buffer() argument
9251 buf->tr = tr; in allocate_trace_buffer()
9253 buf->buffer = ring_buffer_alloc(size, rb_flags); in allocate_trace_buffer()
9254 if (!buf->buffer) in allocate_trace_buffer()
9257 buf->data = alloc_percpu(struct trace_array_cpu); in allocate_trace_buffer()
9258 if (!buf->data) { in allocate_trace_buffer()
9259 ring_buffer_free(buf->buffer); in allocate_trace_buffer()
9260 buf->buffer = NULL; in allocate_trace_buffer()
9271 static void free_trace_buffer(struct array_buffer *buf) in free_trace_buffer() argument
9273 if (buf->buffer) { in free_trace_buffer()
9274 ring_buffer_free(buf->buffer); in free_trace_buffer()
9275 buf->buffer = NULL; in free_trace_buffer()
9276 free_percpu(buf->data); in free_trace_buffer()
9277 buf->data = NULL; in free_trace_buffer()
10189 char *kbuf, *buf, *tmp; in trace_parse_run_command() local
10209 buf = kbuf; in trace_parse_run_command()
10211 tmp = strchr(buf, '\n'); in trace_parse_run_command()
10214 size = tmp - buf + 1; in trace_parse_run_command()
10216 size = strlen(buf); in trace_parse_run_command()
10218 if (buf != kbuf) in trace_parse_run_command()
10230 tmp = strchr(buf, '#'); in trace_parse_run_command()
10235 ret = createfn(buf); in trace_parse_run_command()
10238 buf += size; in trace_parse_run_command()