forked from enlightenment/efl
efl debug infra - add more event types for ability to check extended inf
This commit is contained in:
parent
956182c7c5
commit
e9c5f37ab4
|
@ -247,7 +247,7 @@ static void
|
||||||
_begin_tick(void)
|
_begin_tick(void)
|
||||||
{
|
{
|
||||||
if (ticking) return;
|
if (ticking) return;
|
||||||
eina_evlog(">animator", NULL, ecore_time_get(), NULL);
|
eina_evlog(">animator", NULL, 0.0, NULL);
|
||||||
ticking = 1;
|
ticking = 1;
|
||||||
switch (src)
|
switch (src)
|
||||||
{
|
{
|
||||||
|
@ -268,7 +268,7 @@ static void
|
||||||
_end_tick(void)
|
_end_tick(void)
|
||||||
{
|
{
|
||||||
if (!ticking) return;
|
if (!ticking) return;
|
||||||
eina_evlog("<animator", NULL, ecore_time_get(), NULL);
|
eina_evlog("<animator", NULL, 0.0, NULL);
|
||||||
ticking = 0;
|
ticking = 0;
|
||||||
|
|
||||||
_timer_tick_end();
|
_timer_tick_end();
|
||||||
|
|
|
@ -144,6 +144,8 @@ _eina_debug_monitor(void *_data EINA_UNUSED)
|
||||||
// some state for debugging
|
// some state for debugging
|
||||||
unsigned int poll_time = 1000;
|
unsigned int poll_time = 1000;
|
||||||
Eina_Bool poll_on = EINA_FALSE;
|
Eina_Bool poll_on = EINA_FALSE;
|
||||||
|
Eina_Bool poll_trace = EINA_FALSE;
|
||||||
|
Eina_Bool poll_cpu = EINA_FALSE;
|
||||||
|
|
||||||
t0 = get_time();
|
t0 = get_time();
|
||||||
// sit forever processing commands or timeouts in the debug monitor
|
// sit forever processing commands or timeouts in the debug monitor
|
||||||
|
@ -191,12 +193,14 @@ _eina_debug_monitor(void *_data EINA_UNUSED)
|
||||||
{
|
{
|
||||||
if (size >= 4) memcpy(&poll_time, data, 4);
|
if (size >= 4) memcpy(&poll_time, data, 4);
|
||||||
poll_on = EINA_TRUE;
|
poll_on = EINA_TRUE;
|
||||||
|
poll_trace = EINA_TRUE;
|
||||||
}
|
}
|
||||||
// profiling off with no payload
|
// profiling off with no payload
|
||||||
else if (!strcmp(op, "PLOF"))
|
else if (!strcmp(op, "PLOF"))
|
||||||
{
|
{
|
||||||
poll_time = 1000;
|
poll_time = 1000;
|
||||||
poll_on = EINA_FALSE;
|
poll_on = EINA_FALSE;
|
||||||
|
poll_trace = EINA_FALSE;
|
||||||
}
|
}
|
||||||
// enable evlog
|
// enable evlog
|
||||||
else if (!strcmp(op, "EVON"))
|
else if (!strcmp(op, "EVON"))
|
||||||
|
@ -208,6 +212,19 @@ _eina_debug_monitor(void *_data EINA_UNUSED)
|
||||||
{
|
{
|
||||||
eina_evlog_stop();
|
eina_evlog_stop();
|
||||||
}
|
}
|
||||||
|
// enable evlog
|
||||||
|
else if (!strcmp(op, "CPON"))
|
||||||
|
{
|
||||||
|
if (size >= 4) memcpy(&poll_time, data, 4);
|
||||||
|
poll_on = EINA_TRUE;
|
||||||
|
poll_cpu = EINA_TRUE;
|
||||||
|
}
|
||||||
|
// stop evlog
|
||||||
|
else if (!strcmp(op, "CPOF"))
|
||||||
|
{
|
||||||
|
poll_on = EINA_FALSE;
|
||||||
|
poll_cpu = EINA_FALSE;
|
||||||
|
}
|
||||||
// fetch the evlog
|
// fetch the evlog
|
||||||
else if (!strcmp(op, "EVLG"))
|
else if (!strcmp(op, "EVLG"))
|
||||||
{
|
{
|
||||||
|
@ -239,6 +256,8 @@ _eina_debug_monitor(void *_data EINA_UNUSED)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (poll_on)
|
if (poll_on)
|
||||||
|
{
|
||||||
|
if (poll_trace)
|
||||||
{
|
{
|
||||||
// take a lock on grabbing thread debug info like backtraces
|
// take a lock on grabbing thread debug info like backtraces
|
||||||
eina_spinlock_take(&_eina_debug_thread_lock);
|
eina_spinlock_take(&_eina_debug_thread_lock);
|
||||||
|
@ -296,6 +315,12 @@ err:
|
||||||
bts = 0;
|
bts = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (poll_cpu)
|
||||||
|
{
|
||||||
|
// XXX: opendir /proc/sefl/task
|
||||||
|
// eina_evlog("*cpustat", NULL, 0.0, cpustat);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fail:
|
fail:
|
||||||
// we failed - get out of here and disconnect to debugd
|
// we failed - get out of here and disconnect to debugd
|
||||||
|
|
|
@ -63,14 +63,17 @@ struct _Eina_Evlog_Buf
|
||||||
*
|
*
|
||||||
* "+eventname"
|
* "+eventname"
|
||||||
* "-eventname"
|
* "-eventname"
|
||||||
* "!eventname"
|
|
||||||
* ">eventname"
|
* ">eventname"
|
||||||
* "<eventname"
|
* "<eventname"
|
||||||
|
* "!eventname"
|
||||||
|
* "*eventname"
|
||||||
*
|
*
|
||||||
* etc. The "+" char means an event is beginning (and any subsequent
|
* etc. The "+" char means an event is beginning (and any subsequent
|
||||||
* events logged are really children of this event). The "-" char means an
|
* events logged are really children of this event). The "-" char means an
|
||||||
* event is ending and so all child events SHOULD have ended by now. A "!"
|
* event is ending and so all child events SHOULD have ended by now. A "!"
|
||||||
* character means the event is a one-off with no beginning or end. A ">"
|
* character means the event is a one-off with no beginning or end. A"*"
|
||||||
|
* Means this is special metadata and the defail field may need special
|
||||||
|
* parsing based on the eventname, so ignroe unless known. A ">"
|
||||||
* character means we begin this "state" of the process (these are separate
|
* character means we begin this "state" of the process (these are separate
|
||||||
* to "+" and "-" events and don't nest - arenot related to a thread or
|
* to "+" and "-" events and don't nest - arenot related to a thread or
|
||||||
* any other event, but just a state). "<" Ends the given state given by
|
* any other event, but just a state). "<" Ends the given state given by
|
||||||
|
|
Loading…
Reference in New Issue