raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=71182a57a34e4783f44b575105ae14094ab95865

commit 71182a57a34e4783f44b575105ae14094ab95865
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun May 10 22:27:37 2015 +0900

    eina evlog - remove stolen count - unecessary
---
 src/bin/efl/efl_debugd.c          | 1 -
 src/lib/eina/eina_debug_monitor.c | 6 ++----
 src/lib/eina/eina_evlog.c         | 5 ++---
 src/lib/eina/eina_evlog.h         | 3 +--
 4 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/bin/efl/efl_debugd.c b/src/bin/efl/efl_debugd.c
index 3cfe65d..c4a5e5a 100644
--- a/src/bin/efl/efl_debugd.c
+++ b/src/bin/efl/efl_debugd.c
@@ -145,7 +145,6 @@ _do(Client *c, char *op, unsigned char *d, int size)
    else if (!strcmp(op, "EVLG"))
      {
 //        unsigned int *overflow = (unsigned int *)(d + 0);
-//        unsigned int *stolen = (unsigned int *)(d + 4);
         unsigned char *end = d + size;
         unsigned char *p = d + 8;
         char *event_str, *detail_str;
diff --git a/src/lib/eina/eina_debug_monitor.c 
b/src/lib/eina/eina_debug_monitor.c
index c06d5e9..0ed6a05 100644
--- a/src/lib/eina/eina_debug_monitor.c
+++ b/src/lib/eina/eina_debug_monitor.c
@@ -194,18 +194,16 @@ _eina_debug_monitor(void *data EINA_UNUSED)
                        Eina_Evlog_Buf *evlog = eina_evlog_steal();
                        if ((evlog) && (evlog->buf))
                          {
-                            char          tmp[16];
+                            char          tmp[12];
                             unsigned int *size     = (unsigned int *)(tmp + 0);
                             char         *op2 = "EVLG";
                             unsigned int *overflow = (unsigned int *)(tmp + 8);
-                            unsigned int *stolen   = (unsigned int *)(tmp + 
12);
 
                             *size = (sizeof(tmp) - 4) + evlog->top;
                             memcpy(tmp + 4, op2, 4);
                             *overflow = evlog->overflow;
-                            *stolen = evlog->stolen;
                             write(_eina_debug_monitor_service_fd,
-                                  tmp, 16);
+                                  tmp, sizeof(tmp));
                             write(_eina_debug_monitor_service_fd,
                                   evlog->buf, evlog->top);
                          }
diff --git a/src/lib/eina/eina_evlog.c b/src/lib/eina/eina_evlog.c
index 4703c96..f476e69 100644
--- a/src/lib/eina/eina_evlog.c
+++ b/src/lib/eina/eina_evlog.c
@@ -42,7 +42,6 @@ alloc_buf(Eina_Evlog_Buf *b, unsigned int size)
    b->buf = malloc(size);
 # endif
    b->overflow = 0;
-   b->stolen = 0;
 }
 
 static void
@@ -127,15 +126,15 @@ eina_evlog_steal(void)
      {
         buf = &(buffers[1]);
         buf->top = 0;
+        buf->overflow--;
         stolen = &(buffers[0]);
-        stolen->stolen++;
      }
    else
      {
         buf = &(buffers[0]);
         buf->top = 0;
+        buf->overflow--;
         stolen = &(buffers[1]);
-        stolen->stolen++;
      }
    eina_spinlock_release(&_evlog_lock);
    return stolen;
diff --git a/src/lib/eina/eina_evlog.h b/src/lib/eina/eina_evlog.h
index 82a8dd6..51e2b02 100644
--- a/src/lib/eina/eina_evlog.h
+++ b/src/lib/eina/eina_evlog.h
@@ -31,8 +31,7 @@ struct _Eina_Evlog_Buf
    unsigned char *buf; // current buffer we fill with event logs
    unsigned int size; // the max size of the evlog buffer
    unsigned int top; // the current top byte for a new evlog item
-   unsigned int overflow; // how many times this biffer has overflown
-   unsigned int stolen; // how many times this buffer has been stolen
+   unsigned int overflow; // how many times this buffer has overflown
 };
 
 /**

-- 


Reply via email to