8 #include "threads-model.h"
10 typedef HashSet<uint64_t, uint64_t, 0, model_malloc, model_calloc, model_free> write_set_t;
17 void enter_function(const uint32_t func_id, thread_id_t tid);
18 void exit_function(const uint32_t func_id, thread_id_t tid);
20 uint32_t get_func_counter() { return func_counter; }
21 void incr_func_counter() { func_counter++; }
23 void resize_func_nodes(uint32_t max_func_id);
24 void process_action(ModelAction *act, thread_id_t tid);
26 HashTable<const char *, uint32_t, uintptr_t, 4, model_malloc, model_calloc, model_free> * getFuncMap() { return &func_map; }
27 ModelVector<const char *> * getFuncMapRev() { return &func_map_rev; }
29 ModelVector<FuncNode *> * getFuncNodes() { return &func_nodes; }
30 FuncNode * get_func_node(uint32_t func_id);
31 uint64_t query_last_read(void * location, thread_id_t tid);
33 void add_to_write_history(void * location, uint64_t write_val);
39 uint32_t func_counter;
41 /* map function names to integer ids */
42 HashTable<const char *, uint32_t, uintptr_t, 4, model_malloc, model_calloc, model_free> func_map;
43 /* map integer ids to function names */
44 ModelVector<const char *> func_map_rev;
46 ModelVector<FuncNode *> func_nodes;
47 HashTable<void *, write_set_t *, uintptr_t, 4, model_malloc, model_calloc, model_free> write_history;
50 #endif /* __HISTORY_H__ */