51
|
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 MEMSPYDRIVERLOGICALCHANHEAPBASE_H
|
|
19 |
#define MEMSPYDRIVERLOGICALCHANHEAPBASE_H
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <memspy/driver/memspydriverobjectsshared.h>
|
|
23 |
#include <memspy/driver/memspydriverenumerationsshared.h>
|
|
24 |
|
|
25 |
// User includes
|
|
26 |
#include "MemSpyDriverOpCodes.h"
|
|
27 |
#include "MemSpyDriverLogChanBase.h"
|
|
28 |
#include "MemSpyDriverObjectsInternal.h"
|
|
29 |
#include "MemSpyDriverHeapWalker.h"
|
|
30 |
#include "MemSpyDriverEnumerationsInternal.h"
|
|
31 |
|
|
32 |
// Classes referenced
|
|
33 |
class TMemSpyHeapInfo;
|
|
34 |
class DMemSpyDriverDevice;
|
|
35 |
class RMemSpyDriverRHeapUser;
|
|
36 |
class RMemSpyMemStreamWriter;
|
|
37 |
class RMemSpyDriverRHeapKernelInPlace;
|
|
38 |
class RMemSpyDriverRHeapKernelFromCopy;
|
|
39 |
|
|
40 |
|
54
|
41 |
NONSHARABLE_CLASS(DMemSpyDriverLogChanHeapBase) : public DMemSpyDriverLogChanBase, public MMemSpyHeapWalkerObserver
|
51
|
42 |
{
|
|
43 |
public:
|
|
44 |
enum TDrmMatchType
|
|
45 |
{
|
|
46 |
EMatchTypeNone = 0,
|
|
47 |
EMatchTypeName,
|
|
48 |
EMatchTypeUid
|
|
49 |
};
|
|
50 |
public:
|
|
51 |
~DMemSpyDriverLogChanHeapBase();
|
|
52 |
|
|
53 |
protected:
|
|
54 |
DMemSpyDriverLogChanHeapBase( DMemSpyDriverDevice& aDevice, DThread& aThread );
|
|
55 |
TInt Construct();
|
|
56 |
|
|
57 |
protected: // From DMemSpyDriverLogChanBase
|
|
58 |
TInt Request( TInt aFunction, TAny* a1, TAny* a2 );
|
|
59 |
|
|
60 |
protected: // Capability checks for heap access
|
|
61 |
TDrmMatchType IsDrmThread( DThread& aThread );
|
|
62 |
|
|
63 |
protected: // From MHeapWalkerObserver
|
|
64 |
void HandleHeapWalkInit();
|
|
65 |
TBool HandleHeapCell( TMemSpyDriverCellType aCellType, TAny* aCellAddress, TInt aLength, TInt aNestingLevel, TInt aAllocNumber );
|
|
66 |
|
|
67 |
protected: // Heap utility functions
|
|
68 |
void PrintHeapInfo( const TMemSpyHeapInfo& aInfo );
|
|
69 |
|
|
70 |
private: // Data members
|
|
71 |
|
|
72 |
// Points to stack-based object whilst walking in progress
|
|
73 |
RMemSpyMemStreamWriter* iStackStream;
|
|
74 |
TInt iFreeCellCount;
|
|
75 |
};
|
|
76 |
|
|
77 |
|
|
78 |
#endif
|