tdm_func_output *func_output = &private_display->func_output;
char temp[TDM_NAME_LEN];
tdm_error ret;
+ double stamp;
if (!func_output->output_get_capability) {
TDM_ERR("no output_get_capability()");
return TDM_ERROR_BAD_MODULE;
}
+ stamp = tdm_helper_get_time();
ret = func_output->output_get_capability(output_backend, caps);
+ TDM_DBG("backend output_get_capability() time: %.3f ms", (tdm_helper_get_time() - stamp) * 1000.0);
+
if (ret != TDM_ERROR_NONE) {
TDM_ERR("output_get_capability() failed");
return TDM_ERROR_BAD_MODULE;
tdm_backend_module *module_data;
void *module;
tdm_error ret;
+ double stamp;
snprintf(path, sizeof(path), TDM_MODULE_PATH "/%s", file);
+ stamp = tdm_helper_get_time();
TDM_TRACE_BEGIN(Load_Backend);
module = dlopen(path, RTLD_LAZY);
goto failed_load;
}
+ TDM_DBG("dlopen, dlsym time: %.3f ms", (tdm_helper_get_time() - stamp) * 1000.0);
+
private_display->module_data = module_data;
private_display->module = module;
/* We don't care if backend_data is NULL or not. It's up to backend. */
TDM_TRACE_BEGIN(Init_Backend);
+ stamp = tdm_helper_get_time();
private_display->bdata = module_data->init((tdm_display *)private_display, &ret);
+ TDM_DBG("backend init() time: %.3f ms", (tdm_helper_get_time() - stamp) * 1000.0);
TDM_TRACE_END();
+
if (ret != TDM_ERROR_NONE) {
TDM_ERR("failed to init '%s' module", module_data->name);
goto failed_load;
tdm_private_display *private_display = NULL;
const char *debug;
tdm_error ret;
- double start;
+ double stamp1, stamp2, start;
_pthread_mutex_lock(&gLock);
return g_private_display;
}
- start = tdm_helper_get_time();
+ start = stamp1 = tdm_helper_get_time();
private_display = calloc(1, sizeof(tdm_private_display));
if (!private_display) {
_pthread_mutex_lock(&private_display->lock);
+ stamp2 = tdm_helper_get_time();
+ TDM_DBG("prepare init time: %.3f ms", (stamp2 - stamp1) * 1000.0);
+ stamp1 = stamp2;
+
ret = tdm_event_loop_init(private_display);
if (ret != TDM_ERROR_NONE)
goto failed_event;
+ stamp2 = tdm_helper_get_time();
+ TDM_DBG("creating event loop time: %.3f ms", (stamp2 - stamp1) * 1000.0);
+ stamp1 = stamp2;
+
ret = _tdm_display_load_module(private_display);
if (ret != TDM_ERROR_NONE)
goto failed_load;
+ stamp2 = tdm_helper_get_time();
+ TDM_DBG("loading backend time: %.3f ms", (stamp2 - stamp1) * 1000.0);
+ stamp1 = stamp2;
+
#ifdef INIT_BUFMGR
int tdm_drm_fd = tdm_helper_get_fd("TDM_DRM_MASTER_FD");
if (tdm_drm_fd >= 0) {
} else {
TDM_INFO("tbm_bufmgr_init successed");
}
+
+ stamp2 = tdm_helper_get_time();
+ TDM_DBG("initializing bufmgr time: %.3f ms", (stamp2 - stamp1) * 1000.0);
+ stamp1 = stamp2;
}
#endif
if (ret != TDM_ERROR_NONE)
goto failed_update;
+ stamp2 = tdm_helper_get_time();
+ TDM_DBG("updating display time: %.3f ms", (stamp2 - stamp1) * 1000.0);
+ stamp1 = stamp2;
+
tdm_event_loop_create_backend_source(private_display);
private_display->init_count = 1;