[FIX] wrong app start time
authorNikita Kalyazin <n.kalyazin@samsung.com>
Thu, 8 Aug 2013 14:35:54 +0000 (18:35 +0400)
committerNikita Kalyazin <n.kalyazin@samsung.com>
Thu, 8 Aug 2013 14:35:54 +0000 (18:35 +0400)
Now time is sent in usecs

helper/libdaprobe.c
include/dahelper.h

index 7dba408..5a167cc 100755 (executable)
@@ -144,7 +144,7 @@ static int createSocket(void)
                        {
 
                        }
-                       sprintf(buf, "%d|%u", getpid(), gTraceInfo.app.startTime);
+                       sprintf(buf, "%d|%llu", getpid(), gTraceInfo.app.startTime);
                        printLogStr(buf, MSG_PID);
                        PRINTMSG("createSocket connect() success\n");
                }
@@ -327,7 +327,8 @@ void __attribute__((constructor)) _init_probe()
 
        // get app start time
        gettimeofday(&ttime, NULL);
-       gTraceInfo.app.startTime = ((ttime.tv_sec * 10000 + (ttime.tv_usec/100)));
+       gTraceInfo.app.startTime = (uint64_t)ttime.tv_sec * 1000 * 1000
+               + ttime.tv_usec;
 
        // create socket for communication with da_daemon
        if(createSocket() == 0)
index e764aee..0a5691e 100755 (executable)
@@ -176,7 +176,7 @@ typedef struct
 typedef struct
 {
        char appName[128];
-       unsigned int startTime;
+       uint64_t startTime;
 } __appInfo;
 
 typedef struct