/kernel/trace/ |
D | ring_buffer.c | 271 #define for_each_buffer_cpu(buffer, cpu) \ argument 272 for_each_cpu(cpu, buffer->cpumask) 440 struct ring_buffer *buffer; member 530 int ring_buffer_wait(struct ring_buffer *buffer, int cpu, bool full) in ring_buffer_wait() argument 543 work = &buffer->irq_work; in ring_buffer_wait() 547 if (!cpumask_test_cpu(cpu, buffer->cpumask)) in ring_buffer_wait() 549 cpu_buffer = buffer->buffers[cpu]; in ring_buffer_wait() 590 if (cpu == RING_BUFFER_ALL_CPUS && !ring_buffer_empty(buffer)) in ring_buffer_wait() 594 !ring_buffer_empty_cpu(buffer, cpu)) { in ring_buffer_wait() 634 int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, in ring_buffer_poll_wait() argument [all …]
|
D | trace.c | 310 struct ring_buffer *buffer, in call_filter_check_discard() argument 315 __trace_event_discard_commit(buffer, event); in call_filter_check_discard() 539 parser.buffer[parser.idx] = 0; in trace_pid_write() 542 if (kstrtoul(parser.buffer, 0, &val)) in trace_pid_write() 579 if (!buf->buffer) in buffer_ftrace_now() 582 ts = ring_buffer_time_stamp(buf->buffer, cpu); in buffer_ftrace_now() 583 ring_buffer_normalize_time_stamp(buf->buffer, cpu, &ts); in buffer_ftrace_now() 718 static void __ftrace_trace_stack(struct ring_buffer *buffer, 722 struct ring_buffer *buffer, 727 static inline void __ftrace_trace_stack(struct ring_buffer *buffer, in __ftrace_trace_stack() argument [all …]
|
D | ring_buffer_benchmark.c | 30 static struct ring_buffer *buffer; variable 89 event = ring_buffer_consume(buffer, cpu, &ts, NULL); in read_event() 114 bpage = ring_buffer_alloc_read_page(buffer, cpu); in read_page() 118 ret = ring_buffer_read_page(buffer, &bpage, PAGE_SIZE, cpu, 1); in read_page() 173 ring_buffer_free_read_page(buffer, bpage); in read_page() 252 event = ring_buffer_lock_reserve(buffer, 10); in ring_buffer_producer() 259 ring_buffer_unlock_commit(buffer, event); in ring_buffer_producer() 297 entries = ring_buffer_entries(buffer); in ring_buffer_producer() 298 overruns = ring_buffer_overruns(buffer); in ring_buffer_producer() 402 ring_buffer_reset(buffer); in ring_buffer_producer_thread() [all …]
|
D | trace_mmiotrace.c | 124 unsigned long over = ring_buffer_overruns(iter->trace_buffer->buffer); in count_overruns() 298 struct ring_buffer *buffer = tr->trace_buffer.buffer; in __trace_mmiotrace_rw() local 303 event = trace_buffer_lock_reserve(buffer, TRACE_MMIO_RW, in __trace_mmiotrace_rw() 312 if (!call_filter_check_discard(call, entry, buffer, event)) in __trace_mmiotrace_rw() 313 trace_buffer_unlock_commit(tr, buffer, event, 0, pc); in __trace_mmiotrace_rw() 328 struct ring_buffer *buffer = tr->trace_buffer.buffer; in __trace_mmiotrace_map() local 333 event = trace_buffer_lock_reserve(buffer, TRACE_MMIO_MAP, in __trace_mmiotrace_map() 342 if (!call_filter_check_discard(call, entry, buffer, event)) in __trace_mmiotrace_map() 343 trace_buffer_unlock_commit(tr, buffer, event, 0, pc); in __trace_mmiotrace_map()
|
D | trace.h | 176 struct ring_buffer *buffer; member 590 trace_buffer_lock_reserve(struct ring_buffer *buffer, 602 void __buffer_unlock_commit(struct ring_buffer *buffer, 672 void ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, 678 static inline void ftrace_trace_userstack(struct ring_buffer *buffer, in ftrace_trace_userstack() argument 747 int trace_array_printk_buf(struct ring_buffer *buffer, 922 char *buffer; member 1109 struct ring_buffer *buffer, 1113 struct ring_buffer *buffer, 1119 struct ring_buffer *buffer, in trace_buffer_unlock_commit() argument [all …]
|
D | trace_branch.c | 37 struct ring_buffer *buffer; in probe_likely_condition() local 62 buffer = tr->trace_buffer.buffer; in probe_likely_condition() 63 event = trace_buffer_lock_reserve(buffer, TRACE_BRANCH, in probe_likely_condition() 83 if (!call_filter_check_discard(call, entry, buffer, event)) in probe_likely_condition() 84 __buffer_unlock_commit(buffer, event); in probe_likely_condition()
|
D | trace_syscalls.c | 314 struct ring_buffer *buffer; in ftrace_syscall_enter() local 341 buffer = tr->trace_buffer.buffer; in ftrace_syscall_enter() 342 event = trace_buffer_lock_reserve(buffer, in ftrace_syscall_enter() 351 event_trigger_unlock_commit(trace_file, buffer, event, entry, in ftrace_syscall_enter() 362 struct ring_buffer *buffer; in ftrace_syscall_exit() local 386 buffer = tr->trace_buffer.buffer; in ftrace_syscall_exit() 387 event = trace_buffer_lock_reserve(buffer, in ftrace_syscall_exit() 397 event_trigger_unlock_commit(trace_file, buffer, event, entry, in ftrace_syscall_exit()
|
D | trace_sched_wakeup.c | 377 struct ring_buffer *buffer = tr->trace_buffer.buffer; in tracing_sched_switch_trace() local 381 event = trace_buffer_lock_reserve(buffer, TRACE_CTX, in tracing_sched_switch_trace() 394 if (!call_filter_check_discard(call, entry, buffer, event)) in tracing_sched_switch_trace() 395 trace_buffer_unlock_commit(tr, buffer, event, flags, pc); in tracing_sched_switch_trace() 407 struct ring_buffer *buffer = tr->trace_buffer.buffer; in tracing_sched_wakeup_trace() local 409 event = trace_buffer_lock_reserve(buffer, TRACE_WAKE, in tracing_sched_wakeup_trace() 422 if (!call_filter_check_discard(call, entry, buffer, event)) in tracing_sched_wakeup_trace() 423 trace_buffer_unlock_commit(tr, buffer, event, flags, pc); in tracing_sched_wakeup_trace()
|
D | trace_functions_graph.c | 356 struct ring_buffer *buffer = tr->trace_buffer.buffer; in __trace_graph_entry() local 359 event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_ENT, in __trace_graph_entry() 365 if (!call_filter_check_discard(call, entry, buffer, event)) in __trace_graph_entry() 366 __buffer_unlock_commit(buffer, event); in __trace_graph_entry() 467 struct ring_buffer *buffer = tr->trace_buffer.buffer; in __trace_graph_return() local 470 event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_RET, in __trace_graph_return() 476 if (!call_filter_check_discard(call, entry, buffer, event)) in __trace_graph_return() 477 __buffer_unlock_commit(buffer, event); in __trace_graph_return() 664 ring_buffer_consume(iter->trace_buffer->buffer, iter->cpu, in get_return_for_leaf() 666 event = ring_buffer_peek(iter->trace_buffer->buffer, iter->cpu, in get_return_for_leaf() [all …]
|
D | trace_hwlat.c | 108 struct ring_buffer *buffer = tr->trace_buffer.buffer; in trace_hwlat_sample() local 117 event = trace_buffer_lock_reserve(buffer, TRACE_HWLAT, sizeof(*entry), in trace_hwlat_sample() 129 if (!call_filter_check_discard(call, entry, buffer, event)) in trace_hwlat_sample() 130 __buffer_unlock_commit(buffer, event); in trace_hwlat_sample()
|
D | Kconfig | 266 be recorded into the ring buffer. 286 bool "Create a snapshot trace buffer" 289 Allow tracing users to take snapshot of the current buffer using the 300 Allow doing a snapshot of a single CPU buffer instead of a 306 After which, only the tracing buffer for CPU 2 was swapped with 307 the main tracing buffer, and the other CPU buffers remain the same. 390 events into a running trace buffer to see when and where the 643 tristate "Ring buffer benchmark stress tester" 646 This option creates a test to stress the ring buffer and benchmark it. 647 It creates its own ring buffer such that it will not interfere with [all …]
|
D | blktrace.c | 74 struct ring_buffer *buffer = NULL; in trace_note() local 80 buffer = blk_tr->trace_buffer.buffer; in trace_note() 82 event = trace_buffer_lock_reserve(buffer, TRACE_BLK, in trace_note() 107 trace_buffer_unlock_commit(blk_tr, buffer, event, 0, pc); in trace_note() 210 struct ring_buffer *buffer = NULL; in __blk_add_trace() local 240 buffer = blk_tr->trace_buffer.buffer; in __blk_add_trace() 242 event = trace_buffer_lock_reserve(buffer, TRACE_BLK, in __blk_add_trace() 288 trace_buffer_unlock_commit(blk_tr, buffer, event, 0, pc); in __blk_add_trace() 347 static ssize_t blk_dropped_read(struct file *filp, char __user *buffer, in blk_dropped_read() argument 355 return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf)); in blk_dropped_read() [all …]
|
/kernel/debug/kdb/ |
D | kdb_io.c | 34 static int kgdb_transition_check(char *buffer) in kgdb_transition_check() argument 36 if (buffer[0] != '+' && buffer[0] != '$') { in kgdb_transition_check() 38 kdb_printf("%s", buffer); in kgdb_transition_check() 40 int slen = strlen(buffer); in kgdb_transition_check() 41 if (slen > 3 && buffer[slen - 3] == '#') { in kgdb_transition_check() 42 kdb_gdb_state_pass(buffer); in kgdb_transition_check() 43 strcpy(buffer, "kgdb"); in kgdb_transition_check() 51 static int kdb_read_get_key(char *buffer, size_t bufsize) in kdb_read_get_key() argument 89 *buffer++ = key; in kdb_read_get_key() 90 *buffer = '\0'; in kdb_read_get_key() [all …]
|
D | kdb_bt.c | 83 char buffer[2]; in kdb_bt1() local 84 if (kdb_getarea(buffer[0], (unsigned long)p) || in kdb_bt1() 85 kdb_getarea(buffer[0], (unsigned long)(p+1)-1)) in kdb_bt1() 93 kdb_getstr(buffer, sizeof(buffer), in kdb_bt1() 95 if (buffer[0] == 'q') { in kdb_bt1()
|
/kernel/gcov/ |
D | gcc_4_7.c | 364 void *buffer; member 380 static size_t store_gcov_u32(void *buffer, size_t off, u32 v) in store_gcov_u32() argument 384 if (buffer) { in store_gcov_u32() 385 data = buffer + off; in store_gcov_u32() 404 static size_t store_gcov_u64(void *buffer, size_t off, u64 v) in store_gcov_u64() argument 408 if (buffer) { in store_gcov_u64() 409 data = buffer + off; in store_gcov_u64() 425 static size_t convert_to_gcda(char *buffer, struct gcov_info *info) in convert_to_gcda() argument 435 pos += store_gcov_u32(buffer, pos, GCOV_DATA_MAGIC); in convert_to_gcda() 436 pos += store_gcov_u32(buffer, pos, info->version); in convert_to_gcda() [all …]
|
/kernel/ |
D | sysctl.c | 183 void __user *buffer, size_t *lenp, loff_t *ppos); 185 void __user *buffer, size_t *lenp, loff_t *ppos); 190 void __user *buffer, size_t *lenp, loff_t *ppos); 194 void __user *buffer, size_t *lenp, loff_t *ppos); 197 void __user *buffer, size_t *lenp, loff_t *ppos); 205 void __user *buffer, size_t *lenp, in sysrq_sysctl_handler() argument 210 error = proc_dointvec(table, write, buffer, lenp, ppos); in sysrq_sysctl_handler() 1950 char __user *buffer, in _proc_do_string() argument 1978 p = buffer; in _proc_do_string() 1979 while ((p - buffer) < *lenp && len < maxlen - 1) { in _proc_do_string() [all …]
|
D | kallsyms.c | 419 static int __sprint_symbol(char *buffer, unsigned long address, in __sprint_symbol() argument 428 name = kallsyms_lookup(address, &size, &offset, &modname, buffer); in __sprint_symbol() 430 return sprintf(buffer, "0x%lx", address - symbol_offset); in __sprint_symbol() 432 if (name != buffer) in __sprint_symbol() 433 strcpy(buffer, name); in __sprint_symbol() 434 len = strlen(buffer); in __sprint_symbol() 438 len += sprintf(buffer + len, "+%#lx/%#lx", offset, size); in __sprint_symbol() 441 len += sprintf(buffer + len, " [%s]", modname); in __sprint_symbol() 457 int sprint_symbol(char *buffer, unsigned long address) in sprint_symbol() argument 459 return __sprint_symbol(buffer, address, 0, 1); in sprint_symbol() [all …]
|
D | watchdog.c | 642 void __user *buffer, size_t *lenp, loff_t *ppos) in proc_watchdog_common() argument 663 err = proc_dointvec_minmax(table, write, buffer, lenp, ppos); in proc_watchdog_common() 665 err = proc_dointvec_minmax(table, write, buffer, lenp, ppos); in proc_watchdog_common() 710 void __user *buffer, size_t *lenp, loff_t *ppos) in proc_watchdog() argument 713 table, write, buffer, lenp, ppos); in proc_watchdog() 720 void __user *buffer, size_t *lenp, loff_t *ppos) in proc_nmi_watchdog() argument 723 table, write, buffer, lenp, ppos); in proc_nmi_watchdog() 730 void __user *buffer, size_t *lenp, loff_t *ppos) in proc_soft_watchdog() argument 733 table, write, buffer, lenp, ppos); in proc_soft_watchdog() 740 void __user *buffer, size_t *lenp, loff_t *ppos) in proc_watchdog_thresh() argument [all …]
|
D | reboot.c | 284 char buffer[256]; in SYSCALL_DEFINE4() local 339 ret = strncpy_from_user(&buffer[0], arg, sizeof(buffer) - 1); in SYSCALL_DEFINE4() 344 buffer[sizeof(buffer) - 1] = '\0'; in SYSCALL_DEFINE4() 346 kernel_restart(buffer); in SYSCALL_DEFINE4()
|
D | sysctl_binary.c | 976 char *buffer; in bin_intvec() local 980 buffer = kmalloc(BUFSZ, GFP_KERNEL); in bin_intvec() 981 if (!buffer) in bin_intvec() 990 result = kernel_read(file, 0, buffer, BUFSZ - 1); in bin_intvec() 994 str = buffer; in bin_intvec() 1020 str = buffer; in bin_intvec() 1032 result = kernel_write(file, buffer, str - buffer, 0); in bin_intvec() 1038 kfree(buffer); in bin_intvec() 1047 char *buffer; in bin_ulongvec() local 1051 buffer = kmalloc(BUFSZ, GFP_KERNEL); in bin_ulongvec() [all …]
|
D | params.c | 277 int param_get_##name(char *buffer, const struct kernel_param *kp) \ 279 return scnprintf(buffer, PAGE_SIZE, format, \ 323 int param_get_charp(char *buffer, const struct kernel_param *kp) in param_get_charp() argument 325 return scnprintf(buffer, PAGE_SIZE, "%s", *((char **)kp->arg)); in param_get_charp() 353 int param_get_bool(char *buffer, const struct kernel_param *kp) in param_get_bool() argument 356 return sprintf(buffer, "%c", *(bool *)kp->arg ? 'Y' : 'N'); in param_get_bool() 413 int param_get_invbool(char *buffer, const struct kernel_param *kp) in param_get_invbool() argument 415 return sprintf(buffer, "%c", (*(bool *)kp->arg) ? 'N' : 'Y'); in param_get_invbool() 508 static int param_array_get(char *buffer, const struct kernel_param *kp) in param_array_get() argument 516 buffer[off++] = ','; in param_array_get() [all …]
|
/kernel/power/ |
D | snapshot.c | 132 static void *buffer; variable 1372 safe_copy_page(buffer, s_page); in copy_data_page() 1374 copy_page(dst, buffer); in copy_data_page() 1485 buffer = NULL; in swsusp_free() 1883 buffer = get_image_page(GFP_ATOMIC | __GFP_COLD, safe_needed); in get_highmem_buffer() 1884 return buffer ? 0 : -ENOMEM; in get_highmem_buffer() 2085 if (!buffer) { in snapshot_read_next() 2087 buffer = get_image_page(GFP_ATOMIC, PG_ANY); in snapshot_read_next() 2088 if (!buffer) in snapshot_read_next() 2094 error = init_header((struct swsusp_info *)buffer); in snapshot_read_next() [all …]
|
/kernel/printk/ |
D | nmi.c | 51 unsigned char buffer[NMI_LOG_BUF_LEN]; member 70 if (len >= sizeof(s->buffer)) { in vprintk_nmi() 82 add = vsnprintf(s->buffer + len, sizeof(s->buffer) - len, fmt, args); in vprintk_nmi() 123 const char *buf = s->buffer + start; in printk_nmi_flush_seq_line() 171 size = min(len, sizeof(s->buffer)); in __printk_nmi_flush() 176 if (s->buffer[i] == '\n') { in __printk_nmi_flush()
|
/kernel/irq/ |
D | proc.c | 93 const char __user *buffer, size_t count, loff_t *pos) in write_irq_affinity() argument 106 err = cpumask_parselist_user(buffer, count, new_value); in write_irq_affinity() 108 err = cpumask_parse_user(buffer, count, new_value); in write_irq_affinity() 137 const char __user *buffer, size_t count, loff_t *pos) in irq_affinity_proc_write() argument 139 return write_irq_affinity(0, file, buffer, count, pos); in irq_affinity_proc_write() 143 const char __user *buffer, size_t count, loff_t *pos) in irq_affinity_list_proc_write() argument 145 return write_irq_affinity(1, file, buffer, count, pos); in irq_affinity_list_proc_write() 193 const char __user *buffer, size_t count, loff_t *ppos) in default_affinity_write() argument 201 err = cpumask_parse_user(buffer, count, new_value); in default_affinity_write()
|
/kernel/debug/ |
D | gdbstub.c | 90 static void get_packet(char *buffer) in get_packet() argument 119 buffer[count] = ch; in get_packet() 136 buffer[count] = 0; in get_packet() 144 static void put_packet(char *buffer) in put_packet() argument 158 while ((ch = buffer[count])) { in put_packet() 1115 unsigned char checksum, ch, buffer[3]; in gdbstub_exit() local 1125 buffer[0] = 'W'; in gdbstub_exit() 1126 buffer[1] = hex_asc_hi(status); in gdbstub_exit() 1127 buffer[2] = hex_asc_lo(status); in gdbstub_exit() 1133 ch = buffer[loop]; in gdbstub_exit()
|