function id should start with 1 rather than 0
authorweiyu <weiyuluo1232@gmail.com>
Thu, 18 Jul 2019 18:36:41 +0000 (11:36 -0700)
committerweiyu <weiyuluo1232@gmail.com>
Thu, 18 Jul 2019 18:36:41 +0000 (11:36 -0700)
history.cc

index caf86cedb46a46b2d72cc542c2598057d0b98fa2..23e0d85ac5f685c2e79ae0a8385e364a337d8597 100644 (file)
@@ -10,7 +10,7 @@
 
 /** @brief Constructor */
 ModelHistory::ModelHistory() :
-       func_counter(0), /* function id starts with 0 */
+       func_counter(1), /* function id starts with 1 */
        func_map(),
        func_map_rev(),
        func_atomics()
@@ -106,6 +106,7 @@ void ModelHistory::add_func_atomic(ModelAction *act, thread_id_t tid)
                func_atomics[func_id] = func_node;
        }
 
+       /* add corresponding FuncInst to func_node and curr_inst_list*/
        FuncInst * inst = func_node->get_or_add_action(act);
        if (inst != NULL) {
                func_inst_list_t * curr_inst_list = func_inst_lists->back();