Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
mcount   Message List  
Reply | Forward Message #14339 of 15019 |
Re: [gbadev] mcount

Jonathan Perret wrote:

>Well mcount() is actually part of the profiler (the profiling library), so
>unless you plan on writing your own profiler from scratch there's not
>much point in providing an implementation.
>You're normally supposed to link with the profiling library, I think
>linking with -pg is supposed to do it. It also might need to use a
>special version of crt0 (that's what it does on Linux apparently) that
>initializes the profiling memory.
>In fact looking a bit more into it, it seems gcc's mcount lives in
>libgcc.a... All in all the profiling setup is not a piece of cake, it has
>to be done properly . Oh, and good luck profiling on the GBA
>hardware : where are you going to store the (huge) data set ?
>
The VisualBoy Advance emulator has support for profiling. The data set
is stored by the emulator and dumped to disk when the program exits.
It's a very nice feature, but I had trouble getting intelligible results
from nontrivial programs (e.g. the gprof reports were referencing functions
which were never called). Has anyone else used this feature?

GCC's |"-fprofile-arcs" feature could be implemented similarly, but I'm
not sure how useful it would be on the ARM target.
|
-Pete






Sun Jun 1, 2003 6:19 pm

gonz1242
Offline Offline
Send Email Send Email

Forward
Message #14339 of 15019 |
Expand Messages Author Sort by Date

It appears that the function mcount is inserted by gcc at the beginning and end of each function call. I guess it would maintain a stack which keeps track of...
Jason Wilkins
fenix@...
Send Email
May 20, 2003
8:24 am

Well mcount() is actually part of the profiler (the profiling library), so unless you plan on writing your own profiler from scratch there's not much point in...
Jonathan Perret
jonathan.perret@...
Send Email
May 20, 2003
8:59 am

... The VisualBoy Advance emulator has support for profiling. The data set is stored by the emulator and dumped to disk when the program exits. It's a very...
Pete Gonzalez
gonz1242
Offline Send Email
Jun 1, 2003
7:30 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help