]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #264 in SNORT/snort3 from perfmon to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 12 Feb 2016 19:57:45 +0000 (14:57 -0500)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 12 Feb 2016 19:57:45 +0000 (14:57 -0500)
Squashed commit of the following:

commit 089dea051f4a8ad0d0af48a94821cc8f7429337a
Author: Carter Waxman <cwaxman@cisco.com>
Date:   Fri Feb 12 14:56:56 2016 -0500

    added more bool to perf

commit c3d8d1a00aef8b0bfaa5048e7fa66f3b63b03d04
Author: Carter Waxman <cwaxman@cisco.com>
Date:   Fri Feb 12 14:34:24 2016 -0500

    changed perf rotate flag to a boolean type

commit 9cb4c80a3f6d670adeb829c3acab73ba4098cea7
Author: Carter Waxman <cwaxman@cisco.com>
Date:   Fri Feb 12 13:40:11 2016 -0500

    fixed threading issue in perf file rotation

src/network_inspectors/perf_monitor/perf_monitor.cc
src/network_inspectors/perf_monitor/perf_monitor.h

index 5030e83ed3e4febef7e869376c27c1ad93f44d8c..993698f5ee588e54c28edc8a0b69f48dfaa1b1cb 100644 (file)
@@ -61,7 +61,7 @@
 THREAD_LOCAL SimpleStats pmstats;
 THREAD_LOCAL ProfileStats perfmonStats;
 
-int perfmon_rotate_perf_file = 0;
+THREAD_LOCAL bool perfmon_rotate_perf_file = false;
 static SFPERF config;
 SFPERF* perfmon_config = &config;   //FIXIT-M remove this after flowip can be decoupled.
 THREAD_LOCAL std::vector<PerfTracker*>* trackers;
index cf9c090bf86ae2d6d83854cbe85b58bb4aba786a..43af28bba0451aa2464981a4a1e031a7ddd30d80 100644 (file)
@@ -68,22 +68,22 @@ typedef struct _SFPERF
 
 //FIXIT-M: this shouldn't be needed outside of perfmon
 extern SFPERF* perfmon_config;
-extern int perfmon_rotate_perf_file;
+extern THREAD_LOCAL bool perfmon_rotate_perf_file;
 
 /* functions to set & get the RotatePerfFileFlag */
 inline void SetRotatePerfFileFlag(void)
 {
-    perfmon_rotate_perf_file = 1;
+    perfmon_rotate_perf_file = true;
 }
 
-inline int IsSetRotatePerfFileFlag(void)
+inline bool IsSetRotatePerfFileFlag(void)
 {
     return perfmon_rotate_perf_file;
 }
 
 inline void ClearRotatePerfFileFlag(void)
 {
-    perfmon_rotate_perf_file = 0;
+    perfmon_rotate_perf_file = false;
 }
 
 #endif