Exclude idle events and set sample_period to 200000

This commit is contained in:
Søren Sandmann Pedersen
2009-10-23 13:42:11 -04:00
parent 70d03f4bf2
commit 7fc23589a2

View File

@ -354,6 +354,7 @@ counter_new (Collector *collector,
attr.mmap = 1; attr.mmap = 1;
attr.comm = 1; attr.comm = 1;
attr.task = 1; attr.task = 1;
attr.exclude_idle = 1;
if ((fd = sysprof_perf_counter_open (&attr, -1, cpu, -1, 0)) < 0) 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.type = PERF_TYPE_SOFTWARE;
attr.config = PERF_COUNT_SW_CPU_CLOCK; 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); fd = sysprof_perf_counter_open (&attr, -1, cpu, -1, 0);
} }