memspy/memspy_plat/memspy_api/include/memspy/engine/Helpers/MemSpyEngineHelperHeap.h
branchRCL_3
changeset 20 ca8a1b6995f6
parent 0 a03f92240627
child 21 52e343bb8f80
equal deleted inserted replaced
19:07b41fa8d1dd 20:ca8a1b6995f6
    24 #include <bamdesca.h>
    24 #include <bamdesca.h>
    25 
    25 
    26 // Driver includes
    26 // Driver includes
    27 #include <memspy/driver/memspydriverobjectsshared.h>
    27 #include <memspy/driver/memspydriverobjectsshared.h>
    28 
    28 
       
    29 // MemSpyClient includes
       
    30 #include <memspy/engine/memspyheapdata.h>
       
    31 
    29 // Classes referenced
    32 // Classes referenced
    30 class CMemSpyThread;
    33 class CMemSpyThread;
    31 class CMemSpyEngine;
    34 class CMemSpyEngine;
    32 class CMemSpyProcess;
    35 class CMemSpyProcess;
    33 class CMemSpyEngineOutputList;
    36 class CMemSpyEngineOutputList;
    42 private:
    45 private:
    43     CMemSpyEngineHelperHeap( CMemSpyEngine& aEngine );
    46     CMemSpyEngineHelperHeap( CMemSpyEngine& aEngine );
    44     void ConstructL();
    47     void ConstructL();
    45 
    48 
    46 public: // API - User Heap 
    49 public: // API - User Heap 
    47     IMPORT_C void GetHeapInfoUserL( const TProcessId& aProcess, const TThreadId& aThread, TMemSpyHeapInfo& aInfo, RArray<TMemSpyDriverFreeCell>* aFreeCells = NULL );
    50     IMPORT_C void GetHeapInfoUserL( const TProcessId& aProcess, const TThreadId& aThread, TMemSpyHeapInfo& aInfo, RArray<TMemSpyDriverCell>* aCells = NULL );
       
    51 	IMPORT_C void GetHeapInfoUserL(const TProcessId& aProcess, const TThreadId& aThread, TMemSpyHeapInfo& aInfo, RArray<TMemSpyDriverCell>* aCells, TBool aCollectAllocatedCellsAsWellAsFree);
    48     IMPORT_C void GetHeapInfoUserL( const CMemSpyProcess& aProcess, RArray<TMemSpyHeapInfo >& aInfos );
    52     IMPORT_C void GetHeapInfoUserL( const CMemSpyProcess& aProcess, RArray<TMemSpyHeapInfo >& aInfos );
    49     IMPORT_C void OutputHeapInfoUserL( const CMemSpyThread& aThread );
    53     IMPORT_C void OutputHeapInfoUserL( const CMemSpyThread& aThread );
    50     IMPORT_C void OutputHeapDataUserL( const CMemSpyThread& aThread );
    54     IMPORT_C void OutputHeapDataUserL( const CMemSpyThread& aThread );
    51     IMPORT_C void OutputHeapDataUserL( const TProcessId& aPid, const TThreadId& aTid, const TDesC& aThreadName, const TMemSpyHeapInfo& aInfo, const RArray<TMemSpyDriverFreeCell>* aFreeCells = NULL );
    55     IMPORT_C void OutputHeapDataUserL( const TProcessId& aPid, const TThreadId& aTid, const TDesC& aThreadName, const TMemSpyHeapInfo& aInfo, const RArray<TMemSpyDriverFreeCell>* aFreeCells = NULL );
    52     IMPORT_C void OutputCellListingUserL( const CMemSpyThread& aThread );
    56     IMPORT_C void OutputCellListingUserL( const CMemSpyThread& aThread );
    55     IMPORT_C void GetHeapInfoKernelL( TMemSpyHeapInfo& aInfo, RArray<TMemSpyDriverFreeCell>* aFreeCells = NULL );
    59     IMPORT_C void GetHeapInfoKernelL( TMemSpyHeapInfo& aInfo, RArray<TMemSpyDriverFreeCell>* aFreeCells = NULL );
    56     IMPORT_C void OutputHeapInfoKernelL();
    60     IMPORT_C void OutputHeapInfoKernelL();
    57     IMPORT_C void OutputHeapDataKernelL();
    61     IMPORT_C void OutputHeapDataKernelL();
    58 
    62 
    59 public: // API - Common
    63 public: // API - Common
    60     IMPORT_C void OutputHeapInfoL( const TMemSpyHeapInfo& aInfo, const TDesC& aThreadName, const RArray<TMemSpyDriverFreeCell>* aFreeCells = NULL );
    64     IMPORT_C void OutputHeapInfoL( const TMemSpyHeapInfo& aInfo, const TDesC& aThreadName, const RArray<TMemSpyDriverCell>* aCells = NULL );
    61     IMPORT_C void OutputHeapInfoForDeviceL( TBool aIncludeKernel = ETrue );
    65     IMPORT_C void OutputHeapInfoForDeviceL( TBool aIncludeKernel = ETrue );
    62     IMPORT_C CMemSpyEngineOutputList* NewHeapSummaryShortLC( const TMemSpyHeapInfo& aInfo );
    66     IMPORT_C CMemSpyEngineOutputList* NewHeapSummaryShortLC( const TMemSpyHeapInfo& aInfo );
    63     IMPORT_C CMemSpyEngineOutputList* NewHeapSummaryExtendedLC( const TMemSpyHeapInfo& aInfo, const RArray<TMemSpyDriverFreeCell>* aFreeCells = NULL );
    67     IMPORT_C CMemSpyEngineOutputList* NewHeapSummaryExtendedLC( const TMemSpyHeapInfo& aInfo, const RArray<TMemSpyDriverCell>* aCells = NULL );
       
    68     //cigasto    
       
    69     IMPORT_C TMemSpyHeapData NewHeapRawInfo( const TMemSpyHeapInfo& aInfo ); //not formatted heap info
    64 
    70 
    65 public: // But not exported
    71 public: // But not exported
    66     void OutputHeapDataKernelL( TBool aCreateDataStream );
    72     void OutputHeapDataKernelL( TBool aCreateDataStream );
    67     void OutputHeapDataUserL( const CMemSpyThread& aThread, TBool aCreateDataStream );
    73     void OutputHeapDataUserL( const CMemSpyThread& aThread, TBool aCreateDataStream );
    68     void OutputHeapDataUserL( const TProcessId& aPid, const TThreadId& aTid, const TDesC& aThreadName, const TMemSpyHeapInfo& aInfo, TBool aCreateDataStream, const RArray<TMemSpyDriverFreeCell>* aFreeCells );
    74     void OutputHeapDataUserL( const TProcessId& aPid, const TThreadId& aTid, const TDesC& aThreadName, const TMemSpyHeapInfo& aInfo, TBool aCreateDataStream, const RArray<TMemSpyDriverFreeCell>* aFreeCells );
    69 
    75 
    70 private:
    76 private:
    71     static TUint DescriptorAsDWORD( const TDesC8& aItem );
    77     static TUint DescriptorAsDWORD( const TDesC8& aItem );
    72     void AppendMetaDataL( const TMemSpyHeapInfo& aInfo, CMemSpyEngineOutputList& aList );
    78     void AppendMetaDataL( const TMemSpyHeapInfo& aInfo, CMemSpyEngineOutputList& aList );
    73     void AppendObjectDataL( const TMemSpyHeapInfo& aInfo, CMemSpyEngineOutputList& aList );
       
    74     void AppendStatisticsL( const TMemSpyHeapInfo& aInfo, CMemSpyEngineOutputList& aList );
    79     void AppendStatisticsL( const TMemSpyHeapInfo& aInfo, CMemSpyEngineOutputList& aList );
    75     void AppendFreeCellsL( const RArray<TMemSpyDriverFreeCell>& aFreeCells, CMemSpyEngineOutputList& aList );
    80 	void AppendCellsL(const RArray<TMemSpyDriverCell>& aCells, CMemSpyEngineOutputList& aList);
    76     void OutputCSVEntryL( TInt aIndex, const TMemSpyHeapInfo& aInfo, const TDesC& aThreadName, const TDesC& aProcessName );
    81     void OutputCSVEntryL( TInt aIndex, const TMemSpyHeapInfo& aInfo, const TDesC& aThreadName, const TDesC& aProcessName );
    77     void UpdateSharedHeapInfoL( const TProcessId& aProcess, const TThreadId& aThread, TMemSpyHeapInfo& aInfo );
    82     void UpdateSharedHeapInfoL( const TProcessId& aProcess, const TThreadId& aThread, TMemSpyHeapInfo& aInfo );
    78 
    83 
    79 private:
    84 private:
    80     CMemSpyEngine& iEngine;
    85     CMemSpyEngine& iEngine;