/kernel/trace/ |
D | ring_buffer.c | 279 #define for_each_buffer_cpu(buffer, cpu) \ argument 280 for_each_cpu(cpu, buffer->cpumask) 282 #define for_each_online_buffer_cpu(buffer, cpu) \ argument 283 for_each_cpu_and(cpu, buffer->cpumask, cpu_online_mask) 498 struct trace_buffer *buffer; member 767 size_t ring_buffer_nr_pages(struct trace_buffer *buffer, int cpu) in ring_buffer_nr_pages() argument 769 return buffer->buffers[cpu]->nr_pages; in ring_buffer_nr_pages() 779 size_t ring_buffer_nr_dirty_pages(struct trace_buffer *buffer, int cpu) in ring_buffer_nr_dirty_pages() argument 785 read = local_read(&buffer->buffers[cpu]->pages_read); in ring_buffer_nr_dirty_pages() 786 lost = local_read(&buffer->buffers[cpu]->pages_lost); in ring_buffer_nr_dirty_pages() [all …]
|
D | trace.c | 180 struct trace_buffer *buffer, 498 struct trace_buffer *buffer, in call_filter_check_discard() argument 503 __trace_event_discard_commit(buffer, event); in call_filter_check_discard() 737 if (kstrtoul(parser.buffer, 0, &val)) in trace_pid_write() 774 if (!buf->buffer) in buffer_ftrace_now() 777 ts = ring_buffer_time_stamp(buf->buffer, cpu); in buffer_ftrace_now() 778 ring_buffer_normalize_time_stamp(buf->buffer, cpu, &ts); in buffer_ftrace_now() 913 static void __ftrace_trace_stack(struct trace_buffer *buffer, 917 struct trace_buffer *buffer, 922 static inline void __ftrace_trace_stack(struct trace_buffer *buffer, in __ftrace_trace_stack() argument [all …]
|
D | ring_buffer_benchmark.c | 32 static struct trace_buffer *buffer; variable 91 event = ring_buffer_consume(buffer, cpu, &ts, NULL); in read_event() 116 bpage = ring_buffer_alloc_read_page(buffer, cpu); in read_page() 120 ret = ring_buffer_read_page(buffer, &bpage, PAGE_SIZE, cpu, 1); in read_page() 175 ring_buffer_free_read_page(buffer, cpu, bpage); in read_page() 254 event = ring_buffer_lock_reserve(buffer, 10); in ring_buffer_producer() 261 ring_buffer_unlock_commit(buffer, event); in ring_buffer_producer() 299 entries = ring_buffer_entries(buffer); in ring_buffer_producer() 300 overruns = ring_buffer_overruns(buffer); in ring_buffer_producer() 404 ring_buffer_reset(buffer); in ring_buffer_producer_thread() [all …]
|
D | trace_mmiotrace.c | 125 unsigned long over = ring_buffer_overruns(iter->array_buffer->buffer); in count_overruns() 300 struct trace_buffer *buffer = tr->array_buffer.buffer; in __trace_mmiotrace_rw() local 305 event = trace_buffer_lock_reserve(buffer, TRACE_MMIO_RW, in __trace_mmiotrace_rw() 314 if (!call_filter_check_discard(call, entry, buffer, event)) in __trace_mmiotrace_rw() 315 trace_buffer_unlock_commit(tr, buffer, event, 0, pc); in __trace_mmiotrace_rw() 330 struct trace_buffer *buffer = tr->array_buffer.buffer; in __trace_mmiotrace_map() local 335 event = trace_buffer_lock_reserve(buffer, TRACE_MMIO_MAP, in __trace_mmiotrace_map() 344 if (!call_filter_check_discard(call, entry, buffer, event)) in __trace_mmiotrace_map() 345 trace_buffer_unlock_commit(tr, buffer, event, 0, pc); in __trace_mmiotrace_map()
|
D | trace.h | 196 struct trace_buffer *buffer; member 748 trace_buffer_lock_reserve(struct trace_buffer *buffer, 760 void trace_buffer_unlock_commit_nostack(struct trace_buffer *buffer, 922 int trace_array_printk_buf(struct trace_buffer *buffer, 1264 char *buffer; member 1453 struct trace_buffer *buffer, 1457 struct trace_buffer *buffer, 1463 struct trace_buffer *buffer, in trace_buffer_unlock_commit() argument 1467 trace_buffer_unlock_commit_regs(tr, buffer, event, flags, pc, NULL); in trace_buffer_unlock_commit() 1476 __trace_event_discard_commit(struct trace_buffer *buffer, in __trace_event_discard_commit() argument [all …]
|
D | trace_sched_wakeup.c | 383 struct trace_buffer *buffer = tr->array_buffer.buffer; in tracing_sched_switch_trace() local 387 event = trace_buffer_lock_reserve(buffer, TRACE_CTX, in tracing_sched_switch_trace() 400 if (!call_filter_check_discard(call, entry, buffer, event)) in tracing_sched_switch_trace() 401 trace_buffer_unlock_commit(tr, buffer, event, flags, pc); in tracing_sched_switch_trace() 413 struct trace_buffer *buffer = tr->array_buffer.buffer; in tracing_sched_wakeup_trace() local 415 event = trace_buffer_lock_reserve(buffer, TRACE_WAKE, in tracing_sched_wakeup_trace() 428 if (!call_filter_check_discard(call, entry, buffer, event)) in tracing_sched_wakeup_trace() 429 trace_buffer_unlock_commit(tr, buffer, event, flags, pc); in tracing_sched_wakeup_trace()
|
D | trace_branch.c | 35 struct trace_buffer *buffer; in probe_likely_condition() local 63 buffer = tr->array_buffer.buffer; in probe_likely_condition() 64 event = trace_buffer_lock_reserve(buffer, TRACE_BRANCH, in probe_likely_condition() 85 if (!call_filter_check_discard(call, entry, buffer, event)) in probe_likely_condition() 86 trace_buffer_unlock_commit_nostack(buffer, event); in probe_likely_condition()
|
D | trace_syscalls.c | 300 struct trace_buffer *buffer; in ftrace_syscall_enter() local 328 buffer = tr->array_buffer.buffer; in ftrace_syscall_enter() 329 event = trace_buffer_lock_reserve(buffer, in ftrace_syscall_enter() 339 event_trigger_unlock_commit(trace_file, buffer, event, entry, in ftrace_syscall_enter() 350 struct trace_buffer *buffer; in ftrace_syscall_exit() local 374 buffer = tr->array_buffer.buffer; in ftrace_syscall_exit() 375 event = trace_buffer_lock_reserve(buffer, in ftrace_syscall_exit() 385 event_trigger_unlock_commit(trace_file, buffer, event, entry, in ftrace_syscall_exit()
|
D | trace_functions_graph.c | 104 struct trace_buffer *buffer = tr->array_buffer.buffer; in __trace_graph_entry() local 107 event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_ENT, in __trace_graph_entry() 113 if (!call_filter_check_discard(call, entry, buffer, event)) in __trace_graph_entry() 114 trace_buffer_unlock_commit_nostack(buffer, event); in __trace_graph_entry() 224 struct trace_buffer *buffer = tr->array_buffer.buffer; in __trace_graph_return() local 227 event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_RET, in __trace_graph_return() 233 if (!call_filter_check_discard(call, entry, buffer, event)) in __trace_graph_return() 234 trace_buffer_unlock_commit_nostack(buffer, event); in __trace_graph_return() 447 ring_buffer_consume(iter->array_buffer->buffer, iter->cpu, in get_return_for_leaf() 449 event = ring_buffer_peek(iter->array_buffer->buffer, iter->cpu, in get_return_for_leaf() [all …]
|
D | trace_events_synth.c | 438 struct trace_buffer *buffer; in trace_event_raw_event_synth() local 465 buffer = trace_file->tr->array_buffer.buffer; in trace_event_raw_event_synth() 466 ring_buffer_nest_start(buffer); in trace_event_raw_event_synth() 509 ring_buffer_nest_end(buffer); in trace_event_raw_event_synth() 649 if (s.buffer[s.len - 1] == ';') in parse_synth_field() 655 s.buffer[s.len] = '\0'; in parse_synth_field() 677 s.buffer[s.len] = '\0'; in parse_synth_field() 1403 ret = trace_run_command(cmd->seq.buffer, create_or_delete_synth_event); in synth_event_run_command() 1476 trace_state->buffer = file->tr->array_buffer.buffer; in __synth_event_trace_start() 1477 ring_buffer_nest_start(trace_state->buffer); in __synth_event_trace_start() [all …]
|
D | trace_hwlat.c | 108 struct trace_buffer *buffer = tr->array_buffer.buffer; in trace_hwlat_sample() local 117 event = trace_buffer_lock_reserve(buffer, TRACE_HWLAT, sizeof(*entry), in trace_hwlat_sample() 130 if (!call_filter_check_discard(call, entry, buffer, event)) in trace_hwlat_sample() 131 trace_buffer_unlock_commit_nostack(buffer, event); in trace_hwlat_sample()
|
/kernel/ |
D | sysctl-test.c | 39 void __user *buffer = (void __user *)kunit_kzalloc(test, sizeof(int), in sysctl_test_api_dointvec_null_tbl_data() local 50 KUNIT_PROC_READ, buffer, &len, in sysctl_test_api_dointvec_null_tbl_data() 59 KUNIT_PROC_WRITE, buffer, &len, in sysctl_test_api_dointvec_null_tbl_data() 85 void __user *buffer = (void __user *)kunit_kzalloc(test, sizeof(int), in sysctl_test_api_dointvec_table_maxlen_unset() local 96 KUNIT_PROC_READ, buffer, &len, in sysctl_test_api_dointvec_table_maxlen_unset() 105 KUNIT_PROC_WRITE, buffer, &len, in sysctl_test_api_dointvec_table_maxlen_unset() 128 void __user *buffer = (void __user *)kunit_kzalloc(test, sizeof(int), in sysctl_test_api_dointvec_table_len_is_zero() local 136 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&table, KUNIT_PROC_READ, buffer, in sysctl_test_api_dointvec_table_len_is_zero() 140 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&table, KUNIT_PROC_WRITE, buffer, in sysctl_test_api_dointvec_table_len_is_zero() 162 void __user *buffer = (void __user *)kunit_kzalloc(test, sizeof(int), in sysctl_test_api_dointvec_table_read_but_position_set() local [all …]
|
D | sysctl.c | 204 void *buffer, size_t *lenp, loff_t *ppos) in bpf_stats_handler() argument 222 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); in bpf_stats_handler() 239 void *buffer, size_t *lenp, loff_t *ppos) in bpf_unpriv_handler() argument 249 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); in bpf_unpriv_handler() 269 char *buffer, size_t *lenp, loff_t *ppos) in _proc_do_string() argument 295 p = buffer; in _proc_do_string() 296 while ((p - buffer) < *lenp && len < maxlen - 1) { in _proc_do_string() 319 memcpy(buffer, data, len); in _proc_do_string() 321 buffer[len] = '\n'; in _proc_do_string() 382 void *buffer, size_t *lenp, loff_t *ppos) in proc_dostring() argument [all …]
|
D | watchdog.c | 654 void *buffer, size_t *lenp, loff_t *ppos) in proc_watchdog_common() argument 666 err = proc_dointvec_minmax(table, write, buffer, lenp, ppos); in proc_watchdog_common() 669 err = proc_dointvec_minmax(table, write, buffer, lenp, ppos); in proc_watchdog_common() 681 void *buffer, size_t *lenp, loff_t *ppos) in proc_watchdog() argument 684 table, write, buffer, lenp, ppos); in proc_watchdog() 691 void *buffer, size_t *lenp, loff_t *ppos) in proc_nmi_watchdog() argument 696 table, write, buffer, lenp, ppos); in proc_nmi_watchdog() 703 void *buffer, size_t *lenp, loff_t *ppos) in proc_soft_watchdog() argument 706 table, write, buffer, lenp, ppos); in proc_soft_watchdog() 713 void *buffer, size_t *lenp, loff_t *ppos) in proc_watchdog_thresh() argument [all …]
|
D | kallsyms.c | 399 static int __sprint_symbol(char *buffer, unsigned long address, in __sprint_symbol() argument 408 name = kallsyms_lookup(address, &size, &offset, &modname, buffer); in __sprint_symbol() 410 return sprintf(buffer, "0x%lx", address - symbol_offset); in __sprint_symbol() 412 if (name != buffer) in __sprint_symbol() 413 strcpy(buffer, name); in __sprint_symbol() 414 len = strlen(buffer); in __sprint_symbol() 418 len += sprintf(buffer + len, "+%#lx/%#lx", offset, size); in __sprint_symbol() 421 len += sprintf(buffer + len, " [%s]", modname); in __sprint_symbol() 437 int sprint_symbol(char *buffer, unsigned long address) in sprint_symbol() argument 439 return __sprint_symbol(buffer, address, 0, 1); in sprint_symbol() [all …]
|
D | reboot.c | 317 char buffer[256]; in SYSCALL_DEFINE4() local 372 ret = strncpy_from_user(&buffer[0], arg, sizeof(buffer) - 1); in SYSCALL_DEFINE4() 377 buffer[sizeof(buffer) - 1] = '\0'; in SYSCALL_DEFINE4() 379 kernel_restart(buffer); in SYSCALL_DEFINE4()
|
D | params.c | 222 int param_get_##name(char *buffer, const struct kernel_param *kp) \ 224 return scnprintf(buffer, PAGE_SIZE, format "\n", \ 269 int param_get_charp(char *buffer, const struct kernel_param *kp) in param_get_charp() argument 271 return scnprintf(buffer, PAGE_SIZE, "%s\n", *((char **)kp->arg)); in param_get_charp() 299 int param_get_bool(char *buffer, const struct kernel_param *kp) in param_get_bool() argument 302 return sprintf(buffer, "%c\n", *(bool *)kp->arg ? 'Y' : 'N'); in param_get_bool() 359 int param_get_invbool(char *buffer, const struct kernel_param *kp) in param_get_invbool() argument 361 return sprintf(buffer, "%c\n", (*(bool *)kp->arg) ? 'N' : 'Y'); in param_get_invbool() 454 static int param_array_get(char *buffer, const struct kernel_param *kp) in param_array_get() argument 463 buffer[off - 1] = ','; in param_array_get() [all …]
|
/kernel/debug/kdb/ |
D | kdb_io.c | 35 static int kgdb_transition_check(char *buffer) in kgdb_transition_check() argument 37 if (buffer[0] != '+' && buffer[0] != '$') { in kgdb_transition_check() 39 kdb_printf("%s", buffer); in kgdb_transition_check() 41 int slen = strlen(buffer); in kgdb_transition_check() 42 if (slen > 3 && buffer[slen - 3] == '#') { in kgdb_transition_check() 43 kdb_gdb_state_pass(buffer); in kgdb_transition_check() 44 strcpy(buffer, "kgdb"); in kgdb_transition_check() 196 static char *kdb_read(char *buffer, size_t bufsize) in kdb_read() argument 198 char *cp = buffer; in kdb_read() 199 char *bufend = buffer+bufsize-2; /* Reserve space for newline in kdb_read() [all …]
|
/kernel/gcov/ |
D | gcc_4_7.c | 391 void *buffer; member 407 static size_t store_gcov_u32(void *buffer, size_t off, u32 v) in store_gcov_u32() argument 411 if (buffer) { in store_gcov_u32() 412 data = buffer + off; in store_gcov_u32() 431 static size_t store_gcov_u64(void *buffer, size_t off, u64 v) in store_gcov_u64() argument 435 if (buffer) { in store_gcov_u64() 436 data = buffer + off; in store_gcov_u64() 452 static size_t convert_to_gcda(char *buffer, struct gcov_info *info) in convert_to_gcda() argument 462 pos += store_gcov_u32(buffer, pos, GCOV_DATA_MAGIC); in convert_to_gcda() 463 pos += store_gcov_u32(buffer, pos, info->version); in convert_to_gcda() [all …]
|
D | clang.c | 465 void *buffer; member 481 static size_t store_gcov_u32(void *buffer, size_t off, u32 v) in store_gcov_u32() argument 485 if (buffer) { in store_gcov_u32() 486 data = buffer + off; in store_gcov_u32() 505 static size_t store_gcov_u64(void *buffer, size_t off, u64 v) in store_gcov_u64() argument 509 if (buffer) { in store_gcov_u64() 510 data = buffer + off; in store_gcov_u64() 526 static size_t convert_to_gcda(char *buffer, struct gcov_info *info) in convert_to_gcda() argument 532 pos += store_gcov_u32(buffer, pos, GCOV_DATA_MAGIC); in convert_to_gcda() 533 pos += store_gcov_u32(buffer, pos, info->version); in convert_to_gcda() [all …]
|
/kernel/power/ |
D | snapshot.c | 133 static void *buffer; variable 1391 safe_copy_page(buffer, s_page); in copy_data_page() 1393 copy_page(dst, buffer); in copy_data_page() 1504 buffer = NULL; in swsusp_free() 1901 buffer = get_image_page(GFP_ATOMIC, safe_needed); in get_highmem_buffer() 1902 return buffer ? 0 : -ENOMEM; in get_highmem_buffer() 2099 if (!buffer) { in snapshot_read_next() 2101 buffer = get_image_page(GFP_ATOMIC, PG_ANY); in snapshot_read_next() 2102 if (!buffer) in snapshot_read_next() 2108 error = init_header((struct swsusp_info *)buffer); in snapshot_read_next() [all …]
|
/kernel/printk/ |
D | printk_safe.c | 42 unsigned char buffer[SAFE_LOG_BUF_LEN]; member 82 if (len >= sizeof(s->buffer) - 1) { in printk_safe_log_store() 96 add = vscnprintf(s->buffer + len, sizeof(s->buffer) - len, fmt, ap); in printk_safe_log_store() 210 if ((i && i >= len) || len > sizeof(s->buffer)) { in __printk_safe_flush() 222 i += printk_safe_flush_buffer(s->buffer + i, len - i); in __printk_safe_flush()
|
/kernel/irq/ |
D | timings.c | 317 static int irq_timings_next_event_index(int *buffer, size_t len, int period_max) in irq_timings_next_event_index() argument 325 buffer = &buffer[len - (period_max * 3)]; in irq_timings_next_event_index() 354 while (!memcmp(buffer, &buffer[idx], size * sizeof(int))) { in irq_timings_next_event_index() 367 return buffer[len % period]; in irq_timings_next_event_index() 715 int buffer[IRQ_TIMINGS_SIZE]; in irq_timings_test_next_index() local 742 buffer[i] = _buffer[index]; in irq_timings_test_next_index() 745 index = irq_timings_next_event_index(buffer, count, period_max); in irq_timings_test_next_index()
|
D | proc.c | 138 const char __user *buffer, size_t count, loff_t *pos) in write_irq_affinity() argument 151 err = cpumask_parselist_user(buffer, count, new_value); in write_irq_affinity() 153 err = cpumask_parse_user(buffer, count, new_value); in write_irq_affinity() 180 const char __user *buffer, size_t count, loff_t *pos) in irq_affinity_proc_write() argument 182 return write_irq_affinity(0, file, buffer, count, pos); in irq_affinity_proc_write() 186 const char __user *buffer, size_t count, loff_t *pos) in irq_affinity_list_proc_write() argument 188 return write_irq_affinity(1, file, buffer, count, pos); in irq_affinity_list_proc_write() 236 const char __user *buffer, size_t count, loff_t *ppos) in default_affinity_write() argument 244 err = cpumask_parse_user(buffer, count, new_value); in default_affinity_write()
|
/kernel/debug/ |
D | gdbstub.c | 91 static void get_packet(char *buffer) in get_packet() argument 120 buffer[count] = ch; in get_packet() 137 buffer[count] = 0; in get_packet() 145 static void put_packet(char *buffer) in put_packet() argument 159 while ((ch = buffer[count])) { in put_packet() 1129 unsigned char checksum, ch, buffer[3]; in gdbstub_exit() local 1139 buffer[0] = 'W'; in gdbstub_exit() 1140 buffer[1] = hex_asc_hi(status); in gdbstub_exit() 1141 buffer[2] = hex_asc_lo(status); in gdbstub_exit() 1147 ch = buffer[loop]; in gdbstub_exit()
|