X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=history.h;h=2a77e251f8786709d7731318075047803e31d1fe;hb=0e96d6b49ca2c1f81b45e0b25fc4607304bbd6f1;hp=184646c64a8eaf30eb436b97a5a71ae6391d926f;hpb=0403cb2a09782c54f12f413be0a2ccd7ea6ae60a;p=c11tester.git diff --git a/history.h b/history.h index 184646c6..2a77e251 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 { @@ -22,18 +26,32 @@ public: ModelVector * getFuncNodes() { return &func_nodes; } FuncNode * get_func_node(uint32_t func_id); - uint64_t query_last_read(void * location, thread_id_t tid); +// uint64_t query_last_read(void * location, thread_id_t tid); + + 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 print(); + 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__ */