Adds parameter for both RCU and HP based map test cases
authorPeizhao Ou <peizhaoo@uci.edu>
Thu, 25 Jan 2018 19:50:01 +0000 (11:50 -0800)
committerPeizhao Ou <peizhaoo@uci.edu>
Thu, 25 Jan 2018 19:50:01 +0000 (11:50 -0800)
12 files changed:
test/stress/sequential/sequential-map/insdelfind/map_insdelfind.cpp
test/stress/sequential/sequential-map/insdelfind/map_insdelfind.h
test/stress/sequential/sequential-map/insdelfind/map_insdelfind_ellentree_hp.cpp
test/stress/sequential/sequential-map/insdelfind/map_insdelfind_ellentree_rcu.cpp
test/stress/sequential/sequential-map/insdelfind/map_insdelfind_feldman_hashset_hp.cpp
test/stress/sequential/sequential-map/insdelfind/map_insdelfind_feldman_hashset_rcu.cpp
test/stress/sequential/sequential-map/insdelfind/map_insdelfind_michael_hp.cpp
test/stress/sequential/sequential-map/insdelfind/map_insdelfind_michael_rcu.cpp
test/stress/sequential/sequential-map/insdelfind/map_insdelfind_skip_hp.cpp
test/stress/sequential/sequential-map/insdelfind/map_insdelfind_skip_rcu.cpp
test/stress/sequential/sequential-map/insdelfind/map_insdelfind_split_hp.cpp
test/stress/sequential/sequential-map/insdelfind/map_insdelfind_split_rcu.cpp

