// return 0 if caller is user binary, otherwise return 1
static int determineCaller(char* tracestring)
{
- char *apppath, *substr;
+ char *substr;
// determine whether saveptr (caller binary name) is user binary or not
-// apppath = getenv("APP_PATH");
- apppath = NULL;
-
- if(apppath == NULL)
- substr = strstr(tracestring, APP_INSTALL_PATH);
- else
- substr = strstr(tracestring, apppath);
+ substr = strstr(tracestring, APP_INSTALL_PATH);
if(substr == NULL) // not user binary
return 1;
void __attribute__((destructor)) _fini_probe()
{
+ int i;
TRACE_STATE_SET(TS_FINIT);
gTraceInfo.init_complete = -1;
finalize_hash_table();
+ for(i = 0; i < NUM_ORIGINAL_LIBRARY; i++)
+ {
+ if(lib_handle[i] != NULL)
+ {
+ dlclose(lib_handle[i]);
+ }
+ }
+
TRACE_STATE_UNSET(TS_FINIT);
}
return true;
}
-// update heap memory size though socket
-// return 0 if size is updated though socket
+// update heap memory size through socket
+// return 0 if size is updated through socket
// return 1 if size is updated into global variable
int update_heap_memory_size(bool isAdd, size_t size)
{