]> pd.if.org Git - nbds/commitdiff
clean up skiplist debug print
authorjdybnis <jdybnis@9ec2166a-aeea-11dd-8830-69e4bb380a4a>
Sun, 23 Nov 2008 23:14:56 +0000 (23:14 +0000)
committerjdybnis <jdybnis@9ec2166a-aeea-11dd-8830-69e4bb380a4a>
Sun, 23 Nov 2008 23:14:56 +0000 (23:14 +0000)
change skiplist and list name prefixes

struct/list.c
struct/skiplist.c

index 40a973599d86360373e4ee561afffc0d3d94fff2..d9e461260c6511bf16190c9d2323f0849b96eec1 100644 (file)
@@ -31,7 +31,7 @@ node_t *node_alloc (uint64_t key, uint64_t value) {
     return item;
 }
 
     return item;
 }
 
-list_t *list_alloc (void) {
+list_t *ll_alloc (void) {
     list_t *list = (list_t *)nbd_malloc(sizeof(list_t));
     list->head = node_alloc(0, 0);
     list->last = node_alloc((uint64_t)-1, 0);
     list_t *list = (list_t *)nbd_malloc(sizeof(list_t));
     list->head = node_alloc(0, 0);
     list->last = node_alloc((uint64_t)-1, 0);
@@ -98,8 +98,8 @@ static node_t *find_pred (node_t **pred_ptr, list_t *list, uint64_t key, int hel
 }
 
 // Fast find. Do not help unlink partially removed nodes and do not return the found item's predecessor.
 }
 
 // Fast find. Do not help unlink partially removed nodes and do not return the found item's predecessor.
-uint64_t list_lookup (list_t *list, uint64_t key) {
-    TRACE("l3", "list_lookup: searching for key %p in list %p", key, list);
+uint64_t ll_lookup (list_t *list, uint64_t key) {
+    TRACE("l3", "ll_lookup: searching for key %p in list %p", key, list);
     node_t *item = find_pred(NULL, list, key, FALSE);
 
     // If we found an <item> matching the <key> return its value.
     node_t *item = find_pred(NULL, list, key, FALSE);
 
     // If we found an <item> matching the <key> return its value.
@@ -107,8 +107,8 @@ uint64_t list_lookup (list_t *list, uint64_t key) {
 }
 
 // Insert the <key>, if it doesn't already exist in the <list>
 }
 
 // Insert the <key>, if it doesn't already exist in the <list>
-uint64_t list_add (list_t *list, uint64_t key, uint64_t value) {
-    TRACE("l3", "list_add: inserting key %p value %p", key, value);
+uint64_t ll_add (list_t *list, uint64_t key, uint64_t value) {
+    TRACE("l3", "ll_add: inserting key %p value %p", key, value);
     node_t *pred;
     node_t *item = NULL;
     do {
     node_t *pred;
     node_t *item = NULL;
     do {
@@ -116,52 +116,52 @@ uint64_t list_add (list_t *list, uint64_t key, uint64_t value) {
 
         // If a node matching <key> already exists in the list, return its value.
         if (next->key == key) {
 
         // If a node matching <key> already exists in the list, return its value.
         if (next->key == key) {
-            TRACE("l3", "list_add: there is already an item %p (value %p) with the same key", next, next->value);
+            TRACE("l3", "ll_add: there is already an item %p (value %p) with the same key", next, next->value);
             if (EXPECT_FALSE(item != NULL)) { nbd_free(item); }
             return next->value;
         }
 
             if (EXPECT_FALSE(item != NULL)) { nbd_free(item); }
             return next->value;
         }
 
-        TRACE("l3", "list_add: attempting to insert item between %p and %p", pred, next);
+        TRACE("l3", "ll_add: attempting to insert item between %p and %p", pred, next);
         if (EXPECT_TRUE(item == NULL)) { item = node_alloc(key, value); }
         item->next = next;
         node_t *other = SYNC_CAS(&pred->next, next, item);
         if (other == next) {
         if (EXPECT_TRUE(item == NULL)) { item = node_alloc(key, value); }
         item->next = next;
         node_t *other = SYNC_CAS(&pred->next, next, item);
         if (other == next) {
-            TRACE("l3", "list_add: successfully inserted item %p", item, 0);
+            TRACE("l3", "ll_add: successfully inserted item %p", item, 0);
             return DOES_NOT_EXIST; // success
         }
             return DOES_NOT_EXIST; // success
         }
-        TRACE("l3", "list_add: failed to change pred's link: expected %p found %p", next, other);
+        TRACE("l3", "ll_add: failed to change pred's link: expected %p found %p", next, other);
 
     } while (1);
 }
 
 
     } while (1);
 }
 
-uint64_t list_remove (list_t *list, uint64_t key) {
-    TRACE("l3", "list_remove: removing item with key %p from list %p", key, list);
+uint64_t ll_remove (list_t *list, uint64_t key) {
+    TRACE("l3", "ll_remove: removing item with key %p from list %p", key, list);
     node_t *pred;
     node_t *item = find_pred(&pred, list, key, TRUE);
     if (item->key != key) {
     node_t *pred;
     node_t *item = find_pred(&pred, list, key, TRUE);
     if (item->key != key) {
-        TRACE("l3", "list_remove: remove failed, an item with a matching key does not exist in the list", 0, 0);
+        TRACE("l3", "ll_remove: remove failed, an item with a matching key does not exist in the list", 0, 0);
         return DOES_NOT_EXIST;
     }
 
     // Mark <item> removed. This must be atomic. If multiple threads try to remove the same item
     // only one of them should succeed.
     if (EXPECT_FALSE(IS_TAGGED(item->next))) {
         return DOES_NOT_EXIST;
     }
 
     // Mark <item> removed. This must be atomic. If multiple threads try to remove the same item
     // only one of them should succeed.
     if (EXPECT_FALSE(IS_TAGGED(item->next))) {
-        TRACE("l3", "list_remove: %p is already marked for removal by another thread", item, 0);
+        TRACE("l3", "ll_remove: %p is already marked for removal by another thread", item, 0);
         return DOES_NOT_EXIST;
     }
     node_t *next = SYNC_FETCH_AND_OR(&item->next, TAG);
     if (EXPECT_FALSE(IS_TAGGED(next))) {
         return DOES_NOT_EXIST;
     }
     node_t *next = SYNC_FETCH_AND_OR(&item->next, TAG);
     if (EXPECT_FALSE(IS_TAGGED(next))) {
-        TRACE("l3", "list_remove: lost race -- %p is already marked for removal by another thread", item, 0);
+        TRACE("l3", "ll_remove: lost race -- %p is already marked for removal by another thread", item, 0);
         return DOES_NOT_EXIST;
     }
 
     uint64_t value = item->value;
 
     // Unlink <item> from the list.
         return DOES_NOT_EXIST;
     }
 
     uint64_t value = item->value;
 
     // Unlink <item> from the list.
-    TRACE("l3", "list_remove: link item's pred %p to it's successor %p", pred, next);
+    TRACE("l3", "ll_remove: link item's pred %p to it's successor %p", pred, next);
     node_t *other;
     if ((other = SYNC_CAS(&pred->next, item, next)) != item) {
     node_t *other;
     if ((other = SYNC_CAS(&pred->next, item, next)) != item) {
-        TRACE("l3", "list_remove: unlink failed; pred's link changed from %p to %p", item, other);
+        TRACE("l3", "ll_remove: unlink failed; pred's link changed from %p to %p", item, other);
         // By marking the item earlier, we logically removed it. It is safe to leave the item.
         // Another thread will finish physically removing it from the list.
         return value;
         // By marking the item earlier, we logically removed it. It is safe to leave the item.
         // Another thread will finish physically removing it from the list.
         return value;
@@ -172,7 +172,7 @@ uint64_t list_remove (list_t *list, uint64_t key) {
     return value;
 }
 
     return value;
 }
 
-void list_print (list_t *list) {
+void ll_print (list_t *list) {
     node_t *item;
     item = list->head;
     while (item) {
     node_t *item;
     item = list->head;
     while (item) {
@@ -194,7 +194,7 @@ void list_print (list_t *list) {
 
 static volatile int wait_;
 static long num_threads_;
 
 static volatile int wait_;
 static long num_threads_;
-static list_t *list_;
+static list_t *ll_;
 
 void *worker (void *arg) {
     int id = (int)(size_t)arg;
 
 void *worker (void *arg) {
     int id = (int)(size_t)arg;
@@ -209,9 +209,9 @@ void *worker (void *arg) {
         int n = rand_r(&rand_seed);
         int key = (n & 0xF) + 1;
         if (n & (1 << 8)) {
         int n = rand_r(&rand_seed);
         int key = (n & 0xF) + 1;
         if (n & (1 << 8)) {
-            list_add(list_, key, 1);
+            ll_add(ll_, key, 1);
         } else {
         } else {
-            list_remove(list_, key);
+            ll_remove(ll_, key);
         }
 
         rcu_update();
         }
 
         rcu_update();
@@ -251,7 +251,7 @@ int main (int argc, char **argv) {
         }
     }
 
         }
     }
 
-    list_ = list_alloc();
+    ll_ = ll_alloc();
 
     struct timeval tv1, tv2;
     gettimeofday(&tv1, NULL);
 
     struct timeval tv1, tv2;
     gettimeofday(&tv1, NULL);
@@ -270,7 +270,7 @@ int main (int argc, char **argv) {
     gettimeofday(&tv2, NULL);
     int ms = (int)(1000000*(tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec - tv1.tv_usec) / 1000;
     printf("Th:%ld Time:%dms\n", num_threads_, ms);
     gettimeofday(&tv2, NULL);
     int ms = (int)(1000000*(tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec - tv1.tv_usec) / 1000;
     printf("Th:%ld Time:%dms\n", num_threads_, ms);
-    list_print(list_);
+    ll_print(ll_);
     lwt_dump("lwt.out");
 
     return 0;
     lwt_dump("lwt.out");
 
     return 0;
index 2d81fdd42364be4fd766f1b354dafdc58d6427df..9a26720001474f2858b53a46530b30b3e3c20de2 100644 (file)
@@ -9,6 +9,8 @@
  * See also Kir Fraser's dissertation "Practical Lock Freedom"
  * www.cl.cam.ac.uk/techreports/UCAM-CL-TR-579.pdf
  *
  * See also Kir Fraser's dissertation "Practical Lock Freedom"
  * www.cl.cam.ac.uk/techreports/UCAM-CL-TR-579.pdf
  *
+ * This code depends on certain stores and loads being ordered. Be careful on non-x86 platforms
+ * with weaker memory-models. This code probably won't work without adding some memory barriers.
  */
 #include <stdio.h>
 #include <string.h>
  */
 #include <stdio.h>
 #include <string.h>
@@ -17,7 +19,7 @@
 #include "struct.h"
 #include "mem.h"
 
 #include "struct.h"
 #include "mem.h"
 
-#define MAX_LEVEL 3
+#define MAX_LEVEL 31
 
 typedef struct node {
     uint64_t key;
 
 typedef struct node {
     uint64_t key;
@@ -52,7 +54,7 @@ node_t *node_alloc (int top_level, uint64_t key, uint64_t value) {
     return item;
 }
 
     return item;
 }
 
-skiplist_t *skiplist_alloc (void) {
+skiplist_t *sl_alloc (void) {
     skiplist_t *skiplist = (skiplist_t *)nbd_malloc(sizeof(skiplist_t));
     skiplist->head = node_alloc(MAX_LEVEL, 0, 0);
     skiplist->last = node_alloc(MAX_LEVEL, (uint64_t)-1, 0);
     skiplist_t *skiplist = (skiplist_t *)nbd_malloc(sizeof(skiplist_t));
     skiplist->head = node_alloc(MAX_LEVEL, 0, 0);
     skiplist->last = node_alloc(MAX_LEVEL, (uint64_t)-1, 0);
@@ -131,8 +133,8 @@ static node_t *find_preds (node_t **preds, skiplist_t *skiplist, uint64_t key, i
 }
 
 // Fast find that does not help unlink partially removed nodes and does not return the node's predecessors.
 }
 
 // Fast find that does not help unlink partially removed nodes and does not return the node's predecessors.
-uint64_t skiplist_lookup (skiplist_t *skiplist, uint64_t key) {
-    TRACE("s3", "skiplist_lookup: searching for key %p in skiplist %p", key, skiplist);
+uint64_t sl_lookup (skiplist_t *skiplist, uint64_t key) {
+    TRACE("s3", "sl_lookup: searching for key %p in skiplist %p", key, skiplist);
     node_t *item = find_preds(NULL, skiplist, key, FALSE);
 
     // If we found an <item> matching the <key> return its value.
     node_t *item = find_preds(NULL, skiplist, key, FALSE);
 
     // If we found an <item> matching the <key> return its value.
@@ -140,8 +142,8 @@ uint64_t skiplist_lookup (skiplist_t *skiplist, uint64_t key) {
 }
 
 // Insert the <key> if it doesn't already exist in the <skiplist>
 }
 
 // Insert the <key> if it doesn't already exist in the <skiplist>
-uint64_t skiplist_add_i (int n, skiplist_t *skiplist, uint64_t key, uint64_t value) {
-    TRACE("s3", "skiplist_add: inserting key %p value %p", key, value);
+uint64_t sl_add_r (int r, skiplist_t *skiplist, uint64_t key, uint64_t value) {
+    TRACE("s3", "sl_add: inserting key %p value %p", key, value);
     node_t *preds[MAX_LEVEL+1];
     node_t *item = NULL;
     do {
     node_t *preds[MAX_LEVEL+1];
     node_t *item = NULL;
     do {
@@ -149,24 +151,24 @@ uint64_t skiplist_add_i (int n, skiplist_t *skiplist, uint64_t key, uint64_t val
 
         // If a node matching <key> already exists in the skiplist, return its value.
         if (next->key == key) {
 
         // If a node matching <key> already exists in the skiplist, return its value.
         if (next->key == key) {
-            TRACE("s3", "skiplist_add: there is already an item %p (value %p) with the same key", next, next->value);
+            TRACE("s3", "sl_add: there is already an item %p (value %p) with the same key", next, next->value);
             if (EXPECT_FALSE(item != NULL)) { nbd_free(item); }
             return next->value;
         }
 
         // First insert <item> into the bottom level.
             if (EXPECT_FALSE(item != NULL)) { nbd_free(item); }
             return next->value;
         }
 
         // First insert <item> into the bottom level.
-        if (EXPECT_TRUE(item == NULL)) { item = node_alloc(random_level(n), key, value); }
-        TRACE("s3", "skiplist_add: attempting to insert item between %p and %p", preds[0], next);
+        if (EXPECT_TRUE(item == NULL)) { item = node_alloc(random_level(r), key, value); }
+        TRACE("s3", "sl_add: attempting to insert item between %p and %p", preds[0], next);
         item->next[0] = next;
         for (int level = 1; level <= item->top_level; ++level) {
             item->next[level] = preds[level]->next[level];
         }
         node_t *other = SYNC_CAS(&preds[0]->next[0], next, item);
         if (other == next) {
         item->next[0] = next;
         for (int level = 1; level <= item->top_level; ++level) {
             item->next[level] = preds[level]->next[level];
         }
         node_t *other = SYNC_CAS(&preds[0]->next[0], next, item);
         if (other == next) {
-            TRACE("s3", "skiplist_add: successfully inserted item %p at level 0", item, 0);
+            TRACE("s3", "sl_add: successfully inserted item %p at level 0", item, 0);
             break; // success
         }
             break; // success
         }
-        TRACE("s3", "skiplist_add: failed to change pred's link: expected %p found %p", next, other);
+        TRACE("s3", "sl_add: failed to change pred's link: expected %p found %p", next, other);
 
     } while (1);
 
 
     } while (1);
 
@@ -192,25 +194,25 @@ uint64_t skiplist_add_i (int n, skiplist_t *skiplist, uint64_t key, uint64_t val
                     break;
             } while (1);
 
                     break;
             } while (1);
 
-            TRACE("s3", "skiplist_add: attempting to insert item between %p and %p", pred, next);
+            TRACE("s3", "sl_add: attempting to insert item between %p and %p", pred, next);
             node_t *other = SYNC_CAS(&pred->next[level], next, item);
             if (other == next) {
             node_t *other = SYNC_CAS(&pred->next[level], next, item);
             if (other == next) {
-                TRACE("s3", "skiplist_add: successfully inserted item %p at level %llu", item, level);
+                TRACE("s3", "sl_add: successfully inserted item %p at level %llu", item, level);
                 break; // success
             }
                 break; // success
             }
-            TRACE("s3", "skiplist_add: failed to change pred's link: expected %p found %p", next, other);
+            TRACE("s3", "sl_add: failed to change pred's link: expected %p found %p", next, other);
 
         } while (1);
     }
     return value;
 }
 
 
         } while (1);
     }
     return value;
 }
 
-uint64_t skiplist_remove (skiplist_t *skiplist, uint64_t key) {
-    TRACE("s3", "skiplist_remove: removing item with key %p from skiplist %p", key, skiplist);
+uint64_t sl_remove (skiplist_t *skiplist, uint64_t key) {
+    TRACE("s3", "sl_remove: removing item with key %p from skiplist %p", key, skiplist);
     node_t *preds[MAX_LEVEL+1];
     node_t *item = find_preds(preds, skiplist, key, TRUE);
     if (item->key != key) {
     node_t *preds[MAX_LEVEL+1];
     node_t *item = find_preds(preds, skiplist, key, TRUE);
     if (item->key != key) {
-        TRACE("s3", "skiplist_remove: remove failed, an item with a matching key does not exist in the skiplist", 0, 0);
+        TRACE("s3", "sl_remove: remove failed, an item with a matching key does not exist in the skiplist", 0, 0);
         return DOES_NOT_EXIST;
     }
 
         return DOES_NOT_EXIST;
     }
 
@@ -219,14 +221,14 @@ uint64_t skiplist_remove (skiplist_t *skiplist, uint64_t key) {
     // them succeeds.
     for (int level = item->top_level; level >= 0; --level) {
         if (EXPECT_FALSE(IS_TAGGED(item->next[level]))) {
     // them succeeds.
     for (int level = item->top_level; level >= 0; --level) {
         if (EXPECT_FALSE(IS_TAGGED(item->next[level]))) {
-            TRACE("s3", "skiplist_remove: %p is already marked for removal by another thread", item, 0);
+            TRACE("s3", "sl_remove: %p is already marked for removal by another thread", item, 0);
             if (level == 0)
                 return DOES_NOT_EXIST;
             continue;
         }
         node_t *next = SYNC_FETCH_AND_OR(&item->next[level], TAG);
         if (EXPECT_FALSE(IS_TAGGED(next))) {
             if (level == 0)
                 return DOES_NOT_EXIST;
             continue;
         }
         node_t *next = SYNC_FETCH_AND_OR(&item->next[level], TAG);
         if (EXPECT_FALSE(IS_TAGGED(next))) {
-            TRACE("s3", "skiplist_remove: lost race -- %p is already marked for removal by another thread", item, 0);
+            TRACE("s3", "sl_remove: lost race -- %p is already marked for removal by another thread", item, 0);
             if (level == 0)
                 return DOES_NOT_EXIST;
             continue;
             if (level == 0)
                 return DOES_NOT_EXIST;
             continue;
@@ -240,10 +242,10 @@ uint64_t skiplist_remove (skiplist_t *skiplist, uint64_t key) {
     while (level >= 0) {
         node_t *pred = preds[level];
         node_t *next = item->next[level];
     while (level >= 0) {
         node_t *pred = preds[level];
         node_t *next = item->next[level];
-        TRACE("s3", "skiplist_remove: link item's pred %p to it's successor %p", pred, STRIP_TAG(next));
+        TRACE("s3", "sl_remove: link item's pred %p to it's successor %p", pred, STRIP_TAG(next));
         node_t *other = NULL;
         if ((other = SYNC_CAS(&pred->next[level], item, STRIP_TAG(next))) != item) {
         node_t *other = NULL;
         if ((other = SYNC_CAS(&pred->next[level], item, STRIP_TAG(next))) != item) {
-            TRACE("s3", "skiplist_remove: unlink failed; pred's link changed from %p to %p", item, other);
+            TRACE("s3", "sl_remove: unlink failed; pred's link changed from %p to %p", item, other);
             // By marking the item earlier, we logically removed it. It is safe to leave the item partially
             // unlinked. Another thread will finish physically removing it from the skiplist.
             return value;
             // By marking the item earlier, we logically removed it. It is safe to leave the item partially
             // unlinked. Another thread will finish physically removing it from the skiplist.
             return value;
@@ -256,10 +258,12 @@ uint64_t skiplist_remove (skiplist_t *skiplist, uint64_t key) {
     return value;
 }
 
     return value;
 }
 
-void skiplist_print (skiplist_t *skiplist) {
+void sl_print (skiplist_t *skiplist) {
     for (int level = MAX_LEVEL; level >= 0; --level) {
     for (int level = MAX_LEVEL; level >= 0; --level) {
-        printf("(%d) ", level);
         node_t *item = skiplist->head;
         node_t *item = skiplist->head;
+        if (item->next[level] == skiplist->last)
+            continue;
+        printf("(%d) ", level);
         while (item) {
             node_t *next = item->next[level];
             printf("%s%p:0x%llx ", IS_TAGGED(next) ? "*" : "", item, item->key);
         while (item) {
             node_t *next = item->next[level];
             printf("%s%p:0x%llx ", IS_TAGGED(next) ? "*" : "", item, item->key);
@@ -269,14 +273,19 @@ void skiplist_print (skiplist_t *skiplist) {
         fflush(stdout);
     }
 
         fflush(stdout);
     }
 
+    printf("\n");
     node_t *item = skiplist->head;
     while (item) {
         assert(item->top_level <= MAX_LEVEL);
         int is_marked = IS_TAGGED(item->next[0]);
         printf("%s%p:0x%llx (%d", is_marked ? "*" : "", item, item->key, item->top_level);
     node_t *item = skiplist->head;
     while (item) {
         assert(item->top_level <= MAX_LEVEL);
         int is_marked = IS_TAGGED(item->next[0]);
         printf("%s%p:0x%llx (%d", is_marked ? "*" : "", item, item->key, item->top_level);
-        for (int i = 1; i <= item->top_level; ++i) {
-            node_t *next = (node_t *)STRIP_TAG(item->next[i]);
-            printf(" %p:0x%llx", item->next[i], next ? next->key : 0);
+        for (int level = 1; level <= item->top_level; ++level) {
+            node_t *next = (node_t *)STRIP_TAG(item->next[level]);
+            printf(" %p:0x%llx", item->next[level], next ? next->key : 0);
+            if (item == skiplist->head && item->next[level] == skiplist->last)
+                break;
+            if (item == skiplist->last && item->next[level] == NULL)
+                break;
         }
         printf(")\n");
         fflush(stdout);
         }
         printf(")\n");
         fflush(stdout);
@@ -295,7 +304,7 @@ void skiplist_print (skiplist_t *skiplist) {
 
 static volatile int wait_;
 static long num_threads_;
 
 static volatile int wait_;
 static long num_threads_;
-static skiplist_t *skiplist_;
+static skiplist_t *sl_;
 
 void *worker (void *arg) {
     int id = (int)(size_t)arg;
 
 void *worker (void *arg) {
     int id = (int)(size_t)arg;
@@ -310,9 +319,9 @@ void *worker (void *arg) {
         int n = rand_r(&rand_seed);
         int key = (n & 0xF) + 1;
         if (n & (1 << 8)) {
         int n = rand_r(&rand_seed);
         int key = (n & 0xF) + 1;
         if (n & (1 << 8)) {
-            skiplist_add_i(n, skiplist_, key, 1);
+            sl_add_r(n, sl_, key, 1);
         } else {
         } else {
-            skiplist_remove(skiplist_, key);
+            sl_remove(sl_, key);
         }
 
         rcu_update();
         }
 
         rcu_update();
@@ -352,7 +361,7 @@ int main (int argc, char **argv) {
         }
     }
 
         }
     }
 
-    skiplist_ = skiplist_alloc();
+    sl_ = sl_alloc();
 
     struct timeval tv1, tv2;
     gettimeofday(&tv1, NULL);
 
     struct timeval tv1, tv2;
     gettimeofday(&tv1, NULL);
@@ -371,7 +380,7 @@ int main (int argc, char **argv) {
     gettimeofday(&tv2, NULL);
     int ms = (int)(1000000*(tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec - tv1.tv_usec) / 1000;
     printf("Th:%ld Time:%dms\n", num_threads_, ms);
     gettimeofday(&tv2, NULL);
     int ms = (int)(1000000*(tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec - tv1.tv_usec) / 1000;
     printf("Th:%ld Time:%dms\n", num_threads_, ms);
-    skiplist_print(skiplist_);
+    sl_print(sl_);
     lwt_dump("lwt.out");
 
     return 0;
     lwt_dump("lwt.out");
 
     return 0;