@@ -203,6 +203,13 @@ static const cache_test_data_t test_data_truth[] = {
203203 .miss_cnt_true = {90043 , 83978 , 81482 , 77727 , 72611 , 72059 , 67836 , 65739 },
204204 .miss_byte_true = {4068758016 , 3792818176 , 3639756288 , 3379609600 ,
205205 3165339648 , 3058814976 , 2862775296 , 2774183936 }},
206+ {.cache_name = "Clock2QPlus" ,
207+ .hashpower = 20 ,
208+ .req_cnt_true = 113872 ,
209+ .req_byte_true = 4368040448 ,
210+ .miss_cnt_true = {90600 , 81357 , 75287 , 72430 , 70057 , 65671 , 60864 , 55864 },
211+ .miss_byte_true = {4061047808 , 3577076736 , 3242227712 , 3061383680 ,
212+ 2898187264 , 2624986112 , 2422187008 , 2322797568 }},
206213#if defined(ENABLE_3L_CACHE ) && ENABLE_3L_CACHE == 1
207214 {.cache_name = "3LCache" ,
208215 .hashpower = 20 ,
@@ -385,9 +392,13 @@ static void test_SR_LRU(gconstpointer user_data) {
385392 test_cache_algorithm (user_data , & test_data_truth [25 ]);
386393}
387394
395+ static void test_Clock2QPlus (gconstpointer user_data ) {
396+ test_cache_algorithm (user_data , & test_data_truth [26 ]);
397+ }
398+
388399#if defined(ENABLE_3L_CACHE ) && ENABLE_3L_CACHE == 1
389400static void test_3LCache (gconstpointer user_data ) {
390- test_cache_algorithm (user_data , & test_data_truth [26 ]);
401+ test_cache_algorithm (user_data , & test_data_truth [27 ]);
391402}
392403#endif /* ENABLE_3L_CACHE */
393404
@@ -441,6 +452,8 @@ int main(int argc, char *argv[]) {
441452 g_test_add_data_func ("/libCacheSim/cacheAlgo_Sieve" , reader , test_Sieve );
442453 g_test_add_data_func ("/libCacheSim/cacheAlgo_SLRU" , reader , test_SLRU );
443454 g_test_add_data_func ("/libCacheSim/cacheAlgo_SR_LRU" , reader , test_SR_LRU );
455+ g_test_add_data_func ("/libCacheSim/cacheAlgo_Clock2QPlus" , reader ,
456+ test_Clock2QPlus );
444457
445458#if defined(ENABLE_3L_CACHE ) && ENABLE_3L_CACHE == 1
446459 g_test_add_data_func ("/libCacheSim/cacheAlgo_3LCache" , reader , test_3LCache );
0 commit comments