| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ProcessDescriptor.h
Go to the documentation of this file.
1 // $Id: ProcessDescriptor.h,v 1.3 2006/12/10 20:29:18 leggett Exp $
2 #ifndef GAUDIKERNEL_PROCESS_H
3 #define GAUDIKERNEL_PROCESS_H
4
5 // Framework include files
6 #include "GaudiKernel/Kernel.h"
7 #include "GaudiKernel/SystemBase.h"
8
9 namespace System {
10 // Forward declarations
11 class ProcessDescriptor;
13 ProcessDescriptor* getProcess();
14
18 typedef struct _PEB *PPEB;
19 struct PROCESS_BASIC_INFORMATION {
20 long ExitStatus;
21 PPEB PebBaseAddress;
22 unsigned long AffinityMask;
23 long BasePriority;
24 unsigned long UniqueProcessId;
25 unsigned long InheritedFromUniqueProcessId;
26 };
27
33 struct QUOTA_LIMITS {
34 unsigned long PagedPoolLimit;
35 unsigned long NonPagedPoolLimit;
36 unsigned long MinimumWorkingSetSize;
37 unsigned long MaximumWorkingSetSize;
38 unsigned long PagefileLimit;
39 longlong TimeLimit;
40 };
41
45 struct IO_COUNTERS {
46 unsigned long ReadOperationCount;
47 unsigned long WriteOperationCount;
48 unsigned long OtherOperationCount;
49 // longlong ReadOperationCount;
50 // longlong WriteOperationCount;
51 // longlong OtherOperationCount;
52 longlong ReadTransferCount;
53 longlong WriteTransferCount;
54 longlong OtherTransferCount;
55 };
56
60 struct VM_COUNTERS {
61 unsigned long PeakVirtualSize;
62 unsigned long VirtualSize;
63 unsigned long PageFaultCount;
64 unsigned long PeakWorkingSetSize;
65 unsigned long WorkingSetSize;
66 unsigned long QuotaPeakPagedPoolUsage;
67 unsigned long QuotaPagedPoolUsage;
68 unsigned long QuotaPeakNonPagedPoolUsage;
69 unsigned long QuotaNonPagedPoolUsage;
70 unsigned long PagefileUsage;
71 unsigned long PeakPagefileUsage;
72 };
73
74
78 struct POOLED_USAGE_AND_LIMITS {
79 unsigned long PeakPagedPoolUsage;
80 unsigned long PagedPoolUsage;
81 unsigned long PagedPoolLimit;
82 unsigned long PeakNonPagedPoolUsage;
83 unsigned long NonPagedPoolUsage;
84 unsigned long NonPagedPoolLimit;
85 unsigned long PeakPagefileUsage;
86 unsigned long PagefileUsage;
87 unsigned long PagefileLimit;
88 };
89
94 struct KERNEL_USER_TIMES {
95 longlong CreateTime;
96 longlong ExitTime;
97 longlong KernelTime;
98 longlong UserTime;
99 //longlong EllapsedTime; // Added by M.Frank
100 };
101
110 class ProcessDescriptor {
111 class ProcessHandle {
112 void* m_handle;
113 bool m_needRelease;
114 public:
115 ProcessHandle(long pid);
116 virtual ~ProcessHandle();
117 long item() {
118 return m_needRelease ? 1 : 0;
119 }
120 void* handle() {
121 return m_handle;
122 }
123 };
124 long m_PRIORITYBOOST[2];
125 IO_COUNTERS m_IO_COUNTERS[2];
126 VM_COUNTERS m_VM_COUNTERS[2];
127 KERNEL_USER_TIMES m_KERNEL_USER_TIMES[2];
128 POOLED_USAGE_AND_LIMITS m_POOLED_USAGE_AND_LIMITS[2];
129 QUOTA_LIMITS m_QUOTA_LIMITS[2];
130 PROCESS_BASIC_INFORMATION m_PROCESS_BASIC_INFORMATION[2];
131 public:
132 ProcessDescriptor();
133 virtual ~ProcessDescriptor();
134 long query(long pid, InfoType info, PROCESS_BASIC_INFORMATION* buffer);
135 long query(long pid, InfoType info, POOLED_USAGE_AND_LIMITS* buffer);
136 long query(long pid, InfoType info, KERNEL_USER_TIMES* buffer);
137 long query(long pid, InfoType info, QUOTA_LIMITS* buffer);
138 long query(long pid, InfoType info, VM_COUNTERS* buffer);
139 long query(long pid, InfoType info, IO_COUNTERS* buffer);
140 long query(long pid, InfoType info, long* buffer);
141 };
142 }
143 #endif //GAUDIKERNEL_PROCESS_H