From: weiyu Date: Thu, 22 Aug 2019 01:55:41 +0000 (-0700) Subject: update FuncNodes when there is a write X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c4fcfd684e2017658cd69cc491ffd94ff8fe9603;p=c11tester.git update FuncNodes when there is a write --- diff --git a/history.cc b/history.cc index 68e8575f..581dfc1b 100644 --- a/history.cc +++ b/history.cc @@ -125,8 +125,20 @@ void ModelHistory::process_action(ModelAction *act, thread_id_t tid) SnapList * func_act_lists = (*thrd_func_act_lists)[id]; if (act->is_write()) { - add_to_write_history(act->get_location(), act->get_write_value()); - + void * location = act->get_location(); + uint64_t value = act->get_write_value(); + add_to_write_history(location, value); + + /* update FuncNodes */ + SnapList * func_nodes = loc_func_nodes_map.get(location); + sllnode * it = NULL; + if (func_nodes != NULL) + it = func_nodes->begin(); + + for (; it != NULL; it = it->getNext()) { + FuncNode * func_node = it->getVal(); + func_node->add_to_val_loc_map(value, location); + } } /* the following does not care about actions without a position */