func_map(),
func_map_rev(),
func_nodes(),
- write_history()
+ write_history(),
+ write_locations()
{}
void ModelHistory::enter_function(const uint32_t func_id, thread_id_t tid)
void ModelHistory::add_to_write_history(void * location, uint64_t write_val)
{
- if ( !write_history.contains(location) )
- write_history.put(location, new write_set_t() );
-
write_set_t * write_set = write_history.get(location);
+
+ if (write_set == NULL) {
+ write_set = new write_set_t();
+ write_history.put(location, write_set);
+ }
+
write_set->add(write_val);
+ write_locations.add(location);
}
-void ModelHistory::print()
+void ModelHistory::print_write()
+{
+}
+
+void ModelHistory::print_func_node()
{
/* function id starts with 1 */
- for (uint32_t i = 1;i < func_nodes.size();i++) {
+ for (uint32_t i = 1; i < func_nodes.size(); i++) {
FuncNode * func_node = func_nodes[i];
func_inst_list_mt * entry_insts = func_node->get_entry_insts();
FuncInst *inst = *it;
model_print("type: %d, at: %s\n", inst->get_type(), inst->get_position());
}
-
/*
func_inst_list_mt * inst_list = funcNode->get_inst_list();
FuncInst *inst = *it;
model_print("type: %d, at: %s\n", inst->get_type(), inst->get_position());
}
- */
+*/
}
}