It was legacy mechanism for working with native LD_PRELOAD.
Change-Id: I738cbbbc5e3ce77a3d6039341fbbb7d2745787a4
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
COMMON_SRCS = $(UTILITY_SRCS) $(PROBE_SRCS)
UTILITY_SRCS = \
./helper/lsan_open.c \
- ./helper/real_functions.c \
./helper/libdaprobe.c \
./helper/dahelper.c \
./helper/dacollection.c \
#include "da_chart.h"
#include "binproto.h"
-#include "real_functions.h"
#define ERR_THREAD_CREATE_FAIL -2001 // thread creation fail
{
chart_interval_callback* newelem;
- newelem = (chart_interval_callback*)real_malloc(sizeof(chart_interval_callback));
+ newelem =
+ (chart_interval_callback *)malloc(sizeof(chart_interval_callback));
newelem->chart_handle = charthandle;
newelem->series_handle = series_handle;
newelem->callback = callback;
#include "da_gles20.h"
#include "binproto.h"
#include "common_probe_init.h"
-#include "real_functions.h"
//#define EGL_TEST
void (*real_glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat *params);
#include <tizen-extension-client-protocol.h>
#include <screenshooter-client-protocol.h>
-#include "real_functions.h"
#include "daprobe.h"
#include "dahelper.h"
}
// ARGB32 is sizeof(int), that is 4 bytes, per pixel
- pixels = real_malloc(width * height * sizeof(int));
+ pixels = malloc(width * height * sizeof(int));
if (unlikely(pixels == NULL)) {
PRINTERR("could not allocate canvas pixels!");
__evas_free_p(canvas);
elm = find_element(key);
if (elm == NULL)
{
- elm = (element_t*)real_malloc(sizeof(element_t));
+ elm = (element_t *)malloc(sizeof(element_t));
if (likely(elm != NULL))
{
elm->keylen = strlen(key);
- elm->keystr = (char*)real_malloc(elm->keylen + 1);
+ elm->keystr = (char *)malloc(elm->keylen + 1);
if (likely(elm->keystr != NULL))
{
memcpy(elm->keystr, key, elm->keylen + 1);
#include "daforkexec.h"
#include "dastdout.h"
#include "common_probe_init.h"
-#include "real_functions.h"
#include "lsan_open.h"
#include "got_patching.h"
if (recvlen > 0) {/* recv succeed */
char *data_buf = NULL;
- data_buf = real_malloc(log.length);
+ data_buf = malloc(log.length);
if (data_buf == NULL) {
PRINTERR("cannot allocate buf to recv msg");
void __attribute__((constructor)) _init_probe()
{
-
- if (_init_real_functions()) {
- PRINTERR("cannot init real functions\n");
- exit(1);
- }
- rtdl_next_set_once(real_malloc, "malloc");
-
/* init library */
_init_();
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Vitaliy Cherepanov <v.cherepanov@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
- *
- */
-
-#include <stdint.h> // fot uint32_t,uint64_t
-#include "daprobe.h"
-
-void *(*real_malloc)(size_t) = NULL;
-
-int _init_real_functions()
-{
- rtdl_next_set_once(real_malloc, "malloc");
- return 0;
-}
#include <pthread.h> // for pthread_mutex_t
#include "khash.h"
-#include "real_functions.h"
#ifdef __cplusplus
extern "C"{
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Vitaliy Cherepanov <v.cherepanov@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 _REAL_FUNCTIONS_H_
-#define _REAL_FUNCTIONS_H_
-
-/* real malloc function pointer */
-extern void *(*real_malloc)(size_t);
-
-extern int _init_real_functions();
-#endif /* _REAL_FUNCTIONS_H_ */
#include "dahelper.h"
#include "probeinfo.h"
#include "binproto.h"
-#include "real_functions.h"
#include "common_probe_init.h"
#include "capi_probes_list.h"
#include "probe_capi.h"
#include "da_event.h"
#include "binproto.h"
-#include "real_functions.h"
// ===================================================================
#include "da_event.h"
#include "binproto.h"
-#include "real_functions.h"
#include "event_probes_list.h"
#include "probe_event.h"
#include <errno.h>
#include "binproto.h"
-#include "real_functions.h"
#include "file_probes_list.h"
#include "probe_file.h"
#include "da_io.h"
#include "binproto.h"
-#include "real_functions.h"
#include "aliases.h"
#include "file_probes_list.h"
#include "probe_file.h"
#include "daprobe.h"
#include "binproto.h"
#include "common_probe_init.h"
-#include "real_functions.h"
#include "graphics_probes_list.h"
#include "probe_graphics.h"
#include "da_gles20.h"
#include "binproto.h"
#include "common_probe_init.h"
-#include "real_functions.h"
/* GL __local_* functions prototypes */
#define X(func) extern void __local_##func(void);
*/
#include "da_gles20.h"
#include "daprobe.h"
-#include "real_functions.h"
#include "common_probe_init.h"
static char contextValue[MAX_GL_CONTEXT_VALUE_SIZE]; /* maybe it should not be gobal static variable */
#define TYPEDEF(type) typedef type
#include "daprobe.h"
-#include "real_functions.h"
#include "common_probe_init.h"
/* TODO search real definition */
#include "da_memory.h"
#include "binproto.h"
#include "common_probe_init.h"
-#include "real_functions.h"
#include "memory_probes_list.h"
#include "probe_memory.h"
#include "dahelper.h"
#include "api_id_mapping.h"
#include "binproto.h"
-#include "real_functions.h"
#include "socket_probes_list.h"
#include "probe_socket.h"
#include "daprobe.h"
#include "dahelper.h"
-#include "real_functions.h"
-
int daemon_close_allv(const int except_fds[])
{
static int (*daemon_close_allvp)(const int except_fds[]);
}
// allocate memory for new except fds
- fds = (int*)real_malloc((i + 2) * sizeof(int));
+ fds = (int *)malloc((i + 2) * sizeof(int));
// copy fds
if(fds)
#include "da_sync.h"
#include "binproto.h"
-#include "real_functions.h"
#include "thread_probes_list.h"
#include "probe_thread.h"
#include "da_thread.h"
#include "da_sync.h"
#include "binproto.h"
-#include "real_functions.h"
#include "thread_probes_list.h"
#include "probe_thread.h"
#include "lsan_open.h"
if(blockresult)
{
thread_routine_call *ptrc =
- (thread_routine_call *) real_malloc(sizeof(thread_routine_call));
+ (thread_routine_call *)malloc(sizeof(thread_routine_call));
ptrc->thread_routine = start_routine;
ptrc->argument = arg;