From 7fc23589a2e96b3a7d4b26b641256b4402f385a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Fri, 23 Oct 2009 13:42:11 -0400 Subject: [PATCH] Exclude idle events and set sample_period to 200000 --- collector.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collector.c b/collector.c index 95b56158..aa0fe03c 100644 --- a/collector.c +++ b/collector.c @@ -354,6 +354,7 @@ counter_new (Collector *collector, attr.mmap = 1; attr.comm = 1; attr.task = 1; + attr.exclude_idle = 1; if ((fd = sysprof_perf_counter_open (&attr, -1, cpu, -1, 0)) < 0) { @@ -361,7 +362,7 @@ counter_new (Collector *collector, { attr.type = PERF_TYPE_SOFTWARE; attr.config = PERF_COUNT_SW_CPU_CLOCK; - attr.sample_period = 10000000; + attr.sample_period = 2000000; fd = sysprof_perf_counter_open (&attr, -1, cpu, -1, 0); }