[Patch] Stop smbprofile.tdb from growing when level is set to 0

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Jan 15 15:26:57 UTC 2019


On Mon, Jan 14, 2019 at 06:43:48PM +0000, Dylan Stephano-Shachter wrote:
> This all makes sense to me. Let's try out this patch.

Better. Attached find it in a version that conforms to our
conventions. No statements before variables and a signed-off-by in the
comment.

Already reviewed-by me.

Okay with you?

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: 0551-370000-0, mailto:kontakt at sernet.de
Gesch.F.: Dr. Johannes Loxen und Reinhild Jung
AG Göttingen: HR-B 2816 - http://www.sernet.de
-------------- next part --------------
From a036cbc1f35f74419e4bf614b30b96ba29f09440 Mon Sep 17 00:00:00 2001
From: Dylan Stephano-Shachter <dshachter at nasuni.com>
Date: Mon, 14 Jan 2019 13:42:03 -0500
Subject: [PATCH] profiling: stop smbprofile from growing unnecessarily

Signed-off-by: Dylan Stephano-Shachter <dshachter at nasuni.com>
Reviewed-by: Volker Lendecke <vl at samba.org>
---
 source3/profile/profile.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/source3/profile/profile.c b/source3/profile/profile.c
index 5deef81b6df..5e7b69d25d6 100644
--- a/source3/profile/profile.c
+++ b/source3/profile/profile.c
@@ -271,6 +271,11 @@ void smbprofile_dump(void)
 
 	TALLOC_FREE(smbprofile_state.internal.te);
 
+	if (! (smbprofile_state.config.do_count ||
+	       smbprofile_state.config.do_times)) {
+			return;
+	}
+
 	if (smbprofile_state.internal.db == NULL) {
 		return;
 	}
-- 
2.11.0



More information about the samba-technical mailing list