- Status Closed
- Percent Complete
- Task Type Bugs
- Category
- Assigned To No-one
- Operating System All players
- Severity Medium
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#4834 - Plugin profiling broken.
plugin_start() must be declared with NO_PROF_ATTR to prevent it from being instrumented. Right now a plugin will die immediatley with a NULL pointer dereference becasue __cyg_profile_func_enter() gets called before the plugin has a chance to call profile_init().
Closed by lostlogic
2006-03-16 17:05
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
2006-03-16 17:05
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
fixed
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Hmm, praps the profiling functions should be smart enough to not blow up if they are called before prof_start is called instead?
Any interest in looking into that?
Thanks.
This can be done by adding "if (!rb_local) return;" to the __cyg_profile_func_enter/exit functions.
Also a new end function is needed:
void profile_end ()
{
}
and plugin_start is required to call it before exiting. This is to make sure we don't get a mismatch where profile_func_enter() is skipped when entering plugin_start() but profile_func_exit() gets called when plugin_start() exits becasue local_rb is still initialized.
The end result is the same as in my suggested patch, profiling is skipped for plugin_start(), this solution is just more roundabout.
Also, profiling codecs have the exact same problem as plugins.
Will apply, thanks.