summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-11-05 13:10:49 +0100
committerJeremy Allison <jra@samba.org>2014-11-19 20:51:36 +0100
commit4de3ed1b0e5da29dae7ef43668bfc642766b8c20 (patch)
treedea51aac4b6ed63fea861c105a51f4e3dc226c1a
parent14ff976406ab45baa5723f73b7f93b4ccce82a80 (diff)
downloadsamba-4de3ed1b0e5da29dae7ef43668bfc642766b8c20.tar.gz
samba-4de3ed1b0e5da29dae7ef43668bfc642766b8c20.tar.xz
samba-4de3ed1b0e5da29dae7ef43668bfc642766b8c20.zip
s3:nmbd: remove START/END_PROFILE() calls
nmbd never calls profile_setup() and never collects any profiling data. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/nmbd/nmbd_elections.c10
-rw-r--r--source3/nmbd/nmbd_incomingdgrams.c43
-rw-r--r--source3/nmbd/nmbd_synclists.c7
-rwxr-xr-xsource3/wscript_build2
4 files changed, 11 insertions, 51 deletions
diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c
index 1947e37e3a..04a08071a3 100644
--- a/source3/nmbd/nmbd_elections.c
+++ b/source3/nmbd/nmbd_elections.c
@@ -22,7 +22,6 @@
#include "includes.h"
#include "nmbd/nmbd.h"
-#include "smbprofile.h"
/* Election parameters. */
extern time_t StartupTime;
@@ -167,11 +166,8 @@ void run_elections(time_t t)
struct subnet_record *subrec;
- START_PROFILE(run_elections);
-
/* Send election packets once every 2 seconds - note */
if (lastime && (t - lastime < 2)) {
- END_PROFILE(run_elections);
return;
}
@@ -211,7 +207,6 @@ yet registered on subnet %s\n", nmb_namestr(&nmbname), subrec->subnet_name ));
}
}
}
- END_PROFILE(run_elections);
}
/*******************************************************************
@@ -271,8 +266,6 @@ void process_election(struct subnet_record *subrec, struct packet_struct *p, con
struct work_record *work;
unstring workgroup_name;
- START_PROFILE(election);
-
pull_ascii_nstring(server_name, sizeof(server_name), buf+13);
pull_ascii_nstring(workgroup_name, sizeof(workgroup_name), dgram->dest_name.name);
@@ -319,8 +312,7 @@ is not my workgroup.\n", work->work_group, subrec->subnet_name ));
}
}
done:
-
- END_PROFILE(election);
+ return;
}
/****************************************************************************
diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c
index 153a86db55..3623c0807a 100644
--- a/source3/nmbd/nmbd_incomingdgrams.c
+++ b/source3/nmbd/nmbd_incomingdgrams.c
@@ -23,7 +23,6 @@
#include "includes.h"
#include "../librpc/gen_ndr/svcctl.h"
#include "nmbd/nmbd.h"
-#include "smbprofile.h"
extern bool found_lm_clients;
@@ -107,8 +106,6 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p
unstring work_name;
unstring source_name;
- START_PROFILE(host_announce);
-
pull_ascii_fstring(comment, buf+31);
pull_ascii_nstring(announce_name, sizeof(announce_name), buf+5);
@@ -187,8 +184,7 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p
subrec->work_changed = True;
done:
-
- END_PROFILE(host_announce);
+ return;
}
/*******************************************************************
@@ -206,8 +202,6 @@ void process_workgroup_announce(struct subnet_record *subrec, struct packet_stru
unstring source_name;
unstring dest_name;
- START_PROFILE(workgroup_announce);
-
pull_ascii_nstring(workgroup_announce_name,sizeof(workgroup_announce_name),buf+5);
pull_ascii_nstring(master_name,sizeof(master_name),buf+31);
pull_ascii_nstring(source_name,sizeof(source_name),dgram->source_name.name);
@@ -244,8 +238,7 @@ void process_workgroup_announce(struct subnet_record *subrec, struct packet_stru
subrec->work_changed = True;
done:
-
- END_PROFILE(workgroup_announce);
+ return;
}
/*******************************************************************
@@ -264,8 +257,6 @@ void process_local_master_announce(struct subnet_record *subrec, struct packet_s
struct server_record *servrec;
unstring source_name;
- START_PROFILE(local_master_announce);
-
pull_ascii_nstring(server_name,sizeof(server_name),buf+5);
pull_ascii_fstring(comment, buf+31);
pull_ascii_nstring(source_name, sizeof(source_name), dgram->source_name.name);
@@ -355,8 +346,7 @@ a local master browser for workgroup %s and we think we are master. Forcing elec
subrec->work_changed = True;
done:
-
- END_PROFILE(local_master_announce);
+ return;
}
/*******************************************************************
@@ -373,8 +363,6 @@ void process_master_browser_announce(struct subnet_record *subrec,
struct work_record *work;
struct browse_cache_record *browrec;
- START_PROFILE(master_browser_announce);
-
pull_ascii_nstring(local_master_name,sizeof(local_master_name),buf);
DEBUG(3,("process_master_browser_announce: Local master announce from %s IP %s.\n",
@@ -410,8 +398,7 @@ master - ignoring master announce.\n"));
}
done:
-
- END_PROFILE(master_browser_announce);
+ return;
}
/*******************************************************************
@@ -433,7 +420,6 @@ void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct
fstring comment;
char *s = get_safe_str_ptr(buf,len,discard_const_p(char, buf),9);
- START_PROFILE(lm_host_announce);
if (!s) {
goto done;
}
@@ -529,8 +515,7 @@ originate from OS/2 Warp client. Ignoring packet.\n"));
found_lm_clients = True;
done:
-
- END_PROFILE(lm_host_announce);
+ return;
}
/****************************************************************************
@@ -654,7 +639,6 @@ void process_get_backup_list_request(struct subnet_record *subrec,
unstring workgroup_name;
struct subnet_record *search_subrec = subrec;
- START_PROFILE(get_backup_list);
pull_ascii_nstring(workgroup_name, sizeof(workgroup_name), dgram->dest_name.name);
DEBUG(3,("process_get_backup_list_request: request from %s IP %s to %s.\n",
@@ -712,8 +696,7 @@ and I am not a local master browser.\n", workgroup_name));
max_number_requested, token, p->ip, p->port);
done:
-
- END_PROFILE(get_backup_list);
+ return;
}
/*******************************************************************
@@ -733,8 +716,6 @@ void process_reset_browser(struct subnet_record *subrec,
int state = CVAL(buf,0);
struct subnet_record *sr;
- START_PROFILE(reset_browser);
-
DEBUG(1,("process_reset_browser: received diagnostic browser reset \
request from %s IP %s state=0x%X\n",
nmb_namestr(&dgram->source_name), inet_ntoa(p->ip), state));
@@ -767,8 +748,6 @@ request from %s IP %s state=0x%X\n",
/* Request to stop browsing altogether. */
if (state & 0x4)
DEBUG(1,("process_reset_browser: ignoring request to stop being a browser.\n"));
-
- END_PROFILE(reset_browser);
}
/*******************************************************************
@@ -785,8 +764,6 @@ void process_announce_request(struct subnet_record *subrec, struct packet_struct
struct work_record *work;
unstring workgroup_name;
- START_PROFILE(announce_request);
-
pull_ascii_nstring(workgroup_name, sizeof(workgroup_name), dgram->dest_name.name);
DEBUG(3,("process_announce_request: Announce request from %s IP %s to %s.\n",
nmb_namestr(&dgram->source_name), inet_ntoa(p->ip),
@@ -807,8 +784,7 @@ void process_announce_request(struct subnet_record *subrec, struct packet_struct
work->needannounce = True;
done:
-
- END_PROFILE(announce_request);
+ return;
}
/*******************************************************************
@@ -825,8 +801,6 @@ void process_lm_announce_request(struct subnet_record *subrec, struct packet_str
struct dgram_packet *dgram = &p->packet.dgram;
unstring workgroup_name;
- START_PROFILE(lm_announce_request);
-
pull_ascii_nstring(workgroup_name, sizeof(workgroup_name), dgram->dest_name.name);
DEBUG(3,("process_lm_announce_request: Announce request from %s IP %s to %s.\n",
nmb_namestr(&dgram->source_name), inet_ntoa(p->ip),
@@ -848,6 +822,5 @@ void process_lm_announce_request(struct subnet_record *subrec, struct packet_str
found_lm_clients = True;
done:
-
- END_PROFILE(lm_announce_request);
+ return;
}
diff --git a/source3/nmbd/nmbd_synclists.c b/source3/nmbd/nmbd_synclists.c
index 19e3ed0e2b..70c1750422 100644
--- a/source3/nmbd/nmbd_synclists.c
+++ b/source3/nmbd/nmbd_synclists.c
@@ -31,7 +31,6 @@
#include "nmbd/nmbd.h"
#include "libsmb/libsmb.h"
#include "libsmb/clirap.h"
-#include "smbprofile.h"
#include "../libcli/smb/smbXcli_base.h"
struct sync_record {
@@ -139,12 +138,10 @@ void sync_browse_lists(struct work_record *work,
struct sync_record *s;
static int counter;
- START_PROFILE(sync_browse_lists);
/* Check we're not trying to sync with ourselves. This can
happen if we are a domain *and* a local master browser. */
if (ismyip_v4(ip)) {
done:
- END_PROFILE(sync_browse_lists);
return;
}
@@ -167,7 +164,7 @@ done:
DLIST_ADD(syncs, s);
/* the parent forks and returns, leaving the child to do the
- actual sync and call END_PROFILE*/
+ actual sync */
CatchChild();
if ((s->pid = fork())) return;
@@ -178,7 +175,6 @@ done:
fp = x_fopen(s->fname,O_WRONLY|O_CREAT|O_TRUNC, 0644);
if (!fp) {
- END_PROFILE(sync_browse_lists);
_exit(1);
}
@@ -186,7 +182,6 @@ done:
s->fname);
x_fclose(fp);
- END_PROFILE(sync_browse_lists);
_exit(0);
}
diff --git a/source3/wscript_build b/source3/wscript_build
index 54ba3a7488..7a7fea4d42 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -860,7 +860,7 @@ bld.SAMBA3_BINARY('nmbd/nmbd',
param
libsmb
popt_samba3
- PROFILE''',
+ ''',
install_path='${SBINDIR}')