Changeset 745 for trunk/server/source3/include/smbprofile.h
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/include/smbprofile.h
r414 r745 27 27 #define PROF_SHMEM_KEY ((key_t)0x07021999) 28 28 #define PROF_SHM_MAGIC 0x6349985 29 #define PROF_SHM_VERSION 1 129 #define PROF_SHM_VERSION 12 30 30 31 31 /* time values in the following structure are in microseconds */ … … 44 44 #define syscall_opendir_time __profile_stats_value(PR_VALUE_SYSCALL_OPENDIR, time) 45 45 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) 49 46 50 PR_VALUE_SYSCALL_READDIR, 47 51 #define syscall_readdir_count __profile_stats_value(PR_VALUE_SYSCALL_READDIR, count) … … 179 183 #define syscall_ftruncate_count __profile_stats_value(PR_VALUE_SYSCALL_FTRUNCATE, count) 180 184 #define syscall_ftruncate_time __profile_stats_value(PR_VALUE_SYSCALL_FTRUNCATE, time) 185 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) 181 189 182 190 PR_VALUE_SYSCALL_FCNTL_LOCK, … … 756 764 #define election_count __profile_stats_value(PR_VALUE_ELECTION, count) 757 765 #define election_time __profile_stats_value(PR_VALUE_ELECTION, time) 766 767 PR_VALUE_SMB2_NEGPROT, 768 #define smb2_negprot_count __profile_stats_value(PR_VALUE_SMB2_NEGPROT, count) 769 #define smb2_negprot_time __profile_stats_value(PR_VALUE_SMB2_NEGPROT, time) 770 771 PR_VALUE_SMB2_SESSSETUP, 772 #define smb2_sesssetup_count __profile_stats_value(PR_VALUE_SMB2_SESSSETUP, count) 773 #define smb2_sesssetup_time __profile_stats_value(PR_VALUE_SMB2_SESSSETUP, time) 774 775 PR_VALUE_SMB2_LOGOFF, 776 #define smb2_logoff_count __profile_stats_value(PR_VALUE_SMB2_LOGOFF, count) 777 #define smb2_logoff_time __profile_stats_value(PR_VALUE_SMB2_LOGOFF, time) 778 779 PR_VALUE_SMB2_TCON, 780 #define smb2_tcon_count __profile_stats_value(PR_VALUE_SMB2_TCON, count) 781 #define smb2_tcon_time __profile_stats_value(PR_VALUE_SMB2_TCON, time) 782 783 PR_VALUE_SMB2_TDIS, 784 #define smb2_tdis_count __profile_stats_value(PR_VALUE_SMB2_TDIS, count) 785 #define smb2_tdis_time __profile_stats_value(PR_VALUE_SMB2_TDIS, time) 786 787 PR_VALUE_SMB2_CREATE, 788 #define smb2_create_count __profile_stats_value(PR_VALUE_SMB2_CREATE, count) 789 #define smb2_create_time __profile_stats_value(PR_VALUE_SMB2_CREATE, time) 790 791 PR_VALUE_SMB2_CLOSE, 792 #define smb2_close_count __profile_stats_value(PR_VALUE_SMB2_CLOSE, count) 793 #define smb2_close_time __profile_stats_value(PR_VALUE_SMB2_CLOSE, time) 794 795 PR_VALUE_SMB2_FLUSH, 796 #define smb2_flush_count __profile_stats_value(PR_VALUE_SMB2_FLUSH, count) 797 #define smb2_flush_time __profile_stats_value(PR_VALUE_SMB2_FLUSH, time) 798 799 PR_VALUE_SMB2_READ, 800 #define smb2_read_count __profile_stats_value(PR_VALUE_SMB2_READ, count) 801 #define smb2_read_time __profile_stats_value(PR_VALUE_SMB2_READ, time) 802 803 PR_VALUE_SMB2_WRITE, 804 #define smb2_write_count __profile_stats_value(PR_VALUE_SMB2_WRITE, count) 805 #define smb2_write_time __profile_stats_value(PR_VALUE_SMB2_WRITE, time) 806 807 PR_VALUE_SMB2_LOCK, 808 #define smb2_lock_count __profile_stats_value(PR_VALUE_SMB2_LOCK, count) 809 #define smb2_lock_time __profile_stats_value(PR_VALUE_SMB2_LOCK, time) 810 811 PR_VALUE_SMB2_IOCTL, 812 #define smb2_ioctl_count __profile_stats_value(PR_VALUE_SMB2_IOCTL, count) 813 #define smb2_ioctl_time __profile_stats_value(PR_VALUE_SMB2_IOCTL, time) 814 815 PR_VALUE_SMB2_CANCEL, 816 #define smb2_cancel_count __profile_stats_value(PR_VALUE_SMB2_CANCEL, count) 817 #define smb2_cancel_time __profile_stats_value(PR_VALUE_SMB2_CANCEL, time) 818 819 PR_VALUE_SMB2_KEEPALIVE, 820 #define smb2_keepalive_count __profile_stats_value(PR_VALUE_SMB2_KEEPALIVE, count) 821 #define smb2_keepalive_time __profile_stats_value(PR_VALUE_SMB2_KEEPALIVE, time) 822 823 PR_VALUE_SMB2_FIND, 824 #define smb2_find_count __profile_stats_value(PR_VALUE_SMB2_FIND, count) 825 #define smb2_find_time __profile_stats_value(PR_VALUE_SMB2_FIND, time) 826 827 PR_VALUE_SMB2_NOTIFY, 828 #define smb2_notify_count __profile_stats_value(PR_VALUE_SMB2_NOTIFY, count) 829 #define smb2_notify_time __profile_stats_value(PR_VALUE_SMB2_NOTIFY, time) 830 831 PR_VALUE_SMB2_GETINFO, 832 #define smb2_getinfo_count __profile_stats_value(PR_VALUE_SMB2_GETINFO, count) 833 #define smb2_getinfo_time __profile_stats_value(PR_VALUE_SMB2_GETINFO, time) 834 835 PR_VALUE_SMB2_SETINFO, 836 #define smb2_setinfo_count __profile_stats_value(PR_VALUE_SMB2_SETINFO, count) 837 #define smb2_setinfo_time __profile_stats_value(PR_VALUE_SMB2_SETINFO, time) 838 839 PR_VALUE_SMB2_BREAK, 840 #define smb2_break_count __profile_stats_value(PR_VALUE_SMB2_BREAK, count) 841 #define smb2_break_time __profile_stats_value(PR_VALUE_SMB2_BREAK, time) 758 842 759 843 /* This mist remain the last value. */ … … 819 903 #define ADD_PROFILE_COUNT(x,y) profile_p->x += (y) 820 904 821 #if defined(HAVE_CLOCK_GETTIME)822 823 extern clockid_t __profile_clock;824 825 905 static inline uint64_t profile_timestamp(void) 826 906 { 827 907 struct timespec ts; 828 908 829 /* FIXME: On a single-CPU system, or a system where we have bound 830 * daemon threads to single CPUs (eg. using cpusets or processor 831 * affinity), it might be preferable to use CLOCK_PROCESS_CPUTIME_ID. 832 */ 833 834 clock_gettime(__profile_clock, &ts); 909 /* we might prefer to use the _COARSE clock variant of CLOCK_MONOTONIC 910 that one is faster but cached and "just" tick-wise precise */ 911 clock_gettime_mono(&ts); 835 912 return (ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); /* usec */ 836 913 } 837 838 #else839 840 static inline uint64_t profile_timestamp(void)841 {842 struct timeval tv;843 GetTimeOfDay(&tv);844 return (tv.tv_sec * 1000000) + tv.tv_usec;845 }846 847 #endif848 914 849 915 /* end of helper macros */ … … 890 956 profile_timestamp() - __profstamp_##x); \ 891 957 } 892 893 894 958 #else /* WITH_PROFILE */ 895 959 … … 901 965 #define START_PROFILE_BYTES(x,n) 902 966 #define END_PROFILE(x) 903 904 967 #endif /* WITH_PROFILE */ 905 968 969 /* The following definitions come from profile/profile.c */ 970 971 void set_profile_level(int level, struct server_id src); 972 bool profile_setup(struct messaging_context *msg_ctx, bool rdonly); 973 906 974 #endif
Note:
See TracChangeset
for help on using the changeset viewer.