forked from enlightenment/efl
evlog - no need to take lock to check if evlog is on. fix
this should reduce oerhead of evlog when on by a bit by not taking+releasing a lock at all in this case.
This commit is contained in:
parent
2f6045abc0
commit
42ebfa863f
|
@ -142,12 +142,8 @@ eina_evlog(const char *event, void *obj, double srctime, const char *detail)
|
||||||
unsigned short detail_offset = 0;
|
unsigned short detail_offset = 0;
|
||||||
unsigned short event_size;
|
unsigned short event_size;
|
||||||
|
|
||||||
|
if (!_evlog_go) return;
|
||||||
eina_spinlock_take(&_evlog_lock);
|
eina_spinlock_take(&_evlog_lock);
|
||||||
if (!_evlog_go)
|
|
||||||
{
|
|
||||||
eina_spinlock_release(&_evlog_lock);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
size = sizeof(Eina_Evlog_Item);
|
size = sizeof(Eina_Evlog_Item);
|
||||||
event_size = strlen(event) + 1;
|
event_size = strlen(event) + 1;
|
||||||
size += event_size;
|
size += event_size;
|
||||||
|
|
Loading…
Reference in New Issue