Debug tweaks.

SVN revision: 77011
This commit is contained in:
Kim Woelders 2012-09-22 08:29:15 +00:00
parent 083ef4dd35
commit f244c9a479
4 changed files with 26 additions and 18 deletions

View File

@ -1666,7 +1666,7 @@ DeskCurrentGotoArea(int ax, int ay)
return;
if (EDebug(EDBUG_TYPE_DESKS))
Eprintf("DeskCurrentGotoArea %d,%d\n", ax, ay);
Eprintf("%s %d,%d\n", __func__, ax, ay);
ModulesSignal(ESIGNAL_AREA_SWITCH_START, NULL);
@ -1748,6 +1748,9 @@ DeskCurrentGotoArea(int ax, int ay)
/* re-focus on a new ewin on that new desktop area */
DeskAreaSwitchDone();
if (EDebug(EDBUG_TYPE_DESKS))
Eprintf("%s done\n", __func__);
ModulesSignal(ESIGNAL_AREA_SWITCH_DONE, DesksGetCurrent());
/* update which "edge flip resistance" detector windows are visible */

View File

@ -68,10 +68,12 @@
#define ENABLE_DEBUG 1
#if ENABLE_DEBUG
#define D1printf(fmt...) if(EDebug(EDBUG_TYPE_COMPMGR))Eprintf(fmt)
#define D2printf(fmt...) if(EDebug(EDBUG_TYPE_COMPMGR2))Eprintf(fmt)
#define D3printf(fmt...) if(EDebug(EDBUG_TYPE_COMPMGR3))Eprintf(fmt)
#define Dprintf(fmt...) if(EDebug(EDBUG_TYPE_COMPMGR))Eprintf(fmt)
#define D1printf(fmt...) if(EDebug(EDBUG_TYPE_COMPMGR2))Eprintf(fmt)
#define D2printf(fmt...) if(EDebug(EDBUG_TYPE_COMPMGR3))Eprintf(fmt)
#define D3printf(fmt...) if(EDebug(EDBUG_TYPE_COMPMGR3)>1)Eprintf(fmt)
#else
#define Dprintf(fmt...)
#define D1printf(fmt...)
#define D2printf(fmt...)
#define D3printf(fmt...)
@ -1922,8 +1924,8 @@ ECompMgrRepaint(void)
ERegionIntersect(Mode_compmgr.damage, Mode_compmgr.rgn_screen);
D2printf("ECompMgrRepaint rootBuffer=%#lx rootPicture=%#lx\n",
rootBuffer, rootPicture);
Dprintf("ECompMgrRepaint rootBuffer=%#lx rootPicture=%#lx\n",
rootBuffer, rootPicture);
if (EDebug(EDBUG_TYPE_COMPMGR2))
ERegionShow("damage", Mode_compmgr.damage, NULL);
@ -2014,7 +2016,7 @@ ECompMgrGetRootBuffer(void)
static void
ECompMgrRootConfigure(void *prm __UNUSED__, XEvent * ev)
{
D1printf("ECompMgrRootConfigure root\n");
Dprintf("ECompMgrRootConfigure root\n");
ECompMgrRootBufferDestroy();
ECompMgrRootBufferCreate(ev->xconfigure.width, ev->xconfigure.height);
@ -2144,8 +2146,8 @@ ECompMgrStart(void)
/* Pass all input events through */
XShapeCombineRectangles(disp, Mode_compmgr.cow, ShapeInput, 0, 0,
NULL, 0, ShapeSet, Unsorted);
D1printf("COW/CMroot=%#lx/%#lx\n",
Mode_compmgr.cow, Mode_compmgr.root);
Dprintf("COW/CMroot=%#lx/%#lx\n",
Mode_compmgr.cow, Mode_compmgr.root);
}
}
else
@ -2518,8 +2520,8 @@ ECompMgrInit(void)
done:
if (Conf_compmgr.mode == ECM_MODE_OFF)
Conf_compmgr.enable = 0;
D1printf("ECompMgrInit: enable=%d mode=%d\n", Conf_compmgr.enable,
Conf_compmgr.mode);
Dprintf("ECompMgrInit: enable=%d mode=%d\n", Conf_compmgr.enable,
Conf_compmgr.mode);
}
static void

View File

@ -887,7 +887,7 @@ EventsProcess(XEvent ** evq_p, int *evq_n, int *evq_f)
n = EventsFetch(evq_p, evq_n);
evq = *evq_p;
if (EDebug(EDBUG_TYPE_EVENTS))
if (EDebug(EDBUG_TYPE_EVENTS) > 1)
Eprintf("EventsProcess-B %d\n", n);
for (i = count = 0; i < n; i++)
@ -895,7 +895,7 @@ EventsProcess(XEvent ** evq_p, int *evq_n, int *evq_f)
if (evq[i].type == 0)
continue;
if (EDebug(EDBUG_TYPE_EVENTS) > 1)
if (EDebug(EDBUG_TYPE_EVENTS) > 2)
EventShow(evq + i);
count++;
@ -903,7 +903,7 @@ EventsProcess(XEvent ** evq_p, int *evq_n, int *evq_f)
evq[i].type = 0;
}
if (EDebug(EDBUG_TYPE_EVENTS))
if (EDebug(EDBUG_TYPE_EVENTS) > 1)
Eprintf("EventsProcess-E %d/%d\n", count, n);
if (n > *evq_f)
@ -941,7 +941,7 @@ EventsMain(void)
{
evq_fetch =
(pfetch > evq_fetch) ? pfetch : (3 * evq_fetch + pfetch) / 4;
if (EDebug(EDBUG_TYPE_EVENTS))
if (EDebug(EDBUG_TYPE_EVENTS) > 1)
Eprintf("EventsMain - Alloc/fetch/pfetch/peak=%d/%d/%d/%d)\n",
evq_alloc, evq_fetch, pfetch, count);
if ((evq_ptr) && ((evq_alloc - evq_fetch) > 64))
@ -1011,7 +1011,7 @@ EventsMain(void)
fd = pfds[i].fd;
if ((fd >= 0) && (FD_ISSET(fd, &fdset)))
{
if (EDebug(EDBUG_TYPE_EVENTS))
if (EDebug(EDBUG_TYPE_EVENTS) > 1)
Eprintf("Event fd %d\n", i);
pfds[i].handler();
}

View File

@ -259,6 +259,8 @@ _IdlerRun(void *_id, void *prm __UNUSED__)
{
Idler *id = (Idler *) _id;
if (EDebug(EDBUG_TYPE_IDLERS) > 1)
Eprintf("%s: func=%p\n", __func__, id->func);
id->func(id->data);
}
@ -266,9 +268,10 @@ void
IdlersRun(void)
{
if (EDebug(EDBUG_TYPE_IDLERS))
Eprintf("%s\n", __func__);
Eprintf("%s B\n", __func__);
ecore_list_for_each(idler_list, _IdlerRun, NULL);
if (EDebug(EDBUG_TYPE_IDLERS))
Eprintf("%s E\n", __func__);
}
/*