From: Günther Deschner Date: Wed, 13 Apr 2011 22:36:23 +0000 (+0200) Subject: s3: only include smb profiling where needed. X-Git-Tag: ldb-1.1.0~88 X-Git-Url: http://git.samba.org/samba.git/?p=nivanova%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=165521e20d8aea1e35cc68e39ced57de64f8e560 s3: only include smb profiling where needed. Guenther Autobuild-User: Günther Deschner Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104 --- diff --git a/source3/include/includes.h b/source3/include/includes.h index 1e4800d327d..5d6e554ede2 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -567,9 +567,6 @@ enum flush_reason_enum { #include "proto.h" #endif -/* We need this after proto.h to reference GetTimeOfDay(). */ -#include "smbprofile.h" - /* String routines */ #include "srvstr.h" diff --git a/source3/include/proto.h b/source3/include/proto.h index 5b96bdfbeb4..be2915f4c57 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -2647,11 +2647,6 @@ void set_server_role(void); uint32 get_int_param( const char* param ); char* get_string_param( const char* param ); -/* The following definitions come from profile/profile.c */ - -void set_profile_level(int level, struct server_id src); -bool profile_setup(struct messaging_context *msg_ctx, bool rdonly); - /* The following definitions come from librpc/rpc/rpc_common.c */ struct ndr_interface_table; bool smb_register_ndr_interface(const struct ndr_interface_table *interface); diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 3041f6c87ec..4f5b6002fc9 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -966,4 +966,9 @@ static inline uint64_t profile_timestamp(void) #define END_PROFILE(x) #endif /* WITH_PROFILE */ +/* The following definitions come from profile/profile.c */ + +void set_profile_level(int level, struct server_id src); +bool profile_setup(struct messaging_context *msg_ctx, bool rdonly); + #endif diff --git a/source3/modules/vfs_crossrename.c b/source3/modules/vfs_crossrename.c index ffb807da487..8f7c5f042bb 100644 --- a/source3/modules/vfs_crossrename.c +++ b/source3/modules/vfs_crossrename.c @@ -19,7 +19,7 @@ #include "smbd/smbd.h" #include "system/filesys.h" #include "transfer_file.h" - +#include "smbprofile.h" #define MODULE "crossrename" static SMB_OFF_T module_sizelimit; diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index e7c6f7ebebe..859b2120486 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -23,6 +23,7 @@ #include "system/filesys.h" #include "smbd/smbd.h" #include "ntioctl.h" +#include "smbprofile.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_VFS diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c index 4c9c9d9151d..899c273fe08 100644 --- a/source3/nmbd/nmbd_elections.c +++ b/source3/nmbd/nmbd_elections.c @@ -22,6 +22,7 @@ #include "includes.h" #include "nmbd/nmbd.h" +#include "smbprofile.h" /* Election parameters. */ extern time_t StartupTime; diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c index cc657e39625..6993e183583 100644 --- a/source3/nmbd/nmbd_incomingdgrams.c +++ b/source3/nmbd/nmbd_incomingdgrams.c @@ -23,6 +23,7 @@ #include "includes.h" #include "../librpc/gen_ndr/svcctl.h" #include "nmbd/nmbd.h" +#include "smbprofile.h" extern bool found_lm_clients; diff --git a/source3/nmbd/nmbd_synclists.c b/source3/nmbd/nmbd_synclists.c index 2fd510cedd8..fc2b25edcae 100644 --- a/source3/nmbd/nmbd_synclists.c +++ b/source3/nmbd/nmbd_synclists.c @@ -31,6 +31,7 @@ #include "../librpc/gen_ndr/svcctl.h" #include "nmbd/nmbd.h" #include "libsmb/clirap.h" +#include "smbprofile.h" struct sync_record { struct sync_record *next, *prev; diff --git a/source3/profile/profile.c b/source3/profile/profile.c index 9a3bb625083..6c47c988ffe 100644 --- a/source3/profile/profile.c +++ b/source3/profile/profile.c @@ -22,6 +22,7 @@ #include "includes.h" #include "system/shmem.h" #include "messages.h" +#include "smbprofile.h" #ifdef WITH_PROFILE #define IPC_PERMS ((S_IRUSR | S_IWUSR) | S_IRGRP | S_IROTH) diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index 460eeac33a5..16d8853b54c 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -23,6 +23,7 @@ #include "printing.h" #include "smbd/smbd.h" #include "smbd/globals.h" +#include "smbprofile.h" static bool setup_write_cache(files_struct *, SMB_OFF_T); diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index 3fd42954f9f..4f2fea52658 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -27,6 +27,7 @@ #include "includes.h" #include "smbd/smbd.h" #include "smbd/globals.h" +#include "smbprofile.h" #define NERR_notsupported 50 diff --git a/source3/smbd/message.c b/source3/smbd/message.c index 1a6e9c8b13c..34997a13dc5 100644 --- a/source3/smbd/message.c +++ b/source3/smbd/message.c @@ -25,6 +25,7 @@ #include "includes.h" #include "smbd/smbd.h" #include "smbd/globals.h" +#include "smbprofile.h" extern userdom_struct current_user_info; diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index d307c210c28..6877ccc861f 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -25,6 +25,7 @@ #include "serverid.h" #include "auth.h" #include "messages.h" +#include "smbprofile.h" extern fstring remote_proto; diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 2dd5715c89c..e1358c6e554 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -28,6 +28,7 @@ #include "passdb/lookup_sid.h" #include "auth.h" #include "ntioctl.h" +#include "smbprofile.h" extern const struct generic_mapping file_generic_mapping; diff --git a/source3/smbd/process.c b/source3/smbd/process.c index f290e1d82b0..93f29e57b64 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -31,6 +31,7 @@ #include "passdb.h" #include "auth.h" #include "messages.h" +#include "smbprofile.h" extern bool global_machine_password_needs_changing; diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index cc02ae29dc3..96595223a60 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -38,6 +38,7 @@ #include "libcli/security/security.h" #include "libsmb/nmblib.h" #include "auth.h" +#include "smbprofile.h" /**************************************************************************** Ensure we check the path in *exactly* the same way as W2K for a findfirst/findnext diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c index 8da1db41f43..f8c8847a60c 100644 --- a/source3/smbd/sec_ctx.c +++ b/source3/smbd/sec_ctx.c @@ -22,6 +22,7 @@ #include "smbd/globals.h" #include "libcli/security/security_token.h" #include "auth.h" +#include "smbprofile.h" extern struct current_user current_user; diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 1948077c1f8..d3c6c1884f0 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -40,6 +40,7 @@ #include "passdb.h" #include "auth.h" #include "messages.h" +#include "smbprofile.h" extern void start_epmd(struct tevent_context *ev_ctx, struct messaging_context *msg_ctx); diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 5067201a652..3cf6758e296 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -33,6 +33,7 @@ #include "../lib/util/asn1.h" #include "auth.h" #include "messages.h" +#include "smbprofile.h" /* For split krb5 SPNEGO blobs. */ struct pending_auth_data { diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 50505e77302..0004e7ca8ca 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -24,6 +24,7 @@ #include "smbd/globals.h" #include "../libcli/smb/smb_common.h" #include "../lib/tsocket/tsocket.h" +#include "smbprofile.h" #define OUTVEC_ALLOC_SIZE (SMB2_HDR_BODY + 9) diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c index 40174c80348..5c74b928550 100644 --- a/source3/smbd/statcache.c +++ b/source3/smbd/statcache.c @@ -24,6 +24,7 @@ #include "memcache.h" #include "smbd/smbd.h" #include "messages.h" +#include "smbprofile.h" /**************************************************************************** Stat cache code used in unix_convert. diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index fe06538246a..507ae9ba93a 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -34,6 +34,7 @@ #include "libcli/security/security.h" #include "trans2.h" #include "auth.h" +#include "smbprofile.h" #define DIR_ENTRY_SAFETY_MARGIN 4096 diff --git a/source3/utils/status_profile.c b/source3/utils/status_profile.c index 198dac69a19..c0eeb7a923a 100644 --- a/source3/utils/status_profile.c +++ b/source3/utils/status_profile.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "smbprofile.h" bool status_profile_dump(bool be_verbose); bool status_profile_rates(bool be_verbose);