--- a/perfsrv/memspy/Driver/Shared/heaputils.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/Shared/heaputils.h Tue Oct 26 16:20:32 2010 +0300
@@ -9,7 +9,9 @@
// Initial Contributors:
// Accenture - Initial contribution
//
-
+// Contributors:
+// Adrian Issott (Nokia) - Updates for kernel-side alloc helper & RHybridHeap v2
+//
#ifndef FSHELL_HEAP_UTILS_H
#define FSHELL_HEAP_UTILS_H
@@ -41,7 +43,7 @@
public:
HUIMPORT_C RAllocatorHelper();
#ifdef __KERNEL_MODE__
- TLinAddr GetKernelAllocator(DChunk* aKernelChunk);
+ static TLinAddr GetKernelAllocator(DChunk* aKernelChunk);
TInt OpenKernelHeap();
#else
HUIMPORT_C TInt Open(RAllocator* aAllocator);
@@ -111,6 +113,7 @@
ETypeUnknown,
ETypeRHeap,
ETypeRHybridHeap,
+ ETypeRHybridHeapV2,
};
TType GetType() const; // This is for information only, nothing should care about the return value
#endif
@@ -124,7 +127,10 @@
#endif
virtual TInt ReadData(TLinAddr aLocation, TAny* aResult, TInt aSize) const;
virtual TInt WriteData(TLinAddr aLocation, const TAny* aData, TInt aSize);
-
+
+ void SetIsKernelHeapAllocator(TBool aIsKernelHeapAllocator);
+ TBool GetIsKernelHeapAllocator() const;
+
#ifndef __KERNEL_MODE__
protected:
#else
@@ -150,21 +156,34 @@
TUint PageMapBits(unsigned ix, unsigned len, TInt& err);
TUint PagedDecode(TUint pos, TInt& err);
TInt TreeWalk(TUint32 aSlabRoot, TInt aSlabType, TWalkFunc3 aCallbackFn, TAny* aContext, TBool& shouldContinue);
+
+private:
+ TInt PageMapOffset() const;
+ TInt MallocStateOffset() const;
+ TInt SparePageOffset() const;
+ TInt PartialPageOffset() const;
+ TInt FullSlabOffset() const;
+ TInt SlabAllocOffset() const;
+ TInt UserInitialHeapMetaDataSize() const;
+
protected:
TLinAddr iAllocatorAddress;
enum TAllocatorType
{
- EUnknown,
- EAllocator,
+ EAllocatorNotSet,
+ EAllocatorUnknown,
EUrelOldRHeap,
EUdebOldRHeap,
EUrelHybridHeap,
EUdebHybridHeap,
+ EUrelHybridHeapV2,
+ EUdebHybridHeapV2,
};
TAllocatorType iAllocatorType;
+
private:
THeapInfo* iInfo;
- TUint iValidInfo;
+ TBool iIsKernelHeapAllocator;
TUint8* iTempSlabBitmap;
mutable TAny* iPageCache;
mutable TLinAddr iPageCacheAddr;