[PROTO] update feature list, enable 64bit features
authorAnastasia Lyupa <a.lyupa@samsung.com>
Tue, 19 Nov 2013 07:17:41 +0000 (11:17 +0400)
committerNikita Kalyazin <n.kalyazin@samsung.com>
Fri, 22 Nov 2013 13:09:20 +0000 (17:09 +0400)
add new features for no filtering

fix feature size (uint32->uint64) in
sending config and feature_code_str

Change-Id: I30f6c7e0818da9ce9344d0bf3ec5ff072e94d6ee
Signed-off-by: Anastasia Lyupa <a.lyupa@samsung.com>
daemon/da_protocol.c
daemon/da_protocol.h
daemon/daemon.c

index c1c74545ba22fa3e7d4425deabdceb936470e320..780414c0a8181039dc05c56bc8712ca850a02479 100644 (file)
@@ -149,12 +149,12 @@ static char *msgErrStr(enum ErrorCode err)
                to+=strlen( dstr(f) delim );    \
        }
 #define print_feature_0(f) print_feature(f, feature0, to, ", \n\t")
-void feature_code_str(uint32_t feature0, uint32_t feature1, char *to)
+void feature_code_str(uint64_t feature0, uint64_t feature1, char *to)
 {
        print_feature_0(FL_CPU);
        print_feature_0(FL_MEMORY);
        print_feature_0(FL_FUNCTION_PROFILING);
-       print_feature_0(FL_MEMORY_ALLCATION_PROBING);
+       print_feature_0(FL_MEMORY_ALLOC_PROBING);
        print_feature_0(FL_FILE_API_PROBING);
        print_feature_0(FL_THREAD_API_PROBING);
        print_feature_0(FL_OSP_UI_API_PROBING);
@@ -170,7 +170,12 @@ void feature_code_str(uint32_t feature0, uint32_t feature1, char *to)
        print_feature_0(FL_CONTEXT_SWITCH);
        print_feature_0(FL_NETWORK_API_PROBING);
        print_feature_0(FL_OPENGL_API_PROBING);
-
+       print_feature_0(FL_MEMORY_ALLOC_ALWAYS_PROBING);
+       print_feature_0(FL_FILE_API_ALWAYS_PROBING);
+       print_feature_0(FL_THREAD_API_ALWAYS_PROBING);
+       print_feature_0(FL_OSP_UI_API_ALWAYS_PROBING);
+       print_feature_0(FL_NETWORK_API_ALWAYS_PROBING);
+       print_feature_0(FL_OPENGL_API_ALWAYS_PROBING);
 }
 
 
@@ -1106,8 +1111,8 @@ int host_message_handler(struct msg_t *msg)
                sendACKToHost(msg->id, ERR_NO, 0, 0);
                // send config message to target process
                sendlog.type = MSG_OPTION;
