Fix bug 9900: is_printer_published GUID retrieval
[Samba/gebeck_regimport.git] / source3 / include / smbprofile.h
blob79410e597f742b7840a2ae3281b2c0f5e45591c5
1 #ifndef _PROFILE_H_
2 #define _PROFILE_H_
3 /*
4 Unix SMB/CIFS implementation.
5 store smbd profiling information in shared memory
6 Copyright (C) Andrew Tridgell 1999
7 Copyright (C) James Peach 2006
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 /* this file defines the profile structure in the profile shared
25 memory area */
27 #define PROF_SHMEM_KEY ((key_t)0x07021999)
28 #define PROF_SHM_MAGIC 0x6349985
29 #define PROF_SHM_VERSION 13
31 /* time values in the following structure are in microseconds */
33 #define __profile_stats_value(which, domain) domain[which]
35 enum profile_stats_values
37 PR_VALUE_SMBD_IDLE = 0,
38 #define smbd_idle_count __profile_stats_value(PR_VALUE_SMBD_IDLE, count)
39 #define smbd_idle_time __profile_stats_value(PR_VALUE_SMBD_IDLE, time)
41 /* system call counters */
42 PR_VALUE_SYSCALL_OPENDIR,
43 #define syscall_opendir_count __profile_stats_value(PR_VALUE_SYSCALL_OPENDIR, count)
44 #define syscall_opendir_time __profile_stats_value(PR_VALUE_SYSCALL_OPENDIR, time)
46 PR_VALUE_SYSCALL_FDOPENDIR,
47 #define syscall_fdopendir_count __profile_stats_value(PR_VALUE_SYSCALL_FDOPENDIR, count)
48 #define syscall_fdopendir_time __profile_stats_value(PR_VALUE_SYSCALL_FDOPENDIR, time)
50 PR_VALUE_SYSCALL_READDIR,
51 #define syscall_readdir_count __profile_stats_value(PR_VALUE_SYSCALL_READDIR, count)
52 #define syscall_readdir_time __profile_stats_value(PR_VALUE_SYSCALL_READDIR, time)
54 PR_VALUE_SYSCALL_SEEKDIR,
55 #define syscall_seekdir_count __profile_stats_value(PR_VALUE_SYSCALL_SEEKDIR, count)
56 #define syscall_seekdir_time __profile_stats_value(PR_VALUE_SYSCALL_SEEKDIR, time)
58 PR_VALUE_SYSCALL_TELLDIR,
59 #define syscall_telldir_count __profile_stats_value(PR_VALUE_SYSCALL_TELLDIR, count)
60 #define syscall_telldir_time __profile_stats_value(PR_VALUE_SYSCALL_TELLDIR, time)
62 PR_VALUE_SYSCALL_REWINDDIR,
63 #define syscall_rewinddir_count __profile_stats_value(PR_VALUE_SYSCALL_REWINDDIR, count)
64 #define syscall_rewinddir_time __profile_stats_value(PR_VALUE_SYSCALL_REWINDDIR, time)
66 PR_VALUE_SYSCALL_MKDIR,
67 #define syscall_mkdir_count __profile_stats_value(PR_VALUE_SYSCALL_MKDIR, count)
68 #define syscall_mkdir_time __profile_stats_value(PR_VALUE_SYSCALL_MKDIR, time)
70 PR_VALUE_SYSCALL_RMDIR,
71 #define syscall_rmdir_count __profile_stats_value(PR_VALUE_SYSCALL_RMDIR, count)
72 #define syscall_rmdir_time __profile_stats_value(PR_VALUE_SYSCALL_RMDIR, time)
74 PR_VALUE_SYSCALL_CLOSEDIR,
75 #define syscall_closedir_count __profile_stats_value(PR_VALUE_SYSCALL_CLOSEDIR, count)
76 #define syscall_closedir_time __profile_stats_value(PR_VALUE_SYSCALL_CLOSEDIR, time)
78 PR_VALUE_SYSCALL_OPEN,
79 #define syscall_open_count __profile_stats_value(PR_VALUE_SYSCALL_OPEN, count)
80 #define syscall_open_time __profile_stats_value(PR_VALUE_SYSCALL_OPEN, time)
82 PR_VALUE_SYSCALL_CREATEFILE,
83 #define syscall_createfile_count __profile_stats_value(PR_VALUE_SYSCALL_CREATEFILE, count)
84 #define syscall_createfile_time __profile_stats_value(PR_VALUE_SYSCALL_CREATEFILE, time)
86 PR_VALUE_SYSCALL_CLOSE,
87 #define syscall_close_count __profile_stats_value(PR_VALUE_SYSCALL_CLOSE, count)
88 #define syscall_close_time __profile_stats_value(PR_VALUE_SYSCALL_CLOSE, time)
90 PR_VALUE_SYSCALL_READ,
91 #define syscall_read_count __profile_stats_value(PR_VALUE_SYSCALL_READ, count)
92 #define syscall_read_time __profile_stats_value(PR_VALUE_SYSCALL_READ, time)
94 PR_VALUE_SYSCALL_PREAD,
95 #define syscall_pread_count __profile_stats_value(PR_VALUE_SYSCALL_PREAD, count)
96 #define syscall_pread_time __profile_stats_value(PR_VALUE_SYSCALL_PREAD, time)
98 PR_VALUE_SYSCALL_WRITE,
99 #define syscall_write_count __profile_stats_value(PR_VALUE_SYSCALL_WRITE, count)
100 #define syscall_write_time __profile_stats_value(PR_VALUE_SYSCALL_WRITE, time)
102 PR_VALUE_SYSCALL_PWRITE,
103 #define syscall_pwrite_count __profile_stats_value(PR_VALUE_SYSCALL_PWRITE, count)
104 #define syscall_pwrite_time __profile_stats_value(PR_VALUE_SYSCALL_PWRITE, time)
106 PR_VALUE_SYSCALL_LSEEK,
107 #define syscall_lseek_count __profile_stats_value(PR_VALUE_SYSCALL_LSEEK, count)
108 #define syscall_lseek_time __profile_stats_value(PR_VALUE_SYSCALL_LSEEK, time)
110 PR_VALUE_SYSCALL_SENDFILE,
111 #define syscall_sendfile_count __profile_stats_value(PR_VALUE_SYSCALL_SENDFILE, count)
112 #define syscall_sendfile_time __profile_stats_value(PR_VALUE_SYSCALL_SENDFILE, time)
114 PR_VALUE_SYSCALL_RECVFILE,
115 #define syscall_recvfile_count __profile_stats_value(PR_VALUE_SYSCALL_RECVFILE, count)
116 #define syscall_recvfile_time __profile_stats_value(PR_VALUE_SYSCALL_RECVFILE, time)
118 PR_VALUE_SYSCALL_RENAME,
119 #define syscall_rename_count __profile_stats_value(PR_VALUE_SYSCALL_RENAME, count)
120 #define syscall_rename_time __profile_stats_value(PR_VALUE_SYSCALL_RENAME, time)
122 PR_VALUE_SYSCALL_RENAME_AT,
123 #define syscall_rename_at_count __profile_stats_value(PR_VALUE_SYSCALL_RENAME_AT, count)
124 #define syscall_rename_at_time __profile_stats_value(PR_VALUE_SYSCALL_RENAME_AT, time)
126 PR_VALUE_SYSCALL_FSYNC,
127 #define syscall_fsync_count __profile_stats_value(PR_VALUE_SYSCALL_FSYNC, count)
128 #define syscall_fsync_time __profile_stats_value(PR_VALUE_SYSCALL_FSYNC, time)
130 PR_VALUE_SYSCALL_STAT,
131 #define syscall_stat_count __profile_stats_value(PR_VALUE_SYSCALL_STAT, count)
132 #define syscall_stat_time __profile_stats_value(PR_VALUE_SYSCALL_STAT, time)
134 PR_VALUE_SYSCALL_FSTAT,
135 #define syscall_fstat_count __profile_stats_value(PR_VALUE_SYSCALL_FSTAT, count)
136 #define syscall_fstat_time __profile_stats_value(PR_VALUE_SYSCALL_FSTAT, time)
138 PR_VALUE_SYSCALL_LSTAT,
139 #define syscall_lstat_count __profile_stats_value(PR_VALUE_SYSCALL_LSTAT, count)
140 #define syscall_lstat_time __profile_stats_value(PR_VALUE_SYSCALL_LSTAT, time)
142 PR_VALUE_SYSCALL_GET_ALLOC_SIZE,
143 #define syscall_get_alloc_size_count __profile_stats_value(PR_VALUE_SYSCALL_GET_ALLOC_SIZE, count)
144 #define syscall_get_alloc_size_time __profile_stats_value(PR_VALUE_SYSCALL_GET_ALLOC_SIZE, time)
146 PR_VALUE_SYSCALL_UNLINK,
147 #define syscall_unlink_count __profile_stats_value(PR_VALUE_SYSCALL_UNLINK, count)
148 #define syscall_unlink_time __profile_stats_value(PR_VALUE_SYSCALL_UNLINK, time)
150 PR_VALUE_SYSCALL_CHMOD,
151 #define syscall_chmod_count __profile_stats_value(PR_VALUE_SYSCALL_CHMOD, count)
152 #define syscall_chmod_time __profile_stats_value(PR_VALUE_SYSCALL_CHMOD, time)
154 PR_VALUE_SYSCALL_FCHMOD,
155 #define syscall_fchmod_count __profile_stats_value(PR_VALUE_SYSCALL_FCHMOD, count)
156 #define syscall_fchmod_time __profile_stats_value(PR_VALUE_SYSCALL_FCHMOD, time)
158 PR_VALUE_SYSCALL_CHOWN,
159 #define syscall_chown_count __profile_stats_value(PR_VALUE_SYSCALL_CHOWN, count)
160 #define syscall_chown_time __profile_stats_value(PR_VALUE_SYSCALL_CHOWN, time)
162 PR_VALUE_SYSCALL_FCHOWN,
163 #define syscall_fchown_count __profile_stats_value(PR_VALUE_SYSCALL_FCHOWN, count)
164 #define syscall_fchown_time __profile_stats_value(PR_VALUE_SYSCALL_FCHOWN, time)
166 PR_VALUE_SYSCALL_LCHOWN,
167 #define syscall_lchown_count __profile_stats_value(PR_VALUE_SYSCALL_LCHOWN, count)
168 #define syscall_lchown_time __profile_stats_value(PR_VALUE_SYSCALL_LCHOWN, time)
170 PR_VALUE_SYSCALL_CHDIR,
171 #define syscall_chdir_count __profile_stats_value(PR_VALUE_SYSCALL_CHDIR, count)
172 #define syscall_chdir_time __profile_stats_value(PR_VALUE_SYSCALL_CHDIR, time)
174 PR_VALUE_SYSCALL_GETWD,
175 #define syscall_getwd_count __profile_stats_value(PR_VALUE_SYSCALL_GETWD, count)
176 #define syscall_getwd_time __profile_stats_value(PR_VALUE_SYSCALL_GETWD, time)
178 PR_VALUE_SYSCALL_NTIMES,
179 #define syscall_ntimes_count __profile_stats_value(PR_VALUE_SYSCALL_NTIMES, count)
180 #define syscall_ntimes_time __profile_stats_value(PR_VALUE_SYSCALL_NTIMES, time)
182 PR_VALUE_SYSCALL_FTRUNCATE,
183 #define syscall_ftruncate_count __profile_stats_value(PR_VALUE_SYSCALL_FTRUNCATE, count)
184 #define syscall_ftruncate_time __profile_stats_value(PR_VALUE_SYSCALL_FTRUNCATE, time)
186 PR_VALUE_SYSCALL_FALLOCATE,
187 #define syscall_fallocate_count __profile_stats_value(PR_VALUE_SYSCALL_FALLOCATE, count)
188 #define syscall_fallocate_time __profile_stats_value(PR_VALUE_SYSCALL_FALLOCATE, time)
190 PR_VALUE_SYSCALL_FCNTL_LOCK,
191 #define syscall_fcntl_lock_count __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_LOCK, count)
192 #define syscall_fcntl_lock_time __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_LOCK, time)
194 PR_VALUE_SYSCALL_KERNEL_FLOCK,
195 #define syscall_kernel_flock_count __profile_stats_value(PR_VALUE_SYSCALL_KERNEL_FLOCK, count)
196 #define syscall_kernel_flock_time __profile_stats_value(PR_VALUE_SYSCALL_KERNEL_FLOCK, time)
198 PR_VALUE_SYSCALL_LINUX_SETLEASE,
199 #define syscall_linux_setlease_count __profile_stats_value(PR_VALUE_SYSCALL_LINUX_SETLEASE, count)
200 #define syscall_linux_setlease_time __profile_stats_value(PR_VALUE_SYSCALL_LINUX_SETLEASE, time)
202 PR_VALUE_SYSCALL_FCNTL_GETLOCK,
203 #define syscall_fcntl_getlock_count __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_GETLOCK, count)
204 #define syscall_fcntl_getlock_time __profile_stats_value(PR_VALUE_SYSCALL_FCNTL_GETLOCK, time)
206 PR_VALUE_SYSCALL_READLINK,
207 #define syscall_readlink_count __profile_stats_value(PR_VALUE_SYSCALL_READLINK, count)
208 #define syscall_readlink_time __profile_stats_value(PR_VALUE_SYSCALL_READLINK, time)
210 PR_VALUE_SYSCALL_SYMLINK,
211 #define syscall_symlink_count __profile_stats_value(PR_VALUE_SYSCALL_SYMLINK, count)
212 #define syscall_symlink_time __profile_stats_value(PR_VALUE_SYSCALL_SYMLINK, time)
214 PR_VALUE_SYSCALL_LINK,
215 #define syscall_link_count __profile_stats_value(PR_VALUE_SYSCALL_LINK, count)
216 #define syscall_link_time __profile_stats_value(PR_VALUE_SYSCALL_LINK, time)
218 PR_VALUE_SYSCALL_MKNOD,
219 #define syscall_mknod_count __profile_stats_value(PR_VALUE_SYSCALL_MKNOD, count)
220 #define syscall_mknod_time __profile_stats_value(PR_VALUE_SYSCALL_MKNOD, time)
222 PR_VALUE_SYSCALL_REALPATH,
223 #define syscall_realpath_count __profile_stats_value(PR_VALUE_SYSCALL_REALPATH, count)
224 #define syscall_realpath_time __profile_stats_value(PR_VALUE_SYSCALL_REALPATH, time)
226 PR_VALUE_SYSCALL_GET_QUOTA,
227 #define syscall_get_quota_count __profile_stats_value(PR_VALUE_SYSCALL_GET_QUOTA, count)
228 #define syscall_get_quota_time __profile_stats_value(PR_VALUE_SYSCALL_GET_QUOTA, time)
230 PR_VALUE_SYSCALL_SET_QUOTA,
231 #define syscall_set_quota_count __profile_stats_value(PR_VALUE_SYSCALL_SET_QUOTA, count)
232 #define syscall_set_quota_time __profile_stats_value(PR_VALUE_SYSCALL_SET_QUOTA, time)
234 PR_VALUE_SYSCALL_GET_SD,
235 #define syscall_get_sd_count __profile_stats_value(PR_VALUE_SYSCALL_GET_SD, count)
236 #define syscall_get_sd_time __profile_stats_value(PR_VALUE_SYSCALL_GET_SD, time)
238 PR_VALUE_SYSCALL_SET_SD,
239 #define syscall_set_sd_count __profile_stats_value(PR_VALUE_SYSCALL_SET_SD, count)
240 #define syscall_set_sd_time __profile_stats_value(PR_VALUE_SYSCALL_SET_SD, time)
242 PR_VALUE_SYSCALL_BRL_LOCK,
243 #define syscall_brl_lock_count __profile_stats_value(PR_VALUE_SYSCALL_BRL_LOCK, count)
244 #define syscall_brl_lock_time __profile_stats_value(PR_VALUE_SYSCALL_BRL_LOCK, time)
246 PR_VALUE_SYSCALL_BRL_UNLOCK,
247 #define syscall_brl_unlock_count __profile_stats_value(PR_VALUE_SYSCALL_BRL_UNLOCK, count)
248 #define syscall_brl_unlock_time __profile_stats_value(PR_VALUE_SYSCALL_BRL_UNLOCK, time)
250 PR_VALUE_SYSCALL_BRL_CANCEL,
251 #define syscall_brl_cancel_count __profile_stats_value(PR_VALUE_SYSCALL_BRL_CANCEL, count)
252 #define syscall_brl_cancel_time __profile_stats_value(PR_VALUE_SYSCALL_BRL_CANCEL, time)
254 PR_VALUE_SYSCALL_STRICT_LOCK,
255 #define syscall_strict_lock_count __profile_stats_value(PR_VALUE_SYSCALL_STRICT_LOCK, count)
256 #define syscall_strict_lock_time __profile_stats_value(PR_VALUE_SYSCALL_STRICT_LOCK, time)
258 PR_VALUE_SYSCALL_STRICT_UNLOCK,
259 #define syscall_strict_unlock_count __profile_stats_value(PR_VALUE_SYSCALL_STRICT_UNLOCK, count)
260 #define syscall_strict_unlock_time __profile_stats_value(PR_VALUE_SYSCALL_STRICT_UNLOCK, time)
262 /* counters for individual SMB types */
263 PR_VALUE_SMBMKDIR,
264 #define SMBmkdir_count __profile_stats_value(PR_VALUE_SMBMKDIR, count)
265 #define SMBmkdir_time __profile_stats_value(PR_VALUE_SMBMKDIR, time)
267 PR_VALUE_SMBRMDIR,
268 #define SMBrmdir_count __profile_stats_value(PR_VALUE_SMBRMDIR, count)
269 #define SMBrmdir_time __profile_stats_value(PR_VALUE_SMBRMDIR, time)
271 PR_VALUE_SMBOPEN,
272 #define SMBopen_count __profile_stats_value(PR_VALUE_SMBOPEN, count)
273 #define SMBopen_time __profile_stats_value(PR_VALUE_SMBOPEN, time)
275 PR_VALUE_SMBCREATE,
276 #define SMBcreate_count __profile_stats_value(PR_VALUE_SMBCREATE, count)
277 #define SMBcreate_time __profile_stats_value(PR_VALUE_SMBCREATE, time)
279 PR_VALUE_SMBCLOSE,
280 #define SMBclose_count __profile_stats_value(PR_VALUE_SMBCLOSE, count)
281 #define SMBclose_time __profile_stats_value(PR_VALUE_SMBCLOSE, time)
283 PR_VALUE_SMBFLUSH,
284 #define SMBflush_count __profile_stats_value(PR_VALUE_SMBFLUSH, count)
285 #define SMBflush_time __profile_stats_value(PR_VALUE_SMBFLUSH, time)
287 PR_VALUE_SMBUNLINK,
288 #define SMBunlink_count __profile_stats_value(PR_VALUE_SMBUNLINK, count)
289 #define SMBunlink_time __profile_stats_value(PR_VALUE_SMBUNLINK, time)
291 PR_VALUE_SMBMV,
292 #define SMBmv_count __profile_stats_value(PR_VALUE_SMBMV, count)
293 #define SMBmv_time __profile_stats_value(PR_VALUE_SMBMV, time)
295 PR_VALUE_SMBGETATR,
296 #define SMBgetatr_count __profile_stats_value(PR_VALUE_SMBGETATR, count)
297 #define SMBgetatr_time __profile_stats_value(PR_VALUE_SMBGETATR, time)
299 PR_VALUE_SMBSETATR,
300 #define SMBsetatr_count __profile_stats_value(PR_VALUE_SMBSETATR, count)
301 #define SMBsetatr_time __profile_stats_value(PR_VALUE_SMBSETATR, time)
303 PR_VALUE_SMBREAD,
304 #define SMBread_count __profile_stats_value(PR_VALUE_SMBREAD, count)
305 #define SMBread_time __profile_stats_value(PR_VALUE_SMBREAD, time)
307 PR_VALUE_SMBWRITE,
308 #define SMBwrite_count __profile_stats_value(PR_VALUE_SMBWRITE, count)
309 #define SMBwrite_time __profile_stats_value(PR_VALUE_SMBWRITE, time)
311 PR_VALUE_SMBLOCK,
312 #define SMBlock_count __profile_stats_value(PR_VALUE_SMBLOCK, count)
313 #define SMBlock_time __profile_stats_value(PR_VALUE_SMBLOCK, time)
315 PR_VALUE_SMBUNLOCK,
316 #define SMBunlock_count __profile_stats_value(PR_VALUE_SMBUNLOCK, count)
317 #define SMBunlock_time __profile_stats_value(PR_VALUE_SMBUNLOCK, time)
319 PR_VALUE_SMBCTEMP,
320 #define SMBctemp_count __profile_stats_value(PR_VALUE_SMBCTEMP, count)
321 #define SMBctemp_time __profile_stats_value(PR_VALUE_SMBCTEMP, time)
323 /* SMBmknew stats are currently combined with SMBcreate */
324 PR_VALUE_SMBMKNEW,
325 #define SMBmknew_count __profile_stats_value(PR_VALUE_SMBMKNEW, count)
326 #define SMBmknew_time __profile_stats_value(PR_VALUE_SMBMKNEW, time)
328 PR_VALUE_SMBCHECKPATH,
329 #define SMBcheckpath_count __profile_stats_value(PR_VALUE_SMBCHECKPATH, count)
330 #define SMBcheckpath_time __profile_stats_value(PR_VALUE_SMBCHECKPATH, time)
332 PR_VALUE_SMBEXIT,
333 #define SMBexit_count __profile_stats_value(PR_VALUE_SMBEXIT, count)
334 #define SMBexit_time __profile_stats_value(PR_VALUE_SMBEXIT, time)
336 PR_VALUE_SMBLSEEK,
337 #define SMBlseek_count __profile_stats_value(PR_VALUE_SMBLSEEK, count)
338 #define SMBlseek_time __profile_stats_value(PR_VALUE_SMBLSEEK, time)
340 PR_VALUE_SMBLOCKREAD,
341 #define SMBlockread_count __profile_stats_value(PR_VALUE_SMBLOCKREAD, count)
342 #define SMBlockread_time __profile_stats_value(PR_VALUE_SMBLOCKREAD, time)
344 PR_VALUE_SMBWRITEUNLOCK,
345 #define SMBwriteunlock_count __profile_stats_value(PR_VALUE_SMBWRITEUNLOCK, count)
346 #define SMBwriteunlock_time __profile_stats_value(PR_VALUE_SMBWRITEUNLOCK, time)
348 PR_VALUE_SMBREADBRAW,
349 #define SMBreadbraw_count __profile_stats_value(PR_VALUE_SMBREADBRAW, count)
350 #define SMBreadbraw_time __profile_stats_value(PR_VALUE_SMBREADBRAW, time)
352 PR_VALUE_SMBREADBMPX,
353 #define SMBreadBmpx_count __profile_stats_value(PR_VALUE_SMBREADBMPX, count)
354 #define SMBreadBmpx_time __profile_stats_value(PR_VALUE_SMBREADBMPX, time)
356 PR_VALUE_SMBREADBS,
357 #define SMBreadBs_count __profile_stats_value(PR_VALUE_SMBREADBS, count)
358 #define SMBreadBs_time __profile_stats_value(PR_VALUE_SMBREADBS, time)
360 PR_VALUE_SMBWRITEBRAW,
361 #define SMBwritebraw_count __profile_stats_value(PR_VALUE_SMBWRITEBRAW, count)
362 #define SMBwritebraw_time __profile_stats_value(PR_VALUE_SMBWRITEBRAW, time)
364 PR_VALUE_SMBWRITEBMPX,
365 #define SMBwriteBmpx_count __profile_stats_value(PR_VALUE_SMBWRITEBMPX, count)
366 #define SMBwriteBmpx_time __profile_stats_value(PR_VALUE_SMBWRITEBMPX, time)
368 PR_VALUE_SMBWRITEBS,
369 #define SMBwriteBs_count __profile_stats_value(PR_VALUE_SMBWRITEBS, count)
370 #define SMBwriteBs_time __profile_stats_value(PR_VALUE_SMBWRITEBS, time)
372 PR_VALUE_SMBWRITEC,
373 #define SMBwritec_count __profile_stats_value(PR_VALUE_SMBWRITEC, count)
374 #define SMBwritec_time __profile_stats_value(PR_VALUE_SMBWRITEC, time)
376 PR_VALUE_SMBSETATTRE,
377 #define SMBsetattrE_count __profile_stats_value(PR_VALUE_SMBSETATTRE, count)
378 #define SMBsetattrE_time __profile_stats_value(PR_VALUE_SMBSETATTRE, time)
380 PR_VALUE_SMBGETATTRE,
381 #define SMBgetattrE_count __profile_stats_value(PR_VALUE_SMBGETATTRE, count)
382 #define SMBgetattrE_time __profile_stats_value(PR_VALUE_SMBGETATTRE, time)
384 PR_VALUE_SMBLOCKINGX,
385 #define SMBlockingX_count __profile_stats_value(PR_VALUE_SMBLOCKINGX, count)
386 #define SMBlockingX_time __profile_stats_value(PR_VALUE_SMBLOCKINGX, time)
388 PR_VALUE_SMBTRANS,
389 #define SMBtrans_count __profile_stats_value(PR_VALUE_SMBTRANS, count)
390 #define SMBtrans_time __profile_stats_value(PR_VALUE_SMBTRANS, time)
392 PR_VALUE_SMBTRANSS,
393 #define SMBtranss_count __profile_stats_value(PR_VALUE_SMBTRANSS, count)
394 #define SMBtranss_time __profile_stats_value(PR_VALUE_SMBTRANSS, time)
396 PR_VALUE_SMBIOCTL,
397 #define SMBioctl_count __profile_stats_value(PR_VALUE_SMBIOCTL, count)
398 #define SMBioctl_time __profile_stats_value(PR_VALUE_SMBIOCTL, time)
400 PR_VALUE_SMBIOCTLS,
401 #define SMBioctls_count __profile_stats_value(PR_VALUE_SMBIOCTLS, count)
402 #define SMBioctls_time __profile_stats_value(PR_VALUE_SMBIOCTLS, time)
404 PR_VALUE_SMBCOPY,
405 #define SMBcopy_count __profile_stats_value(PR_VALUE_SMBCOPY, count)
406 #define SMBcopy_time __profile_stats_value(PR_VALUE_SMBCOPY, time)
408 PR_VALUE_SMBMOVE,
409 #define SMBmove_count __profile_stats_value(PR_VALUE_SMBMOVE, count)
410 #define SMBmove_time __profile_stats_value(PR_VALUE_SMBMOVE, time)
412 PR_VALUE_SMBECHO,
413 #define SMBecho_count __profile_stats_value(PR_VALUE_SMBECHO, count)
414 #define SMBecho_time __profile_stats_value(PR_VALUE_SMBECHO, time)
416 PR_VALUE_SMBWRITECLOSE,
417 #define SMBwriteclose_count __profile_stats_value(PR_VALUE_SMBWRITECLOSE, count)
418 #define SMBwriteclose_time __profile_stats_value(PR_VALUE_SMBWRITECLOSE, time)
420 PR_VALUE_SMBOPENX,
421 #define SMBopenX_count __profile_stats_value(PR_VALUE_SMBOPENX, count)
422 #define SMBopenX_time __profile_stats_value(PR_VALUE_SMBOPENX, time)
424 PR_VALUE_SMBREADX,
425 #define SMBreadX_count __profile_stats_value(PR_VALUE_SMBREADX, count)
426 #define SMBreadX_time __profile_stats_value(PR_VALUE_SMBREADX, time)
428 PR_VALUE_SMBWRITEX,
429 #define SMBwriteX_count __profile_stats_value(PR_VALUE_SMBWRITEX, count)
430 #define SMBwriteX_time __profile_stats_value(PR_VALUE_SMBWRITEX, time)
432 PR_VALUE_SMBTRANS2,
433 #define SMBtrans2_count __profile_stats_value(PR_VALUE_SMBTRANS2, count)
434 #define SMBtrans2_time __profile_stats_value(PR_VALUE_SMBTRANS2, time)
436 PR_VALUE_SMBTRANSS2,
437 #define SMBtranss2_count __profile_stats_value(PR_VALUE_SMBTRANSS2, count)
438 #define SMBtranss2_time __profile_stats_value(PR_VALUE_SMBTRANSS2, time)
440 PR_VALUE_SMBFINDCLOSE,
441 #define SMBfindclose_count __profile_stats_value(PR_VALUE_SMBFINDCLOSE, count)
442 #define SMBfindclose_time __profile_stats_value(PR_VALUE_SMBFINDCLOSE, time)
444 PR_VALUE_SMBFINDNCLOSE,
445 #define SMBfindnclose_count __profile_stats_value(PR_VALUE_SMBFINDNCLOSE, count)
446 #define SMBfindnclose_time __profile_stats_value(PR_VALUE_SMBFINDNCLOSE, time)
448 PR_VALUE_SMBTCON,
449 #define SMBtcon_count __profile_stats_value(PR_VALUE_SMBTCON, count)
450 #define SMBtcon_time __profile_stats_value(PR_VALUE_SMBTCON, time)
452 PR_VALUE_SMBTDIS,
453 #define SMBtdis_count __profile_stats_value(PR_VALUE_SMBTDIS, count)
454 #define SMBtdis_time __profile_stats_value(PR_VALUE_SMBTDIS, time)
456 PR_VALUE_SMBNEGPROT,
457 #define SMBnegprot_count __profile_stats_value(PR_VALUE_SMBNEGPROT, count)
458 #define SMBnegprot_time __profile_stats_value(PR_VALUE_SMBNEGPROT, time)
460 PR_VALUE_SMBSESSSETUPX,
461 #define SMBsesssetupX_count __profile_stats_value(PR_VALUE_SMBSESSSETUPX, count)
462 #define SMBsesssetupX_time __profile_stats_value(PR_VALUE_SMBSESSSETUPX, time)
464 PR_VALUE_SMBULOGOFFX,
465 #define SMBulogoffX_count __profile_stats_value(PR_VALUE_SMBULOGOFFX, count)
466 #define SMBulogoffX_time __profile_stats_value(PR_VALUE_SMBULOGOFFX, time)
468 PR_VALUE_SMBTCONX,
469 #define SMBtconX_count __profile_stats_value(PR_VALUE_SMBTCONX, count)
470 #define SMBtconX_time __profile_stats_value(PR_VALUE_SMBTCONX, time)
472 PR_VALUE_SMBDSKATTR,
473 #define SMBdskattr_count __profile_stats_value(PR_VALUE_SMBDSKATTR, count)
474 #define SMBdskattr_time __profile_stats_value(PR_VALUE_SMBDSKATTR, time)
476 PR_VALUE_SMBSEARCH,
477 #define SMBsearch_count __profile_stats_value(PR_VALUE_SMBSEARCH, count)
478 #define SMBsearch_time __profile_stats_value(PR_VALUE_SMBSEARCH, time)
480 /* SBMffirst stats combined with SMBsearch */
481 PR_VALUE_SMBFFIRST,
482 #define SMBffirst_count __profile_stats_value(PR_VALUE_SMBFFIRST, count)
483 #define SMBffirst_time __profile_stats_value(PR_VALUE_SMBFFIRST, time)
485 /* SBMfunique stats combined with SMBsearch */
486 PR_VALUE_SMBFUNIQUE,
487 #define SMBfunique_count __profile_stats_value(PR_VALUE_SMBFUNIQUE, count)
488 #define SMBfunique_time __profile_stats_value(PR_VALUE_SMBFUNIQUE, time)
490 PR_VALUE_SMBFCLOSE,
491 #define SMBfclose_count __profile_stats_value(PR_VALUE_SMBFCLOSE, count)
492 #define SMBfclose_time __profile_stats_value(PR_VALUE_SMBFCLOSE, time)
494 PR_VALUE_SMBNTTRANS,
495 #define SMBnttrans_count __profile_stats_value(PR_VALUE_SMBNTTRANS, count)
496 #define SMBnttrans_time __profile_stats_value(PR_VALUE_SMBNTTRANS, time)
498 PR_VALUE_SMBNTTRANSS,
499 #define SMBnttranss_count __profile_stats_value(PR_VALUE_SMBNTTRANSS, count)
500 #define SMBnttranss_time __profile_stats_value(PR_VALUE_SMBNTTRANSS, time)
502 PR_VALUE_SMBNTCREATEX,
503 #define SMBntcreateX_count __profile_stats_value(PR_VALUE_SMBNTCREATEX, count)
504 #define SMBntcreateX_time __profile_stats_value(PR_VALUE_SMBNTCREATEX, time)
506 PR_VALUE_SMBNTCANCEL,
507 #define SMBntcancel_count __profile_stats_value(PR_VALUE_SMBNTCANCEL, count)
508 #define SMBntcancel_time __profile_stats_value(PR_VALUE_SMBNTCANCEL, time)
510 PR_VALUE_SMBNTRENAME,
511 #define SMBntrename_count __profile_stats_value(PR_VALUE_SMBNTRENAME, count)
512 #define SMBntrename_time __profile_stats_value(PR_VALUE_SMBNTRENAME, time)
514 PR_VALUE_SMBSPLOPEN,
515 #define SMBsplopen_count __profile_stats_value(PR_VALUE_SMBSPLOPEN, count)
516 #define SMBsplopen_time __profile_stats_value(PR_VALUE_SMBSPLOPEN, time)
518 PR_VALUE_SMBSPLWR,
519 #define SMBsplwr_count __profile_stats_value(PR_VALUE_SMBSPLWR, count)
520 #define SMBsplwr_time __profile_stats_value(PR_VALUE_SMBSPLWR, time)
522 PR_VALUE_SMBSPLCLOSE,
523 #define SMBsplclose_count __profile_stats_value(PR_VALUE_SMBSPLCLOSE, count)
524 #define SMBsplclose_time __profile_stats_value(PR_VALUE_SMBSPLCLOSE, time)
526 PR_VALUE_SMBSPLRETQ,
527 #define SMBsplretq_count __profile_stats_value(PR_VALUE_SMBSPLRETQ, count)
528 #define SMBsplretq_time __profile_stats_value(PR_VALUE_SMBSPLRETQ, time)
530 PR_VALUE_SMBSENDS,
531 #define SMBsends_count __profile_stats_value(PR_VALUE_SMBSENDS, count)
532 #define SMBsends_time __profile_stats_value(PR_VALUE_SMBSENDS, time)
534 PR_VALUE_SMBSENDB,
535 #define SMBsendb_count __profile_stats_value(PR_VALUE_SMBSENDB, count)
536 #define SMBsendb_time __profile_stats_value(PR_VALUE_SMBSENDB, time)
538 PR_VALUE_SMBFWDNAME,
539 #define SMBfwdname_count __profile_stats_value(PR_VALUE_SMBFWDNAME, count)
540 #define SMBfwdname_time __profile_stats_value(PR_VALUE_SMBFWDNAME, time)
542 PR_VALUE_SMBCANCELF,
543 #define SMBcancelf_count __profile_stats_value(PR_VALUE_SMBCANCELF, count)
544 #define SMBcancelf_time __profile_stats_value(PR_VALUE_SMBCANCELF, time)
546 PR_VALUE_SMBGETMAC,
547 #define SMBgetmac_count __profile_stats_value(PR_VALUE_SMBGETMAC, count)
548 #define SMBgetmac_time __profile_stats_value(PR_VALUE_SMBGETMAC, time)
550 PR_VALUE_SMBSENDSTRT,
551 #define SMBsendstrt_count __profile_stats_value(PR_VALUE_SMBSENDSTRT, count)
552 #define SMBsendstrt_time __profile_stats_value(PR_VALUE_SMBSENDSTRT, time)
554 PR_VALUE_SMBSENDEND,
555 #define SMBsendend_count __profile_stats_value(PR_VALUE_SMBSENDEND, count)
556 #define SMBsendend_time __profile_stats_value(PR_VALUE_SMBSENDEND, time)
558 PR_VALUE_SMBSENDTXT,
559 #define SMBsendtxt_count __profile_stats_value(PR_VALUE_SMBSENDTXT, count)
560 #define SMBsendtxt_time __profile_stats_value(PR_VALUE_SMBSENDTXT, time)
562 PR_VALUE_SMBINVALID,
563 #define SMBinvalid_count __profile_stats_value(PR_VALUE_SMBINVALID, count)
564 #define SMBinvalid_time __profile_stats_value(PR_VALUE_SMBINVALID, time)
566 /* These are the TRANS2 sub commands */
567 PR_VALUE_TRANS2_OPEN,
568 #define Trans2_open_count __profile_stats_value(PR_VALUE_TRANS2_OPEN, count)
569 #define Trans2_open_time __profile_stats_value(PR_VALUE_TRANS2_OPEN, time)
571 PR_VALUE_TRANS2_FINDFIRST,
572 #define Trans2_findfirst_count __profile_stats_value(PR_VALUE_TRANS2_FINDFIRST, count)
573 #define Trans2_findfirst_time __profile_stats_value(PR_VALUE_TRANS2_FINDFIRST, time)
575 PR_VALUE_TRANS2_FINDNEXT,
576 #define Trans2_findnext_count __profile_stats_value(PR_VALUE_TRANS2_FINDNEXT, count)
577 #define Trans2_findnext_time __profile_stats_value(PR_VALUE_TRANS2_FINDNEXT, time)
579 PR_VALUE_TRANS2_QFSINFO,
580 #define Trans2_qfsinfo_count __profile_stats_value(PR_VALUE_TRANS2_QFSINFO, count)
581 #define Trans2_qfsinfo_time __profile_stats_value(PR_VALUE_TRANS2_QFSINFO, time)
583 PR_VALUE_TRANS2_SETFSINFO,
584 #define Trans2_setfsinfo_count __profile_stats_value(PR_VALUE_TRANS2_SETFSINFO, count)
585 #define Trans2_setfsinfo_time __profile_stats_value(PR_VALUE_TRANS2_SETFSINFO, time)
587 PR_VALUE_TRANS2_QPATHINFO,
588 #define Trans2_qpathinfo_count __profile_stats_value(PR_VALUE_TRANS2_QPATHINFO, count)
589 #define Trans2_qpathinfo_time __profile_stats_value(PR_VALUE_TRANS2_QPATHINFO, time)
591 PR_VALUE_TRANS2_SETPATHINFO,
592 #define Trans2_setpathinfo_count __profile_stats_value(PR_VALUE_TRANS2_SETPATHINFO, count)
593 #define Trans2_setpathinfo_time __profile_stats_value(PR_VALUE_TRANS2_SETPATHINFO, time)
595 PR_VALUE_TRANS2_QFILEINFO,
596 #define Trans2_qfileinfo_count __profile_stats_value(PR_VALUE_TRANS2_QFILEINFO, count)
597 #define Trans2_qfileinfo_time __profile_stats_value(PR_VALUE_TRANS2_QFILEINFO, time)
599 PR_VALUE_TRANS2_SETFILEINFO,
600 #define Trans2_setfileinfo_count __profile_stats_value(PR_VALUE_TRANS2_SETFILEINFO, count)
601 #define Trans2_setfileinfo_time __profile_stats_value(PR_VALUE_TRANS2_SETFILEINFO, time)
603 PR_VALUE_TRANS2_FSCTL,
604 #define Trans2_fsctl_count __profile_stats_value(PR_VALUE_TRANS2_FSCTL, count)
605 #define Trans2_fsctl_time __profile_stats_value(PR_VALUE_TRANS2_FSCTL, time)
607 PR_VALUE_TRANS2_IOCTL,
608 #define Trans2_ioctl_count __profile_stats_value(PR_VALUE_TRANS2_IOCTL, count)
609 #define Trans2_ioctl_time __profile_stats_value(PR_VALUE_TRANS2_IOCTL, time)
611 PR_VALUE_TRANS2_FINDNOTIFYFIRST,
612 #define Trans2_findnotifyfirst_count __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYFIRST, count)
613 #define Trans2_findnotifyfirst_time __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYFIRST, time)
615 PR_VALUE_TRANS2_FINDNOTIFYNEXT,
616 #define Trans2_findnotifynext_count __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYNEXT, count)
617 #define Trans2_findnotifynext_time __profile_stats_value(PR_VALUE_TRANS2_FINDNOTIFYNEXT, time)
619 PR_VALUE_TRANS2_MKDIR,
620 #define Trans2_mkdir_count __profile_stats_value(PR_VALUE_TRANS2_MKDIR, count)
621 #define Trans2_mkdir_time __profile_stats_value(PR_VALUE_TRANS2_MKDIR, time)
623 PR_VALUE_TRANS2_SESSION_SETUP,
624 #define Trans2_session_setup_count __profile_stats_value(PR_VALUE_TRANS2_SESSION_SETUP, count)
625 #define Trans2_session_setup_time __profile_stats_value(PR_VALUE_TRANS2_SESSION_SETUP, time)
627 PR_VALUE_TRANS2_GET_DFS_REFERRAL,
628 #define Trans2_get_dfs_referral_count __profile_stats_value(PR_VALUE_TRANS2_GET_DFS_REFERRAL, count)
629 #define Trans2_get_dfs_referral_time __profile_stats_value(PR_VALUE_TRANS2_GET_DFS_REFERRAL, time)
631 PR_VALUE_TRANS2_REPORT_DFS_INCONSISTANCY,
632 #define Trans2_report_dfs_inconsistancy_count __profile_stats_value(PR_VALUE_TRANS2_REPORT_DFS_INCONSISTANCY, count)
633 #define Trans2_report_dfs_inconsistancy_time __profile_stats_value(PR_VALUE_TRANS2_REPORT_DFS_INCONSISTANCY, time)
635 /* These are the NT transact sub commands. */
636 PR_VALUE_NT_TRANSACT_CREATE,
637 #define NT_transact_create_count __profile_stats_value(PR_VALUE_NT_TRANSACT_CREATE, count)
638 #define NT_transact_create_time __profile_stats_value(PR_VALUE_NT_TRANSACT_CREATE, time)
640 PR_VALUE_NT_TRANSACT_IOCTL,
641 #define NT_transact_ioctl_count __profile_stats_value(PR_VALUE_NT_TRANSACT_IOCTL, count)
642 #define NT_transact_ioctl_time __profile_stats_value(PR_VALUE_NT_TRANSACT_IOCTL, time)
644 PR_VALUE_NT_TRANSACT_SET_SECURITY_DESC,
645 #define NT_transact_set_security_desc_count __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_SECURITY_DESC, count)
646 #define NT_transact_set_security_desc_time __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_SECURITY_DESC, time)
648 PR_VALUE_NT_TRANSACT_NOTIFY_CHANGE,
649 #define NT_transact_notify_change_count __profile_stats_value(PR_VALUE_NT_TRANSACT_NOTIFY_CHANGE, count)
650 #define NT_transact_notify_change_time __profile_stats_value(PR_VALUE_NT_TRANSACT_NOTIFY_CHANGE, time)
652 PR_VALUE_NT_TRANSACT_RENAME,
653 #define NT_transact_rename_count __profile_stats_value(PR_VALUE_NT_TRANSACT_RENAME, count)
654 #define NT_transact_rename_time __profile_stats_value(PR_VALUE_NT_TRANSACT_RENAME, time)
656 PR_VALUE_NT_TRANSACT_QUERY_SECURITY_DESC,
657 #define NT_transact_query_security_desc_count __profile_stats_value(PR_VALUE_NT_TRANSACT_QUERY_SECURITY_DESC, count)
658 #define NT_transact_query_security_desc_time __profile_stats_value(PR_VALUE_NT_TRANSACT_QUERY_SECURITY_DESC, time)
660 PR_VALUE_NT_TRANSACT_GET_USER_QUOTA,
661 #define NT_transact_get_user_quota_count __profile_stats_value(PR_VALUE_NT_TRANSACT_GET_USER_QUOTA, count)
662 #define NT_transact_get_user_quota_time __profile_stats_value(PR_VALUE_NT_TRANSACT_GET_USER_QUOTA, time)
664 PR_VALUE_NT_TRANSACT_SET_USER_QUOTA,
665 #define NT_transact_set_user_quota_count __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_USER_QUOTA, count)
666 #define NT_transact_set_user_quota_time __profile_stats_value(PR_VALUE_NT_TRANSACT_SET_USER_QUOTA, time)
668 /* These are ACL manipulation calls */
669 PR_VALUE_GET_NT_ACL,
670 #define get_nt_acl_count __profile_stats_value(PR_VALUE_GET_NT_ACL, count)
671 #define get_nt_acl_time __profile_stats_value(PR_VALUE_GET_NT_ACL, time)
673 PR_VALUE_FGET_NT_ACL,
674 #define fget_nt_acl_count __profile_stats_value(PR_VALUE_FGET_NT_ACL, count)
675 #define fget_nt_acl_time __profile_stats_value(PR_VALUE_FGET_NT_ACL, time)
677 PR_VALUE_FSET_NT_ACL,
678 #define fset_nt_acl_count __profile_stats_value(PR_VALUE_FSET_NT_ACL, count)
679 #define fset_nt_acl_time __profile_stats_value(PR_VALUE_FSET_NT_ACL, time)
681 PR_VALUE_CHMOD_ACL,
682 #define chmod_acl_count __profile_stats_value(PR_VALUE_CHMOD_ACL, count)
683 #define chmod_acl_time __profile_stats_value(PR_VALUE_CHMOD_ACL, time)
685 PR_VALUE_FCHMOD_ACL,
686 #define fchmod_acl_count __profile_stats_value(PR_VALUE_FCHMOD_ACL, count)
687 #define fchmod_acl_time __profile_stats_value(PR_VALUE_FCHMOD_ACL, time)
689 /* These are nmbd stats */
690 PR_VALUE_NAME_RELEASE,
691 #define name_release_count __profile_stats_value(PR_VALUE_NAME_RELEASE, count)
692 #define name_release_time __profile_stats_value(PR_VALUE_NAME_RELEASE, time)
694 PR_VALUE_NAME_REFRESH,
695 #define name_refresh_count __profile_stats_value(PR_VALUE_NAME_REFRESH, count)
696 #define name_refresh_time __profile_stats_value(PR_VALUE_NAME_REFRESH, time)
698 PR_VALUE_NAME_REGISTRATION,
699 #define name_registration_count __profile_stats_value(PR_VALUE_NAME_REGISTRATION, count)
700 #define name_registration_time __profile_stats_value(PR_VALUE_NAME_REGISTRATION, time)
702 PR_VALUE_NODE_STATUS,
703 #define node_status_count __profile_stats_value(PR_VALUE_NODE_STATUS, count)
704 #define node_status_time __profile_stats_value(PR_VALUE_NODE_STATUS, time)
706 PR_VALUE_NAME_QUERY,
707 #define name_query_count __profile_stats_value(PR_VALUE_NAME_QUERY, count)
708 #define name_query_time __profile_stats_value(PR_VALUE_NAME_QUERY, time)
710 PR_VALUE_HOST_ANNOUNCE,
711 #define host_announce_count __profile_stats_value(PR_VALUE_HOST_ANNOUNCE, count)
712 #define host_announce_time __profile_stats_value(PR_VALUE_HOST_ANNOUNCE, time)
714 PR_VALUE_WORKGROUP_ANNOUNCE,
715 #define workgroup_announce_count __profile_stats_value(PR_VALUE_WORKGROUP_ANNOUNCE, count)
716 #define workgroup_announce_time __profile_stats_value(PR_VALUE_WORKGROUP_ANNOUNCE, time)
718 PR_VALUE_LOCAL_MASTER_ANNOUNCE,
719 #define local_master_announce_count __profile_stats_value(PR_VALUE_LOCAL_MASTER_ANNOUNCE, count)
720 #define local_master_announce_time __profile_stats_value(PR_VALUE_LOCAL_MASTER_ANNOUNCE, time)
722 PR_VALUE_MASTER_BROWSER_ANNOUNCE,
723 #define master_browser_announce_count __profile_stats_value(PR_VALUE_MASTER_BROWSER_ANNOUNCE, count)
724 #define master_browser_announce_time __profile_stats_value(PR_VALUE_MASTER_BROWSER_ANNOUNCE, time)
726 PR_VALUE_LM_HOST_ANNOUNCE,
727 #define lm_host_announce_count __profile_stats_value(PR_VALUE_LM_HOST_ANNOUNCE, count)
728 #define lm_host_announce_time __profile_stats_value(PR_VALUE_LM_HOST_ANNOUNCE, time)
730 PR_VALUE_GET_BACKUP_LIST,
731 #define get_backup_list_count __profile_stats_value(PR_VALUE_GET_BACKUP_LIST, count)
732 #define get_backup_list_time __profile_stats_value(PR_VALUE_GET_BACKUP_LIST, time)
734 PR_VALUE_RESET_BROWSER,
735 #define reset_browser_count __profile_stats_value(PR_VALUE_RESET_BROWSER, count)
736 #define reset_browser_time __profile_stats_value(PR_VALUE_RESET_BROWSER, time)
738 PR_VALUE_ANNOUNCE_REQUEST,
739 #define announce_request_count __profile_stats_value(PR_VALUE_ANNOUNCE_REQUEST, count)
740 #define announce_request_time __profile_stats_value(PR_VALUE_ANNOUNCE_REQUEST, time)
742 PR_VALUE_LM_ANNOUNCE_REQUEST,
743 #define lm_announce_request_count __profile_stats_value(PR_VALUE_LM_ANNOUNCE_REQUEST, count)
744 #define lm_announce_request_time __profile_stats_value(PR_VALUE_LM_ANNOUNCE_REQUEST, time)
746 PR_VALUE_DOMAIN_LOGON,
747 #define domain_logon_count __profile_stats_value(PR_VALUE_DOMAIN_LOGON, count)
748 #define domain_logon_time __profile_stats_value(PR_VALUE_DOMAIN_LOGON, time)
750 PR_VALUE_SYNC_BROWSE_LISTS,
751 #define sync_browse_lists_count __profile_stats_value(PR_VALUE_SYNC_BROWSE_LISTS, count)
752 #define sync_browse_lists_time __profile_stats_value(PR_VALUE_SYNC_BROWSE_LISTS, time)
754 PR_VALUE_RUN_ELECTIONS,
755 #define run_elections_count __profile_stats_value(PR_VALUE_RUN_ELECTIONS, count)
756 #define run_elections_time __profile_stats_value(PR_VALUE_RUN_ELECTIONS, time)
758 PR_VALUE_ELECTION,
759 #define election_count __profile_stats_value(PR_VALUE_ELECTION, count)
760 #define election_time __profile_stats_value(PR_VALUE_ELECTION, time)
762 PR_VALUE_SMB2_NEGPROT,
763 #define smb2_negprot_count __profile_stats_value(PR_VALUE_SMB2_NEGPROT, count)
764 #define smb2_negprot_time __profile_stats_value(PR_VALUE_SMB2_NEGPROT, time)
766 PR_VALUE_SMB2_SESSSETUP,
767 #define smb2_sesssetup_count __profile_stats_value(PR_VALUE_SMB2_SESSSETUP, count)
768 #define smb2_sesssetup_time __profile_stats_value(PR_VALUE_SMB2_SESSSETUP, time)
770 PR_VALUE_SMB2_LOGOFF,
771 #define smb2_logoff_count __profile_stats_value(PR_VALUE_SMB2_LOGOFF, count)
772 #define smb2_logoff_time __profile_stats_value(PR_VALUE_SMB2_LOGOFF, time)
774 PR_VALUE_SMB2_TCON,
775 #define smb2_tcon_count __profile_stats_value(PR_VALUE_SMB2_TCON, count)
776 #define smb2_tcon_time __profile_stats_value(PR_VALUE_SMB2_TCON, time)
778 PR_VALUE_SMB2_TDIS,
779 #define smb2_tdis_count __profile_stats_value(PR_VALUE_SMB2_TDIS, count)
780 #define smb2_tdis_time __profile_stats_value(PR_VALUE_SMB2_TDIS, time)
782 PR_VALUE_SMB2_CREATE,
783 #define smb2_create_count __profile_stats_value(PR_VALUE_SMB2_CREATE, count)
784 #define smb2_create_time __profile_stats_value(PR_VALUE_SMB2_CREATE, time)
786 PR_VALUE_SMB2_CLOSE,
787 #define smb2_close_count __profile_stats_value(PR_VALUE_SMB2_CLOSE, count)
788 #define smb2_close_time __profile_stats_value(PR_VALUE_SMB2_CLOSE, time)
790 PR_VALUE_SMB2_FLUSH,
791 #define smb2_flush_count __profile_stats_value(PR_VALUE_SMB2_FLUSH, count)
792 #define smb2_flush_time __profile_stats_value(PR_VALUE_SMB2_FLUSH, time)
794 PR_VALUE_SMB2_READ,
795 #define smb2_read_count __profile_stats_value(PR_VALUE_SMB2_READ, count)
796 #define smb2_read_time __profile_stats_value(PR_VALUE_SMB2_READ, time)
798 PR_VALUE_SMB2_WRITE,
799 #define smb2_write_count __profile_stats_value(PR_VALUE_SMB2_WRITE, count)
800 #define smb2_write_time __profile_stats_value(PR_VALUE_SMB2_WRITE, time)
802 PR_VALUE_SMB2_LOCK,
803 #define smb2_lock_count __profile_stats_value(PR_VALUE_SMB2_LOCK, count)
804 #define smb2_lock_time __profile_stats_value(PR_VALUE_SMB2_LOCK, time)
806 PR_VALUE_SMB2_IOCTL,
807 #define smb2_ioctl_count __profile_stats_value(PR_VALUE_SMB2_IOCTL, count)
808 #define smb2_ioctl_time __profile_stats_value(PR_VALUE_SMB2_IOCTL, time)
810 PR_VALUE_SMB2_CANCEL,
811 #define smb2_cancel_count __profile_stats_value(PR_VALUE_SMB2_CANCEL, count)
812 #define smb2_cancel_time __profile_stats_value(PR_VALUE_SMB2_CANCEL, time)
814 PR_VALUE_SMB2_KEEPALIVE,
815 #define smb2_keepalive_count __profile_stats_value(PR_VALUE_SMB2_KEEPALIVE, count)
816 #define smb2_keepalive_time __profile_stats_value(PR_VALUE_SMB2_KEEPALIVE, time)
818 PR_VALUE_SMB2_FIND,
819 #define smb2_find_count __profile_stats_value(PR_VALUE_SMB2_FIND, count)
820 #define smb2_find_time __profile_stats_value(PR_VALUE_SMB2_FIND, time)
822 PR_VALUE_SMB2_NOTIFY,
823 #define smb2_notify_count __profile_stats_value(PR_VALUE_SMB2_NOTIFY, count)
824 #define smb2_notify_time __profile_stats_value(PR_VALUE_SMB2_NOTIFY, time)
826 PR_VALUE_SMB2_GETINFO,
827 #define smb2_getinfo_count __profile_stats_value(PR_VALUE_SMB2_GETINFO, count)
828 #define smb2_getinfo_time __profile_stats_value(PR_VALUE_SMB2_GETINFO, time)
830 PR_VALUE_SMB2_SETINFO,
831 #define smb2_setinfo_count __profile_stats_value(PR_VALUE_SMB2_SETINFO, count)
832 #define smb2_setinfo_time __profile_stats_value(PR_VALUE_SMB2_SETINFO, time)
834 PR_VALUE_SMB2_BREAK,
835 #define smb2_break_count __profile_stats_value(PR_VALUE_SMB2_BREAK, count)
836 #define smb2_break_time __profile_stats_value(PR_VALUE_SMB2_BREAK, time)
838 /* This mist remain the last value. */
839 PR_VALUE_MAX
840 }; /* enum profile_stats_values */
842 const char * profile_value_name(enum profile_stats_values val);
844 struct profile_stats {
845 /* general counters */
846 unsigned smb_count; /* how many SMB packets we have processed */
847 unsigned uid_changes; /* how many times we change our effective uid */
849 /* system call and protocol operation counters and cumulative times */
850 unsigned count[PR_VALUE_MAX];
851 unsigned time[PR_VALUE_MAX];
853 /* cumulative byte counts */
854 unsigned syscall_pread_bytes;
855 unsigned syscall_pwrite_bytes;
856 unsigned syscall_read_bytes;
857 unsigned syscall_write_bytes;
858 unsigned syscall_sendfile_bytes;
859 unsigned syscall_recvfile_bytes;
861 /* stat cache counters */
862 unsigned statcache_lookups;
863 unsigned statcache_misses;
864 unsigned statcache_hits;
866 /* write cache counters */
867 unsigned writecache_read_hits;
868 unsigned writecache_abutted_writes;
869 unsigned writecache_total_writes;
870 unsigned writecache_non_oplock_writes;
871 unsigned writecache_direct_writes;
872 unsigned writecache_init_writes;
873 unsigned writecache_flushed_writes[NUM_FLUSH_REASONS];
874 unsigned writecache_num_perfect_writes;
875 unsigned writecache_num_write_caches;
876 unsigned writecache_allocated_write_caches;
879 struct profile_header {
880 int prof_shm_magic;
881 int prof_shm_version;
882 struct profile_stats stats;
885 extern struct profile_header *profile_h;
886 extern struct profile_stats *profile_p;
887 extern bool do_profile_flag;
888 extern bool do_profile_times;
890 #ifdef WITH_PROFILE
892 /* these are helper macros - do not call them directly in the code
893 * use the DO_PROFILE_* START_PROFILE and END_PROFILE ones
894 * below which test for the profile flage first
896 #define INC_PROFILE_COUNT(x) profile_p->x++
897 #define DEC_PROFILE_COUNT(x) profile_p->x--
898 #define ADD_PROFILE_COUNT(x,y) profile_p->x += (y)
900 static inline uint64_t profile_timestamp(void)
902 struct timespec ts;
904 /* we might prefer to use the _COARSE clock variant of CLOCK_MONOTONIC
905 that one is faster but cached and "just" tick-wise precise */
906 clock_gettime_mono(&ts);
907 return (ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); /* usec */
910 /* end of helper macros */
912 #define DO_PROFILE_INC(x) \
913 if (do_profile_flag) { \
914 INC_PROFILE_COUNT(x); \
917 #define DO_PROFILE_DEC(x) \
918 if (do_profile_flag) { \
919 DEC_PROFILE_COUNT(x); \
922 #define DO_PROFILE_DEC_INC(x,y) \
923 if (do_profile_flag) { \
924 DEC_PROFILE_COUNT(x); \
925 INC_PROFILE_COUNT(y); \
928 #define DO_PROFILE_ADD(x,n) \
929 if (do_profile_flag) { \
930 ADD_PROFILE_COUNT(x,n); \
933 #define START_PROFILE_RAW(x, _stamp, _count) \
934 _stamp = 0; \
935 if (do_profile_flag) { \
936 _stamp = do_profile_times ? profile_timestamp() : 0;\
937 INC_PROFILE_COUNT(_count); \
940 #define START_PROFILE_STAMP(x, _stamp) \
941 START_PROFILE_RAW(x, _stamp, x##_count)
943 #define START_PROFILE(x) \
944 uint64_t __profstamp_##x = 0; \
945 START_PROFILE_RAW(x, __profstamp_##x, x##_count)
947 #define START_PROFILE_BYTES(x,n) \
948 uint64_t __profstamp_##x = 0; \
949 if (do_profile_flag) { \
950 __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\
951 INC_PROFILE_COUNT(x##_count); \
952 ADD_PROFILE_COUNT(x##_bytes, n); \
955 #define END_PROFILE_RAW(x, _stamp, _time) \
956 if (do_profile_times) { \
957 ADD_PROFILE_COUNT(_time, \
958 profile_timestamp() - _stamp); \
961 #define END_PROFILE_STAMP(x, _stamp) \
962 END_PROFILE_RAW(x, _stamp, x##_time)
964 #define END_PROFILE(x) \
965 END_PROFILE_RAW(x, __profstamp_##x, x##_time)
967 #else /* WITH_PROFILE */
969 #define DO_PROFILE_INC(x)
970 #define DO_PROFILE_DEC(x)
971 #define DO_PROFILE_DEC_INC(x,y)
972 #define DO_PROFILE_ADD(x,n)
973 #define START_PROFILE_STAMP(x, _stamp)
974 #define START_PROFILE(x)
975 #define START_PROFILE_BYTES(x,n)
976 #define END_PROFILE_STAMP(x, _stamp)
977 #define END_PROFILE(x)
978 #endif /* WITH_PROFILE */
980 /* The following definitions come from profile/profile.c */
982 void set_profile_level(int level, struct server_id src);
983 bool profile_setup(struct messaging_context *msg_ctx, bool rdonly);
985 #endif