diff options
| author | Volker Lendecke <vl@samba.org> | 2014-10-02 13:36:22 +0000 |
|---|---|---|
| committer | Jeremy Allison <jra@samba.org> | 2014-10-03 19:55:09 +0200 |
| commit | 5254a7e1e5ab216a679bfbf3584bb8a16f502a2b (patch) | |
| tree | 37b33b7dcf1044c6a5480d3cc31980126c7173b6 /source3 | |
| parent | c7c300f9710f1f207b9fa0274648ba2dc11c1ffd (diff) | |
profiling: Remove some #ifdefs
The DO_PROFILE_INC thingies already #define to nothing without
WITH_PROFILE, and any sane compiler will just not compile the if-condition
if there is no body to be executed.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
| -rw-r--r-- | source3/smbd/fileio.c | 6 | ||||
| -rw-r--r-- | source3/smbd/server.c | 2 |
2 files changed, 0 insertions, 8 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index b0da7a2af2..91b3102f9c 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -345,12 +345,10 @@ ssize_t write_file(struct smb_request *req, mark_file_modified(fsp); -#ifdef WITH_PROFILE DO_PROFILE_INC(writecache_total_writes); if (!fsp->oplock_type) { DO_PROFILE_INC(writecache_non_oplock_writes); } -#endif /* * If this file is level II oplocked then we need @@ -826,13 +824,11 @@ n = %u, wcp->offset=%.0f, wcp->data_size=%u\n", */ if (n) { -#ifdef WITH_PROFILE if (wcp->data_size) { DO_PROFILE_INC(writecache_abutted_writes); } else { DO_PROFILE_INC(writecache_init_writes); } -#endif if ((wcp->data_size == 0) && (pos > wcp->file_size) @@ -997,11 +993,9 @@ ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason) DEBUG(9,("flushing write cache: fd = %d, off=%.0f, size=%u\n", fsp->fh->fd, (double)wcp->offset, (unsigned int)data_size)); -#ifdef WITH_PROFILE if(data_size == wcp->alloc_size) { DO_PROFILE_INC(writecache_num_perfect_writes); } -#endif ret = real_write_file(NULL, fsp, wcp->data, wcp->offset, data_size); diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 658f26870e..8b9a1c1a96 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1304,7 +1304,6 @@ extern void build_options(bool screen); init_structs(); -#ifdef WITH_PROFILE if (!profile_setup(msg_ctx, False)) { DEBUG(0,("ERROR: failed to setup profiling\n")); return -1; @@ -1317,7 +1316,6 @@ extern void build_options(bool screen); src.pid = getpid(); set_profile_level(pl, src); } -#endif if (!is_daemon && !is_a_socket(0)) { if (!interactive) { |
