--- a/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/driver/user/MemSpyDriverClient.h Fri Sep 17 08:38:31 2010 +0300
+++ b/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/driver/user/MemSpyDriverClient.h Mon Oct 04 02:45:59 2010 +0300
@@ -30,18 +30,18 @@
class RMemSpyDriverClient : public RBusLogicalChannel
- {
+ {
public: // GENERAL API
/**
*
*/
- IMPORT_C TInt Open();
+ IMPORT_C TInt Open();
/**
*
*/
- IMPORT_C void Close();
+ IMPORT_C void Close();
/**
*
@@ -54,7 +54,7 @@
/**
*
*/
- IMPORT_C TInt ReadMemory( TUint aTid, TLinAddr aSrc, TDes8& aDest );
+ IMPORT_C TInt ReadMemory( TUint aTid, TLinAddr aSrc, TDes8& aDest );
public: // CODE SEGS
@@ -62,17 +62,17 @@
/**
*
*/
- IMPORT_C TInt GetCodeSegs( TAny** aHandleArray, TInt& aHandleCount, TBool aOnlyRamLoaded = EFalse );
+ IMPORT_C TInt GetCodeSegs( TAny** aHandleArray, TInt& aHandleCount, TBool aOnlyRamLoaded = EFalse );
/**
*
*/
- IMPORT_C TInt GetCodeSegs( TUint aPid, TAny** aHandleArray, TInt& aHandleCount );
+ IMPORT_C TInt GetCodeSegs( TUint aPid, TAny** aHandleArray, TInt& aHandleCount );
/**
*
*/
- IMPORT_C TInt GetCodeSegInfo( TAny* aHandle, TUint aPid, TMemSpyDriverCodeSegInfo& aInfo );
+ IMPORT_C TInt GetCodeSegInfo( TAny* aHandle, TUint aPid, TMemSpyDriverCodeSegInfo& aInfo );
public: // CHUNKS
@@ -150,6 +150,22 @@
*/
IMPORT_C TInt SetPriority( TUint aId, TThreadPriority aPriority );
+
+public: // HEAP KERNEL COPY
+
+ /**
+ * Creates a copy of the kernel heap so long running operations (like dumping the heap data)
+ * don't need to lock the kernel heap.
+ *
+ * At most one copy of the kernel heap is held at a time. Each time this function is called the
+ * previous copy, if any, is erased.
+ */
+ IMPORT_C TInt CopyHeapDataKernel();
+ /**
+ * Frees the copy made using CopyHeapDataKernel()
+ */
+ IMPORT_C TInt FreeHeapDataKernel();
+
public: // HEAP INFO
/**
@@ -157,13 +173,16 @@
*/
IMPORT_C TInt GetHeapInfoUser( TMemSpyHeapInfo& aInfo, TUint aTid );
IMPORT_C TInt GetHeapInfoUser( TMemSpyHeapInfo& aInfo, TUint aTid, RArray<TMemSpyDriverFreeCell>& aFreeCells );
- IMPORT_C TInt GetHeapInfoUser(TMemSpyHeapInfo& aInfo, TUint aTid, RArray<TMemSpyDriverCell>& aCells, TBool aCollectAllocatedCellsAsWellAsFree);
+ IMPORT_C TInt GetHeapInfoUser(TMemSpyHeapInfo& aInfo, TUint aTid, RArray<TMemSpyDriverCell>& aCells, TBool aCollectAllocatedCellsAsWellAsFree);
/**
*
*/
IMPORT_C TInt GetHeapInfoKernel( TMemSpyHeapInfo& aInfo );
IMPORT_C TInt GetHeapInfoKernel( TMemSpyHeapInfo& aInfo, RArray<TMemSpyDriverFreeCell>& aFreeCells );
+ IMPORT_C TInt GetHeapInfoKernel( TMemSpyHeapInfo& aInfo, RArray<TMemSpyDriverCell>& aCells, TBool aCollectAllocatedCellsAsWellAsFree);
+ IMPORT_C TInt GetHeapInfoKernel( TMemSpyHeapInfo& aInfo, RArray<TMemSpyDriverCell>& aCells, TBool aCollectAllocatedCellsAsWellAsFree, TBool aUseKernelCopy);
+
public: // HEAP DATA
@@ -178,10 +197,16 @@
IMPORT_C TInt GetHeapDataNext( TUint aTid, TDes8& aDest, TUint& aReadAddress, TUint& aAmountRemaining );
/**
- *
+ * Get free cell data. If aFreeCellChecksum is 0, then no checksum comparison is performed.
+ * @pre must be called after CopyHeapDataKernel()
*/
- IMPORT_C HBufC8* GetHeapDataKernelLC( TMemSpyHeapInfo& aInfo, RArray<TMemSpyDriverFreeCell>& aFreeCells );
+ IMPORT_C TInt GetHeapDataKernel( TUint aTid, TDes8& aDest, TUint& aReadAddress, TUint& aAmountRemaining );
+ /**
+ * @pre must be called after GetHeapDataKernelNext()
+ */
+ IMPORT_C TInt GetHeapDataKernelNext( TUint aTid, TDes8& aDest, TUint& aReadAddress, TUint& aAmountRemaining );
+
public: // HEAP WALK
@@ -290,17 +315,17 @@
/**
* Get all of the handles in a specific container
*/
- IMPORT_C TInt GetContainerHandles( TMemSpyDriverContainerType aContainer, TAny** aHandleArray, TInt& aHandleCount );
+ IMPORT_C TInt GetContainerHandles( TMemSpyDriverContainerType aContainer, TAny** aHandleArray, TInt& aHandleCount );
/**
* Get all handles of a specific type, for a specific thread.
*/
- IMPORT_C TInt GetThreadHandlesByType( TInt aTid, TMemSpyDriverContainerType aType, TAny** aHandleArray, TInt& aHandleCount );
+ IMPORT_C TInt GetThreadHandlesByType( TInt aTid, TMemSpyDriverContainerType aType, TAny** aHandleArray, TInt& aHandleCount );
/**
* Get all handles of a specific type, for a specific process.
*/
- IMPORT_C TInt GetProcessHandlesByType( TInt aPid, TMemSpyDriverContainerType aType, TAny** aHandleArray, TInt& aHandleCount );
+ IMPORT_C TInt GetProcessHandlesByType( TInt aPid, TMemSpyDriverContainerType aType, TAny** aHandleArray, TInt& aHandleCount );
/**
* Get handle info for a specific handle owner by a specific thread. If the handle is not thread-specific, then
@@ -325,8 +350,8 @@
* to see if any of those handle containers happen to reference the specified thread or process (as defined by
* aTid or aPid).
*/
- IMPORT_C TInt GetReferencesToMyThread( TUint aTid );
- IMPORT_C TInt GetReferencesToMyProcess( TUint aPid );
+ IMPORT_C TInt GetReferencesToMyThread( TUint aTid );
+ IMPORT_C TInt GetReferencesToMyProcess( TUint aPid );
/**
* Get info about a P&S kernel object
@@ -348,7 +373,7 @@
/**
* Gets handles of all sessions that are connected to a particular server
*/
- IMPORT_C TInt GetServerSessionHandles( TAny* aServerHandle, TAny** aSessionHandleArray, TInt& aSessionHandleCount );
+ IMPORT_C TInt GetServerSessionHandles( TAny* aServerHandle, TAny** aSessionHandleArray, TInt& aSessionHandleCount );
/**
* Gets session information for a given session handle.
@@ -394,7 +419,7 @@
private: // Data members
RBuf8 iBuffer;
- };
+ };