smbprofile: add smbprofile_active() helper
authorStefan Metzmacher <metze@samba.org>
Wed, 26 Apr 2023 15:21:38 +0000 (17:21 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 1 Jun 2023 07:20:31 +0000 (07:20 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/include/smbprofile.h

index ce7a7405bf47e6470a2f0c0f58d4ed744146721d..7b080e11ee1e50ca95488f5303fef4b702725241 100644 (file)
@@ -497,6 +497,11 @@ static inline void smbprofile_dump_schedule(void)
        smbprofile_dump_schedule_timer();
 }
 
+static inline bool smbprofile_active(void)
+{
+       return smbprofile_state.config.do_count;
+}
+
 static inline bool smbprofile_dump_pending(void)
 {
        if (smbprofile_state.internal.te == NULL) {
@@ -574,6 +579,11 @@ static inline uint64_t profile_timestamp(void)
 
 #define PROFILE_TIMESTAMP(x) (*(x)=(struct timespec){0})
 
+static inline bool smbprofile_active(void)
+{
+       return false;
+}
+
 static inline bool smbprofile_dump_pending(void)
 {
        return false;