author | hgs |
Fri, 23 Apr 2010 22:08:41 +0100 | |
changeset 121 | 661475905584 |
parent 36 | 538db54a451d |
permissions | -rw-r--r-- |
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 |
||
36
538db54a451d
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
26 |
_LIT(KPageMoveLddName,"d_pagemove"); |
538db54a451d
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
27 |
|
0 | 28 |
class TCapsPageMoveV01 |
29 |
{ |
|
30 |
public: |
|
31 |
TVersion iVersion; |
|
32 |
}; |
|
33 |
||
34 |
class RPageMove : public RBusLogicalChannel |
|
35 |
{ |
|
36 |
public: |
|
37 |
enum TControl |
|
38 |
{ |
|
39 |
EControlTryMovingKHeap, |
|
40 |
EControlTryMovingKStack, |
|
41 |
EControlTryMovingUserPage, |
|
42 |
EControlTryMovingKCode, |
|
43 |
EControlTryMovingLocale, |
|
44 |
EControlPerfMovingKData, |
|
45 |
EControlGetPhysAddr, |
|
46 |
EControlTryMovingPhysAddr, |
|
47 |
EControlTryMovingPageTable, |
|
48 |
EControlTryMovingPageTableInfo, |
|
49 |
EControlNumberOfCpus, |
|
50 |
}; |
|
51 |
||
52 |
public: |
|
53 |
inline TInt Open(); |
|
54 |
inline TInt TryMovingKHeap(); |
|
55 |
inline TInt TryMovingKStack(); |
|
56 |
inline TInt TryMovingUserPage(TAny* aAddr, TBool aEchoOff=EFalse); |
|
57 |
inline TInt TryMovingKCode(); |
|
58 |
inline TInt TryMovingLocaleDll(TAny *aAddr); |
|
59 |
inline TInt TestKernelDataMovePerformance(void); |
|
60 |
inline TInt GetPhysAddr(TAny* aLinAddr, TAny* aPhysAddr); |
|
61 |
inline TInt TryMovingPhysAddr(TAny* aPhysAddr, TAny* aNewPhysAddr); |
|
62 |
inline TInt TryMovingPageTable(TAny* aAddr); |
|
63 |
inline TInt TryMovingPageTableInfo(TAny* aAddr); |
|
64 |
inline TUint NumberOfCpus(); |
|
65 |
}; |
|
66 |
||
67 |
||
68 |
#ifndef __KERNEL_MODE__ |
|
69 |
inline TInt RPageMove::Open() |
|
70 |
{ |
|
36
538db54a451d
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
71 |
TInt r=User::LoadLogicalDevice(KPageMoveLddName); |
538db54a451d
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
72 |
if(r==KErrNone || r==KErrAlreadyExists) |
538db54a451d
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
73 |
r=DoCreate(KPageMoveLddName,TVersion(0,1,1),KNullUnit,NULL,NULL); |
538db54a451d
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
74 |
return r; |
0 | 75 |
} |
76 |
||
77 |
inline TInt RPageMove::TryMovingKHeap() |
|
78 |
{ return DoControl(EControlTryMovingKHeap); } |
|
79 |
||
80 |
inline TInt RPageMove::TryMovingKStack() |
|
81 |
{ return DoControl(EControlTryMovingKStack); } |
|
82 |
||
83 |
inline TInt RPageMove::TryMovingUserPage(TAny* aAddr, TBool aEchoOff) |
|
84 |
{ return DoControl(EControlTryMovingUserPage, aAddr, (TAny*)aEchoOff); } |
|
85 |
||
86 |
inline TInt RPageMove::TryMovingKCode() |
|
87 |
{ return DoControl(EControlTryMovingKCode); } |
|
88 |
||
89 |
inline TInt RPageMove::TryMovingLocaleDll(TAny* aAddr) |
|
90 |
{ return DoControl(EControlTryMovingLocale, aAddr, (TAny*)EFalse); } |
|
91 |
||
92 |
inline TInt RPageMove::TestKernelDataMovePerformance(void) |
|
93 |
{ return DoControl(EControlPerfMovingKData); } |
|
94 |
||
95 |
inline TInt RPageMove::GetPhysAddr(TAny* aLinAddr, TAny* aPhysAddr) |
|
96 |
{ return DoControl(EControlGetPhysAddr, aLinAddr, aPhysAddr); } |
|
97 |
||
98 |
inline TInt RPageMove::TryMovingPhysAddr(TAny* aPhysAddr, TAny* aNewPhysAddr) |
|
99 |
{ return DoControl(EControlTryMovingPhysAddr, aPhysAddr, aNewPhysAddr); } |
|
100 |
||
101 |
inline TInt RPageMove::TryMovingPageTable(TAny* aLinAddr) |
|
102 |
{ return DoControl(EControlTryMovingPageTable, aLinAddr); } |
|
103 |
||
104 |
inline TInt RPageMove::TryMovingPageTableInfo(TAny* aLinAddr) |
|
105 |
{ return DoControl(EControlTryMovingPageTableInfo, aLinAddr); } |
|
106 |
||
107 |
inline TUint RPageMove::NumberOfCpus() |
|
108 |
{ return DoControl(EControlNumberOfCpus);} |
|
109 |
#endif |
|
110 |
||
111 |
#endif |