0
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// e32test\defrag\d_pagemove.h
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#if !defined(__D_PAGEMOVE_H__)
|
|
19 |
#define __D_PAGEMOVE_H__
|
|
20 |
#include <e32cmn.h>
|
|
21 |
#ifndef __KERNEL_MODE__
|
|
22 |
#include <e32std.h>
|
|
23 |
#endif
|
|
24 |
|
|
25 |
|
|
26 |
class TCapsPageMoveV01
|
|
27 |
{
|
|
28 |
public:
|
|
29 |
TVersion iVersion;
|
|
30 |
};
|
|
31 |
|
|
32 |
class RPageMove : public RBusLogicalChannel
|
|
33 |
{
|
|
34 |
public:
|
|
35 |
enum TControl
|
|
36 |
{
|
|
37 |
EControlTryMovingKHeap,
|
|
38 |
EControlTryMovingKStack,
|
|
39 |
EControlTryMovingUserPage,
|
|
40 |
EControlTryMovingKCode,
|
|
41 |
EControlTryMovingLocale,
|
|
42 |
EControlPerfMovingKData,
|
|
43 |
EControlGetPhysAddr,
|
|
44 |
EControlTryMovingPhysAddr,
|
|
45 |
EControlTryMovingPageTable,
|
|
46 |
EControlTryMovingPageTableInfo,
|
|
47 |
EControlNumberOfCpus,
|
|
48 |
};
|
|
49 |
|
|
50 |
public:
|
|
51 |
inline TInt Open();
|
|
52 |
inline TInt TryMovingKHeap();
|
|
53 |
inline TInt TryMovingKStack();
|
|
54 |
inline TInt TryMovingUserPage(TAny* aAddr, TBool aEchoOff=EFalse);
|
|
55 |
inline TInt TryMovingKCode();
|
|
56 |
inline TInt TryMovingLocaleDll(TAny *aAddr);
|
|
57 |
inline TInt TestKernelDataMovePerformance(void);
|
|
58 |
inline TInt GetPhysAddr(TAny* aLinAddr, TAny* aPhysAddr);
|
|
59 |
inline TInt TryMovingPhysAddr(TAny* aPhysAddr, TAny* aNewPhysAddr);
|
|
60 |
inline TInt TryMovingPageTable(TAny* aAddr);
|
|
61 |
inline TInt TryMovingPageTableInfo(TAny* aAddr);
|
|
62 |
inline TUint NumberOfCpus();
|
|
63 |
};
|
|
64 |
|
|
65 |
|
|
66 |
#ifndef __KERNEL_MODE__
|
|
67 |
inline TInt RPageMove::Open()
|
|
68 |
{
|
|
69 |
return DoCreate(_L("PageMove"),TVersion(0,1,1),KNullUnit,NULL,NULL);
|
|
70 |
}
|
|
71 |
|
|
72 |
inline TInt RPageMove::TryMovingKHeap()
|
|
73 |
{ return DoControl(EControlTryMovingKHeap); }
|
|
74 |
|
|
75 |
inline TInt RPageMove::TryMovingKStack()
|
|
76 |
{ return DoControl(EControlTryMovingKStack); }
|
|
77 |
|
|
78 |
inline TInt RPageMove::TryMovingUserPage(TAny* aAddr, TBool aEchoOff)
|
|
79 |
{ return DoControl(EControlTryMovingUserPage, aAddr, (TAny*)aEchoOff); }
|
|
80 |
|
|
81 |
inline TInt RPageMove::TryMovingKCode()
|
|
82 |
{ return DoControl(EControlTryMovingKCode); }
|
|
83 |
|
|
84 |
inline TInt RPageMove::TryMovingLocaleDll(TAny* aAddr)
|
|
85 |
{ return DoControl(EControlTryMovingLocale, aAddr, (TAny*)EFalse); }
|
|
86 |
|
|
87 |
inline TInt RPageMove::TestKernelDataMovePerformance(void)
|
|
88 |
{ return DoControl(EControlPerfMovingKData); }
|
|
89 |
|
|
90 |
inline TInt RPageMove::GetPhysAddr(TAny* aLinAddr, TAny* aPhysAddr)
|
|
91 |
{ return DoControl(EControlGetPhysAddr, aLinAddr, aPhysAddr); }
|
|
92 |
|
|
93 |
inline TInt RPageMove::TryMovingPhysAddr(TAny* aPhysAddr, TAny* aNewPhysAddr)
|
|
94 |
{ return DoControl(EControlTryMovingPhysAddr, aPhysAddr, aNewPhysAddr); }
|
|
95 |
|
|
96 |
inline TInt RPageMove::TryMovingPageTable(TAny* aLinAddr)
|
|
97 |
{ return DoControl(EControlTryMovingPageTable, aLinAddr); }
|
|
98 |
|
|
99 |
inline TInt RPageMove::TryMovingPageTableInfo(TAny* aLinAddr)
|
|
100 |
{ return DoControl(EControlTryMovingPageTableInfo, aLinAddr); }
|
|
101 |
|
|
102 |
inline TUint RPageMove::NumberOfCpus()
|
|
103 |
{ return DoControl(EControlNumberOfCpus);}
|
|
104 |
#endif
|
|
105 |
|
|
106 |
#endif
|