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:
Carsten Haitzler 2016-11-10 14:32:56 +09:00
parent 2f6045abc0
commit 42ebfa863f
1 changed files with 1 additions and 5 deletions

View File

@ -142,12 +142,8 @@ eina_evlog(const char *event, void *obj, double srctime, const char *detail)
unsigned short detail_offset = 0;
unsigned short event_size;
if (!_evlog_go) return;
eina_spinlock_take(&_evlog_lock);
if (!_evlog_go)
{
eina_spinlock_release(&_evlog_lock);
return;
}
size = sizeof(Eina_Evlog_Item);
event_size = strlen(event) + 1;
size += event_size;