|
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 MEMSPYENGINEHELPERSYSMEMTRACKERENTRYGLOBALDATA_H |
|
19 #define MEMSPYENGINEHELPERSYSMEMTRACKERENTRYGLOBALDATA_H |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 #include <badesca.h> |
|
24 |
|
25 // Driver includes |
|
26 #include <memspy/driver/memspydriverobjectsshared.h> |
|
27 |
|
28 // User includes |
|
29 #include "MemSpyEngineHelperSysMemTrackerEntries.h" |
|
30 #include <memspy/engine/memspyenginehelpersysmemtrackercyclechange.h> |
|
31 |
|
32 // Classes referenced |
|
33 class CMemSpyEngine; |
|
34 class CMemSpyThread; |
|
35 class CMemSpyProcess; |
|
36 class CMemSpyEngineHelperSysMemTrackerImp; |
|
37 class CMemSpyEngineHelperSysMemTrackerCycle; |
|
38 class TMemSpyEngineHelperSysMemTrackerConfig; |
|
39 |
|
40 |
|
41 |
|
42 class CMemSpyEngineHelperSysMemTrackerGlobalData : public CMemSpyEngineHelperSysMemTrackerEntry |
|
43 { |
|
44 public: |
|
45 static CMemSpyEngineHelperSysMemTrackerGlobalData* NewLC( CMemSpyEngineHelperSysMemTrackerImp& aTracker, CMemSpyProcess& aProcess, const TMemSpyDriverChunkInfo& aChunkInfo ); |
|
46 ~CMemSpyEngineHelperSysMemTrackerGlobalData(); |
|
47 |
|
48 private: |
|
49 CMemSpyEngineHelperSysMemTrackerGlobalData( CMemSpyEngineHelperSysMemTrackerImp& aTracker ); |
|
50 void ConstructL( CMemSpyProcess& aProcess, const TMemSpyDriverChunkInfo& aChunkInfo ); |
|
51 |
|
52 public: // From CMemSpyEngineHelperSysMemTrackerEntry |
|
53 void UpdateFromL( const CMemSpyEngineHelperSysMemTrackerEntry& aEntry ); |
|
54 void CreateChangeDescriptorL( CMemSpyEngineHelperSysMemTrackerCycle& aCycle ); |
|
55 void UpdateCycleStatistics( CMemSpyEngineHelperSysMemTrackerCycle& aInfo ); |
|
56 TBool HasChangedL( const TMemSpyEngineHelperSysMemTrackerConfig& aConfig ) const; |
|
57 |
|
58 private: // Internal methods |
|
59 TBool IsProcessGlobalData() const; |
|
60 TInt CurrentGlobalDataSize() const; |
|
61 |
|
62 private: // Data members |
|
63 TMemSpyDriverChunkInfoWithoutName iCurrent; |
|
64 TMemSpyDriverChunkInfoWithoutName* iLast; |
|
65 HBufC* iChunkName; |
|
66 }; |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 /** |
|
75 * Change descriptor associated with global data-related changes |
|
76 */ |
|
77 NONSHARABLE_CLASS( CMemSpyEngineHelperSysMemTrackerCycleChangeGlobalData ) : public CMemSpyEngineHelperSysMemTrackerCycleChange |
|
78 { |
|
79 public: |
|
80 static CMemSpyEngineHelperSysMemTrackerCycleChangeGlobalData* NewLC( TUint8 aAttribs, const TDesC& aChunkName, const TMemSpyDriverChunkInfoWithoutName& aCurrent, const TMemSpyDriverChunkInfoWithoutName* aLast ); |
|
81 ~CMemSpyEngineHelperSysMemTrackerCycleChangeGlobalData(); |
|
82 |
|
83 private: |
|
84 CMemSpyEngineHelperSysMemTrackerCycleChangeGlobalData( TUint8 aAttribs, const TMemSpyDriverChunkInfoWithoutName& aCurrent ); |
|
85 void ConstructL( const TDesC& aChunkName, const TMemSpyDriverChunkInfoWithoutName* aLast ); |
|
86 |
|
87 public: // From CMemSpyEngineHelperSysMemTrackerCycleChange |
|
88 TMemSpyEngineSysMemTrackerType Type() const; |
|
89 void OutputHeaderL( CMemSpyEngineOutputSink& aSink, CMemSpyEngineHelperSysMemTrackerCycle& aCycle ); |
|
90 void OutputContentL( CMemSpyEngineOutputSink& aSink, CMemSpyEngineHelperSysMemTrackerCycle& aCycle ); |
|
91 void OutputDataL( CMemSpyEngineOutputSink& aSink, CMemSpyEngineHelperSysMemTrackerCycle& aCycle ); |
|
92 |
|
93 private: // Data members |
|
94 HBufC* iChunkName; |
|
95 TMemSpyDriverChunkInfoWithoutName iCurrent; |
|
96 TMemSpyDriverChunkInfoWithoutName* iLast; |
|
97 }; |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 #endif |