-               sendlog.length = sprintf(sendlog.data, "%lu",
-                                    (unsigned long int) prof_session.conf.use_features0);
+               sendlog.length = sprintf(sendlog.data, "%llu",
+                                    (unsigned long long) prof_session.conf.use_features0);
                for (target_index = 0; target_index < MAX_TARGET_COUNT; target_index++)
                {
                        if(manager.target[target_index].socket != -1)
index fdd9a516edf5c5cc3ad556a66468f91e7685e084..9974244293c1a9df364d0060c17a74d777d4c68c 100644 (file)
@@ -91,39 +91,45 @@ enum ErrorCode{
 };
 
 enum feature_code{
-       FL_RESERVED1                = 0x00000001,
-       FL_RESERVED2                = 0x00000002,
-       FL_FUNCTION_PROFILING       = 0x00000004, //On/Off the UserSpaceInst
-       FL_MEMORY_ALLCATION_PROBING = 0x00000008, //memory allocation API (glibc)
-       FL_FILE_API_PROBING         = 0x00000010, //file API (glibc, OSP)
-       FL_THREAD_API_PROBING       = 0x00000020, //thread API (glibc, OSP)
-       FL_OSP_UI_API_PROBING       = 0x00000040, //UI API (OSP)
-       FL_SCREENSHOT               = 0x00000080, //Screenshot
-       FL_USER_EVENT               = 0x00000100, //events of Touch, Gesture, Orientation, Key
-       FL_RECORDING                = 0x00000200, //recording the user event
-       FL_SYSTCALL_FILE            = 0x00000400, //File operation syscalls tracing
-       FL_SYSTCALL_IPC             = 0x00000800, //IPC syscall tracing
-       FL_SYSTCALL_PROCESS         = 0x00001000, //Process syscalls tracing
-       FL_SYSTCALL_SIGNAL          = 0x00002000, //Signal syscalls tracing
-       FL_SYSTCALL_NETWORK         = 0x00004000, //Network syscalls tracing
-       FL_SYSTCALL_DESC            = 0x00008000, //Descriptor syscalls tracing
-       FL_CONTEXT_SWITCH           = 0x00010000, //Context switch tracing
-       FL_NETWORK_API_PROBING      = 0x00020000, //network API (glibc, OSP, libsoap, openssl)
-       FL_OPENGL_API_PROBING       = 0x00040000, //openGL API
-       FL_FUNCTION_SAMPLING        = 0x00080000, //Function sampling
-       FL_CPU                      = 0x00100000, //CPU core load, frequency
-       FL_PROCESSES                = 0x00200000, //Process load
-       FL_MEMORY                   = 0x00400000, //Process size(VSS, PSS. RSS), heap usage(application, library), physical memory in use
-       FL_DISK                     = 0x00800000,
-       FL_NETWORK                  = 0x01000000,
-       FL_DEVICE                   = 0x02000000,
-       FL_ENERGY                   = 0x04000000,
-       FL_RESERVED3                = 0x08000000,
-
-       FL_ALL_FEATURES             = 0xFFFFFFFF &
-                                     (~FL_RESERVED1) &
-                                     (~FL_RESERVED2) &
-                                     (~FL_RESERVED3)
+       FL_RESERVED1                    = 0x000000001,
+       FL_RESERVED2                    = 0x000000002,
+       FL_FUNCTION_PROFILING           = 0x000000004, //On/Off the UserSpaceInst
+       FL_MEMORY_ALLOC_PROBING         = 0x000000008, //memory allocation API (glibc)
+       FL_FILE_API_PROBING             = 0x000000010, //file API (glibc, OSP)
+       FL_THREAD_API_PROBING           = 0x000000020, //thread API (glibc, OSP)
+       FL_OSP_UI_API_PROBING           = 0x000000040, //UI API (OSP)
+       FL_SCREENSHOT                   = 0x000000080, //Screenshot
+       FL_USER_EVENT                   = 0x000000100, //events of Touch, Gesture, Orientation, Key
+       FL_RECORDING                    = 0x000000200, //recording the user event
+       FL_SYSTCALL_FILE                = 0x000000400, //File operation syscalls tracing
+       FL_SYSTCALL_IPC                 = 0x000000800, //IPC syscall tracing
+       FL_SYSTCALL_PROCESS             = 0x000001000, //Process syscalls tracing
+       FL_SYSTCALL_SIGNAL              = 0x000002000, //Signal syscalls tracing
+       FL_SYSTCALL_NETWORK             = 0x000004000, //Network syscalls tracing
+       FL_SYSTCALL_DESC                = 0x000008000, //Descriptor syscalls tracing
+       FL_CONTEXT_SWITCH               = 0x000010000, //Context switch tracing
+       FL_NETWORK_API_PROBING          = 0x000020000, //network API (glibc, OSP, libsoap, openssl)
+       FL_OPENGL_API_PROBING           = 0x000040000, //openGL API
+       FL_FUNCTION_SAMPLING            = 0x000080000, //Function sampling
+       FL_CPU                          = 0x000100000, //CPU core load, frequency
+       FL_PROCESSES                    = 0x000200000, //Process load
+       FL_MEMORY                       = 0x000400000, //Process size(VSS, PSS. RSS), heap usage(application, library), physical memory in use
+       FL_DISK                         = 0x000800000,
+       FL_NETWORK                      = 0x001000000,
+       FL_DEVICE                       = 0x002000000,
+       FL_ENERGY                       = 0x004000000,
+       FL_RESERVED3                    = 0x008000000,
+       FL_MEMORY_ALLOC_ALWAYS_PROBING  = 0x010000000, //memory allocation API (glibc) always
+       FL_FILE_API_ALWAYS_PROBING      = 0x020000000, //file API (glibc, OSP) always
+       FL_THREAD_API_ALWAYS_PROBING    = 0x040000000, //thread API (glibc, OSP) always
+       FL_OSP_UI_API_ALWAYS_PROBING    = 0x080000000, //UI API (OSP) always
+       FL_NETWORK_API_ALWAYS_PROBING   = 0x100000000ULL, //network API (glibc, OSP, libsoap, openssl) always
+       FL_OPENGL_API_ALWAYS_PROBING    = 0x200000000ULL, //openGL API always
+
+       FL_ALL_FEATURES                 = 0x3FFFFFFFFULL &
+                                       (~FL_RESERVED1) &
+                                       (~FL_RESERVED2) &
+                                       (~FL_RESERVED3)
 };
 
 #define IS_OPT_SET_IN(OPT, reg) (reg & (OPT))
index 976ee0bf31b877d10b463cfb68fce86d580855f7..b668405cef9b088da002a10dce74f18d0d8ea8a0 100644 (file)
@@ -714,8 +714,8 @@ static int targetServerHandler(int efd)
 
                /* send config message to target process */
                log.type = MSG_OPTION;
-               log.length = sprintf(log.data, "%lu",
-                                    (unsigned long int)prof_session.conf.use_features0);
+               log.length = sprintf(log.data, "%llu",
+                                    prof_session.conf.use_features0);
                if (0 > send(manager.target[index].socket, &log,
                             sizeof(log.type) + sizeof(log.length) + log.length,
                             MSG_NOSIGNAL))