perfsrv/memspy/Driver/Kernel/Include/SubChannels/MemSpyDriverLogChanHeapDataBase.h
changeset 55 f2950aff7424
child 54 a151135b0cf9
equal deleted inserted replaced
48:516af714ebb4 55:f2950aff7424
       
     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 MEMSPYDRIVERLOGICALCHANHEAPDATABASE_H
       
    19 #define MEMSPYDRIVERLOGICALCHANHEAPDATABASE_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 "MemSpyDriverHeap.h"
       
    32 #include "MemSpyDriverOpCodes.h"
       
    33 #include "MemSpyDriverLogChanHeapBase.h"
       
    34 #include "MemSpyDriverObjectsInternal.h"
       
    35 #include "MemSpyDriverHeapWalker.h"
       
    36 #include "MemSpyDriverEnumerationsInternal.h"
       
    37 
       
    38 // Classes referenced
       
    39 class DMemSpyDriverDevice;
       
    40 class RMemSpyMemStreamWriter;
       
    41 
       
    42 const static TInt KPageSize = 4096;
       
    43 
       
    44 class DMemSpyDriverLogChanHeapDataBase : public DMemSpyDriverLogChanHeapBase
       
    45 	{
       
    46 public:
       
    47 	DMemSpyDriverLogChanHeapDataBase( DMemSpyDriverDevice& aDevice, DThread& aThread );
       
    48 	~DMemSpyDriverLogChanHeapDataBase();
       
    49 
       
    50 private: // From MHeapWalkerObserver
       
    51     void HandleHeapWalkInit();
       
    52     TBool HandleHeapCell( TMemSpyDriverCellType aCellType, TAny* aCellAddress, TInt aLength, TInt aNestingLevel, TInt aAllocNumber );   
       
    53     
       
    54 protected: // For use by the base classes
       
    55     TInt PrepareCellListTransferBuffer();
       
    56     TInt FetchCellList(TDes8* aBufferSink);
       
    57     void ReleaseCellList();
       
    58     TInt CalculateCellListBufferSize() const;
       
    59     TInt GetFullData( TMemSpyDriverInternalHeapDataParams* aParams );
       
    60     TInt DoGetFullData(TMemSpyDriverInternalHeapDataParams& aParams, DThread* aThread, RMemSpyDriverRHeapBase& aHeap);
       
    61 
       
    62 protected: // To be implemetned by the base classes
       
    63     virtual TInt GetFullData( TMemSpyDriverInternalHeapDataParams& aParams ) = 0;
       
    64 
       
    65 protected: // Data members
       
    66     TMemSpyDriverInternalHeapRequestParameters iHeapInfoParams;
       
    67 	RArray<TMemSpyDriverCell> iCellList;
       
    68     RMemSpyMemStreamWriter* iHeapStream;
       
    69 	};
       
    70 
       
    71 
       
    72 #endif