summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Aksenov <a.aksenov@samsung.com>2016-04-04 18:42:24 +0300
committerAlexander Aksenov <a.aksenov@samsung.com>2016-04-19 19:29:36 +0300
commita4ed238c1877eaa0f81be059884661b21d0aeea6 (patch)
tree9794416e574b85cdbbdcc18e538b7988208665e9
parent70dc652af4020ebc6a8a9301942ebc4e8acf8d54 (diff)
downloadswap-probe-a4ed238c1877eaa0f81be059884661b21d0aeea6.tar.gz
swap-probe-a4ed238c1877eaa0f81be059884661b21d0aeea6.tar.bz2
swap-probe-a4ed238c1877eaa0f81be059884661b21d0aeea6.zip
[CLEAN] Remove some more dead code
Removed: - struct probeInfo and its interface macros; - getCurrentTime(); - enum MonitorType; - enum BlockLocation; - postBlockEnd() (empty); - gProbeDepth (unused); - __appendTypeLog(); - getBacktraceString(); - some commented code; - dautil.h (contains debug that is useless); setProbePoint() replaced with inc_current_event_index(), because it was the only usage of this function. Change-Id: I08efc7a84a759d1585b20a8e907a851cb764e1ff Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
-rwxr-xr-xcustom_chart/da_chart.c11
-rw-r--r--helper/common_probe_init.c3
-rwxr-xr-xhelper/dacapture.c5
-rwxr-xr-xhelper/libdaprobe.c43
-rw-r--r--include/binproto.h1
-rw-r--r--include/daprobe.h55
-rw-r--r--include/dautil.h39
-rwxr-xr-xinclude/tizen_probe.h2
-rwxr-xr-xprobe_event/da_event.c8
-rwxr-xr-xprobe_event/da_event.h1
-rwxr-xr-xprobe_event/gesture.c3
-rwxr-xr-xprobe_event/gesture.cpp46
-rwxr-xr-xprobe_event/keytouch.c8
-rwxr-xr-xprobe_file/da_io.h6
-rwxr-xr-xprobe_file/da_io_posix.c1
-rw-r--r--probe_file/da_io_stdc.c1
-rwxr-xr-xprobe_memory/libdamemalloc.c1
-rw-r--r--probe_memory/libdamemmanage.c1
-rw-r--r--probe_memory/libdanew.cpp12
-rw-r--r--probe_socket/da_socket.h9
-rw-r--r--probe_socket/libdasocket.c1
-rw-r--r--probe_thread/libdasync.c14
-rw-r--r--probe_thread/libdathread.c8
23 files changed, 34 insertions, 245 deletions
diff --git a/custom_chart/da_chart.c b/custom_chart/da_chart.c
index 5d7143b..8a3e0ee 100755
--- a/custom_chart/da_chart.c
+++ b/custom_chart/da_chart.c
@@ -100,7 +100,6 @@ __thread pid_t cur_thread = -1;
#define DECLARE_CHART_VARIABLE \
da_handle __attribute__((unused)) ret = 0; \
- probeInfo_t probeInfo;
// =====================================================================
// timer thread routine for callback
@@ -130,7 +129,7 @@ void* _chart_timerThread(void* data)
{
value = cur->callback(cur->user_data);
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_CUSTOM,
@@ -431,7 +430,7 @@ void da_mark(chart_color color, char* mark_text)
{
DECLARE_CHART_VARIABLE;
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_CUSTOM,
@@ -456,7 +455,7 @@ da_handle da_create_chart(char* chart_name)
ret = ++(chm.chart_handle_index);
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_CUSTOM,
@@ -489,7 +488,7 @@ da_handle da_create_series(da_handle charthandle, char* seriesname,
ret = ++(chm.series_handle_index[charthandle]);
ret += (10 * charthandle);
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_CUSTOM,
@@ -557,7 +556,7 @@ void da_log(da_handle series_handle, float uservalue)
if(sindex > chm.series_handle_index[(int)cindex])
return;
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_CUSTOM,
diff --git a/helper/common_probe_init.c b/helper/common_probe_init.c
index b04cfcd..f1527e4 100644
--- a/helper/common_probe_init.c
+++ b/helper/common_probe_init.c
@@ -162,7 +162,6 @@ void init_probe_gl(const char *func_name, void **func_pointer,
ORIGINAL_LIBRARY id, int blockresult, int32_t vAPI_ID)
{
void *faddr;
- probeInfo_t tempProbeInfo;
if (lib_handle[id] == ((void *)0)) {
lib_handle[id] = dlopen(lib_string[id], RTLD_LAZY);
@@ -170,7 +169,7 @@ void init_probe_gl(const char *func_name, void **func_pointer,
probe_terminate_with_err("dlopen failed", func_name,
id);
- setProbePoint(&tempProbeInfo);
+ inc_current_event_index();
if (blockresult != 0) {
/* get max value */
char maxValString[64];
diff --git a/helper/dacapture.c b/helper/dacapture.c
index cc88331..e13a0ae 100755
--- a/helper/dacapture.c
+++ b/helper/dacapture.c
@@ -370,7 +370,6 @@ int captureScreen()
Evas* ev = NULL;
Evas_Object* img;
screenshot_data sdata;
- probeInfo_t probeInfo;
int ret = 0;
rtld_default_set_once(__evas_object_resize_p, "evas_object_resize");
@@ -383,7 +382,7 @@ int captureScreen()
pthread_mutex_lock(&captureScreenLock);
- setProbePoint(&probeInfo);
+ inc_current_event_index();
sdata.ximage = NULL;
scrimage = captureScreenShotX(&width, &height, &sdata);
if(scrimage != NULL)
@@ -393,7 +392,7 @@ int captureScreen()
{
snprintf(dstpath, sizeof(dstpath),
SCREENSHOT_DIRECTORY "/%d_%d.png", getpid(),
- probeInfo.eventIndex);
+ getCurrentEventIndex());
// make image buffer
if((img = __evas_object_image_add_p(ev)) != NULL)
diff --git a/helper/libdaprobe.c b/helper/libdaprobe.c
index a85bc96..15fef67 100755
--- a/helper/libdaprobe.c
+++ b/helper/libdaprobe.c
@@ -51,7 +51,6 @@
#include <sys/timerfd.h> // for timerfd
#include "probeinfo.h"
-#include "dautil.h"
#include "dahelper.h"
#include "dacollection.h"
#include "da_sync.h"
@@ -63,12 +62,9 @@
#include "common_probe_init.h"
#include "real_functions.h"
-#define APP_INSTALL_PATH "/opt/apps"
-#define TISEN_APP_POSTFIX ".exe"
#define UDS_NAME "/tmp/da.socket"
#define TIMERFD_INTERVAL 100000000 // 0.1 sec
-__thread int gProbeDepth = 0;
pid_t gPid = -1;
__thread pid_t gTid = -1;
@@ -135,7 +131,6 @@ void application_exit()
// create socket to daemon and connect
#define MSG_CONFIG_RECV 0x01
-#define MSG_MAPS_INST_LIST_RECV 0x02
static int createSocket(void)
{
char strerr_buf[MAX_PATH_LENGTH];
@@ -687,33 +682,21 @@ int preBlockBegin(void)
if(gTraceInfo.init_complete <= 0)
return 0;
- probingStart();
-
return 1;
}
-void postBlockEnd()
-{
- probingEnd();
-}
-
/*************************************************************************
* helper info getter functions
*************************************************************************/
-// return current time in 1/10000 sec unit
-unsigned long getCurrentTime()
+unsigned int getCurrentEventIndex()
{
- struct timeval cTime;
-
- gettimeofday(&cTime, NULL);
-
- return (unsigned long)((cTime.tv_sec * 10000 + (cTime.tv_usec/100)));
+ return gTraceInfo.index.eventIndex;
}
-unsigned int getCurrentEventIndex()
+void inc_current_event_index(void)
{
- return gTraceInfo.index.eventIndex;
+ __sync_add_and_fetch(&gTraceInfo.index.eventIndex, 1);
}
uint64_t get_current_nsec(void)
@@ -745,24 +728,6 @@ void write_msg(unsigned long __unused msg_buf,
/************************************************************************
* probe functions
************************************************************************/
-bool setProbePoint(probeInfo_t* iProbe)
-{
- if(unlikely(iProbe == NULL))
- {
- return false;
- }
-
- // atomic operaion(gcc builtin) is more expensive then pthread_mutex
- // ...but it leads to a great workaround when using with the new preload.
- iProbe->eventIndex = __sync_add_and_fetch(&gTraceInfo.index.eventIndex, 1);
- iProbe->currentTime = getCurrentTime();
- iProbe->pID = _getpid();
- iProbe->tID = _gettid();
- iProbe->callDepth = gProbeDepth;
-
- return true;
-}
-
// update heap memory size through socket
// return 0 if size is updated through socket
// return 1 if size is updated into global variable
diff --git a/include/binproto.h b/include/binproto.h
index 2aa53c9..e8ccac4 100644
--- a/include/binproto.h
+++ b/include/binproto.h
@@ -495,7 +495,6 @@ static char __attribute__((used)) *pack_ret(char *to, char ret_type, ...)
do {
#define POST_PACK_PROBEBLOCK_END() \
- postBlockEnd(); \
} while (0); \
errno = (newerrno != 0) ? newerrno : olderrno
diff --git a/include/daprobe.h b/include/daprobe.h
index 10ae807..7df1a61 100644
--- a/include/daprobe.h
+++ b/include/daprobe.h
@@ -79,19 +79,6 @@ void write_msg(unsigned long msg_buf, size_t len, unsigned long call_type_p,
(unsigned long)caller_address); \
} while(0)
-typedef enum
-{
- MT_MEMORY,
- MT_FILE,
- MT_SOCKET,
-} MonitorType;
-
-enum BlockLocation
-{
- BL_PRE,
- BL_POST,
-};
-
typedef struct
{
int type;
@@ -99,56 +86,24 @@ typedef struct
char data[DA_LOG_MAX];
} log_t;
-typedef struct
-{
- int eventIndex;
- int pID;
- int tID;
- unsigned long currentTime;
- unsigned int callDepth;
-} probeInfo_t;
-
-extern __thread int gProbeDepth;
-
-#define probingStart() (gProbeDepth++)
-#define probingEnd() (gProbeDepth--)
-
/***************************************************************************
* helper apis
***************************************************************************/
int preBlockBegin(void);
-void postBlockEnd();
+void inc_current_event_index();
unsigned int getCurrentEventIndex();
-unsigned long getCurrentTime();
uint64_t get_current_nsec(void);
-bool setProbePoint(probeInfo_t * iProbe);
int update_heap_memory_size(bool isAdd, size_t size);
bool print_log_fmt(int msgType, const char *func_name, int line, ...);
bool print_log_str(int msgType, char *st);
bool printLog(log_t* log, int msgType);
-int __appendTypeLog(log_t* log, int nInput, char* token, ...);
-int getBacktraceString(log_t* log, int bufsize);
-
void *rtdl_next(const char *symname);
void *rtld_default(const char *symname);
-//char* captureScreenShotX(int* width, int* height);
-//void releaseScreenShotX();
-
-//int printSamplingLog(void);
-
-//bool captureScreen(unsigned int logNum);
-//void captureProbe();
-//int registeScreenChange(int renderID);
-//void detectTouchEvent(int touchID);
-//int getTouchState();
-//int isPossibleCapture();
-
-
/***************************************************************************
* helper macros
***************************************************************************/
@@ -200,14 +155,12 @@ typedef struct {
// declare variable for standard api (not tizen related api)
#define DECLARE_VARIABLE_STANDARD \
- probeInfo_t probeInfo; \
int blockresult = 0; \
DECLARE_ERRNO_VARS; \
int __attribute__((unused)) ret = 0
// declare variable for standard api (not tizen related api) without ret
#define DECLARE_VARIABLE_STANDARD_NORET \
- probeInfo_t probeInfo; \
int blockresult; \
int olderrno, newerrno; \
@@ -279,7 +232,7 @@ typedef struct {
#define PRE_PROBEBLOCK_BEGIN() \
if((blockresult = preBlockBegin()) != 0) { \
- setProbePoint(&probeInfo)
+ inc_current_event_index()
#define PRE_PROBEBLOCK_END() \
} \
@@ -294,7 +247,7 @@ typedef struct {
#define PRE_UNCONDITIONAL_BLOCK_BEGIN() \
do { \
- setProbePoint(&probeInfo)
+ inc_current_event_index()
#define PRE_UNCONDITIONAL_BLOCK_END() \
} while(0)
@@ -310,12 +263,10 @@ typedef struct {
#define POST_PROBEBLOCK_END() \
FLUSH_LOCAL_BUF(); \
- postBlockEnd(); \
} while(0); \
errno = (newerrno != 0) ? newerrno : olderrno
#define POST_PROBEBLOCK_FUNC_START_END() \
- postBlockEnd(); \
} while(0); \
olderrno = errno; \
errno = 0
diff --git a/include/dautil.h b/include/dautil.h
deleted file mode 100644
index 15d7486..0000000
--- a/include/dautil.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Woojin Jung <woojin2.jung@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the
- * Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-#ifndef __DAUTIL_H__
-#define __DAUTIL_H__
-//#define DA_DEBUG_LOG
-#ifdef DA_DEBUG_LOG
-#define HEAR() printf("DA: %s:%s:%d: we are here\n", __FILE__, __func__, __LINE__)
-#else
-#define HEAR() ;
-#endif
-#endif
diff --git a/include/tizen_probe.h b/include/tizen_probe.h
index b4d7b58..025a75e 100755
--- a/include/tizen_probe.h
+++ b/include/tizen_probe.h
@@ -63,7 +63,7 @@ extern "C" {
#define PRE_PROBEBLOCK_TIZEN(FILTER) \
do { \
if((blockresult = preBlockBegin()) != 0) { \
- setProbePoint(&probeInfo); \
+ inc_current_event_index(); \
} \
} while(0)
diff --git a/probe_event/da_event.c b/probe_event/da_event.c
index 47f5ebf..9f10eaf 100755
--- a/probe_event/da_event.c
+++ b/probe_event/da_event.c
@@ -102,8 +102,6 @@ static int convert_angle(int angle)
void on_orientation_changed(int angle, bool capi)
{
- probeInfo_t probeInfo;
-
initialize_event();
internal_angle = angle;
@@ -111,7 +109,7 @@ void on_orientation_changed(int angle, bool capi)
if(isOptionEnabled(OPT_EVENT))
{
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_UIEVENT,
@@ -123,10 +121,6 @@ void on_orientation_changed(int angle, bool capi)
}
SCREENSHOT_SET();
-// if(!capi)
-// {
-// SCREENSHOT_DONE();
-// }
}
int getOrientation()
diff --git a/probe_event/da_event.h b/probe_event/da_event.h
index d2b7665..95db159 100755
--- a/probe_event/da_event.h
+++ b/probe_event/da_event.h
@@ -110,7 +110,6 @@ enum _orientation_status
*******************************************************************/
#define DECLARE_VARIABLE_EVENT \
- probeInfo_t probeInfo; \
static unsigned int oldtime = 0; \
int blockresult = 0
diff --git a/probe_event/gesture.c b/probe_event/gesture.c
index 5756b2c..bfaf853 100755
--- a/probe_event/gesture.c
+++ b/probe_event/gesture.c
@@ -195,13 +195,12 @@ static inline enum __event_type __get_event_type_code(Elm_Gesture_Type idx)
/* Callbacks */
Evas_Event_Flags __common_elm_gesture_layer_cb(void *data , void *event_info)
{
- probeInfo_t probeInfo;
struct __elm_gesture_layer_cb_set_data *d = data;
Evas_Event_Flags res;
res = d->cb(d->data, event_info);
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_UIEVENT, API_ID___common_elm_gesture_layer_cb, "p", CALLER_ADDRESS);
PACK_COMMON_END('d', res, 0, 0);
diff --git a/probe_event/gesture.cpp b/probe_event/gesture.cpp
index 72820bd..40d403b 100755
--- a/probe_event/gesture.cpp
+++ b/probe_event/gesture.cpp
@@ -42,7 +42,7 @@
#define PACK_GESTURE_EVENT(API_ID, _GESTURETYPE, _X, _Y, _INFO1, _INFO2, _ARGDETECTOR) \
do { \
char info1_str[16]; \
- setProbePoint(&probeInfo); \
+ inc_current_event_index(); \
PREPARE_LOCAL_BUF(); \
PACK_COMMON_BEGIN(MSG_PROBE_UIEVENT, API_ID, "p", voidp_to_uint64(_ARGDETECTOR)); \
PACK_COMMON_END('v', 0, 0, 0); \
@@ -65,8 +65,6 @@ GestureEventListener::~GestureEventListener()
void GestureEventListener::OnCustomGestureCanceled (TouchGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -78,8 +76,6 @@ void GestureEventListener::OnCustomGestureCanceled (TouchGestureDetector &gestur
void GestureEventListener::OnCustomGestureChanged (TouchGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -91,8 +87,6 @@ void GestureEventListener::OnCustomGestureChanged (TouchGestureDetector &gesture
void GestureEventListener::OnCustomGestureFinished (TouchGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -104,8 +98,6 @@ void GestureEventListener::OnCustomGestureFinished (TouchGestureDetector &gestur
void GestureEventListener::OnCustomGestureStarted (TouchGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -117,8 +109,6 @@ void GestureEventListener::OnCustomGestureStarted (TouchGestureDetector &gesture
void GestureEventListener::OnFlickGestureCanceled (TouchFlickGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -138,8 +128,6 @@ void GestureEventListener::OnFlickGestureCanceled (TouchFlickGestureDetector &ge
void GestureEventListener::OnFlickGestureDetected (TouchFlickGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -159,8 +147,6 @@ void GestureEventListener::OnFlickGestureDetected (TouchFlickGestureDetector &ge
void GestureEventListener::OnLongPressGestureCanceled (TouchLongPressGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -179,8 +165,6 @@ void GestureEventListener::OnLongPressGestureCanceled (TouchLongPressGestureDete
void GestureEventListener::OnLongPressGestureDetected (TouchLongPressGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -199,8 +183,6 @@ void GestureEventListener::OnLongPressGestureDetected (TouchLongPressGestureDete
void GestureEventListener::OnPanningGestureCanceled (TouchPanningGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -217,8 +199,6 @@ void GestureEventListener::OnPanningGestureCanceled (TouchPanningGestureDetector
void GestureEventListener::OnPanningGestureChanged (TouchPanningGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -235,8 +215,6 @@ void GestureEventListener::OnPanningGestureChanged (TouchPanningGestureDetector
void GestureEventListener::OnPanningGestureFinished (TouchPanningGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -253,8 +231,6 @@ void GestureEventListener::OnPanningGestureFinished (TouchPanningGestureDetector
void GestureEventListener::OnPanningGestureStarted (TouchPanningGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -271,8 +247,6 @@ void GestureEventListener::OnPanningGestureStarted (TouchPanningGestureDetector
void GestureEventListener::OnPinchGestureCanceled (TouchPinchGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -291,8 +265,6 @@ void GestureEventListener::OnPinchGestureCanceled (TouchPinchGestureDetector &ge
void GestureEventListener::OnPinchGestureChanged (TouchPinchGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -311,8 +283,6 @@ void GestureEventListener::OnPinchGestureChanged (TouchPinchGestureDetector &ges
void GestureEventListener::OnPinchGestureFinished (TouchPinchGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -331,8 +301,6 @@ void GestureEventListener::OnPinchGestureFinished (TouchPinchGestureDetector &ge
void GestureEventListener::OnPinchGestureStarted (TouchPinchGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -351,8 +319,6 @@ void GestureEventListener::OnPinchGestureStarted (TouchPinchGestureDetector &ges
void GestureEventListener::OnRotationGestureCanceled (TouchRotationGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -371,8 +337,6 @@ void GestureEventListener::OnRotationGestureCanceled (TouchRotationGestureDetect
void GestureEventListener::OnRotationGestureChanged (TouchRotationGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -391,8 +355,6 @@ void GestureEventListener::OnRotationGestureChanged (TouchRotationGestureDetecto
void GestureEventListener::OnRotationGestureFinished (TouchRotationGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -411,8 +373,6 @@ void GestureEventListener::OnRotationGestureFinished (TouchRotationGestureDetect
void GestureEventListener::OnRotationGestureStarted (TouchRotationGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -431,8 +391,6 @@ void GestureEventListener::OnRotationGestureStarted (TouchRotationGestureDetecto
void GestureEventListener::OnTapGestureCanceled (TouchTapGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
@@ -452,8 +410,6 @@ void GestureEventListener::OnTapGestureCanceled (TouchTapGestureDetector &gestur
void GestureEventListener::OnTapGestureDetected (TouchTapGestureDetector &gestureDetector)
{
- probeInfo_t probeInfo;
-
if(isOptionEnabled(OPT_EVENT))
{
probeBlockStart();
diff --git a/probe_event/keytouch.c b/probe_event/keytouch.c
index 30be0bd..143bfc0 100755
--- a/probe_event/keytouch.c
+++ b/probe_event/keytouch.c
@@ -47,7 +47,6 @@
#include "daprobe.h"
#include "dahelper.h"
#include "probeinfo.h"
-//#include "dautil.h"
#include "da_event.h"
#include "binproto.h"
@@ -58,7 +57,7 @@ bool touch_pressed = false;
#define PACK_HW_EVENT(API_ID, _EVENTTYPE, _DETAILTYPE, _X, _Y, _KEYCODE, _EXTRA, \
_ARGDATA, _ARGTYPE, _ARGEVENT) \
do { \
- setProbePoint(&probeInfo); \
+ inc_current_event_index(); \
PREPARE_LOCAL_BUF(); \
PACK_COMMON_BEGIN(MSG_PROBE_UIEVENT, API_ID, "pdp", \
voidp_to_uint64(_ARGDATA), _ARGTYPE, \
@@ -71,7 +70,6 @@ bool touch_pressed = false;
Eina_Bool PROBE_NAME(ecore_event_evas_key_down)(void *data, int type, void *event)
{
static Eina_Bool (*ecore_event_evas_key_downp)(void *data, int type, void *event);
- probeInfo_t probeInfo;
GET_REAL_FUNC(ecore_event_evas_key_down, LIBECORE_INPUT_EVAS);
@@ -95,7 +93,6 @@ Eina_Bool PROBE_NAME(ecore_event_evas_key_down)(void *data, int type, void *even
Eina_Bool PROBE_NAME(ecore_event_evas_key_up)(void *data, int type, void *event)
{
static Eina_Bool (*ecore_event_evas_key_upp)(void *data, int type, void *event);
- probeInfo_t probeInfo;
GET_REAL_FUNC(ecore_event_evas_key_up, LIBECORE_INPUT_EVAS);
@@ -119,7 +116,6 @@ Eina_Bool PROBE_NAME(ecore_event_evas_key_up)(void *data, int type, void *event)
Eina_Bool PROBE_NAME(ecore_event_evas_mouse_button_down)(void *data, int type, void *event)
{
static Eina_Bool (*ecore_event_evas_mouse_button_downp)(void *data, int type, void *event);
- probeInfo_t probeInfo;
GET_REAL_FUNC(ecore_event_evas_mouse_button_down, LIBECORE_INPUT_EVAS);
@@ -141,7 +137,6 @@ Eina_Bool PROBE_NAME(ecore_event_evas_mouse_button_down)(void *data, int type, v
Eina_Bool PROBE_NAME(ecore_event_evas_mouse_button_up)(void *data, int type, void *event)
{
static Eina_Bool (*ecore_event_evas_mouse_button_upp)(void *data, int type, void *event);
- probeInfo_t probeInfo;
GET_REAL_FUNC(ecore_event_evas_mouse_button_up, LIBECORE_INPUT_EVAS);
@@ -163,7 +158,6 @@ Eina_Bool PROBE_NAME(ecore_event_evas_mouse_button_up)(void *data, int type, voi
Eina_Bool PROBE_NAME(ecore_event_evas_mouse_move)(void *data, int type, void *event)
{
static Eina_Bool (*ecore_event_evas_mouse_movep)(void *data, int type, void *event);
- probeInfo_t probeInfo;
GET_REAL_FUNC(ecore_event_evas_mouse_move, LIBECORE_INPUT_EVAS);
diff --git a/probe_file/da_io.h b/probe_file/da_io.h
index 06c9a88..87a6f6f 100755
--- a/probe_file/da_io.h
+++ b/probe_file/da_io.h
@@ -199,7 +199,7 @@ static inline bool stat_regular_or_socket_p(struct stat *buf)
#define AFTER_ORIGINAL_START_END_FD(API_ID, RTYPE, RVAL, SIZE, FD, APITYPE, INPUTFORMAT, ...) \
do { \
POST_PACK_PROBEBLOCK_BEGIN(); \
- setProbePoint(&probeInfo); \
+ inc_current_event_index(); \
_fstatret = fstat(FD, &_statbuf); \
if (stat_regular_or_socket_p(&_statbuf)) { \
PREPARE_LOCAL_BUF(); \
@@ -241,7 +241,7 @@ do { \
#define AFTER_ORIGINAL_START_END_NOFD(API_ID, RTYPE, RVAL, SIZE, APITYPE, INPUTFORMAT, ...) \
do { \
POST_PACK_PROBEBLOCK_BEGIN(); \
- setProbePoint(&probeInfo); \
+ inc_current_event_index(); \
PREPARE_LOCAL_BUF(); \
PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE, API_ID, INPUTFORMAT, __VA_ARGS__); \
PACK_COMMON_END(RTYPE, RVAL, newerrno, blockresult); \
@@ -252,7 +252,7 @@ do { \
#define AFTER_ORIGINAL_START_END_FILEP(API_ID, RTYPE, RVAL, SIZE, FILEP, APITYPE, INPUTFORMAT, ...) \
do { \
POST_PACK_PROBEBLOCK_BEGIN(); \
- setProbePoint(&probeInfo); \
+ inc_current_event_index(); \
GET_FD_FROM_FILEP(FILEP); \
if(_fd != -1) { \
_fstatret = fstat(_fd, &_statbuf); \
diff --git a/probe_file/da_io_posix.c b/probe_file/da_io_posix.c
index ee244f6..fdf8412 100755
--- a/probe_file/da_io_posix.c
+++ b/probe_file/da_io_posix.c
@@ -35,7 +35,6 @@
#include <dlfcn.h>
#include "daprobe.h"
#include "probeinfo.h"
-#include "dautil.h"
#include "dahelper.h"
#include "da_io.h"
diff --git a/probe_file/da_io_stdc.c b/probe_file/da_io_stdc.c
index 6be7ade..8569f7e 100644
--- a/probe_file/da_io_stdc.c
+++ b/probe_file/da_io_stdc.c
@@ -38,7 +38,6 @@
#include <errno.h>
#include "daprobe.h"
#include "probeinfo.h"
-#include "dautil.h"
#include "dahelper.h"
#include "da_io.h"
diff --git a/probe_memory/libdamemalloc.c b/probe_memory/libdamemalloc.c
index d3509ed..b539e09 100755
--- a/probe_memory/libdamemalloc.c
+++ b/probe_memory/libdamemalloc.c
@@ -42,7 +42,6 @@
#include "daprobe.h"
#include "probeinfo.h"
#include "dacollection.h"
-#include "dautil.h"
#include "da_memory.h"
#include "binproto.h"
diff --git a/probe_memory/libdamemmanage.c b/probe_memory/libdamemmanage.c
index ba9ae08..524a6a6 100644
--- a/probe_memory/libdamemmanage.c
+++ b/probe_memory/libdamemmanage.c
@@ -39,7 +39,6 @@
#include <errno.h>
#include "daprobe.h"
#include "probeinfo.h"
-#include "dautil.h"
#include "da_memory.h"
#include "binproto.h"
#include "common_probe_init.h"
diff --git a/probe_memory/libdanew.cpp b/probe_memory/libdanew.cpp
index 13ee0b6..46682f7 100644
--- a/probe_memory/libdanew.cpp
+++ b/probe_memory/libdanew.cpp
@@ -119,9 +119,8 @@ void operator delete(void *ptr) throw()
ret = del_memory_hash(ptr, MEMTYPE_DELETE, &caller);
if(blockresult == 0 && ret == 0 && caller == MEM_EXTERNAL)
{
- setProbePoint(&probeInfo);
+ inc_current_event_index();
blockresult = 2;
- probingStart();
}
}
@@ -155,9 +154,8 @@ void operator delete[](void *ptr) throw()
ret = del_memory_hash(ptr, MEMTYPE_DELETE, &caller);
if(blockresult == 0 && ret == 0 && caller == MEM_EXTERNAL)
{
- setProbePoint(&probeInfo);
+ inc_current_event_index();
blockresult = 2;
- probingStart();
}
}
@@ -251,9 +249,8 @@ void operator delete(void *ptr, const std::nothrow_t& nothrow) throw()
ret = del_memory_hash(ptr, MEMTYPE_DELETE, &caller);
if(blockresult == 0 && ret == 0 && caller == MEM_EXTERNAL)
{
- setProbePoint(&probeInfo);
+ inc_current_event_index();
blockresult = 2;
- probingStart();
}
}
@@ -287,9 +284,8 @@ void operator delete[](void *ptr, const std::nothrow_t& nothrow) throw()
ret = del_memory_hash(ptr, MEMTYPE_DELETE, &caller);
if(blockresult == 0 && ret == 0 && caller == MEM_EXTERNAL)
{
- setProbePoint(&probeInfo);
+ inc_current_event_index();
blockresult = 2;
- probingStart();
}
}
diff --git a/probe_socket/da_socket.h b/probe_socket/da_socket.h
index 5269e9e..c9ce409 100644
--- a/probe_socket/da_socket.h
+++ b/probe_socket/da_socket.h
@@ -97,7 +97,7 @@
#define POST_PROBEBLOCK_FUNC_END_BEGIN(LCTYPE, RTYPE, RETVALUE, INPUTFORMAT, ...) \
newerrno = errno; \
do { \
- setProbePoint(&probeInfo); \
+ inc_current_event_index(); \
PREPARE_LOCAL_BUF(); \
PACK_COMMON_BEGIN(MSG_PROBE_NETWORK, vAPI_ID, INPUTFORMAT, __VA_ARGS__);\
PACK_COMMON_END(RTYPE, RETVALUE, errno, blockresult)
@@ -141,11 +141,6 @@
PACK_COMMON_BEGIN(MSG_PROBE_NETWORK, vAPI_ID, INPUTFORMAT, __VA_ARGS__);\
PACK_COMMON_END(RTYPE, RETVALUE, errno, blockresult)
-#define APPEND_NETWORK_LOG_BASIC(LCTYPE, APINAME) \
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", \
- LCTYPE, probeInfo.eventIndex, APINAME, \
- probeInfo.currentTime, probeInfo.pID, probeInfo.tID)
-
#define POST_PROBEBLOCK_TIZEN_FUNC_START_BEGIN(APINAME, LCTYPE, RTYPE, RETVALUE, INPUTFORMAT, ...) \
do { \
PREPARE_LOCAL_BUF(); \
@@ -154,7 +149,7 @@
#define POST_PROBEBLOCK_TIZEN_FUNC_END_BEGIN(APINAME, LCTYPE, RTYPE, RETVALUE, INPUTFORMAT, ...) \
do { \
- setProbePoint(&probeInfo); \
+ inc_current_event_index(); \
PREPARE_LOCAL_BUF(); \
PACK_COMMON_BEGIN(MSG_PROBE_NETWORK, vAPI_ID, INPUTFORMAT, __VA_ARGS__);\
PACK_COMMON_END(RTYPE, RETVALUE, errno, blockresult)
diff --git a/probe_socket/libdasocket.c b/probe_socket/libdasocket.c
index c9b917f..d15b5a5 100644
--- a/probe_socket/libdasocket.c
+++ b/probe_socket/libdasocket.c
@@ -46,7 +46,6 @@
#include <sys/epoll.h>
#include <sys/poll.h>
#include "probeinfo.h"
-#include "dautil.h"
#include "da_socket.h"
#include "daprobe.h"
#include "dahelper.h"
diff --git a/probe_thread/libdasync.c b/probe_thread/libdasync.c
index 54c487d..50d1df3 100644
--- a/probe_thread/libdasync.c
+++ b/probe_thread/libdasync.c
@@ -103,7 +103,7 @@ int PROBE_NAME(pthread_mutex_lock)(pthread_mutex_t *mutex) {
// send WAIT_END log
newerrno = errno;
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
@@ -113,7 +113,6 @@ int PROBE_NAME(pthread_mutex_lock)(pthread_mutex_t *mutex) {
PACK_SYNC(mutex, SYNC_PTHREAD_MUTEX, SYNC_API_ACQUIRE_WAIT_END);
FLUSH_LOCAL_BUF();
- postBlockEnd();
errno = (newerrno != 0) ? newerrno : olderrno;
return ret;
@@ -144,7 +143,7 @@ int PROBE_NAME(pthread_mutex_timedlock)(pthread_mutex_t *mutex,
// send WAIT_END log
newerrno = errno;
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
@@ -155,8 +154,6 @@ int PROBE_NAME(pthread_mutex_timedlock)(pthread_mutex_t *mutex,
PACK_SYNC(mutex, SYNC_PTHREAD_MUTEX, SYNC_API_ACQUIRE_WAIT_END);
FLUSH_LOCAL_BUF();
- postBlockEnd();
-
errno = (newerrno != 0) ? newerrno : olderrno;
return ret;
@@ -434,7 +431,7 @@ int PROBE_NAME(pthread_cond_wait)(pthread_cond_t *cond, pthread_mutex_t *mutex)
// send WAIT_END log
newerrno = errno;
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
@@ -446,7 +443,6 @@ int PROBE_NAME(pthread_cond_wait)(pthread_cond_t *cond, pthread_mutex_t *mutex)
PACK_SYNC(cond, SYNC_PTHREAD_COND_VARIABLE, SYNC_API_COND_WAIT_END);
FLUSH_LOCAL_BUF();
- postBlockEnd();
errno = (newerrno != 0) ? newerrno : olderrno;
return ret;
@@ -480,7 +476,7 @@ int PROBE_NAME(pthread_cond_timedwait)(pthread_cond_t *cond, pthread_mutex_t *mu
// send WAIT_END log
newerrno = errno;
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
@@ -493,8 +489,6 @@ int PROBE_NAME(pthread_cond_timedwait)(pthread_cond_t *cond, pthread_mutex_t *mu
PACK_SYNC(cond, SYNC_PTHREAD_COND_VARIABLE, SYNC_API_COND_WAIT_END);
FLUSH_LOCAL_BUF();
- postBlockEnd();
-
errno = (newerrno != 0) ? newerrno : olderrno;
return ret;
diff --git a/probe_thread/libdathread.c b/probe_thread/libdathread.c
index 1d30259..38e1941 100644
--- a/probe_thread/libdathread.c
+++ b/probe_thread/libdathread.c
@@ -104,7 +104,7 @@ int PROBE_NAME(pthread_join)(pthread_t thread, void **retval)
// send WAIT_END log
newerrno = errno;
- setProbePoint(&probeInfo);
+ inc_current_event_index();
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
@@ -116,8 +116,6 @@ int PROBE_NAME(pthread_join)(pthread_t thread, void **retval)
PACK_THREAD(thread, THREAD_PTHREAD, THREAD_API_WAIT_END, THREAD_CLASS_BLANK);
FLUSH_LOCAL_BUF();
- postBlockEnd();
-
errno = (newerrno != 0) ? newerrno : olderrno;
return ret;
@@ -664,8 +662,6 @@ void _da_cleanup_handler(void *data)
{
pthread_t pSelf;
- probeInfo_t probeInfo;
-
// unlock socket mutex to prevent deadlock
// in case of cancellation happened while log sending
real_pthread_mutex_unlock(&(gTraceInfo.socket.sockMutex));
@@ -696,8 +692,6 @@ void *_da_ThreadProc(void *params)
int old_state;
int new_state = PTHREAD_CANCEL_DISABLE;
- probeInfo_t probeInfo;
-
// disable cancellation to prevent deadlock
real_pthread_setcancelstate(new_state, &old_state);