1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MEMSPYDRIVERLOGICALCHANHEAPINFO_H |
|
19 #define MEMSPYDRIVERLOGICALCHANHEAPINFO_H |
|
20 |
|
21 // System includes |
|
22 #include <e32cmn.h> |
|
23 #include <kern_priv.h> |
|
24 #ifdef __MARM__ |
|
25 #include <arm.h> |
|
26 #endif |
|
27 #include <memspy/driver/memspydriverobjectsshared.h> |
|
28 #include <memspy/driver/memspydriverenumerationsshared.h> |
|
29 |
|
30 // User includes |
|
31 #include "MemSpyDriverOpCodes.h" |
|
32 #include "MemSpyDriverLogChanHeapBase.h" |
|
33 #include "MemSpyDriverObjectsInternal.h" |
|
34 #include "MemSpyDriverHeapWalker.h" |
|
35 #include "MemSpyDriverEnumerationsInternal.h" |
|
36 |
|
37 // Classes referenced |
|
38 class DMemSpyDriverDevice; |
|
39 class RMemSpyDriverRHeapKernel; |
|
40 class RMemSpyMemStreamWriter; |
|
41 |
|
42 |
|
43 class DMemSpyDriverLogChanHeapInfo : public DMemSpyDriverLogChanHeapBase |
|
44 { |
|
45 public: |
|
46 DMemSpyDriverLogChanHeapInfo( DMemSpyDriverDevice& aDevice, DThread& aThread ); |
|
47 ~DMemSpyDriverLogChanHeapInfo(); |
|
48 |
|
49 private: // from DMemSpyDriverLogChanBase |
|
50 TInt Request( TInt aFunction, TAny* a1, TAny* a2 ); |
|
51 TBool IsHandler( TInt aFunction ) const; |
|
52 |
|
53 private: // Channel operation handlers |
|
54 TInt GetHeapInfoUser( TMemSpyDriverInternalHeapRequestParameters* aParams ); |
|
55 TInt GetHeapInfoKernel( TMemSpyDriverInternalHeapRequestParameters* aParams, TDes8* aTransferBuffer ); |
|
56 TInt GetIsDebugKernel(TAny* aIsDebugKernel); |
|
57 |
|
58 private: // From MHeapWalkerObserver |
|
59 void HandleHeapWalkInit(); |
|
60 TBool HandleHeapCell( TMemSpyDriverCellType aCellType, TAny* aCellAddress, TInt aLength, TInt aNestingLevel, TInt aAllocNumber ); |
|
61 |
|
62 private: // Internal methods |
|
63 void ReleaseCellList(); |
|
64 TInt PrepareCellListTransferBuffer(); |
|
65 TInt FetchCellList(TDes8* aBufferSink); |
|
66 TInt CalculateCellListBufferSize() const; |
|
67 |
|
68 private: // Data members |
|
69 TMemSpyDriverInternalHeapRequestParameters iHeapInfoParams; |
|
70 RArray<TMemSpyDriverCell> iCellList; |
|
71 RMemSpyMemStreamWriter* iHeapStream; |
|
72 }; |
|
73 |
|
74 |
|
75 #endif |
|