author | hgs |
Thu, 24 Jun 2010 14:55:55 +0300 | |
changeset 31 | e7a04a6385be |
parent 26 | 41ebde60981f |
permissions | -rw-r--r-- |
17
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
#ifndef MEMSPYUIUTILS_H |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#define MEMSPYUIUTILS_H |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
|
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
// System includes |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#include <e32std.h> |
31 | 23 |
#include <e32const.h> |
17
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
|
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
// Engine includes |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
#include <memspy/engine/memspyengineutils.h> |
26 | 27 |
#include <memspy/engine/memspyengineobjectthreadinfoobjects.h> |
17
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
|
31 | 29 |
typedef TBuf<20> TMemSpySizeText; |
30 |
||
26 | 31 |
_LIT( KTab, "\t" ); |
31 | 32 |
|
33 |
//ThreadInfoItemList view types |
|
26 | 34 |
_LIT( KTypeUnknown, "Unknown Type" ); |
35 |
_LIT( KGeneral, "General" ); |
|
36 |
_LIT( KHeap, "Heap" ); |
|
37 |
_LIT( KStack, "Stack" ); |
|
38 |
_LIT( KChunks, "Chunks" ); |
|
39 |
_LIT( KCodeSegs, "Code Segments" ); |
|
40 |
_LIT( KOpenFiles, "Open Files" ); |
|
41 |
_LIT( KActiveObjects, "Active Objects" ); |
|
42 |
_LIT( KThreadHandlers, "Handlers to other Threads" ); |
|
43 |
_LIT( KProcessHandlers, "Handlers to other Processes" ); |
|
44 |
_LIT( KServers, "Servers running in Thread" ); |
|
45 |
_LIT( KConnections, "Client <> Server Connections" ); |
|
46 |
_LIT( KSemaphores, "Semaphores" ); |
|
47 |
_LIT( KThreadReferences, "References in Thread" ); |
|
48 |
_LIT( KProcessReferences, "References in Process" ); |
|
49 |
_LIT( KMutexes, "Mutexes" ); |
|
50 |
_LIT( KTimers, "Timers" ); |
|
51 |
_LIT( KDD, "Logical DD Channels" ); |
|
52 |
_LIT( KChangeNotif, "Change Notifiers" ); |
|
53 |
_LIT( KUndertakers, "Undertakers" ); |
|
54 |
_LIT( KLogicalDrivers, "Logical Device Drivers" ); |
|
55 |
_LIT( KPhysicalDrivers, "Physical Device Drivers" ); |
|
17
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
|
31 | 57 |
//Kernel Object types |
58 |
_LIT( KTypeThread, "Thread" ); |
|
59 |
_LIT( KTypeProcess, "Process" ); |
|
60 |
_LIT( KTypeChunk, "Chunk" ); |
|
61 |
_LIT( KTypeLibrary, "Library" ); |
|
62 |
_LIT( KTypeSemaphore, "Semaphore" ); |
|
63 |
_LIT( KTypeMutex, "Mutex" ); |
|
64 |
_LIT( KTypeTimer, "Timer" ); |
|
65 |
_LIT( KTypeServer, "Server" ); |
|
66 |
_LIT( KTypeSession, "Session" ); |
|
67 |
_LIT( KTypeLogicalDevice, "Logical Device" ); |
|
68 |
_LIT( KTypePhysicalDevice, "Physical Device" ); |
|
69 |
_LIT( KTypeLogicalChannel, "Logical Channel" ); |
|
70 |
_LIT( KTypeChangeNotifier, "Change Notifier" ); |
|
71 |
_LIT( KTypeUndertaker, "Undertaker" ); |
|
72 |
_LIT( KTypeMsgQueue, "Msg. Queue" ); |
|
73 |
_LIT( KTypePropertyRef, "Property Ref." ); |
|
74 |
_LIT( KTypeCondVar, "Conditional Var." ); |
|
75 |
||
76 |
||
17
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
class MemSpyUiUtils : public MemSpyEngineUtils |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
{ |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
public: |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
static void Format( TDes& aBuf, TInt aResourceId, ...); |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
static void GetErrorText( TDes& aBuf, TInt aError ); |
26 | 82 |
static HBufC* FormatItem( const TDesC& aCaption ); |
83 |
static TDesC& ThreadInfoItemNameByType( TMemSpyThreadInfoItemType aType ); |
|
31 | 84 |
static void AppendPriority( TDes& aDes, TProcessPriority aPriority ); |
85 |
static void AppendExitInfo( TDes& aDes, TExitType aType, TInt aExitReason, const TDesC& aExitCategory ); |
|
86 |
static void AppendExitType( TDes& aDes, TExitType aType ); |
|
87 |
||
88 |
//for Kernel Objects |
|
89 |
static TPtrC TypeAsString( TMemSpyDriverContainerType aType ); |
|
90 |
static TMemSpySizeText FormatSizeText( const TInt64& aValue, TInt aDecimalPlaces, TBool aExtraRounding = EFalse ); |
|
17
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
}; |
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
|
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
|
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
|
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
|
4f2773374eff
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
#endif |