diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-02-24 12:26:21 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-02-27 12:43:25 +0100 |
commit | c347a2f1793e285b0812343e715bb7e953dbdf68 (patch) | |
tree | 5a1566147ac559f5eb9c76eb5eb4fb479728a213 /arch/x86/kernel/cpu/perf_event.h | |
parent | fdded676c3ef680bf1abc415d307d7e69a6768d1 (diff) | |
download | lwn-c347a2f1793e285b0812343e715bb7e953dbdf68.tar.gz lwn-c347a2f1793e285b0812343e715bb7e953dbdf68.zip |
perf/x86: Add a few more comments
Add a few comments on the ->add(), ->del() and ->*_txn()
implementation.
Requested-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/tip-he3819318c245j7t5e1e22tr@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.h')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h index 4972c244d0bc..3b2f9bdd974b 100644 --- a/arch/x86/kernel/cpu/perf_event.h +++ b/arch/x86/kernel/cpu/perf_event.h @@ -130,9 +130,11 @@ struct cpu_hw_events { unsigned long running[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; int enabled; - int n_events; - int n_added; - int n_txn; + int n_events; /* the # of events in the below arrays */ + int n_added; /* the # last events in the below arrays; + they've never been enabled yet */ + int n_txn; /* the # last events in the below arrays; + added in the current transaction */ int assign[X86_PMC_IDX_MAX]; /* event to counter assignment */ u64 tags[X86_PMC_IDX_MAX]; struct perf_event *event_list[X86_PMC_IDX_MAX]; /* in enabled order */ |