• Home
  • Raw
  • Download

Lines Matching refs:cnt

684 		    const char __user *ubuf, size_t cnt)  in trace_pid_write()  argument
721 while (cnt > 0) { in trace_pid_write()
725 ret = trace_get_user(&parser, ubuf, cnt, &pos); in trace_pid_write()
731 cnt -= ret; in trace_pid_write()
1611 size_t cnt, loff_t *ppos) in trace_get_user() argument
1625 cnt--; in trace_get_user()
1633 while (cnt && isspace(ch)) { in trace_get_user()
1638 cnt--; in trace_get_user()
1652 while (cnt && !isspace(ch) && ch) { in trace_get_user()
1663 cnt--; in trace_get_user()
1688 static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt) in trace_seq_to_buffer() argument
1696 if (cnt > len) in trace_seq_to_buffer()
1697 cnt = len; in trace_seq_to_buffer()
1698 memcpy(buf, s->buffer + s->seq.readpos, cnt); in trace_seq_to_buffer()
1700 s->seq.readpos += cnt; in trace_seq_to_buffer()
1701 return cnt; in trace_seq_to_buffer()
5483 size_t cnt, loff_t *ppos) in tracing_trace_options_write() argument
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()
5502 *ppos += cnt; in tracing_trace_options_write()
5504 return cnt; in tracing_trace_options_write()
5811 size_t cnt, loff_t *ppos) in tracing_readme_read() argument
5813 return simple_read_from_buffer(ubuf, cnt, ppos, in tracing_readme_read()
5961 size_t cnt, loff_t *ppos) in tracing_saved_cmdlines_size_read() argument
5972 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_saved_cmdlines_size_read()
5996 size_t cnt, loff_t *ppos) in tracing_saved_cmdlines_size_write() argument
6001 ret = kstrtoul_from_user(ubuf, cnt, 10, &val); in tracing_saved_cmdlines_size_write()
6013 *ppos += cnt; in tracing_saved_cmdlines_size_write()
6015 return cnt; in tracing_saved_cmdlines_size_write()
6203 size_t cnt, loff_t *ppos) in tracing_set_trace_read() argument
6213 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_set_trace_read()
6527 size_t cnt, loff_t *ppos) in tracing_set_trace_write() argument
6535 ret = cnt; in tracing_set_trace_write()
6537 if (cnt > MAX_TRACER_SIZE) in tracing_set_trace_write()
6538 cnt = MAX_TRACER_SIZE; in tracing_set_trace_write()
6540 if (copy_from_user(buf, ubuf, cnt)) in tracing_set_trace_write()
6543 buf[cnt] = 0; in tracing_set_trace_write()
6558 size_t cnt, loff_t *ppos) in tracing_nsecs_read() argument
6567 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_nsecs_read()
6572 size_t cnt, loff_t *ppos) in tracing_nsecs_write() argument
6577 ret = kstrtoul_from_user(ubuf, cnt, 10, &val); in tracing_nsecs_write()
6583 return cnt; in tracing_nsecs_write()
6588 size_t cnt, loff_t *ppos) in tracing_thresh_read() argument
6590 return tracing_nsecs_read(&tracing_thresh, ubuf, cnt, ppos); in tracing_thresh_read()
6595 size_t cnt, loff_t *ppos) in tracing_thresh_write() argument
6601 ret = tracing_nsecs_write(&tracing_thresh, ubuf, cnt, ppos); in tracing_thresh_write()
6611 ret = cnt; in tracing_thresh_write()
6622 size_t cnt, loff_t *ppos) in tracing_max_lat_read() argument
6626 return tracing_nsecs_read(&tr->max_latency, ubuf, cnt, ppos); in tracing_max_lat_read()
6631 size_t cnt, loff_t *ppos) in tracing_max_lat_write() argument
6635 return tracing_nsecs_write(&tr->max_latency, ubuf, cnt, ppos); in tracing_max_lat_write()
6795 size_t cnt, loff_t *ppos) in tracing_read_pipe() argument
6808 sret = trace_seq_to_user(&iter->seq, ubuf, cnt); in tracing_read_pipe()
6815 sret = iter->trace->read(iter, filp, ubuf, cnt, ppos); in tracing_read_pipe()
6831 if (cnt >= PAGE_SIZE) in tracing_read_pipe()
6832 cnt = PAGE_SIZE - 1; in tracing_read_pipe()
6867 if (trace_seq_used(&iter->seq) >= cnt) in tracing_read_pipe()
6882 sret = trace_seq_to_user(&iter->seq, ubuf, cnt); in tracing_read_pipe()
7040 size_t cnt, loff_t *ppos) in tracing_entries_read() argument
7082 ret = simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_entries_read()
7088 size_t cnt, loff_t *ppos) in tracing_entries_write() argument
7095 ret = kstrtoul_from_user(ubuf, cnt, 10, &val); in tracing_entries_write()
7109 *ppos += cnt; in tracing_entries_write()
7111 return cnt; in tracing_entries_write()
7116 size_t cnt, loff_t *ppos) in tracing_total_entries_read() argument
7135 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_total_entries_read()
7140 size_t cnt, loff_t *ppos) in tracing_free_buffer_write() argument
7147 *ppos += cnt; in tracing_free_buffer_write()
7149 return cnt; in tracing_free_buffer_write()
7170 size_t cnt, loff_t *fpos) in tracing_mark_write() argument
7191 if (cnt > TRACE_BUF_SIZE) in tracing_mark_write()
7192 cnt = TRACE_BUF_SIZE; in tracing_mark_write()
7196 size = sizeof(*entry) + cnt + 2; /* add '\0' and possible '\n' */ in tracing_mark_write()
7199 if (cnt < FAULTED_SIZE) in tracing_mark_write()
7200 size += FAULTED_SIZE - cnt; in tracing_mark_write()
7212 len = __copy_from_user_inatomic(&entry->buf, ubuf, cnt); in tracing_mark_write()
7215 cnt = FAULTED_SIZE; in tracing_mark_write()
7218 written = cnt; 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()
7247 size_t cnt, loff_t *fpos) in tracing_mark_raw_write() argument
7266 if (cnt < sizeof(unsigned int) || cnt > RAW_DATA_MAX_SIZE) in tracing_mark_raw_write()
7269 if (cnt > TRACE_BUF_SIZE) in tracing_mark_raw_write()
7270 cnt = TRACE_BUF_SIZE; in tracing_mark_raw_write()
7274 size = sizeof(*entry) + cnt; in tracing_mark_raw_write()
7275 if (cnt < FAULT_SIZE_ID) in tracing_mark_raw_write()
7276 size += FAULT_SIZE_ID - cnt; in tracing_mark_raw_write()
7287 len = __copy_from_user_inatomic(&entry->id, ubuf, cnt); in tracing_mark_raw_write()
7293 written = cnt; in tracing_mark_raw_write()
7350 size_t cnt, loff_t *fpos) in tracing_clock_write() argument
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()
7372 *fpos += cnt; in tracing_clock_write()
7374 return cnt; in tracing_clock_write()
7514 tracing_snapshot_write(struct file *filp, const char __user *ubuf, size_t cnt, in tracing_snapshot_write() argument
7527 ret = kstrtoul_from_user(ubuf, cnt, 10, &val); in tracing_snapshot_write()
7592 *ppos += cnt; in tracing_snapshot_write()
7593 ret = cnt; in tracing_snapshot_write()
7765 trace_min_max_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos) in trace_min_max_write() argument
7774 err = kstrtoull_from_user(ubuf, cnt, 10, &val); in trace_min_max_write()
7796 return cnt; in trace_min_max_write()
7811 trace_min_max_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) in trace_min_max_read() argument
7823 if (cnt > sizeof(buf)) in trace_min_max_read()
7824 cnt = sizeof(buf); in trace_min_max_read()
7828 return simple_read_from_buffer(ubuf, cnt, ppos, buf, len); in trace_min_max_read()
8479 unsigned long cnt; in tracing_stats_read() local
8489 cnt = ring_buffer_entries_cpu(trace_buf->buffer, cpu); in tracing_stats_read()
8490 trace_seq_printf(s, "entries: %ld\n", cnt); in tracing_stats_read()
8492 cnt = ring_buffer_overrun_cpu(trace_buf->buffer, cpu); in tracing_stats_read()
8493 trace_seq_printf(s, "overrun: %ld\n", cnt); in tracing_stats_read()
8495 cnt = ring_buffer_commit_overrun_cpu(trace_buf->buffer, cpu); in tracing_stats_read()
8496 trace_seq_printf(s, "commit overrun: %ld\n", cnt); in tracing_stats_read()
8498 cnt = ring_buffer_bytes_cpu(trace_buf->buffer, cpu); in tracing_stats_read()
8499 trace_seq_printf(s, "bytes: %ld\n", cnt); in tracing_stats_read()
8520 cnt = ring_buffer_dropped_events_cpu(trace_buf->buffer, cpu); in tracing_stats_read()
8521 trace_seq_printf(s, "dropped events: %ld\n", cnt); in tracing_stats_read()
8523 cnt = ring_buffer_read_events_cpu(trace_buf->buffer, cpu); in tracing_stats_read()
8524 trace_seq_printf(s, "read events: %ld\n", cnt); in tracing_stats_read()
8545 size_t cnt, loff_t *ppos) in tracing_read_dyn_info() argument
8561 ret = simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in tracing_read_dyn_info()
8823 trace_options_read(struct file *filp, char __user *ubuf, size_t cnt, in trace_options_read() argument
8834 return simple_read_from_buffer(ubuf, cnt, ppos, buf, 2); in trace_options_read()
8838 trace_options_write(struct file *filp, const char __user *ubuf, size_t cnt, in trace_options_write() argument
8845 ret = kstrtoul_from_user(ubuf, cnt, 10, &val); in trace_options_write()
8861 *ppos += cnt; in trace_options_write()
8863 return cnt; in trace_options_write()
8929 trace_options_core_read(struct file *filp, char __user *ubuf, size_t cnt, in trace_options_core_read() argument
8944 return simple_read_from_buffer(ubuf, cnt, ppos, buf, 2); in trace_options_core_read()
8948 trace_options_core_write(struct file *filp, const char __user *ubuf, size_t cnt, in trace_options_core_write() argument
8959 ret = kstrtoul_from_user(ubuf, cnt, 10, &val); in trace_options_core_write()
8975 *ppos += cnt; in trace_options_core_write()
8977 return cnt; in trace_options_core_write()
9051 int cnt; in create_trace_option_files() local
9077 for (cnt = 0; opts[cnt].name; cnt++) in create_trace_option_files()
9080 topts = kcalloc(cnt + 1, sizeof(*topts), GFP_KERNEL); in create_trace_option_files()
9096 for (cnt = 0; opts[cnt].name; cnt++) { in create_trace_option_files()
9097 create_trace_option_file(tr, &topts[cnt], flags, in create_trace_option_files()
9098 &opts[cnt]); in create_trace_option_files()
9099 MEM_FAIL(topts[cnt].entry == NULL, in create_trace_option_files()
9101 opts[cnt].name); in create_trace_option_files()
9139 size_t cnt, loff_t *ppos) in rb_simple_read() argument
9148 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in rb_simple_read()
9153 size_t cnt, loff_t *ppos) in rb_simple_write() argument
9160 ret = kstrtoul_from_user(ubuf, cnt, 10, &val); in rb_simple_write()
9184 return cnt; in rb_simple_write()
9197 size_t cnt, loff_t *ppos) in buffer_percent_read() argument
9206 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); in buffer_percent_read()
9211 size_t cnt, loff_t *ppos) in buffer_percent_write() argument
9217 ret = kstrtoul_from_user(ubuf, cnt, 10, &val); in buffer_percent_write()
9228 return cnt; in buffer_percent_write()
10074 int cnt = 0, cpu; in ftrace_dump() local
10145 if (!cnt) in ftrace_dump()
10148 cnt++; in ftrace_dump()
10167 if (!cnt) in ftrace_dump()