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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf_counter/powerpc: Fix cache event codes for POWER7
perf_counter: Fix /0 bug in swcounters
perf_counters: Increase paranoia level

+5 -4
+3 -3
arch/powerpc/kernel/power7-pmu.c
··· 317 317 */ 318 318 static int power7_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { 319 319 [C(L1D)] = { /* RESULT_ACCESS RESULT_MISS */ 320 - [C(OP_READ)] = { 0x400f0, 0xc880 }, 320 + [C(OP_READ)] = { 0xc880, 0x400f0 }, 321 321 [C(OP_WRITE)] = { 0, 0x300f0 }, 322 322 [C(OP_PREFETCH)] = { 0xd8b8, 0 }, 323 323 }, ··· 327 327 [C(OP_PREFETCH)] = { 0x408a, 0 }, 328 328 }, 329 329 [C(LL)] = { /* RESULT_ACCESS RESULT_MISS */ 330 - [C(OP_READ)] = { 0x6080, 0x6084 }, 331 - [C(OP_WRITE)] = { 0x6082, 0x6086 }, 330 + [C(OP_READ)] = { 0x16080, 0x26080 }, 331 + [C(OP_WRITE)] = { 0x16082, 0x26082 }, 332 332 [C(OP_PREFETCH)] = { 0, 0 }, 333 333 }, 334 334 [C(DTLB)] = { /* RESULT_ACCESS RESULT_MISS */
+2 -1
kernel/perf_counter.c
··· 50 50 * 1 - disallow cpu counters to unpriv 51 51 * 2 - disallow kernel profiling to unpriv 52 52 */ 53 - int sysctl_perf_counter_paranoid __read_mostly; 53 + int sysctl_perf_counter_paranoid __read_mostly = 1; 54 54 55 55 static inline bool perf_paranoid_cpu(void) 56 56 { ··· 4066 4066 hwc->sample_period = attr->sample_period; 4067 4067 if (attr->freq && attr->sample_freq) 4068 4068 hwc->sample_period = 1; 4069 + hwc->last_period = hwc->sample_period; 4069 4070 4070 4071 atomic64_set(&hwc->period_left, hwc->sample_period); 4071 4072