X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=history.h;h=0a51e6404826bda5407cbf41be96b8635051f5df;hb=eed2c95c816686f295d6baa6743f74d9265b40c2;hp=2c359c92c569f5bad81c4ab6352c9c526ab59ae6;hpb=3af3ac7e5138cbb6e239edfbc857d71ab8cb60cf;p=c11tester.git diff --git a/history.h b/history.h index 2c359c92..0a51e640 100644 --- a/history.h +++ b/history.h @@ -1,6 +1,10 @@ +#ifndef __HISTORY_H__ +#define __HISTORY_H__ + #include "stl-model.h" #include "common.h" #include "hashtable.h" +#include "hashset.h" #include "threads-model.h" class ModelHistory { @@ -14,6 +18,7 @@ public: uint32_t get_func_counter() { return func_counter; } void incr_func_counter() { func_counter++; } + void resize_func_nodes(uint32_t max_func_id); void process_action(ModelAction *act, thread_id_t tid); HashTable * getFuncMap() { return &func_map; } @@ -22,16 +27,30 @@ public: ModelVector * getFuncNodes() { return &func_nodes; } FuncNode * get_func_node(uint32_t func_id); - void print(); + void add_to_write_history(void * location, uint64_t write_val); + HashTable * getWriteHistory() { return &write_history; } + void add_to_loc_func_nodes_map(void * location, FuncNode * node); + + void set_new_exec_flag(); + void print_write(); + void print_func_node(); MEMALLOC private: uint32_t func_counter; - /* map function names to integer ids */ + /* Map function names to integer ids */ HashTable func_map; - /* map integer ids to function names */ + + /* Map integer ids to function names */ ModelVector func_map_rev; ModelVector func_nodes; + + HashTable write_history; + + /* Map a location to FuncNodes that may read from it */ + HashTable *, uintptr_t, 4> loc_func_nodes_map; }; + +#endif /* __HISTORY_H__ */