Unable to display Statistical Callgraph results in Eclipse

Unable to display Statistical Callgraph results in Eclipse

Hi there,

I am new to PTU and I trying to reproduce the call_chain example in the tutorial. The code looks like this:
#include
#include
#include

void f2() {
printf ("Beginning f2
");
Sleep(100);
printf ("Ending f2
");
}

void f1() {
printf ("Beginning f1
");
Sleep(100);
f2();
printf ("Ending f1
");
}

void main() {
printf ("Beginning main
");
Sleep(1000);
f1();
printf ("Ending main
");
}
I compile the code and build the project and after adding the project and choosing the Basic Statistical Callgraph option from the profile menu, eclipse runs and the output in the console shows:
Beginning main
Beginning f1
Beginning f2
Ending f2
Ending f1
Ending main
Stop request has been processed..
and then nothing shows under the functions list. Any idea of what I could be doing wrong?

Thanks in advance,

Emad

5 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

How did you compile the app

What OS are you using

What processor are you using

d

I am using a Intel Core 2 Duo processor. Running Vista Home.

I compiled the app using Microsoft Visual Studio 2005. Do I need to set any specific debugging flags? Is there a document that tells you what flags need to be set in order for PTU to work?

Thanks a lot for the reply,

Emad

The problem here is that your programsdoesn't do anything - it just sleeps.Therefore PTU haven't collected any samples on it. You should replace the sleep() with somebusy cycle, like:

double d = 1.0;

for (int i = 0; i< 10000000; i++){ d += d/i;}

Thanks that solved it !

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi