bug fix for some probe, add filesize value for Tizen::Io::File APIs
authorwoojin <woojin2.jung@samsung.com>
Fri, 12 Jul 2013 23:21:34 +0000 (08:21 +0900)
committerwoojin <woojin2.jung@samsung.com>
Fri, 12 Jul 2013 23:21:34 +0000 (08:21 +0900)
Change-Id: Ia85c4c0eeb2d51694195d1756b0bce7461cd1bc9

Makefile
helper/libdaprobe.c
packaging/dynamic-analysis-probe.changes
packaging/dynamic-analysis-probe.spec
probe_badaapi/bada_file.cpp
probe_badaapi/bada_sync.cpp
probe_badaapi/bada_thread.cpp
probe_badaapi/osp_constructor.cpp

index be2c399..b5913e4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -67,7 +67,9 @@ TIZEN_TARGET = da_probe_tizen.so
 OSP_TARGET = da_probe_osp.so
 DUMMY_TARGET = libdaprobe.so
 
-FLAGS = -D_GNU_SOURCE -fPIC -shared -Wall -funwind-tables -fomit-frame-pointer -Xlinker --no-undefined
+COMMON_FLAGS = -D_GNU_SOURCE -fPIC -shared -Wall -funwind-tables -fomit-frame-pointer -Xlinker --no-undefined
+TIZEN_FLAGS = $(COMMON_FLAGS)
+OSP_FLAGS = $(COMMON_FLAGS) -DOSPAPP
 
 LIBDIR_COMMON = 
 LIBDIR_TIZEN = $(LIBDIR_COMMON) 
@@ -84,13 +86,13 @@ osp:        $(OSP_TARGET)
 dummy: $(DUMMY_TARGET)
 
 $(TIZEN_TARGET): $(TIZEN_SRCS)
-       $(CC) $(INC_TIZEN) $(FLAGS) $(LIBDIR_TIZEN) -o $@ $(TIZEN_SRCS) $(TIZEN_LDFLAGS)
+       $(CC) $(INC_TIZEN) $(TIZEN_FLAGS) $(LIBDIR_TIZEN) -o $@ $(TIZEN_SRCS) $(TIZEN_LDFLAGS)
 
 $(OSP_TARGET): $(OSP_SRCS)
-       $(CC) $(INC_OSP) $(FLAGS) $(LIBDIR_OSP) -o $@ $(OSP_SRCS) $(OSP_LDFLAGS)
+       $(CC) $(INC_OSP) $(OSP_FLAGS) $(LIBDIR_OSP) -o $@ $(OSP_SRCS) $(OSP_LDFLAGS)
 
 $(DUMMY_TARGET): $(DUMMY_SRCS)
-       $(CC) $(INC_OSP) $(FLAGS) -o $@ $(DUMMY_SRCS) $(DUMMY_LDFLAGS)
+       $(CC) $(INC_OSP) $(COMMON_FLAGS) -o $@ $(DUMMY_SRCS) $(DUMMY_LDFLAGS)
 
 
 install:
index f344b9d..78f707b 100755 (executable)
@@ -51,6 +51,7 @@
 #include "dacollection.h"
 
 #define APP_INSTALL_PATH               "/opt/apps"
+#define OSP_APP_POSTFIX                        ".exe"
 #define UDS_NAME                               "/tmp/da.socket"
 #define TIMERFD_INTERVAL               100000000               // 0.1 sec
 
@@ -175,9 +176,18 @@ static int determineCaller(char* tracestring)
        substr = strstr(tracestring, APP_INSTALL_PATH);
 
        if(substr == NULL)      // not user binary
+       {
                return 1;
+       }
        else                            // user binary
+       {
+#ifdef OSPAPP
+               substr = strstr(tracestring, OSP_APP_POSTFIX);
+               if(substr == NULL)
+                       return 1;
+#endif
                return 0;
+       }
 }
 
 // return current thread id
index 5e3aa16..3cd68c4 100644 (file)
@@ -1,4 +1,9 @@
-* 2.2.0
+* Fri Jul 12 2013 Woojin Jung <woojin2.jung@samsung.com>
+- bug fix for ThreadProc, File::Seek probe
+- add filesize value for probe log of Tizen::Io::File APIs
+- function call inside app loader is excluded from user call
+- use original header files for Tizen APIs
+
+* Wed Jul 3 2013 Jaewon Lim <jaewon81.lim@samsung.com>
 - change screenshot file name for multiprocess application
