analyzetool/dynamicmemoryhook/inc/analyzetoolallocator.h
branchRCL_3
changeset 49 7fdc9a71d314
parent 19 da2cedce4920
child 59 8ad140f3dd41
equal deleted inserted replaced
46:e26895079d7c 49:7fdc9a71d314
    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>
       
    28 #include <analyzetool/analyzetool.h>
    27 #include <analyzetool/analyzetool.h>
    29 #include <analyzetool/atcommon.h>
    28 #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
       
    48         * @param aCodeblocks A reference to array of code segments
    45         * @param aCodeblocks A reference to array of code segments
    49         * @param aMutex A reference to mutex for schedule access to the 
    46         * @param aMutex A reference to mutex for schedule access to the 
    50         *                   shared resources
    47         *                   shared resources
    51         * @param aProcessId A reference to the observed process id
    48         * @param aProcessId A reference to the observed process id
    52         * @param aAnalyzeTool Reference to device driver
    49         * @param aAnalyzeTool Reference to device driver
    53         * @param aStorageServerOpen Variable to check if Storage server is connected
    50         * @param aLogOption The logging option
    54         * @param aLogOption The logging option for storage server
       
    55         * @param aAllocCallStackSize Max number of stored callstack items when memory allocated
    51         * @param aAllocCallStackSize Max number of stored callstack items when memory allocated
    56         * @param aFreeCallStackSize Max number of stored callstack items when memory freed
    52         * @param aFreeCallStackSize Max number of stored callstack items when memory freed
    57         */
    53         */
    58         RAnalyzeToolAllocator( TBool aNotFirst,
    54         RAnalyzeToolAllocator( TBool aNotFirst,
    59                                RATStorageServer& aStorageServer, 
       
    60                                RArray<TCodeblock>& aCodeblocks, 
    55                                RArray<TCodeblock>& aCodeblocks, 
    61                                RMutex& aMutex, 
    56                                RMutex& aMutex, 
    62                                TUint aProcessId,
    57                                TUint aProcessId,
    63                                RAnalyzeTool& aAnalyzeTool,
    58                                RAnalyzeTool& aAnalyzeTool,
    64                                TBool aStorageServerOpen,
       
    65                                TUint32 aLogOption,
    59                                TUint32 aLogOption,
    66                                TUint32 aAllocCallStackSize,
    60                                TUint32 aAllocCallStackSize,
    67                                TUint32 aFreeCallStackSize );
    61                                TUint32 aFreeCallStackSize,
       
    62                                RATFileLog& iLogFile );
    68         /**
    63         /**
    69         * Destructor.
    64         * Destructor.
    70         */                     
    65         */                     
    71         ~RAnalyzeToolAllocator();
    66         ~RAnalyzeToolAllocator();
    72 
    67 
   200         */
   195         */
   201         TBool FindCurrentThreadStack( TUint32& aStackStart );
   196         TBool FindCurrentThreadStack( TUint32& aStackStart );
   202 
   197 
   203     private: 
   198     private: 
   204     
   199     
   205         /* Handle to the storage server*/
       
   206         RATStorageServer& iStorageServer;
       
   207 
       
   208         /* A reference to codeblocks of the observed process */            
   200         /* A reference to codeblocks of the observed process */            
   209         RArray<TCodeblock>& iCodeblocks;
   201         RArray<TCodeblock>& iCodeblocks;
   210 
   202 
   211         /* The mutex for serializing access to the shared resources */
   203         /* The mutex for serializing access to the shared resources */
   212         RMutex& iMutex;
   204         RMutex& iMutex;
   226         /* Array of threads using this heap */
   218         /* Array of threads using this heap */
   227         RArray<TThreadStack> iThreadArray;
   219         RArray<TThreadStack> iThreadArray;
   228 
   220 
   229         RAnalyzeTool& iAnalyzeTool;
   221         RAnalyzeTool& iAnalyzeTool;
   230 
   222 
   231         /* A flag for indicating that the RATStorageServer is open */
       
   232         TBool iStorageServerOpen;
       
   233 
       
   234         /* Log option */
   223         /* Log option */
   235         TUint32 iLogOption;
   224         TUint32 iLogOption;
   236         
   225         
   237         /* Max items on stored call stack when memory allocated */
   226         /* Max items on stored call stack when memory allocated */
   238         TUint32 iAllocMaxCallStack;
   227         TUint32 iAllocMaxCallStack;
   239         
   228         
   240         /* Max items on stored call stack when memory freed */
   229         /* Max items on stored call stack when memory freed */
   241         TUint32 iFreeMaxCallStack;
   230         TUint32 iFreeMaxCallStack;
   242         
   231         
       
   232         /* Binary log file */
       
   233         RATFileLog& iLogFile;
       
   234         
   243     };
   235     };
   244 
   236 
   245 #endif // ANALYZETOOLALLOCATOR_H
   237 #endif // ANALYZETOOLALLOCATOR_H
   246 
   238 
   247 // End of File
   239 // End of File