Software profiling report_0.txt outputs only 0

Software profiling report_0.txt outputs only 0

by Jérôme Savary -
Number of replies: 4

Hi,

We have finally achieved a software profiling for the lab2 using the SDRAM. The software itself works perfectly. However, when we try to generate the gmon.out file, the report_0.txt is full of 0. 

We configured the BSP Editor as required by the previous messages on the forum (see picture attached). In the folder of our project, we used the following command in the nios2 shell : 
nios2-download -g --write-gmon gmon_0.out *.elf && nios2-elf-gprof *.elf gmon_0.out > report_0.txt;

If anyone has an idea, I would be very interested in hearing it.

Yours sincerely,

Jérôme Savary 


Attachment BSP_Editor_config.JPG
In reply to Jérôme Savary

Re: Software profiling report_0.txt outputs only 0

by Luca Joss -

Hi,

The measured timings might be very low (it's in [ms] in the report), we had a similar output when doing only 10 conversion. Try doing around 10000 conversions and check if the values reported are still 0.

In reply to Luca Joss

Re: Software profiling report_0.txt outputs only 0

by Jérôme Savary -

I tried with 1000 and 10000 but I get the same results. 

The behavior is really weird though : 
- either it failed after 15 seconds
- either it "works" after 5 seconds but the files are full of 0
- either it takes a lot of time and it never ends (I waited 15 min, but this seems cleary too much)

In reply to Jérôme Savary

Re: Software profiling report_0.txt outputs only 0

by Luca Joss -

We had a similar issue when using the timer_0 for interruption in our software and using it for the profiler in lab 3. But for lab2 the timer_0 was only used for the profiler, and worked. Maybe that could be your issue.

In reply to Luca Joss

Re: Software profiling report_0.txt outputs only 0

by Sahand Kashani-Akhavan -

Is your timer's interrupt output connected to the CPU's interrupt source?

It seems like the timer is running, but no periodic interrupts are being generated, so nothing is ever sampled.

In this lab, do not use the timer that gprof is using by yourself for measurements as gprof controls it under the hood. If you want to time something yourself, use a second timer, or a performance counter, but in any case something that is not under the control of gprof in any way.