Skip to content

Commit

Permalink
perf tools: Fix various typos in comments
Browse files Browse the repository at this point in the history
Fix ~124 single-word typos and a few spelling errors in the perf tooling code,
accumulated over the years.

Signed-off-by: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
Ingo Molnar authored and acmel committed Mar 23, 2021
1 parent a6cb06f commit 4d39c89
Show file tree
Hide file tree
Showing 72 changed files with 124 additions and 123 deletions.
2 changes: 1 addition & 1 deletion tools/perf/Documentation/perf-buildid-cache.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ OPTIONS
-u::
--update=::
Update specified file of the cache. Note that this doesn't remove
older entires since those may be still needed for annotating old
older entries since those may be still needed for annotating old
(or remote) perf.data. Only if there is already a cache which has
exactly same build-id, that is replaced by new one. It can be used
to update kallsyms and kernel dso to vmlinux in order to support
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/Documentation/perf-report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ OPTIONS
but probably we'll make the default not to show the switch-on/off events
on the --group mode and if there is only one event besides the off/on ones,
go straight to the histogram browser, just like 'perf report' with no events
explicitely specified does.
explicitly specified does.

--itrace::
Options for decoding instruction tracing data. The options are:
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/Documentation/perf-top.txt
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ Default is to monitor all CPUS.
but probably we'll make the default not to show the switch-on/off events
on the --group mode and if there is only one event besides the off/on ones,
go straight to the histogram browser, just like 'perf top' with no events
explicitely specified does.
explicitly specified does.

--stitch-lbr::
Show callgraph with stitched LBRs, which may have more complete
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/arch/arm/util/cs-etm.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
opts->auxtrace_mmap_pages = roundup_pow_of_two(sz);
}

