Skip to content

Commit

Permalink
perf, tools: Use correct articles in comments
Browse files Browse the repository at this point in the history
Some of the comments in the perf events code use articles incorrectly,
using 'a' for words beginning with a vowel sound, where 'an' should be
used.

Signed-off-by: Tobias Tefke <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
[ Fix a few more perf related 'a event' typo fixes from all around the kernel and tooling tree. ]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
ttefke authored and Ingo Molnar committed Jul 15, 2018
1 parent 26c6ccd commit 788faab
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions arch/powerpc/perf/core-book3s.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ static int collect_events(struct perf_event *group, int max_count,
}

/*
* Add a event to the PMU.
* Add an event to the PMU.
* If all events are not already frozen, then we disable and
* re-enable the PMU in order to get hw_perf_enable to do the
* actual work of reconfiguring the PMU.
Expand Down Expand Up @@ -1548,7 +1548,7 @@ static int power_pmu_add(struct perf_event *event, int ef_flags)
}

/*
* Remove a event from the PMU.
* Remove an event from the PMU.
*/
static void power_pmu_del(struct perf_event *event, int ef_flags)
{
Expand Down Expand Up @@ -1742,7 +1742,7 @@ static int power_pmu_commit_txn(struct pmu *pmu)
/*
* Return 1 if we might be able to put event on a limited PMC,
* or 0 if not.
* A event can only go on a limited PMC if it counts something
* An event can only go on a limited PMC if it counts something
* that a limited PMC can count, doesn't require interrupts, and
* doesn't exclude any processor mode.
*/
Expand Down
2 changes: 1 addition & 1 deletion include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ struct perf_addr_filters_head {
};

/**
* enum perf_event_state - the states of a event
* enum perf_event_state - the states of an event:
*/
enum perf_event_state {
PERF_EVENT_STATE_DEAD = -4,
Expand Down
16 changes: 8 additions & 8 deletions kernel/events/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1656,7 +1656,7 @@ perf_event_groups_next(struct perf_event *event)
typeof(*event), group_node))

/*
* Add a event from the lists for its context.
* Add an event from the lists for its context.
* Must be called with ctx->mutex and ctx->lock held.
*/
static void
Expand Down Expand Up @@ -1844,7 +1844,7 @@ static void perf_group_attach(struct perf_event *event)
}

/*
* Remove a event from the lists for its context.
* Remove an event from the lists for its context.
* Must be called with ctx->mutex and ctx->lock held.
*/
static void
Expand Down Expand Up @@ -2148,7 +2148,7 @@ static void __perf_event_disable(struct perf_event *event,
}

/*
* Disable a event.
* Disable an event.
*
* If event->ctx is a cloned context, callers must make sure that
* every task struct that event->ctx->task could possibly point to
Expand Down Expand Up @@ -2677,7 +2677,7 @@ static void __perf_event_enable(struct perf_event *event,
}

/*
* Enable a event.
* Enable an event.
*
* If event->ctx is a cloned context, callers must make sure that
* every task struct that event->ctx->task could possibly point to
Expand Down Expand Up @@ -2755,7 +2755,7 @@ static int __perf_event_stop(void *info)
* events will refuse to restart because of rb::aux_mmap_count==0,
* see comments in perf_aux_output_begin().
*
* Since this is happening on a event-local CPU, no trace is lost
* Since this is happening on an event-local CPU, no trace is lost
* while restarting.
*/
if (sd->restart)
Expand Down Expand Up @@ -4827,7 +4827,7 @@ __perf_read(struct perf_event *event, char __user *buf, size_t count)
int ret;

/*
* Return end-of-file for a read on a event that is in
* Return end-of-file for a read on an event that is in
* error state (i.e. because it was pinned but it couldn't be
* scheduled on to the CPU at some point).
*/
Expand Down Expand Up @@ -9898,7 +9898,7 @@ static void account_event(struct perf_event *event)
}

/*
* Allocate and initialize a event structure
* Allocate and initialize an event structure
*/
static struct perf_event *
perf_event_alloc(struct perf_event_attr *attr, int cpu,
Expand Down Expand Up @@ -11229,7 +11229,7 @@ const struct perf_event_attr *perf_event_attrs(struct perf_event *event)
}

/*
* Inherit a event from parent task to child task.
* Inherit an event from parent task to child task.
*
* Returns:
* - valid pointer on success
Expand Down
6 changes: 3 additions & 3 deletions kernel/events/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *
EXPORT_SYMBOL_GPL(uprobe_register);

/*
* uprobe_apply - unregister a already registered probe.
* uprobe_apply - unregister an already registered probe.
* @inode: the file in which the probe has to be removed.
* @offset: offset from the start of the file.
* @uc: consumer which wants to add more or remove some breakpoints
Expand Down Expand Up @@ -947,7 +947,7 @@ int uprobe_apply(struct inode *inode, loff_t offset,
}

/*
* uprobe_unregister - unregister a already registered probe.
* uprobe_unregister - unregister an already registered probe.
* @inode: the file in which the probe has to be removed.
* @offset: offset from the start of the file.
* @uc: identify which probe if multiple probes are colocated.
Expand Down Expand Up @@ -1403,7 +1403,7 @@ static struct return_instance *free_ret_instance(struct return_instance *ri)

/*
* Called with no locks held.
* Called in context of a exiting or a exec-ing thread.
* Called in context of an exiting or an exec-ing thread.
*/
void uprobe_free_utask(struct task_struct *t)
{
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/Documentation/perf-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ perf also supports group leader sampling using the :S specifier.
perf record -e '{cycles,instructions}:S' ...
perf report --group

Normally all events in a event group sample, but with :S only
Normally all events in an event group sample, but with :S only
the first event (the leader) samples, and it only reads the values of the
other events in the group.

Expand Down
4 changes: 2 additions & 2 deletions tools/perf/Documentation/perf-record.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ OPTIONS
"perf report" to view group events together.

--filter=<filter>::
Event filter. This option should follow a event selector (-e) which
Event filter. This option should follow an event selector (-e) which
selects either tracepoint event(s) or a hardware trace PMU
(e.g. Intel PT or CoreSight).

Expand Down Expand Up @@ -153,7 +153,7 @@ OPTIONS

--exclude-perf::
Don't record events issued by perf itself. This option should follow
a event selector (-e) which selects tracepoint event(s). It adds a
an event selector (-e) which selects tracepoint event(s). It adds a
filter expression 'common_pid != $PERFPID' to filters. If other
'--filter' exists, the new filter expression will be combined with
them by '&&'.
Expand Down

0 comments on commit 788faab

Please sign in to comment.