Dear All,

I am using perf to count events for cgroups. I am getting some wierd results.

For example, I am using the following toy program:
for(a=0;a<4000;a++)
{
count=0;
for(b=0;b<4000;b++)
for(c=0;c<4000;c++)
count++;
}

I measure the values of the performance counter while program
1. as a process - perf stat -p 'pid' sleep 1 and I run this every
second till the end of the program. So, at the end of the run, I get
time series of performance counter values
2. inside a Cgroup. - perf stat -G "cgroup-name" sleep 1 and I run
this every second till the end of the program.

But, I get really strange results. For example, the average values of
the number of branches in case of the process is 411.1236M/sec where
as the number of branches in case of the Cgroup it's 103.20M/sec.
Since, the number of branch instruction is expected to be constant,
this would mean that the run time of the program has to be around 4
times more than the normal running time. But, this is not the case.

How can I explain this?

Regards,
Vivek Nair
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to