/* Snapshost size can't be bigger than the auxtrace area */
/* Snapshot size can't be bigger than the auxtrace area */
if (opts->auxtrace_snapshot_size >
opts->auxtrace_mmap_pages * (size_t)page_size) {
pr_err("Snapshot size %zu must not be greater than AUX area tracing mmap size %zu\n",
Expand Down
6 changes: 3 additions & 3 deletions tools/perf/arch/arm64/util/machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#include "debug.h"
#include "symbol.h"

/* On arm64, kernel text segment start at high memory address,
/* On arm64, kernel text segment starts at high memory address,
* for example 0xffff 0000 8xxx xxxx. Modules start at a low memory
* address, like 0xffff 0000 00ax xxxx. When only samll amount of
* address, like 0xffff 0000 00ax xxxx. When only small amount of
* memory is used by modules, gap between end of module's text segment
* and start of kernel text segment may be reach 2G.
* and start of kernel text segment may reach 2G.
* Therefore do not fill this gap and do not assign it to the kernel dso map.
*/

Expand Down
2 changes: 1 addition & 1 deletion tools/perf/arch/arm64/util/perf_regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ int arch_sdt_arg_parse_op(char *old_op, char **new_op)
/* [sp], [sp, NUM] or [sp,NUM] */
new_len = 7; /* + ( % s p ) NULL */

/* If the arugment is [sp], need to fill offset '0' */
/* If the argument is [sp], need to fill offset '0' */
if (rm[2].rm_so == -1)
new_len += 1;
else
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/arch/powerpc/util/kvm-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int cpu_isa_init(struct perf_kvm_stat *kvm, const char *cpuid __maybe_unused)
}

/*
* Incase of powerpc architecture, pmu registers are programmable
* In case of powerpc architecture, pmu registers are programmable
* by guest kernel. So monitoring guest via host may not provide
* valid samples with default 'cycles' event. It is better to use
* 'trace_imc/trace_cycles' event for guest profiling, since it
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/arch/powerpc/util/utils_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

#define SPRN_PVR 0x11F /* Processor Version Register */
#define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) /* Version field */
#define PVR_REV(pvr) (((pvr) >> 0) & 0xFFFF) /* Revison field */
#define PVR_REV(pvr) (((pvr) >> 0) & 0xFFFF) /* Revision field */

#endif /* __PERF_UTIL_HEADER_H */
2 changes: 1 addition & 1 deletion tools/perf/arch/x86/tests/bp-modify.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static int bp_modify1(void)
/*
* The parent does following steps:
* - creates a new breakpoint (id 0) for bp_2 function
* - changes that breakponit to bp_1 function
* - changes that breakpoint to bp_1 function
* - waits for the breakpoint to hit and checks
* it has proper rip of bp_1 function
* - detaches the child
Expand Down
4 changes: 2 additions & 2 deletions tools/perf/arch/x86/util/perf_regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static int sdt_init_op_regex(void)
/*
* Max x86 register name length is 5(ex: %r15d). So, 6th char
* should always contain NULL. This helps to find register name
* length using strlen, insted of maintaing one more variable.
* length using strlen, instead of maintaining one more variable.
*/
#define SDT_REG_NAME_SIZE 6

Expand Down Expand Up @@ -207,7 +207,7 @@ int arch_sdt_arg_parse_op(char *old_op, char **new_op)
* and displacement 0 (Both sign and displacement 0 are
* optional so it may be empty). Use one more character
* to hold last NULL so that strlen can be used to find
* prefix length, instead of maintaing one more variable.
* prefix length, instead of maintaining one more variable.
*/
char prefix[3] = {0};

Expand Down
4 changes: 2 additions & 2 deletions tools/perf/bench/epoll-wait.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* While the second model, enabled via --multiq option, uses multiple
* queueing (which refers to one epoll instance per worker). For example,
* short lived tcp connections in a high throughput httpd server will
* ditribute the accept()'ing connections across CPUs. In this case each
* distribute the accept()'ing connections across CPUs. In this case each
* worker does a limited amount of processing.
*
* [queue A] ---> [worker]
Expand Down Expand Up @@ -198,7 +198,7 @@ static void *workerfn(void *arg)

do {
/*
* Block undefinitely waiting for the IN event.
* Block indefinitely waiting for the IN event.
* In order to stress the epoll_wait(2) syscall,
* call it event per event, instead of a larger
* batch (max)limit.
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/bench/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#endif

/*
* Regular printout to the terminal, supressed if -q is specified:
* Regular printout to the terminal, suppressed if -q is specified:
*/
#define tprintf(x...) do { if (g && g->p.show_details >= 0) printf(x); } while (0)

Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static int evsel__add_sample(struct evsel *evsel, struct perf_sample *sample,
}

/*
* XXX filtered samples can still have branch entires pointing into our
* XXX filtered samples can still have branch entries pointing into our
* symbol and are missed.
*/
process_branch_stack(sample->branch_stack, al, sample);
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@ static int ui_init(void)
data__for_each_file(i, d) {

/*
* Baseline or compute realted columns:
* Baseline or compute related columns:
*
* PERF_HPP_DIFF__BASELINE
* PERF_HPP_DIFF__DELTA
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct lock_stat {

/*
* FIXME: evsel__intval() returns u64,
* so address of lockdep_map should be dealed as 64bit.
* so address of lockdep_map should be treated as 64bit.
* Is there more better solution?
*/
void *addr; /* address of lockdep_map, used as ID */
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ static int perf_sched__process_fork_event(struct perf_tool *tool,
{
struct perf_sched *sched = container_of(tool, struct perf_sched, tool);

/* run the fork event through the perf machineruy */
/* run the fork event through the perf machinery */
perf_event__process_fork(tool, event, sample, machine);

/* and then run additional processing needed for this command */
Expand Down
4 changes: 2 additions & 2 deletions tools/perf/builtin-script.c
Original file line number Diff line number Diff line change
Expand Up @@ -2486,7 +2486,7 @@ static int perf_script__fopen_per_event_dump(struct perf_script *script)
/*
* Already setup? I.e. we may be called twice in cases like
* Intel PT, one for the intel_pt// and dummy events, then
* for the evsels syntheized from the auxtrace info.
* for the evsels synthesized from the auxtrace info.
*
* Ses perf_script__process_auxtrace_info.
*/
Expand Down Expand Up @@ -3083,7 +3083,7 @@ static int list_available_scripts(const struct option *opt __maybe_unused,
*
* Fixme: All existing "xxx-record" are all in good formats "-e event ",
* which is covered well now. And new parsing code should be added to
* cover the future complexing formats like event groups etc.
* cover the future complex formats like event groups etc.
*/
static int check_ev_match(char *dir_name, char *scriptname,
struct perf_session *session)
Expand Down
4 changes: 2 additions & 2 deletions tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ static int add_default_attributes(void)
bzero(&errinfo, sizeof(errinfo));
if (transaction_run) {
/* Handle -T as -M transaction. Once platform specific metrics
* support has been added to the json files, all archictures
* support has been added to the json files, all architectures
* will use this approach. To determine transaction support
* on an architecture test for such a metric name.
*/
Expand Down Expand Up @@ -2459,7 +2459,7 @@ int cmd_stat(int argc, const char **argv)
/*
* We synthesize the kernel mmap record just so that older tools
* don't emit warnings about not being able to resolve symbols
* due to /proc/sys/kernel/kptr_restrict settings and instear provide
* due to /proc/sys/kernel/kptr_restrict settings and instead provide
* a saner message about no samples being in the perf.data file.
*
* This also serves to suppress a warning about f_header.data.size == 0
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ int cmd_top(int argc, const char **argv)
if (status) {
/*
* Some arches do not provide a get_cpuid(), so just use pr_debug, otherwise
* warn the user explicitely.
* warn the user explicitly.
*/
eprintf(status == ENOSYS ? 1 : 0, verbose,
"Couldn't read the cpuid for this machine: %s\n",
Expand Down
4 changes: 2 additions & 2 deletions tools/perf/examples/bpf/augmented_raw_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ int sys_enter(struct syscall_enter_args *args)
/*
* Jump to syscall specific augmenter, even if the default one,
* "!raw_syscalls:unaugmented" that will just return 1 to return the
* unagmented tracepoint payload.
* unaugmented tracepoint payload.
*/
bpf_tail_call(args, &syscalls_sys_enter, augmented_args->args.syscall_nr);

Expand All @@ -282,7 +282,7 @@ int sys_exit(struct syscall_exit_args *args)
/*
* Jump to syscall specific return augmenter, even if the default one,
* "!raw_syscalls:unaugmented" that will just return 1 to return the
* unagmented tracepoint payload.
* unaugmented tracepoint payload.
*/
bpf_tail_call(args, &syscalls_sys_exit, exit_args.syscall_nr);
/*
Expand Down
4 changes: 2 additions & 2 deletions tools/perf/jvmti/jvmti_agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ jvmti_write_code(void *agent, char const *sym,
rec.p.total_size += size;

/*
* If JVM is multi-threaded, nultiple concurrent calls to agent
* If JVM is multi-threaded, multiple concurrent calls to agent
* may be possible, so protect file writes
*/
flockfile(fp);
Expand Down Expand Up @@ -457,7 +457,7 @@ jvmti_write_debug_info(void *agent, uint64_t code,
rec.p.total_size = size;

/*
* If JVM is multi-threaded, nultiple concurrent calls to agent
* If JVM is multi-threaded, multiple concurrent calls to agent
* may be possible, so protect file writes
*/
flockfile(fp);
Expand Down
12 changes: 6 additions & 6 deletions tools/perf/pmu-events/arch/powerpc/power8/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -885,37 +885,37 @@
"MetricName": "flush_rate_percent"
},
{
"BriefDescription": "GCT slot utilization (11 to 14) as a % of cycles this thread had atleast 1 slot valid",
"BriefDescription": "GCT slot utilization (11 to 14) as a % of cycles this thread had at least 1 slot valid",
"MetricExpr": "PM_GCT_UTIL_11_14_ENTRIES / ( PM_RUN_CYC - PM_GCT_NOSLOT_CYC) * 100",
"MetricGroup": "general",
"MetricName": "gct_util_11to14_slots_percent"
},
{
"BriefDescription": "GCT slot utilization (15 to 17) as a % of cycles this thread had atleast 1 slot valid",
"BriefDescription": "GCT slot utilization (15 to 17) as a % of cycles this thread had at least 1 slot valid",
"MetricExpr": "PM_GCT_UTIL_15_17_ENTRIES / ( PM_RUN_CYC - PM_GCT_NOSLOT_CYC) * 100",
"MetricGroup": "general",
"MetricName": "gct_util_15to17_slots_percent"
},
{
"BriefDescription": "GCT slot utilization 18+ as a % of cycles this thread had atleast 1 slot valid",
"BriefDescription": "GCT slot utilization 18+ as a % of cycles this thread had at least 1 slot valid",
"MetricExpr": "PM_GCT_UTIL_18_ENTRIES / ( PM_RUN_CYC - PM_GCT_NOSLOT_CYC) * 100",
"MetricGroup": "general",
"MetricName": "gct_util_18plus_slots_percent"
},
{
"BriefDescription": "GCT slot utilization (1 to 2) as a % of cycles this thread had atleast 1 slot valid",
"BriefDescription": "GCT slot utilization (1 to 2) as a % of cycles this thread had at least 1 slot valid",
"MetricExpr": "PM_GCT_UTIL_1_2_ENTRIES / ( PM_RUN_CYC - PM_GCT_NOSLOT_CYC) * 100",
"MetricGroup": "general",
"MetricName": "gct_util_1to2_slots_percent"
},
{
"BriefDescription": "GCT slot utilization (3 to 6) as a % of cycles this thread had atleast 1 slot valid",
"BriefDescription": "GCT slot utilization (3 to 6) as a % of cycles this thread had at least 1 slot valid",
"MetricExpr": "PM_GCT_UTIL_3_6_ENTRIES / ( PM_RUN_CYC - PM_GCT_NOSLOT_CYC) * 100",
"MetricGroup": "general",
"MetricName": "gct_util_3to6_slots_percent"
},
{
"BriefDescription": "GCT slot utilization (7 to 10) as a % of cycles this thread had atleast 1 slot valid",
"BriefDescription": "GCT slot utilization (7 to 10) as a % of cycles this thread had at least 1 slot valid",
"MetricExpr": "PM_GCT_UTIL_7_10_ENTRIES / ( PM_RUN_CYC - PM_GCT_NOSLOT_CYC) * 100",
"MetricGroup": "general",
"MetricName": "gct_util_7to10_slots_percent"
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/pmu-events/arch/powerpc/power9/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@
"MetricName": "custom_secs"
},
{
"BriefDescription": "Percentage Cycles atleast one instruction dispatched",
"BriefDescription": "Percentage Cycles at least one instruction dispatched",
"MetricExpr": "PM_1PLUS_PPC_DISP / PM_CYC * 100",
"MetricName": "cycles_atleast_one_inst_dispatched_percent"
},
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/pmu-events/jevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ static int process_one_file(const char *fpath, const struct stat *sb,
* and directory tree could result in build failure due to table
* names not being found.
*
* Atleast for now, be strict with processing JSON file names.
* At least for now, be strict with processing JSON file names.
* i.e. if JSON file name cannot be mapped to C-style table name,
* fail.
*/
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/scripts/python/netdev-times.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def handle_irq_softirq_exit(event_info):
return
rec_data = {'sirq_ent_t':sirq_ent_t, 'sirq_ext_t':time,
'irq_list':irq_list, 'event_list':event_list}
# merge information realted to a NET_RX softirq
# merge information related to a NET_RX softirq
receive_hunk_list.append(rec_data)

def handle_napi_poll(event_info):
Expand Down
6 changes: 3 additions & 3 deletions tools/perf/tests/bp_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ int test__bp_signal(struct test *test __maybe_unused, int subtest __maybe_unused
*
* The test case check following error conditions:
* - we get stuck in signal handler because of debug
* exception being triggered receursively due to
* exception being triggered recursively due to
* the wrong RF EFLAG management
*
* - we never trigger the sig_handler breakpoint due
* to the rong RF EFLAG management
* to the wrong RF EFLAG management
*
*/

Expand All @@ -242,7 +242,7 @@ int test__bp_signal(struct test *test __maybe_unused, int subtest __maybe_unused
ioctl(fd3, PERF_EVENT_IOC_ENABLE, 0);

/*
* Kick off the test by trigering 'fd1'
* Kick off the test by triggering 'fd1'
* breakpoint.
*/
test_function();
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/tests/code-reading.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ static int do_test_code_reading(bool try_kcore)
/*
* Both cpus and threads are now owned by evlist
* and will be freed by following perf_evlist__set_maps
* call. Getting refference to keep them alive.
* call. Getting reference to keep them alive.
*/
perf_cpu_map__get(cpus);
perf_thread_map__get(threads);
Expand Down
4 changes: 2 additions & 2 deletions tools/perf/tests/hists_cumulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static struct sample fake_samples[] = {
};

/*
* Will be casted to struct ip_callchain which has all 64 bit entries
* Will be cast to struct ip_callchain which has all 64 bit entries
* of nr and ips[].
*/
static u64 fake_callchains[][10] = {
Expand Down Expand Up @@ -297,7 +297,7 @@ static int test1(struct evsel *evsel, struct machine *machine)
return err;
}

/* callcain + NO children */
/* callchain + NO children */
static int test2(struct evsel *evsel, struct machine *machine)
{
int err;
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/tests/parse-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#if defined(__s390x__)
/* Return true if kvm module is available and loaded. Test this
* and retun success when trace point kvm_s390_create_vm
* and return success when trace point kvm_s390_create_vm
* exists. Otherwise this test always fails.
*/
static bool kvm_s390_create_vm_valid(void)
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/tests/parse-metric.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static int __compute_metric(const char *name, struct value *vals,
*ratio2 = compute_single(&metric_events, evlist, &st, name2);

out:
/* ... clenup. */
/* ... cleanup. */
metricgroup__rblist_exit(&metric_events);
runtime_stat__exit(&st);
evlist__free_stats(evlist);
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/tests/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
* CPU 1 is on core_id 1 and physical_package_id 3
*
* Core_id and physical_package_id are platform and architecture
* dependend and might have higher numbers than the CPU id.
* dependent and might have higher numbers than the CPU id.
* This actually depends on the configuration.
*
* In this case process_cpu_topology() prints error message:
Expand Down
Loading

0 comments on commit 4d39c89

Please sign in to comment.