}
/* LCOV_EXCL_START */
-static bool
-_tbm_bufmgr_mutex_init(void)
-{
- static bool tbm_bufmgr_mutex_init = false;
-
- if (tbm_bufmgr_mutex_init)
- return true;
-
- if (pthread_mutex_init(&tbm_bufmgr_lock, NULL)) {
- TBM_ERR("fail: Cannot pthread_mutex_init for tbm_bufmgr_lock.\n");
- return false;
- }
-
- tbm_bufmgr_mutex_init = true;
-
- return true;
-}
void
_tbm_bufmgr_mutex_lock(void)
{
- if (!_tbm_bufmgr_mutex_init()) {
- TBM_ERR("fail: _tbm_bufmgr_mutex_init()\n");
- return;
- }
-
pthread_mutex_lock(&tbm_bufmgr_lock);
}
gettimeofday(&start_tv, NULL);
#endif
- /* LCOV_EXCL_START */
-#ifdef HAVE_DLOG
- env = getenv("TBM_DLOG");
- if (env) {
- bDlog = atoi(env);
- TBM_DBG("TBM_DLOG=%s\n", env);
- } else
- bDlog = 1;
-#endif
+ bDlog = 1;
+ /* LCOV_EXCL_START */
#ifdef TRACE
env = getenv("TBM_TRACE");
if (env) {
pid = syscall(SYS_getpid);
_tbm_util_get_appname_from_pid(pid, app_name);
_tbm_util_get_appname_brief(app_name);
- TBM_SNRPRINTF(str, len, c, "============TBM DEBUG: %s(%ld)===========================\n",
+ TBM_SNRPRINTF(str, len, c, "===========================================TBM DEBUG: %s(%ld)===========================================\n",
app_name, pid);
- snprintf(title, 255, "%s", "no surface refcnt width height bpp size n_b n_p flags format app_name ");
+ snprintf(title, 255, "%s", "no surface refcnt width height bpp size n_b n_p flags format app_name ");
if (!LIST_IS_EMPTY(&bufmgr->debug_key_list)) {
LIST_FOR_EACH_ENTRY(debug_old_data, &bufmgr->debug_key_list, item_link) {
snprintf(app_name, sizeof(app_name), "%d", surf_pid);
}
- snprintf(data, 255, "%-2d %-9p %-4d %-5u %-6u %-3u %-6u %-2d %-2d %-3d %-8s %-15s",
+ snprintf(data, 255, "%-3d %-11p %-5d %-6u %-7u %-4u %-7u %-3d %-3d %-8d %-9s %-22s",
++surf_cnt,
surf,
surf->refcnt,
TBM_SNRPRINTF(str, len, c, "\n");
TBM_SNRPRINTF(str, len, c, "[tbm_bo information]\n");
- TBM_SNRPRINTF(str, len, c, "no bo refcnt size lock_cnt map_cnt flags surface name\n");
+ TBM_SNRPRINTF(str, len, c, "no bo refcnt size lock_cnt map_cnt flags surface name\n");
/* show the tbm_bo information in bo_list */
if (!LIST_IS_EMPTY(&bufmgr->bo_list)) {
size = bufmgr->backend->bo_size(bo);
key = bufmgr->backend->bo_export(bo);
}
- TBM_SNRPRINTF(str, len, c, "%-4d%-11p %-4d %-6d %-5d %-4u %-3d %-11p %-4d\n",
+ TBM_SNRPRINTF(str, len, c, "%-3d %-11p %-5d %-7d %-6d %-5u %-7d %-11p %-4d\n",
++bo_cnt,
bo,
bo->ref_cnt,
TBM_SNRPRINTF(str, len, c, "no tbm_bos.\n");
TBM_SNRPRINTF(str, len, c, "\n");
- TBM_SNRPRINTF(str, len, c, "===============================================================\n");
+ TBM_SNRPRINTF(str, len, c, "========================================================================================================\n");
pthread_mutex_unlock(&gLock);