Profiling arm/nds program

support for the ARM toolchain
LeRodeur
Posts: 13
Joined: Tue Jul 31, 2012 2:36 pm

Re: Profiling arm/nds program

Post by LeRodeur » Fri Aug 24, 2012 4:52 pm

I found out that the irq handler wasn't called, and fixed it by using irqEnable(IRQ_HBLANK);
But I still have 0ms for all functions :cry:
(the hblanks variable is incrmented correctly)
Last edited by LeRodeur on Fri Aug 24, 2012 5:00 pm, edited 1 time in total.

mtheall
Posts: 211
Joined: Thu Feb 03, 2011 10:47 pm

Re: Profiling arm/nds program

Post by mtheall » Fri Aug 24, 2012 4:56 pm

WHOOPS I forgot a very important line. Add this line before irqSet()

Code: Select all

irqEnable(IRQ_HBLANK);

mtheall
Posts: 211
Joined: Thu Feb 03, 2011 10:47 pm

Re: Profiling arm/nds program

Post by mtheall » Fri Aug 24, 2012 4:57 pm

Oh look you beat me to it.

LeRodeur
Posts: 13
Joined: Tue Jul 31, 2012 2:36 pm

Re: Profiling arm/nds program

Post by LeRodeur » Fri Aug 24, 2012 5:01 pm

I just edited my post, even after enabling irq hblank (the variable hablnaks is incremented correctly) i still have 0ms everywhere :s

mtheall
Posts: 211
Joined: Thu Feb 03, 2011 10:47 pm

Re: Profiling arm/nds program

Post by mtheall » Fri Aug 24, 2012 5:03 pm

It's probable that the loop is being optimized out. I added some real code and it works fine for me.

mtheall
Posts: 211
Joined: Thu Feb 03, 2011 10:47 pm

Re: Profiling arm/nds program

Post by mtheall » Fri Aug 24, 2012 5:06 pm

I updated the code at http://mtheall.com/profile.tar.gz

LeRodeur
Posts: 13
Joined: Tue Jul 31, 2012 2:36 pm

Re: Profiling arm/nds program

Post by LeRodeur » Fri Aug 24, 2012 5:10 pm

It works! It seems my ndslite button was a bit hard to press, so it didn't save the log and kept the old one :oops: thanks for everything!
Hope you guys will get the -pg option to work someday :mrgreen:

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 0 guests