index 63fe876..50ff406 100644 (file)
@@ -36,12 +36,19 @@ namespace map {
     size_t Map_InsDelFind::s_nThreadCount = 8;
 
     size_t Map_InsDelFind::s_nPassCount = 100;
-    size_t Map_InsDelFind::s_nFeldmanPassCount = 100;
     size_t Map_InsDelFind::s_nBronsonAVLTreeMapPassCount = 100;
-    size_t Map_InsDelFind::s_nEllenBinTreeMapPassCount = 100;
-    size_t Map_InsDelFind::s_nMichaelMapPassCount = 100;
-    size_t Map_InsDelFind::s_nSkipListMapPassCount = 100;
-    size_t Map_InsDelFind::s_nSplitListMapPassCount = 100;
+
+    size_t Map_InsDelFind::s_nHpFeldmanPassCount = 100;
+    size_t Map_InsDelFind::s_nHpEllenBinTreeMapPassCount = 100;
+    size_t Map_InsDelFind::s_nHpMichaelMapPassCount = 100;
+    size_t Map_InsDelFind::s_nHpSkipListMapPassCount = 100;
+    size_t Map_InsDelFind::s_nHpSplitListMapPassCount = 100;
+
+    size_t Map_InsDelFind::s_nRcuFeldmanPassCount = 100;
+    size_t Map_InsDelFind::s_nRcuEllenBinTreeMapPassCount = 100;
+    size_t Map_InsDelFind::s_nRcuMichaelMapPassCount = 100;
+    size_t Map_InsDelFind::s_nRcuSkipListMapPassCount = 100;
+    size_t Map_InsDelFind::s_nRcuSplitListMapPassCount = 100;
 
     size_t Map_InsDelFind::s_nMaxLoadFactor = 8;
     unsigned int Map_InsDelFind::s_nInsertPercentage = 5;
@@ -76,35 +83,60 @@ namespace map {
         if (s_nPassCount == 0)
           s_nPassCount = 500;
 
-        s_nFeldmanPassCount =
-            cfg.get_size_t("FeldmanPassCount", s_nFeldmanPassCount);
-        if (s_nFeldmanPassCount == 0)
-          s_nFeldmanPassCount = 500;
-
         s_nBronsonAVLTreeMapPassCount = cfg.get_size_t(
             "BronsonAVLTreeMapPassCount", s_nBronsonAVLTreeMapPassCount);
         if (s_nBronsonAVLTreeMapPassCount == 0)
           s_nBronsonAVLTreeMapPassCount = 500;
 
-        s_nEllenBinTreeMapPassCount = cfg.get_size_t(
-            "EllenBinTreeMapPassCount", s_nEllenBinTreeMapPassCount);
-        if (s_nEllenBinTreeMapPassCount == 0)
-          s_nEllenBinTreeMapPassCount = 500;
-
-        s_nMichaelMapPassCount =
-            cfg.get_size_t("MichaelMapPassCount", s_nMichaelMapPassCount);
-        if (s_nMichaelMapPassCount == 0)
-          s_nMichaelMapPassCount = 500;
-
-        s_nSkipListMapPassCount =
-            cfg.get_size_t("SkipListMapPassCount", s_nSkipListMapPassCount);
-        if (s_nSkipListMapPassCount == 0)
-          s_nSkipListMapPassCount = 500;
-
-        s_nSplitListMapPassCount =
-            cfg.get_size_t("SplitListMapPassCount", s_nSplitListMapPassCount);
-        if (s_nSplitListMapPassCount == 0)
-          s_nSplitListMapPassCount = 500;
+        s_nHpFeldmanPassCount =
+            cfg.get_size_t("HpFeldmanPassCount", s_nHpFeldmanPassCount);
+        if (s_nHpFeldmanPassCount == 0)
+          s_nHpFeldmanPassCount = 500;
+
+        s_nRcuFeldmanPassCount =
+            cfg.get_size_t("RcuFeldmanPassCount", s_nRcuFeldmanPassCount);
+        if (s_nRcuFeldmanPassCount == 0)
+          s_nRcuFeldmanPassCount = 500;
+
+        s_nHpEllenBinTreeMapPassCount = cfg.get_size_t(
+            "HpEllenBinTreeMapPassCount", s_nHpEllenBinTreeMapPassCount);
+        if (s_nHpEllenBinTreeMapPassCount == 0)
+          s_nHpEllenBinTreeMapPassCount = 500;
+
+        s_nRcuEllenBinTreeMapPassCount = cfg.get_size_t(
+            "RcuEllenBinTreeMapPassCount", s_nRcuEllenBinTreeMapPassCount);
+        if (s_nRcuEllenBinTreeMapPassCount == 0)
+          s_nRcuEllenBinTreeMapPassCount = 500;
+
+        s_nHpMichaelMapPassCount =
+            cfg.get_size_t("HpMichaelMapPassCount", s_nHpMichaelMapPassCount);
+        if (s_nHpMichaelMapPassCount == 0)
+          s_nHpMichaelMapPassCount = 500;
+
+        s_nRcuMichaelMapPassCount =
+            cfg.get_size_t("RcuMichaelMapPassCount", s_nRcuMichaelMapPassCount);
+        if (s_nRcuMichaelMapPassCount == 0)
+          s_nRcuMichaelMapPassCount = 500;
+
+        s_nHpSkipListMapPassCount =
+            cfg.get_size_t("HpSkipListMapPassCount", s_nHpSkipListMapPassCount);
+        if (s_nHpSkipListMapPassCount == 0)
+          s_nHpSkipListMapPassCount = 500;
+
+        s_nRcuSkipListMapPassCount =
+            cfg.get_size_t("RcuSkipListMapPassCount", s_nRcuSkipListMapPassCount);
+        if (s_nRcuSkipListMapPassCount == 0)
+          s_nRcuSkipListMapPassCount = 500;
+
+        s_nHpSplitListMapPassCount =
+            cfg.get_size_t("HpSplitListMapPassCount", s_nHpSplitListMapPassCount);
+        if (s_nHpSplitListMapPassCount == 0)
+          s_nHpSplitListMapPassCount = 500;
+
+        s_nRcuSplitListMapPassCount =
+            cfg.get_size_t("RcuSplitListMapPassCount", s_nRcuSplitListMapPassCount);
+        if (s_nRcuSplitListMapPassCount == 0)
+          s_nRcuSplitListMapPassCount = 500;
 
         s_nMaxLoadFactor = cfg.get_size_t( "MaxLoadFactor", s_nMaxLoadFactor );
         if ( s_nMaxLoadFactor == 0 )
index 3eeaa53..165a1d1 100644 (file)
@@ -40,11 +40,19 @@ namespace map {
 
         static size_t s_nPassCount;
         static size_t s_nBronsonAVLTreeMapPassCount;
-        static size_t s_nEllenBinTreeMapPassCount;
-        static size_t s_nFeldmanPassCount;
-        static size_t s_nMichaelMapPassCount;
-        static size_t s_nSkipListMapPassCount;
-        static size_t s_nSplitListMapPassCount;
+
+        static size_t s_nHpEllenBinTreeMapPassCount;
+        static size_t s_nHpFeldmanPassCount;
+        static size_t s_nHpMichaelMapPassCount;
+        static size_t s_nHpSkipListMapPassCount;
+        static size_t s_nHpSplitListMapPassCount;
+
+        static size_t s_nRcuEllenBinTreeMapPassCount;
+        static size_t s_nRcuFeldmanPassCount;
+        static size_t s_nRcuMichaelMapPassCount;
+        static size_t s_nRcuSkipListMapPassCount;
+        static size_t s_nRcuSplitListMapPassCount;
+
 
         static size_t s_nThreadCount;       // thread count
         static size_t s_nMaxLoadFactor;     // maximum load factor
@@ -211,23 +219,44 @@ namespace map {
         }
 
         template <class Map>
-        void run_ellen_bin_tree() {
+        void run_ellen_bin_tree_hp() {
+          Map_InsDelFind::s_nPassCount =
+              Map_InsDelFind::s_nHpEllenBinTreeMapPassCount;
+          run_test<Map>();
+        }
+
+        template <class Map>
+        void run_skip_list_hp() {
+          Map_InsDelFind::s_nPassCount =
+              Map_InsDelFind::s_nHpSkipListMapPassCount;
+          run_test<Map>();
+        }
+
+        template <class Map>
+        void run_feldman_hp() {
+          Map_InsDelFind::s_nPassCount =
+              Map_InsDelFind::s_nHpFeldmanPassCount;
+          run_test<Map>();
+        }
+
+        template <class Map>
+        void run_ellen_bin_tree_rcu() {
           Map_InsDelFind::s_nPassCount =
-              Map_InsDelFind::s_nEllenBinTreeMapPassCount;
+              Map_InsDelFind::s_nRcuEllenBinTreeMapPassCount;
           run_test<Map>();
         }
 
         template <class Map>
-        void run_skip_list() {
+        void run_skip_list_rcu() {
           Map_InsDelFind::s_nPassCount =
-              Map_InsDelFind::s_nSkipListMapPassCount;
+              Map_InsDelFind::s_nRcuSkipListMapPassCount;
           run_test<Map>();
         }
 
         template <class Map>
-        void run_feldman() {
+        void run_feldman_rcu() {
           Map_InsDelFind::s_nPassCount =
-              Map_InsDelFind::s_nFeldmanPassCount;
+              Map_InsDelFind::s_nRcuFeldmanPassCount;
           run_test<Map>();
         }
     };
@@ -245,16 +274,30 @@ namespace map {
         }
 
                                template <class Map>
-        void run_michael() {
+        void run_michael_hp() {
+          Map_InsDelFind::s_nPassCount =
+              Map_InsDelFind::s_nHpMichaelMapPassCount;
+          Map_InsDelFind_LF::run_test<Map>();
+        }
+
+        template <class Map>
+        void run_split_list_hp() {
+          Map_InsDelFind::s_nPassCount =
+              Map_InsDelFind::s_nHpSplitListMapPassCount;
+          Map_InsDelFind_LF::run_test<Map>();
+        }
+
+        template <class Map>
+        void run_michael_rcu() {
           Map_InsDelFind::s_nPassCount =
-              Map_InsDelFind::s_nMichaelMapPassCount;
+              Map_InsDelFind::s_nRcuMichaelMapPassCount;
           Map_InsDelFind_LF::run_test<Map>();
         }
 
         template <class Map>
-        void run_split_list() {
+        void run_split_list_rcu() {
           Map_InsDelFind::s_nPassCount =
-              Map_InsDelFind::s_nSplitListMapPassCount;
+              Map_InsDelFind::s_nRcuSplitListMapPassCount;
           Map_InsDelFind_LF::run_test<Map>();
         }
 
index 7372eee..88ba4d6 100644 (file)
@@ -33,6 +33,6 @@
 
 namespace map {
 
-    CDSSTRESS_EllenBinTreeMap_HP( Map_InsDelFind, run_ellen_bin_tree, size_t, size_t )
+    CDSSTRESS_EllenBinTreeMap_HP( Map_InsDelFind, run_ellen_bin_tree_hp, size_t, size_t )
 
 } // namespace map
index b5db47f..43306b5 100644 (file)
@@ -33,6 +33,6 @@
 
 namespace map {
 
-    CDSSTRESS_EllenBinTreeMap_RCU( Map_InsDelFind, run_ellen_bin_tree, size_t, size_t )
+    CDSSTRESS_EllenBinTreeMap_RCU( Map_InsDelFind, run_ellen_bin_tree_rcu, size_t, size_t )
 
 } // namespace map
index dce3ebb..0787b0c 100644 (file)
@@ -33,6 +33,6 @@
 
 namespace map {
 
-    CDSSTRESS_FeldmanHashMap_fixed_HP( Map_InsDelFind, run_feldman, size_t, size_t )
+    CDSSTRESS_FeldmanHashMap_fixed_HP( Map_InsDelFind, run_feldman_hp, size_t, size_t )
 
 } // namespace map
index 0122f16..2e6ecfe 100644 (file)
@@ -33,6 +33,6 @@
 
 namespace map {
 
-    CDSSTRESS_FeldmanHashMap_fixed_RCU( Map_InsDelFind, run_feldman, size_t, size_t )
+    CDSSTRESS_FeldmanHashMap_fixed_RCU( Map_InsDelFind, run_feldman_rcu, size_t, size_t )
 
 } // namespace map
index 4083ab6..61b8bd2 100644 (file)
@@ -33,6 +33,6 @@
 
 namespace map {
 
-    CDSSTRESS_MichaelMap_HP( Map_InsDelFind_LF, run_michael, size_t, size_t )
+    CDSSTRESS_MichaelMap_HP( Map_InsDelFind_LF, run_michael_hp, size_t, size_t )
 
 } // namespace map
index 0874b0a..309c1e0 100644 (file)
@@ -33,6 +33,6 @@
 
 namespace map {
 
-    CDSSTRESS_MichaelMap_RCU( Map_InsDelFind_LF, run_michael, size_t, size_t )
+    CDSSTRESS_MichaelMap_RCU( Map_InsDelFind_LF, run_michael_rcu, size_t, size_t )
 
 } // namespace map
index a78c73f..329a773 100644 (file)
@@ -33,6 +33,6 @@
 
 namespace map {
 
-    CDSSTRESS_SkipListMap_HP( Map_InsDelFind, run_skip_list, size_t, size_t )
+    CDSSTRESS_SkipListMap_HP( Map_InsDelFind, run_skip_list_hp, size_t, size_t )
 
 } // namespace map
index d73fa79..19d1085 100644 (file)
@@ -33,6 +33,6 @@
 
 namespace map {
 
-    CDSSTRESS_SkipListMap_RCU( Map_InsDelFind, run_skip_list, size_t, size_t )
+    CDSSTRESS_SkipListMap_RCU( Map_InsDelFind, run_skip_list_rcu, size_t, size_t )
 
 } // namespace map
index 625afca..0c501bc 100644 (file)
@@ -33,7 +33,7 @@
 
 namespace map {
 
-    CDSSTRESS_SplitListMap_HP( Map_InsDelFind_LF, run_split_list, size_t, size_t )
-    CDSSTRESS_SplitListIterableMap( Map_InsDelFind_LF, run_split_list, size_t, size_t )
+    CDSSTRESS_SplitListMap_HP( Map_InsDelFind_LF, run_split_list_hp, size_t, size_t )
+    CDSSTRESS_SplitListIterableMap( Map_InsDelFind_LF, run_split_list_hp, size_t, size_t )
 
 } // namespace map
index bfa4da8..9da9c8a 100644 (file)
@@ -33,6 +33,6 @@
 
 namespace map {
 
-    CDSSTRESS_SplitListMap_RCU( Map_InsDelFind_LF, run_split_list, size_t, size_t )
+    CDSSTRESS_SplitListMap_RCU( Map_InsDelFind_LF, run_split_list_rcu, size_t, size_t )
 
 } // namespace map