Re: [Bug gprof/2776] New: Strange profiling results

2006-06-22 Thread Nick Clifton
Hi Dmitry, void f (int n) { rdtscll (t); void g (int n) { gettimeofday (&tv, 0); int main (int argc, char *argv[]) { int n; for (n = 0; n < 200; n++) { if (n % 2) f (n); else g (n); My typical results are: $ gcc -O2 -g -pg -o test test.c

[Bug gprof/2776] New: Strange profiling results

2006-06-15 Thread dmantipov at yandex dot ru
I've observed a strange results while profiling the following program: $ cat test.c #include #define rdtscll(val) asm volatile("rdtsc" : "=A" (val)) struct timeval tv; unsigned long long t; void f (int n) { int x, y, z = 0; for (x = 0; x < n; x++) for (y = 0; y < n; y++) { z +=