summaryrefslogtreecommitdiff
path: root/collector.c
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@daimi.au.dk>2009-10-23 13:42:11 -0400
committerSøren Sandmann Pedersen <sandmann@daimi.au.dk>2009-10-23 13:42:11 -0400
commit7fc23589a2e96b3a7d4b26b641256b4402f385a9 (patch)
tree8d799f81542bd3b85683761dcbb65fd21a03e67a /collector.c
parent70d03f4bf2a21613d49bdc70f1d0df643ed5becf (diff)
Exclude idle events and set sample_period to 200000
Diffstat (limited to 'collector.c')
-rw-r--r--collector.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/collector.c b/collector.c
index 95b5615..aa0fe03 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);
}