Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tracing: Fix various typos in comments

Fix ~59 single-word typos in the tracing code comments, and fix
the grammar in a handful of places.

Link: https://lore.kernel.org/r/20210322224546.GA1981273@gmail.com
Link: https://lkml.kernel.org/r/20210323174935.GA4176821@gmail.com

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

authored by

Ingo Molnar and committed by
Steven Rostedt (VMware)
f2cc020d b700fc3a

+60 -59
+1 -1
arch/microblaze/include/asm/ftrace.h
··· 13 13 #endif 14 14 15 15 #ifdef CONFIG_DYNAMIC_FTRACE 16 - /* reloction of mcount call site is the same as the address */ 16 + /* relocation of mcount call site is the same as the address */ 17 17 static inline unsigned long ftrace_call_adjust(unsigned long addr) 18 18 { 19 19 return addr;
+1 -1
arch/nds32/kernel/ftrace.c
··· 236 236 "bal ftrace_return_to_handler\n\t" 237 237 "move $lp, $r0 \n\t" 238 238 239 - /* restore state nedded by the ABI */ 239 + /* restore state needed by the ABI */ 240 240 "lmw.bim $r0,[$sp],$r1,#0x0 \n\t"); 241 241 } 242 242
+2 -2
arch/powerpc/include/asm/ftrace.h
··· 12 12 13 13 #ifdef __ASSEMBLY__ 14 14 15 - /* Based off of objdump optput from glibc */ 15 + /* Based off of objdump output from glibc */ 16 16 17 17 #define MCOUNT_SAVE_FRAME \ 18 18 stwu r1,-48(r1); \ ··· 52 52 53 53 static inline unsigned long ftrace_call_adjust(unsigned long addr) 54 54 { 55 - /* reloction of mcount call site is the same as the address */ 55 + /* relocation of mcount call site is the same as the address */ 56 56 return addr; 57 57 } 58 58
+1 -1
arch/sh/kernel/ftrace.c
··· 67 67 * Modifying code must take extra care. On an SMP machine, if 68 68 * the code being modified is also being executed on another CPU 69 69 * that CPU will have undefined results and possibly take a GPF. 70 - * We use kstop_machine to stop other CPUS from exectuing code. 70 + * We use kstop_machine to stop other CPUS from executing code. 71 71 * But this does not stop NMIs from happening. We still need 72 72 * to protect against that. We separate out the modification of 73 73 * the code to take care of this.
+1 -1
arch/sparc/include/asm/ftrace.h
··· 17 17 #endif 18 18 19 19 #ifdef CONFIG_DYNAMIC_FTRACE 20 - /* reloction of mcount call site is the same as the address */ 20 + /* relocation of mcount call site is the same as the address */ 21 21 static inline unsigned long ftrace_call_adjust(unsigned long addr) 22 22 { 23 23 return addr;
+1 -1
fs/tracefs/inode.c
··· 477 477 * 478 478 * The instances directory is special as it allows for mkdir and rmdir to 479 479 * to be done by userspace. When a mkdir or rmdir is performed, the inode 480 - * locks are released and the methhods passed in (@mkdir and @rmdir) are 480 + * locks are released and the methods passed in (@mkdir and @rmdir) are 481 481 * called without locks and with the name of the directory being created 482 482 * within the instances directory. 483 483 *
+2 -2
include/linux/ftrace.h
··· 33 33 /* 34 34 * If the arch's mcount caller does not support all of ftrace's 35 35 * features, then it must call an indirect function that 36 - * does. Or at least does enough to prevent any unwelcomed side effects. 36 + * does. Or at least does enough to prevent any unwelcome side effects. 37 37 */ 38 38 #if !ARCH_SUPPORTS_FTRACE_OPS 39 39 # define FTRACE_FORCE_LIST_FUNC 1 ··· 389 389 */ 390 390 static inline void stack_tracer_disable(void) 391 391 { 392 - /* Preemption or interupts must be disabled */ 392 + /* Preemption or interrupts must be disabled */ 393 393 if (IS_ENABLED(CONFIG_DEBUG_PREEMPT)) 394 394 WARN_ON_ONCE(!preempt_count() || !irqs_disabled()); 395 395 this_cpu_inc(disable_stack_tracer);
+1 -1
include/linux/trace_events.h
··· 206 206 207 207 trace_ctx = tracing_gen_ctx(); 208 208 /* 209 - * Subtract one from the preeption counter if preemption is enabled, 209 + * Subtract one from the preemption counter if preemption is enabled, 210 210 * see trace_event_buffer_reserve()for details. 211 211 */ 212 212 if (IS_ENABLED(CONFIG_PREEMPTION))
+1 -1
include/linux/tracepoint.h
··· 465 465 * * 466 466 * * The declared 'local variable' is called '__entry' 467 467 * * 468 - * * __field(pid_t, prev_prid) is equivalent to a standard declariton: 468 + * * __field(pid_t, prev_prid) is equivalent to a standard declaration: 469 469 * * 470 470 * * pid_t prev_pid; 471 471 * *
+1 -1
include/trace/events/io_uring.h
··· 49 49 ); 50 50 51 51 /** 52 - * io_uring_register - called after a buffer/file/eventfd was succesfully 52 + * io_uring_register - called after a buffer/file/eventfd was successfully 53 53 * registered for a ring 54 54 * 55 55 * @ctx: pointer to a ring context structure
+1 -1
include/trace/events/rcu.h
··· 48 48 * RCU flavor, the grace-period number, and a string identifying the 49 49 * grace-period-related event as follows: 50 50 * 51 - * "AccReadyCB": CPU acclerates new callbacks to RCU_NEXT_READY_TAIL. 51 + * "AccReadyCB": CPU accelerates new callbacks to RCU_NEXT_READY_TAIL. 52 52 * "AccWaitCB": CPU accelerates new callbacks to RCU_WAIT_TAIL. 53 53 * "newreq": Request a new grace period. 54 54 * "start": Start a grace period.
+1 -1
include/trace/events/sched.h
··· 174 174 TP_ARGS(p)); 175 175 176 176 /* 177 - * Tracepoint called when the task is actually woken; p->state == TASK_RUNNNG. 177 + * Tracepoint called when the task is actually woken; p->state == TASK_RUNNING. 178 178 * It is not always called from the waking context. 179 179 */ 180 180 DEFINE_EVENT(sched_wakeup_template, sched_wakeup,
+1 -1
include/trace/events/timer.h
··· 119 119 * When used in combination with the timer_expire_entry tracepoint we can 120 120 * determine the runtime of the timer callback function. 121 121 * 122 - * NOTE: Do NOT derefernce timer in TP_fast_assign. The pointer might 122 + * NOTE: Do NOT dereference timer in TP_fast_assign. The pointer might 123 123 * be invalid. We solely track the pointer. 124 124 */ 125 125 DEFINE_EVENT(timer_class, timer_expire_exit,
+3 -2
kernel/trace/bpf_trace.c
··· 658 658 /* fmt[i] != 0 && fmt[last] == 0, so we can access fmt[i + 1] */ 659 659 i++; 660 660 661 - /* skip optional "[0 +-][num]" width formating field */ 661 + /* skip optional "[0 +-][num]" width formatting field */ 662 662 while (fmt[i] == '0' || fmt[i] == '+' || fmt[i] == '-' || 663 663 fmt[i] == ' ') 664 664 i++; ··· 748 748 fmt_cnt++; 749 749 } 750 750 751 - /* Maximumly we can have MAX_SEQ_PRINTF_VARARGS parameter, just give 751 + /* 752 + * The maximum we can have is MAX_SEQ_PRINTF_VARARGS parameters, so just give 752 753 * all of them to seq_printf(). 753 754 */ 754 755 seq_printf(m, fmt, params[0], params[1], params[2], params[3],
+2 -2
kernel/trace/fgraph.c
··· 42 42 } 43 43 44 44 /** 45 - * ftrace_graph_stop - set to permanently disable function graph tracincg 45 + * ftrace_graph_stop - set to permanently disable function graph tracing 46 46 * 47 47 * In case of an error int function graph tracing, this is called 48 48 * to try to keep function graph tracing from causing any more harm. ··· 117 117 118 118 /* 119 119 * Skip graph tracing if the return location is served by direct trampoline, 120 - * since call sequence and return addresses is unpredicatable anymore. 120 + * since call sequence and return addresses are unpredictable anyway. 121 121 * Ex: BPF trampoline may call original function and may skip frame 122 122 * depending on type of BPF programs attached. 123 123 */
+4 -4
kernel/trace/ftrace.c
··· 1045 1045 }; 1046 1046 1047 1047 /* 1048 - * Used by the stack undwinder to know about dynamic ftrace trampolines. 1048 + * Used by the stack unwinder to know about dynamic ftrace trampolines. 1049 1049 */ 1050 1050 struct ftrace_ops *ftrace_ops_trampoline(unsigned long addr) 1051 1051 { ··· 3000 3000 * When the kernel is preemptive, tasks can be preempted 3001 3001 * while on a ftrace trampoline. Just scheduling a task on 3002 3002 * a CPU is not good enough to flush them. Calling 3003 - * synchornize_rcu_tasks() will wait for those tasks to 3003 + * synchronize_rcu_tasks() will wait for those tasks to 3004 3004 * execute and either schedule voluntarily or enter user space. 3005 3005 */ 3006 3006 if (IS_ENABLED(CONFIG_PREEMPTION)) ··· 5373 5373 * @reset - non zero to reset all filters before applying this filter. 5374 5374 * 5375 5375 * Filters denote which functions should be enabled when tracing is enabled 5376 - * If @ip is NULL, it failes to update filter. 5376 + * If @ip is NULL, it fails to update filter. 5377 5377 */ 5378 5378 int ftrace_set_filter_ip(struct ftrace_ops *ops, unsigned long ip, 5379 5379 int remove, int reset) ··· 6325 6325 } 6326 6326 } 6327 6327 6328 - /* Clear any records from hashs */ 6328 + /* Clear any records from hashes */ 6329 6329 static void clear_mod_from_hashes(struct ftrace_page *pg) 6330 6330 { 6331 6331 struct trace_array *tr;
+1 -1
kernel/trace/ring_buffer.c
··· 3154 3154 * is called before preempt_count() is updated, since the check will 3155 3155 * be on the NORMAL bit, the TRANSITION bit will then be set. If an 3156 3156 * NMI then comes in, it will set the NMI bit, but when the NMI code 3157 - * does the trace_recursive_unlock() it will clear the TRANSTION bit 3157 + * does the trace_recursive_unlock() it will clear the TRANSITION bit 3158 3158 * and leave the NMI bit set. But this is fine, because the interrupt 3159 3159 * code that set the TRANSITION bit will then clear the NMI bit when it 3160 3160 * calls trace_recursive_unlock(). If another NMI comes in, it will
+1 -1
kernel/trace/synth_event_gen_test.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* 3 - * Test module for in-kernel sythetic event creation and generation. 3 + * Test module for in-kernel synthetic event creation and generation. 4 4 * 5 5 * Copyright (C) 2019 Tom Zanussi <zanussi@kernel.org> 6 6 */
+9 -9
kernel/trace/trace.c
··· 514 514 * @filtered_pids: The list of pids to check 515 515 * @search_pid: The PID to find in @filtered_pids 516 516 * 517 - * Returns true if @search_pid is fonud in @filtered_pids, and false otherwis. 517 + * Returns true if @search_pid is found in @filtered_pids, and false otherwise. 518 518 */ 519 519 bool 520 520 trace_find_filtered_pid(struct trace_pid_list *filtered_pids, pid_t search_pid) ··· 545 545 struct task_struct *task) 546 546 { 547 547 /* 548 - * If filterd_no_pids is not empty, and the task's pid is listed 548 + * If filtered_no_pids is not empty, and the task's pid is listed 549 549 * in filtered_no_pids, then return true. 550 550 * Otherwise, if filtered_pids is empty, that means we can 551 551 * trace all tasks. If it has content, then only trace pids ··· 612 612 613 613 (*pos)++; 614 614 615 - /* pid already is +1 of the actual prevous bit */ 615 + /* pid already is +1 of the actual previous bit */ 616 616 pid = find_next_bit(pid_list->pids, pid_list->pid_max, pid); 617 617 618 618 /* Return pid + 1 to allow zero to be represented */ ··· 834 834 * The content of events may become garbage if we allow other process consumes 835 835 * these events concurrently: 836 836 * A) the page of the consumed events may become a normal page 837 - * (not reader page) in ring buffer, and this page will be rewrited 837 + * (not reader page) in ring buffer, and this page will be rewritten 838 838 * by events producer. 839 839 * B) The page of the consumed events may become a page for splice_read, 840 840 * and this page will be returned to system. ··· 1520 1520 #undef C 1521 1521 #define C(a, b) b 1522 1522 1523 - /* These must match the bit postions in trace_iterator_flags */ 1523 + /* These must match the bit positions in trace_iterator_flags */ 1524 1524 static const char *trace_options[] = { 1525 1525 TRACE_FLAGS 1526 1526 NULL ··· 3368 3368 * buffer (use trace_printk() for that), as writing into the top level 3369 3369 * buffer should only have events that can be individually disabled. 3370 3370 * trace_printk() is only used for debugging a kernel, and should not 3371 - * be ever encorporated in normal use. 3371 + * be ever incorporated in normal use. 3372 3372 * 3373 3373 * trace_array_printk() can be used, as it will not add noise to the 3374 3374 * top level tracing buffer. ··· 7533 7533 * @cmd: The tracing command that caused the error 7534 7534 * @str: The string to position the caret at within @cmd 7535 7535 * 7536 - * Finds the position of the first occurence of @str within @cmd. The 7536 + * Finds the position of the first occurrence of @str within @cmd. The 7537 7537 * return value can be passed to tracing_log_err() for caret placement 7538 7538 * within @cmd. 7539 7539 * 7540 - * Returns the index within @cmd of the first occurence of @str or 0 7540 + * Returns the index within @cmd of the first occurrence of @str or 0 7541 7541 * if @str was not found. 7542 7542 */ 7543 7543 unsigned int err_pos(char *cmd, const char *str) ··· 9320 9320 * As there may still be users that expect the tracing 9321 9321 * files to exist in debugfs/tracing, we must automount 9322 9322 * the tracefs file system there, so older tools still 9323 - * work with the newer kerenl. 9323 + * work with the newer kernel. 9324 9324 */ 9325 9325 tr->dir = debugfs_create_automount("tracing", NULL, 9326 9326 trace_automount, NULL);
+2 -2
kernel/trace/trace.h
··· 1347 1347 1348 1348 /** 1349 1349 * event_trigger_unlock_commit - handle triggers and finish event commit 1350 - * @file: The file pointer assoctiated to the event 1350 + * @file: The file pointer associated with the event 1351 1351 * @buffer: The ring buffer that the event is being written to 1352 1352 * @event: The event meta data in the ring buffer 1353 1353 * @entry: The event itself ··· 1374 1374 1375 1375 /** 1376 1376 * event_trigger_unlock_commit_regs - handle triggers and finish event commit 1377 - * @file: The file pointer assoctiated to the event 1377 + * @file: The file pointer associated with the event 1378 1378 * @buffer: The ring buffer that the event is being written to 1379 1379 * @event: The event meta data in the ring buffer 1380 1380 * @entry: The event itself
+1 -1
kernel/trace/trace_event_perf.c
··· 16 16 17 17 /* 18 18 * Force it to be aligned to unsigned long to avoid misaligned accesses 19 - * suprises 19 + * surprises 20 20 */ 21 21 typedef typeof(unsigned long [PERF_MAX_TRACE_SIZE / sizeof(unsigned long)]) 22 22 perf_trace_t;
+2 -2
kernel/trace/trace_events.c
··· 2646 2646 } 2647 2647 2648 2648 /* 2649 - * Since calls are grouped by systems, the likelyhood that the 2649 + * Since calls are grouped by systems, the likelihood that the 2650 2650 * next call in the iteration belongs to the same system as the 2651 2651 * previous call is high. As an optimization, we skip searching 2652 2652 * for a map[] that matches the call's system if the last call ··· 2706 2706 } 2707 2707 2708 2708 /* 2709 - * Just create a decriptor for early init. A descriptor is required 2709 + * Just create a descriptor for early init. A descriptor is required 2710 2710 * for enabling events at boot. We want to enable events before 2711 2711 * the filesystem is initialized. 2712 2712 */
+2 -2
kernel/trace/trace_events_filter.c
··· 296 296 * and "FALSE" the program entry after that, we are now done with the first 297 297 * pass. 298 298 * 299 - * Making the above "a || b && c" have a progam of: 299 + * Making the above "a || b && c" have a program of: 300 300 * prog[0] = { "a", 1, 2 } 301 301 * prog[1] = { "b", 0, 2 } 302 302 * prog[2] = { "c", 0, 3 } ··· 390 390 * F: return FALSE 391 391 * 392 392 * As "r = a; if (!r) goto n5;" is obviously the same as 393 - * "if (!a) goto n5;" without doing anything we can interperate the 393 + * "if (!a) goto n5;" without doing anything we can interpret the 394 394 * program as: 395 395 * n1: if (!a) goto n5; 396 396 * n2: if (!b) goto n5;
+1 -1
kernel/trace/trace_events_synth.c
··· 1385 1385 1386 1386 /** 1387 1387 * synth_event_delete - Delete a synthetic event 1388 - * @event_name: The name of the new sythetic event 1388 + * @event_name: The name of the new synthetic event 1389 1389 * 1390 1390 * Delete a synthetic event that was created with synth_event_create(). 1391 1391 *
+1 -1
kernel/trace/trace_functions_graph.c
··· 764 764 * - we are inside irq code 765 765 * - we just entered irq code 766 766 * 767 - * retunns 0 if 767 + * returns 0 if 768 768 * - funcgraph-interrupts option is set 769 769 * - we are not inside irq code 770 770 */
+2 -2
kernel/trace/trace_hwlat.c
··· 83 83 u64 nmi_total_ts; /* Total time spent in NMIs */ 84 84 struct timespec64 timestamp; /* wall time */ 85 85 int nmi_count; /* # NMIs during this sample */ 86 - int count; /* # of iteratons over threash */ 86 + int count; /* # of iterations over thresh */ 87 87 }; 88 88 89 89 /* keep the global state somewhere. */ ··· 389 389 } 390 390 391 391 /** 392 - * stop_kthread - Inform the hardware latency samping/detector kthread to stop 392 + * stop_kthread - Inform the hardware latency sampling/detector kthread to stop 393 393 * 394 394 * This kicks the running hardware latency sampling/detector kernel thread and 395 395 * tells it to stop sampling now. Use this on unload and at system shutdown.
+1 -1
kernel/trace/trace_kprobe.c
··· 1748 1748 if (trace_probe_test_flag(&tk->tp, TP_FLAG_PROFILE)) 1749 1749 kretprobe_perf_func(tk, ri, regs); 1750 1750 #endif 1751 - return 0; /* We don't tweek kernel, so just return 0 */ 1751 + return 0; /* We don't tweak kernel, so just return 0 */ 1752 1752 } 1753 1753 NOKPROBE_SYMBOL(kretprobe_dispatcher); 1754 1754
+3 -3
kernel/trace/trace_probe.c
··· 168 168 if (!trace_probe_log.argv) 169 169 return; 170 170 171 - /* Recalcurate the length and allocate buffer */ 171 + /* Recalculate the length and allocate buffer */ 172 172 for (i = 0; i < trace_probe_log.argc; i++) { 173 173 if (i == trace_probe_log.index) 174 174 pos = len; ··· 182 182 /** 183 183 * Set the error position is next to the last arg + space. 184 184 * Note that len includes the terminal null and the cursor 185 - * appaers at pos + 1. 185 + * appears at pos + 1. 186 186 */ 187 187 pos = len; 188 188 offset = 0; ··· 592 592 } 593 593 594 594 /* 595 - * Since $comm and immediate string can not be dereferred, 595 + * Since $comm and immediate string can not be dereferenced, 596 596 * we can find those by strcmp. 597 597 */ 598 598 if (strcmp(arg, "$comm") == 0 || strncmp(arg, "\\\"", 2) == 0) {
+1 -1
kernel/trace/trace_probe.h
··· 134 134 size_t size; /* Byte size of type */ 135 135 int is_signed; /* Signed flag */ 136 136 print_type_func_t print; /* Print functions */ 137 - const char *fmt; /* Fromat string */ 137 + const char *fmt; /* Format string */ 138 138 const char *fmttype; /* Name in format file */ 139 139 }; 140 140
+1 -1
kernel/trace/trace_probe_tmpl.h
··· 167 167 return code->op == FETCH_OP_END ? ret : -EILSEQ; 168 168 } 169 169 170 - /* Sum up total data length for dynamic arraies (strings) */ 170 + /* Sum up total data length for dynamic arrays (strings) */ 171 171 static nokprobe_inline int 172 172 __get_data_size(struct trace_probe *tp, struct pt_regs *regs) 173 173 {
+2 -2
kernel/trace/trace_selftest.c
··· 878 878 int ret; 879 879 880 880 /* 881 - * Now that the big kernel lock is no longer preemptable, 881 + * Now that the big kernel lock is no longer preemptible, 882 882 * and this is called with the BKL held, it will always 883 883 * fail. If preemption is already disabled, simply 884 884 * pass the test. When the BKL is removed, or becomes ··· 940 940 int ret; 941 941 942 942 /* 943 - * Now that the big kernel lock is no longer preemptable, 943 + * Now that the big kernel lock is no longer preemptible, 944 944 * and this is called with the BKL held, it will always 945 945 * fail. If preemption is already disabled, simply 946 946 * pass the test. When the BKL is removed, or becomes
+6 -6
kernel/trace/trace_seq.c
··· 16 16 * The buffer size is currently PAGE_SIZE, although it may become dynamic 17 17 * in the future. 18 18 * 19 - * A write to the buffer will either succed or fail. That is, unlike 19 + * A write to the buffer will either succeed or fail. That is, unlike 20 20 * sprintf() there will not be a partial write (well it may write into 21 21 * the buffer but it wont update the pointers). This allows users to 22 22 * try to write something into the trace_seq buffer and if it fails ··· 73 73 * @fmt: printf format string 74 74 * 75 75 * The tracer may use either sequence operations or its own 76 - * copy to user routines. To simplify formating of a trace 76 + * copy to user routines. To simplify formatting of a trace 77 77 * trace_seq_printf() is used to store strings into a special 78 78 * buffer (@s). Then the output may be either used by 79 79 * the sequencer or pulled into another buffer. ··· 133 133 * @fmt: printf format string 134 134 * 135 135 * The tracer may use either sequence operations or its own 136 - * copy to user routines. To simplify formating of a trace 136 + * copy to user routines. To simplify formatting of a trace 137 137 * trace_seq_printf is used to store strings into a special 138 138 * buffer (@s). Then the output may be either used by 139 139 * the sequencer or pulled into another buffer. ··· 226 226 * @c: simple character to record 227 227 * 228 228 * The tracer may use either the sequence operations or its own 229 - * copy to user routines. This function records a simple charater 229 + * copy to user routines. This function records a simple character 230 230 * into a special buffer (@s) for later retrieval by a sequencer 231 231 * or other mechanism. 232 232 */ ··· 348 348 EXPORT_SYMBOL_GPL(trace_seq_path); 349 349 350 350 /** 351 - * trace_seq_to_user - copy the squence buffer to user space 351 + * trace_seq_to_user - copy the sequence buffer to user space 352 352 * @s: trace sequence descriptor 353 353 * @ubuf: The userspace memory location to copy to 354 354 * @cnt: The amount to copy ··· 363 363 * 364 364 * On failure it returns -EBUSY if all of the content in the 365 365 * sequence has been already read, which includes nothing in the 366 - * sequenc (@s->len == @s->readpos). 366 + * sequence (@s->len == @s->readpos). 367 367 * 368 368 * Returns -EFAULT if the copy to userspace fails. 369 369 */