Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/include/smbprofile.h

    r414 r745  
    2727#define PROF_SHMEM_KEY ((key_t)0x07021999)
    2828#define PROF_SHM_MAGIC 0x6349985
    29 #define PROF_SHM_VERSION 11
     29#define PROF_SHM_VERSION 12
    3030
    3131/* time values in the following structure are in microseconds */
     
    4444#define syscall_opendir_time __profile_stats_value(PR_VALUE_SYSCALL_OPENDIR, time)
    4545
     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
    4650        PR_VALUE_SYSCALL_READDIR,
    4751#define syscall_readdir_count __profile_stats_value(PR_VALUE_SYSCALL_READDIR, count)
     
    179183#define syscall_ftruncate_count __profile_stats_value(PR_VALUE_SYSCALL_FTRUNCATE, count)
    180184#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)
    181189
    182190        PR_VALUE_SYSCALL_FCNTL_LOCK,
     
    756764#define election_count __profile_stats_value(PR_VALUE_ELECTION, count)
    757765#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)
    758842
    759843        /* This mist remain the last value. */
     
    819903#define ADD_PROFILE_COUNT(x,y) profile_p->x += (y)
    820904
    821 #if defined(HAVE_CLOCK_GETTIME)
    822 
    823 extern clockid_t __profile_clock;
    824 
    825905static inline uint64_t profile_timestamp(void)
    826906{
    827907        struct timespec ts;
    828908
    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);
    835912        return (ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); /* usec */
    836913}
    837 
    838 #else
    839 
    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 #endif
    848914
    849915/* end of helper macros */
     
    890956                    profile_timestamp() - __profstamp_##x); \
    891957        }
    892 
    893 
    894958#else /* WITH_PROFILE */
    895959
     
    901965#define START_PROFILE_BYTES(x,n)
    902966#define END_PROFILE(x)
    903 
    904967#endif /* WITH_PROFILE */
    905968
     969/* The following definitions come from profile/profile.c  */
     970
     971void set_profile_level(int level, struct server_id src);
     972bool profile_setup(struct messaging_context *msg_ctx, bool rdonly);
     973
    906974#endif
Note: See TracChangeset for help on using the changeset viewer.