12.07.2015 Views

Nios Software Tutorial - Faculty.lasierra.edu

Nios Software Tutorial - Faculty.lasierra.edu

Nios Software Tutorial - Faculty.lasierra.edu

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix—Other Board Communication & Debug <strong>Nios</strong> <strong>Software</strong> Development <strong>Tutorial</strong>Gprof provides two additional output formats. To use either one, replacethe -q option with one of the following options (see Figures 10 through12):■■-p—The flat profile option shows how much time your programspent in each function, and how many times that function was called.If you simply want to know which functions burn most of the cycles,it is stated concisely here.-A—The annotated source listing option is a copy of the program’ssource code, labeled with the number of times each line of theprogram was executed.fFor more information and a full description of all the options available,refer to the GNU Gprof manual, atwww.sources.redhat.com/binutils/docs-2.10/gprof.html.Keep the following items in mind when reading the profiling data:■■Time is calculated in ticks, not seconds. Divide time byTIMER_SAMPLE_RATE (default is 10,000) for seconds.Functions from nios_gprof.c are included in your profile, forexample:– -internal_mcount– -sbrk44 Altera Corporation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!