Commit 21c90595 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

module: Set up a timer for moduleNeed().

parent bf117f4d
......@@ -230,6 +230,7 @@ enum
STATS_TIMER_INTERACTION,
STATS_TIMER_PREPARSE,
STATS_TIMER_INPUT_LAUNCHING,
STATS_TIMER_MODULE_NEED,
STATS_TIMER_SKINS_PLAYTREE_IMAGE,
};
......
......@@ -355,6 +355,8 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
{
typedef struct module_list_t module_list_t;
stats_TimerStart( p_this, "module_Need()", STATS_TIMER_MODULE_NEED );
struct module_list_t
{
module_t *p_module;
......@@ -394,6 +396,9 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
if( !strcmp( psz_name, "none" ) )
{
free( psz_var );
stats_TimerStop( p_this, STATS_TIMER_MODULE_NEED );
stats_TimerDump( p_this, STATS_TIMER_MODULE_NEED );
stats_TimerClean( p_this, STATS_TIMER_MODULE_NEED );
return NULL;
}
......@@ -647,6 +652,10 @@ found_shortcut:
free( psz_shortcuts );
free( psz_var );
stats_TimerStop( p_this, STATS_TIMER_MODULE_NEED );
stats_TimerDump( p_this, STATS_TIMER_MODULE_NEED );
stats_TimerClean( p_this, STATS_TIMER_MODULE_NEED );
/* Don't forget that the module is still locked */
return p_module;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment