aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_counter.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r--include/linux/perf_counter.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index f2b914de3f0c..e22ab47a2f41 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -170,22 +170,18 @@ struct perf_counter_mmap_page {
170 * u32 seq; 170 * u32 seq;
171 * s64 count; 171 * s64 count;
172 * 172 *
173 * again: 173 * do {
174 * seq = pc->lock; 174 * seq = pc->lock;
175 * if (unlikely(seq & 1)) {
176 * cpu_relax();
177 * goto again;
178 * }
179 * 175 *
180 * if (pc->index) { 176 * barrier()
181 * count = pmc_read(pc->index - 1); 177 * if (pc->index) {
182 * count += pc->offset; 178 * count = pmc_read(pc->index - 1);
183 * } else 179 * count += pc->offset;
184 * goto regular_read; 180 * } else
181 * goto regular_read;
185 * 182 *
186 * barrier(); 183 * barrier();
187 * if (pc->lock != seq) 184 * } while (pc->lock != seq);
188 * goto again;
189 * 185 *
190 * NOTE: for obvious reason this only works on self-monitoring 186 * NOTE: for obvious reason this only works on self-monitoring
191 * processes. 187 * processes.