-== Jaewon Lim <jaewon81.lim@samsung.com> 2013-07-03 15:00
 
index 362ed17..f0e57a9 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dynamic-analysis-probe
 Summary:    dynamic analyzer probe library
-Version:    2.2.0
+Version:    2.2.1
 Release:    1
 Group:      System/Libraries
 License:       GNU Lesser General Public License, Version 2.1
index 79b72f9..cfa3150 100755 (executable)
  * 
  */
 
-#include <FBase.h>
-//#include <FIo.h>
+#include <FIo.h>
 #include "daprobe.h"
 #include "probeinfo.h"
 #include "dahelper.h"
 
-using namespace Tizen::Base;
-
-enum FileSeekPosition {
-       FILESEEKPOSITION_BEGIN, /**<The beginning of the file */
-       FILESEEKPOSITION_CURRENT, /**<The current position of the file */
-       FILESEEKPOSITION_END
-/**<The end of the file */
-};
-
 static enum DaOptions _sopt = OPT_FILE;
 
 namespace Tizen {
 namespace Io {
 
-class FileAttributes {
-public:
-       virtual bool Equals(const Object& object) const;
-       FileAttributes(const FileAttributes &fileAttributes);
-       FileAttributes(void);
-       DateTime GetDateTime(void) const;
-       long long GetFileSize(void) const;
-       virtual int GetHashCode(void) const;
-       DateTime GetLastModifiedTime(void) const;
-       bool IsDirectory(void) const;
-       bool IsHidden(void) const;
-       bool IsReadOnly(void) const;
-       FileAttributes & operator=(const FileAttributes &fileAttributes);
-       virtual ~FileAttributes(void);
-};
-
-class File {
-public:
-
-/* deprecated apis
- *   
-       result Construct(const Tizen::Base::String& filePath,
-                       const Tizen::Base::String& openMode, bool secureMode,
-                       bool createParentDirectories);
-       result Construct(const Tizen::Base::String& filePath,
-                       const Tizen::Base::String& openMode, bool secureMode,
-                       const Tizen::Base::ByteBuffer& key, bool createParentDirectories);
-       
-       result Construct(const Tizen::Base::String& filePath,
-                       const Tizen::Base::String& openMode,
-                       const Tizen::Base::ByteBuffer& secretKey);
-*/     
-       result Construct(const Tizen::Base::String& filePath,
-                       const Tizen::Base::String& openMode, bool createParentDirectories);
-       result Construct(const Tizen::Base::String& filePath,
-                       const Tizen::Base::String& openMode);
-       
-       result Construct(const Tizen::Base::String& filePath,
-                       const char *pOpenMode);
-       result Construct(const Tizen::Base::String& filePath,
-                       const char *pOpenMode, const Tizen::Base::ByteBuffer &seretKey);
-
-       
-       /*
-        File(void);
-        */
-       result Flush(void);
-
-       Tizen::Base::String GetName(void) const;
-       result Read(Tizen::Base::String& buffer);
-       result Read(Tizen::Base::ByteBuffer& buffer);
-       int Read(void *buffer, int length);
-       result Seek(FileSeekPosition position, long offset);
-
-       int Tell(void) const;
-
-       result Truncate(int length);
-
-       result Write(const void *buffer, int length);
-
-       result Write(const Tizen::Base::ByteBuffer& buffer);
-       result Write(const Tizen::Base::String& buffer);
-       virtual ~File(void);
-       /*
-        // static methods
-        static result ConvertToSecureFile(const Tizen::Base::String &plainFilePath,
-        const Tizen::Base::String &secureFilePath);
-        static result ConvertToSecureFile(const Tizen::Base::String &plainFilePath,
-        const Tizen::Base::String &secureFilePath,
-        const Tizen::Base::ByteBuffer& key);
-        static result Copy(const Tizen::Base::String& srcFilePath,
-        const Tizen::Base::String& destFilePath, bool failIfExist);
-        static result GetAttributes(const Tizen::Base::String& filePath,
-        FileAttributes& attribute);
-        static const Tizen::Base::String GetFileExtension(
-        const Tizen::Base::String& filePath);
-
-        static const Tizen::Base::String GetFileName(const Tizen::Base::String& filePath);
-
-        const Tizen::Base::String& filePath);
-        static bool IsEncrypted(const Tizen::Base::String &filePath);
-        static bool IsFileExist(const Tizen::Base::String& filePath);
-        static result Move(const Tizen::Base::String& oldFilePath,
-        const Tizen::Base::String& newFilePath);
-        static result Remove(const Tizen::Base::String& filePath);
-        //     static Tizen::Base::Collection::IList *GetPathsToAppsN(void);
-        */
-};
-
-//File::File(void) {
-//static (File::*Filep)();
-//}
-
 result File::Construct(const Tizen::Base::String& filePath,
                const Tizen::Base::String& openMode, bool createParentDirectories) {
        typedef result (File::*methodType)(const Tizen::Base::String& filePath,
@@ -152,7 +49,8 @@ result File::Construct(const Tizen::Base::String& filePath,
        int blockresult;
        bool bfiltering = true;
        char temp[50];
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Constructp) {
                probeBlockStart();
@@ -189,10 +87,11 @@ result File::Construct(const Tizen::Base::String& filePath,
                 log.length += sprintf(log.data + log.length,", %s",temp);
                 log.length += sprintf(log.data + log.length,", %s`,%ld",(createParentDirectories == 0 ? "false" : "true"),ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,filePath.GetPointer());
+                size = attr.GetFileSize();
 //              WcharToChar(temp,this->GetName().GetPointer());
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,temp);
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,size,temp);
                 //callstack
 
 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -372,7 +271,8 @@ result File::Construct(const Tizen::Base::String& filePath,
        int blockresult;
        bool bfiltering = true;
        char temp[50];
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if(!Constructp) {
                probeBlockStart();
@@ -408,10 +308,11 @@ result File::Construct(const Tizen::Base::String& filePath,
                 WcharToChar(temp,openMode.GetPointer());
                 log.length += sprintf(log.data + log.length,", %s`,%ld",temp,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,filePath.GetPointer());
+                size = attr.GetFileSize();
 //              WcharToChar(temp,this->GetName().GetPointer());
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,temp);
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,size,temp);
                 //callstack
 
 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -516,7 +417,8 @@ result File::Construct(const Tizen::Base::String& filePath,
        int blockresult;
        bool bfiltering = true;
        char temp[50];
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if(!Constructp) {
                probeBlockStart();
@@ -551,10 +453,11 @@ result File::Construct(const Tizen::Base::String& filePath,
                 log.length += sprintf(log.data + log.length,"`,%s",temp);
                 log.length += sprintf(log.data + log.length,", %s`,%ld",pOpenMode,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,filePath.GetPointer());
+                size = attr.GetFileSize();
 //              WcharToChar(temp,this->GetName().GetPointer());
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,temp);
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,size,temp);
                 //callstack
 
 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -587,7 +490,8 @@ result File::Construct(const Tizen::Base::String& filePath,
        int blockresult;
        bool bfiltering = true;
        char temp[50];
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if(!Constructp) {
                probeBlockStart();
@@ -624,9 +528,10 @@ result File::Construct(const Tizen::Base::String& filePath,
                 log.length += sprintf(log.data + log.length,", %s",pOpenMode);
                 log.length += sprintf(log.data + log.length,", 0x%x`,%ld",(unsigned int)&secretKey,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,filePath.GetPointer());
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,temp);
+                size = attr.GetFileSize();
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,size,temp);
                 //callstack
 
 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -655,7 +560,8 @@ result File::Flush(void) {
        int blockresult;
        bool bfiltering = true;
        char temp[50];
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Flushp) {
                probeBlockStart();
@@ -688,9 +594,10 @@ result File::Flush(void) {
                 //Input,ret
                 log.length += sprintf(log.data + log.length,"`,`,%ld",ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,this->GetName().GetPointer());
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OTHER,temp);
+                size = attr.GetFileSize();
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OTHER,size,temp);
                 //callstack
 
                 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -719,7 +626,8 @@ Tizen::Base::String File::GetName(void) const{
        int blockresult;
        bool bfiltering = true;
        char temp[50];
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!GetNamep) {
                probeBlockStart();
@@ -754,8 +662,9 @@ Tizen::Base::String File::GetName(void) const{
                 WcharToChar(temp,ret.GetPointer());
                 log.length += sprintf(log.data + log.length,"`,`,%s",temp);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",res,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OTHER,temp);
+                File::GetAttributes(this->GetName(),attr);
+                size = attr.GetFileSize();
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,%lld`,%s",res,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OTHER,size,temp);
                 //callstack
 
 //              if(E_SUCCESS != res || blockresult == 2) {
@@ -785,7 +694,8 @@ result File::Read(Tizen::Base::String& buffer) {
        bool bfiltering = true;
        char temp[50];
        int nRead = 0;
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Readp) {
                probeBlockStart();
@@ -819,10 +729,11 @@ result File::Read(Tizen::Base::String& buffer) {
                 //Input,ret
                 log.length += sprintf(log.data + log.length,"`,0x%x`,%ld",(unsigned int)&buffer,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,this->GetName().GetPointer());
+                size = attr.GetFileSize();
                 nRead = buffer.GetLength();
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,nRead,(unsigned int)this,FD_FILE,FD_API_READ,temp);
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,nRead,(unsigned int)this,FD_FILE,FD_API_READ,size,temp);
                 //callstack
 
                 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -852,7 +763,8 @@ result File::Read(Tizen::Base::ByteBuffer& buffer) {
        bool bfiltering = true;
        char temp[50];
        int nRead = 0;
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Readp) {
                probeBlockStart();
@@ -886,10 +798,11 @@ result File::Read(Tizen::Base::ByteBuffer& buffer) {
                 //Input,ret
                 log.length += sprintf(log.data + log.length,"`,0x%x`,%ld",(unsigned int)&buffer,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,this->GetName().GetPointer());
+                size = attr.GetFileSize();
                 buffer.GetInt(nRead);
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,nRead,(unsigned int)this,FD_FILE,FD_API_READ,temp);
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,nRead,(unsigned int)this,FD_FILE,FD_API_READ,size,temp);
                 //callstack
 
                 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -919,7 +832,8 @@ int File::Read(void *buffer, int length) {
        bool bfiltering = true;
        char temp[50];
        int nRead = 0;
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Readp) {
                probeBlockStart();
@@ -954,10 +868,11 @@ int File::Read(void *buffer, int length) {
                 //Input,ret
                 log.length += sprintf(log.data + log.length,"`,0x%x, %d`,%d",(unsigned int)buffer,length,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,this->GetName().GetPointer());
+                size = attr.GetFileSize();
                 nRead = Tell() - nRead;
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,?`,%s",res,blockresult,(unsigned int)CALLER_ADDRESS,nRead,(unsigned int)this,FD_FILE,FD_API_READ,temp);
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,%lld`,%s",res,blockresult,(unsigned int)CALLER_ADDRESS,nRead,(unsigned int)this,FD_FILE,FD_API_READ,size,temp);
                 //callstack
 
                 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -986,13 +901,14 @@ result File::Seek(FileSeekPosition position, long offset) {
        int blockresult;
        bool bfiltering = true;
        char temp[50];
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Seekp) {
                probeBlockStart();
 
                void *tmpPtr = dlsym(RTLD_NEXT,
-                               "_ZN5Tizen2Io4File4SeekE16FileSeekPositionl");
+                               "_ZN5Tizen2Io4File4SeekENS0_16FileSeekPositionEl");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Io::File::Seek");
@@ -1029,9 +945,10 @@ result File::Seek(FileSeekPosition position, long offset) {
                         log.length += sprintf(log.data + log.length,"`,%d",position);
                 log.length += sprintf(log.data + log.length,", %ld`,%ld",offset,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,this->GetName().GetPointer());
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OTHER,temp);
+                size = attr.GetFileSize();
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OTHER,size,temp);
                 //callstack
 
                 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -1060,7 +977,8 @@ int File::Tell(void) const {
        int blockresult;
        bool bfiltering = true;
        char temp[50];
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Tellp) {
                probeBlockStart();
@@ -1095,9 +1013,10 @@ int File::Tell(void) const {
                 //Input,ret
                 log.length += sprintf(log.data + log.length,"`,`,%d",ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,this->GetName().GetPointer());
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",res,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OTHER,temp);
+                size = attr.GetFileSize();
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,%lld`,%s",res,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OTHER,size,temp);
                 //callstack
 
                 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -1126,7 +1045,8 @@ result File::Truncate(int length) {
        int blockresult;
        bool bfiltering = true;
        char temp[50];
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Truncatep) {
                probeBlockStart();
@@ -1159,9 +1079,10 @@ result File::Truncate(int length) {
                 //Input,ret
                 log.length += sprintf(log.data + log.length,"`,%d`,%ld",length,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,this->GetName().GetPointer());
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OTHER,temp);
+                size = attr.GetFileSize();
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OTHER,size,temp);
                 //callstack
 
                 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -1191,7 +1112,8 @@ result File::Write(const void *buffer, int length) {
        bool bfiltering = true;
        char temp[50];
        int nWritten = 0;
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Writep) {
                probeBlockStart();
@@ -1225,10 +1147,11 @@ result File::Write(const void *buffer, int length) {
                 //Input,ret
                 log.length += sprintf(log.data + log.length,"`,0x%x, %d`,%ld",(unsigned int)buffer,length,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,this->GetName().GetPointer());
+                size = attr.GetFileSize();
                 nWritten = Tell() - nWritten;
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,nWritten,(unsigned int)this,FD_FILE,FD_API_WRITE,temp);
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,nWritten,(unsigned int)this,FD_FILE,FD_API_WRITE,size,temp);
                 //callstack
 
                 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -1258,7 +1181,8 @@ result File::Write(const Tizen::Base::ByteBuffer& buffer) {
        bool bfiltering = true;
        char temp[50];
        int nWritten = 0;
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Writep) {
                probeBlockStart();
@@ -1292,10 +1216,11 @@ result File::Write(const Tizen::Base::ByteBuffer& buffer) {
                 //Input,ret
                 log.length += sprintf(log.data + log.length,"`,0x%x`,%ld",(unsigned int)&buffer,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,this->GetName().GetPointer());
+                size = attr.GetFileSize();
                 nWritten = Tell() - nWritten;
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,nWritten,(unsigned int)this,FD_FILE,FD_API_WRITE,temp);
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,nWritten,(unsigned int)this,FD_FILE,FD_API_WRITE,size,temp);
                 //callstack
 
                 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -1325,7 +1250,8 @@ result File::Write(const Tizen::Base::String& buffer) {
        bool bfiltering = true;
        char temp[50];
        int nWritten = 0;
-       //FileAttributes attr;
+       FileAttributes attr;
+       long long size;
 
        if (!Writep) {
                probeBlockStart();
@@ -1360,10 +1286,11 @@ result File::Write(const Tizen::Base::String& buffer) {
                 WcharToChar(temp,buffer.GetPointer());
                 log.length += sprintf(log.data + log.length,"`,%s`,%ld",temp,ret);
                 //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-                //File::GetAttributes(this->GetName(),attr);
+                File::GetAttributes(this->GetName(),attr);
                 WcharToChar(temp,this->GetName().GetPointer());
+                size = attr.GetFileSize();
                 nWritten = Tell() - nWritten;
-                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,nWritten,(unsigned int)this,FD_FILE,FD_API_WRITE,temp);
+                log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,%d`,0x%x`,%d`,%d`,%lld`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,nWritten,(unsigned int)this,FD_FILE,FD_API_WRITE,size,temp);
                 //callstack
 
                 //              if(E_SUCCESS != ret || blockresult == 2) {
@@ -1390,6 +1317,8 @@ File::~File(void) {
        int blockresult;
        bool bfiltering = true;
        void *tmpPtr;
+       FileAttributes attr;
+       long long size;
 
        if (!FileDp) {
                probeBlockStart();
@@ -1407,6 +1336,8 @@ File::~File(void) {
 
        if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
                setProbePoint(&probeInfo);
+               File::GetAttributes(this->GetName(),attr);
+               size = attr.GetFileSize();
                preBlockEnd();
        }
 //
@@ -1422,9 +1353,7 @@ File::~File(void) {
                //Input,ret
                log.length += sprintf(log.data + log.length,"`,`,");
                //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-               //File::GetAttributes(this->GetName(),attr);
-
-               log.length += sprintf(log.data + log.length,"`,0`,0`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,",blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_CLOSE);
+               log.length += sprintf(log.data + log.length,"`,0`,0`,%d`,%u`,0`,0x%x`,%d`,%d`,%lld`,",blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_CLOSE,size);
                //callstack
 
 //             if(E_SUCCESS != ret || blockresult == 2) {
index 3dce703..76ece73 100755 (executable)
  *
  */
 
-#include <FBaseResult.h>
-#include <FBaseString.h>
-#include <FBaseRtTypes.h>
-
+#include <FBase.h>
 #include <string.h>
 #include "daprobe.h"
 #include "probeinfo.h"
@@ -43,68 +40,6 @@ namespace Tizen {
 namespace Base {
 namespace Runtime {
 
-class Mutex {
-public:
-       result Create(void);
-       result Create(const Tizen::Base::String& name);
-       result Release(void);
-       result Acquire(void);
-       result TryToAcquire(void);
-
-//     Mutex(void);
-//     virtual ~Mutex(void);
-
-//private:
-//     Mutex(const Mutex& value);
-//     Mutex& opereator =(const Mutex& value);
-
-//private:
-//     friend class _MutexImpl;
-//     class _MutexImpl * __pMutexImpl;
-};
-
-class Semaphore {
-public:
-       result Create(int count = 1);
-       result Create(const Tizen::Base::String& name, int count = 1);
-       result Acquire(long timeout = INFINITE);
-       result TryToAcquire(void);
-       result Release(void);
-
-//     Semaphore(void);
-//     virtual ~Semaphore(void);
-
-//private:
-//     Semaphore(const Semaphore& rhs);
-//     Semaphore& operator =(const Semaphore& rhs);
-
-//private:
-//     friend class _SemaphoreImpl;
-//     class _SemaphoreImpl * __pSemaphoreImpl;
-};
-
-class Monitor {
-public:
-       result Construct(void);
-       result Enter(void);
-       result Exit(void);
-       result Wait(void);
-       result Notify(void);
-       result NotifyAll(void);
-
-//     Monitor(void);
-//     virtual ~Monitor(void);
-
-//private:
-//     Monitor(const Monitor& rhs);
-//     Monitor& operator =(const Monitor& rhs);
-
-//private:
-//     friend class _MonitorImpl;
-//     class _MonitorImpl * __pMonitorImpl;
-};
-
-
 result Mutex::Create(void) {
        typedef result
                (Mutex::*methodType)(void);
index 8defeac..eca8dfa 100755 (executable)
  *
  */
 
-//#include <FBase.h>
-#include <FBaseDataType.h>
-#include <FBaseRtIRunnable.h>
-#include <FBaseCol.h>
-//#include <FIo.h>
+#include <FBase.h>
 #include "daprobe.h"
 #include "probeinfo.h"
 #include "dahelper.h"
@@ -43,68 +39,6 @@ static enum DaOptions _sopt = OPT_THREAD;
 namespace Tizen {
 namespace Base {
 namespace Runtime {
-enum ThreadType {
-       THREAD_TYPE_WORKER = 0, /**< The worker thread mode */
-       THREAD_TYPE_EVENT_DRIVEN, /**< The event-driven thread mode */
-       THREAD_TYPE_MAIN
-// This enum value is for internal use only. Using this enum value can cause behavioral,
-// security-related, and consistency-related issues in the application.
-// The main thread mode
-};
-
-enum ThreadPriority {
-       THREAD_PRIORITY_HIGH, /**< The high priority*/
-       THREAD_PRIORITY_MID, /**< The mid priority*/
-       THREAD_PRIORITY_LOW,
-/**< The low priority*/
-};
-
-class Thread {
-public:
-       const static unsigned long DEFAULT_STACK_SIZE = 64 * 1024;
-
-       static result Sleep(long milliSeconds);
-       static Thread* GetCurrentThread(void);
-       static result Yield(void);
-       static result Exit(int exitCode=0x00);
-
-       result Construct(ThreadType threadType, long stackSize, // deprecated
-                       ThreadPriority priority = THREAD_PRIORITY_MID);
-       result Construct(long stackSize = DEFAULT_STACK_SIZE,
-                       ThreadPriority priority = THREAD_PRIORITY_MID);
-       result Construct(const Tizen::Base::String &name, long stackSize =
-                       DEFAULT_STACK_SIZE, ThreadPriority priority = THREAD_PRIORITY_MID);
-       result Construct(const Tizen::Base::String &name, ThreadType threadType, // deprecated
-                       long stackSize = DEFAULT_STACK_SIZE, ThreadPriority priority =
-                                       THREAD_PRIORITY_MID);
-       result Construct(IRunnable &target, long stackSize = DEFAULT_STACK_SIZE,
-                       ThreadPriority priority = THREAD_PRIORITY_MID);
-       result Construct(const Tizen::Base::String &name, IRunnable &target,
-                       long stackSize = DEFAULT_STACK_SIZE, ThreadPriority priority =
-                                       THREAD_PRIORITY_MID);
-       result GetExitCode(int &exitCode) const;
-       const Tizen::Base::String & GetName(void) const;
-       result Join(void);
-//     virtual bool OnStart(void); // deprecated
-//     virtual void OnStop(void); // deprecated
-//     virtual void OnUserEventReceivedN(RequestId requestId, // deprecated
-//                     Tizen::Base::Collection::IList *pArgs);
-//     virtual Tizen::Base::Object * Run(void);
-//     virtual result SendUserEvent(RequestId requestId, // deprecated
-//                     const Tizen::Base::Collection::IList *pArgs);
-       result Start(void);
-       result Stop(void); // deprecated
-
-//     Thread(void);
-//     virtual ~Thread(void);
-
-//private:
-//     Thread(const Thread& rhs);
-//     Thread& operator =(const Thread& rhs);
-//private:
-//     friend class _ThreadImpl;
-//     class _ThreadImpl* __pThreadImpl;
-};
 
 class _ThreadImpl {
 //public:
@@ -181,34 +115,6 @@ private:
 //     return ret;
 //}
 
-class EventDrivenThread : public Thread {
-public:
-       result Construct(long stackSize = DEFAULT_STACK_SIZE,
-                       ThreadPriority priority = THREAD_PRIORITY_MID);
-       result Construct(const Tizen::Base::String &name, long stackSize =
-                       DEFAULT_STACK_SIZE, ThreadPriority priority = THREAD_PRIORITY_MID);
-
-       virtual result Quit();
-//     virtual bool OnStart(void);
-//     virtual void OnStop(void);
-//     virtual void OnUserEventReceivedN(RequestId requestId,
-//                     Tizen::Base::Collection::IList *pArgs);
-//     virtual Tizen::Base::Object * Run(void);
-//     virtual result SendUserEvent(RequestId requestId,
-//                     const Tizen::Base::Collection::IList *pArgs);
-
-//     EventDrivenThread(void);
-//     virtual ~EventDrivenThread(void);
-
-//private:
-//     EventDrivenThread(const EventDrivenThread& rhs);
-//     EventDrivenThread& operator = (const EventDrivenThread& rhs);
-//private:
-//     class _EventDrivenThreadImpl* __pEventDrivenThreadImpl;
-//     friend class _EventDrivenThreadImpl;
-};
-
-
 void*
 _ThreadImpl::ThreadProc(void* params) {
        typedef void*
@@ -270,9 +176,7 @@ _ThreadImpl::ThreadProc(void* params) {
        }
        // all probe should be reachable inside thread start_routine (user implemented Thread::Run)
        probingEnd();
-       probeBlockEnd();
        (ThreadProcp)(params);
-       probeBlockStart();
        probingStart();
        //
        if (postBlockBegin(blockresult)) {
index f14bc1f..1d7de3f 100755 (executable)
@@ -378,11 +378,6 @@ class MessageBox
        MessageBox(void);
 };
 
-class NotificationFrame
-{
-       NotificationFrame(void);
-};
-
 class OptionMenu
 {
        OptionMenu(void);
@@ -1098,20 +1093,6 @@ MessageBox::MessageBox(void)
        (this->*messagebox_messageboxp)();
 }
 
-NotificationFrame::NotificationFrame(void)
-{
-       typedef void (NotificationFrame::*methodType)(void);
-       static methodType notificationframe_notificationframep;
-
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls17NotificationFrameC2Ev, LIBOSP_UIFW, notificationframe_notificationframep);
-
-       probeBlockStart();
-       add_object_hash_type((void*)this, "NotificationFrame");
-       probeBlockEnd();
-
-       (this->*notificationframe_notificationframep)();
-}
-
 OptionMenu::OptionMenu(void)
 {
        typedef void (OptionMenu::*methodType)(void);