analyzetool/dynamicmemoryhook/inc/analyzetoolallocator.h
branchRCL_3
changeset 59 8ad140f3dd41
parent 49 7fdc9a71d314
equal deleted inserted replaced
49:7fdc9a71d314 59:8ad140f3dd41
    22 // INCLUDES
    22 // INCLUDES
    23 #include <u32std.h>
    23 #include <u32std.h>
    24 #include "codeblock.h"
    24 #include "codeblock.h"
    25 #include "threadstack.h"
    25 #include "threadstack.h"
    26 #include "analyzetoolmemoryallocator.h"
    26 #include "analyzetoolmemoryallocator.h"
       
    27 #include <analyzetool/atstorageserverclnt.h>
    27 #include <analyzetool/analyzetool.h>
    28 #include <analyzetool/analyzetool.h>
    28 #include <analyzetool/atcommon.h>
    29 #include <analyzetool/atcommon.h>
    29 #include "analyzetoolfilelog.h"
       
    30 
    30 
    31 // CLASS DECLARATION
    31 // CLASS DECLARATION
    32 
    32 
    33 /**
    33 /**
    34 *  Class which overloads the RAlloctor functions and provides access to 
    34 *  Class which overloads the RAlloctor functions and provides access to 
    40     public:
    40     public:
    41 
    41 
    42         /**
    42         /**
    43         * C++ default constructor.
    43         * C++ default constructor.
    44         * @param aNotFirst Is this first thread using this heap
    44         * @param aNotFirst Is this first thread using this heap
       
    45         * @param aStorageServer A reference to the 
       
    46         *                       <code>RATStorageServer</code> which is 
       
    47         *                       used to store kernel events
    45         * @param aCodeblocks A reference to array of code segments
    48         * @param aCodeblocks A reference to array of code segments
    46         * @param aMutex A reference to mutex for schedule access to the 
    49         * @param aMutex A reference to mutex for schedule access to the 
    47         *                   shared resources
    50         *                   shared resources
    48         * @param aProcessId A reference to the observed process id
    51         * @param aProcessId A reference to the observed process id
    49         * @param aAnalyzeTool Reference to device driver
    52         * @param aAnalyzeTool Reference to device driver
    50         * @param aLogOption The logging option
    53         * @param aStorageServerOpen Variable to check if Storage server is connected
       
    54         * @param aLogOption The logging option for storage server
    51         * @param aAllocCallStackSize Max number of stored callstack items when memory allocated
    55         * @param aAllocCallStackSize Max number of stored callstack items when memory allocated
    52         * @param aFreeCallStackSize Max number of stored callstack items when memory freed
    56         * @param aFreeCallStackSize Max number of stored callstack items when memory freed
    53         */
    57         */
    54         RAnalyzeToolAllocator( TBool aNotFirst,
    58         RAnalyzeToolAllocator( TBool aNotFirst,
       
    59                                RATStorageServer& aStorageServer, 
    55                                RArray<TCodeblock>& aCodeblocks, 
    60                                RArray<TCodeblock>& aCodeblocks, 
    56                                RMutex& aMutex, 
    61                                RMutex& aMutex, 
    57                                TUint aProcessId,
    62                                TUint aProcessId,
    58                                RAnalyzeTool& aAnalyzeTool,
    63                                RAnalyzeTool& aAnalyzeTool,
       
    64                                TBool aStorageServerOpen,
    59                                TUint32 aLogOption,
    65                                TUint32 aLogOption,
    60                                TUint32 aAllocCallStackSize,
    66                                TUint32 aAllocCallStackSize,
    61                                TUint32 aFreeCallStackSize,
    67                                TUint32 aFreeCallStackSize );
    62                                RATFileLog& iLogFile );
       
    63         /**
    68         /**
    64         * Destructor.
    69         * Destructor.
    65         */                     
    70         */                     
    66         ~RAnalyzeToolAllocator();
    71         ~RAnalyzeToolAllocator();
    67 
    72 
   195         */
   200         */
   196         TBool FindCurrentThreadStack( TUint32& aStackStart );
   201         TBool FindCurrentThreadStack( TUint32& aStackStart );
   197 
   202 
   198     private: 
   203     private: 
   199     
   204     
       
   205         /* Handle to the storage server*/
       
   206         RATStorageServer& iStorageServer;
       
   207 
   200         /* A reference to codeblocks of the observed process */            
   208         /* A reference to codeblocks of the observed process */            
   201         RArray<TCodeblock>& iCodeblocks;
   209         RArray<TCodeblock>& iCodeblocks;
   202 
   210 
   203         /* The mutex for serializing access to the shared resources */
   211         /* The mutex for serializing access to the shared resources */
   204         RMutex& iMutex;
   212         RMutex& iMutex;
   218         /* Array of threads using this heap */
   226         /* Array of threads using this heap */
   219         RArray<TThreadStack> iThreadArray;
   227         RArray<TThreadStack> iThreadArray;
   220 
   228 
   221         RAnalyzeTool& iAnalyzeTool;
   229         RAnalyzeTool& iAnalyzeTool;
   222 
   230 
       
   231         /* A flag for indicating that the RATStorageServer is open */
       
   232         TBool iStorageServerOpen;
       
   233 
   223         /* Log option */
   234         /* Log option */
   224         TUint32 iLogOption;
   235         TUint32 iLogOption;
   225         
   236         
   226         /* Max items on stored call stack when memory allocated */
   237         /* Max items on stored call stack when memory allocated */
   227         TUint32 iAllocMaxCallStack;
   238         TUint32 iAllocMaxCallStack;
   228         
   239         
   229         /* Max items on stored call stack when memory freed */
   240         /* Max items on stored call stack when memory freed */
   230         TUint32 iFreeMaxCallStack;
   241         TUint32 iFreeMaxCallStack;
   231         
   242         
   232         /* Binary log file */
       
   233         RATFileLog& iLogFile;
       
   234         
       
   235     };
   243     };
   236 
   244 
   237 #endif // ANALYZETOOLALLOCATOR_H
   245 #endif // ANALYZETOOLALLOCATOR_H
   238 
   246 
   239 // End of File
   247 // End of File