8 #include "threads-model.h"
16 void enter_function(const uint32_t func_id, thread_id_t tid);
17 void exit_function(const uint32_t func_id, thread_id_t tid);
19 uint32_t get_func_counter() { return func_counter; }
20 void incr_func_counter() { func_counter++; }
22 void resize_func_nodes(uint32_t max_func_id);
23 void process_action(ModelAction *act, thread_id_t tid);
25 HashTable<const char *, uint32_t, uintptr_t, 4, model_malloc, model_calloc, model_free> * getFuncMap() { return &func_map; }
26 ModelVector<const char *> * getFuncMapRev() { return &func_map_rev; }
28 ModelVector<FuncNode *> * getFuncNodes() { return &func_nodes; }
29 FuncNode * get_func_node(uint32_t func_id);
30 uint64_t query_last_read(void * location, thread_id_t tid);
32 void add_to_write_history(void * location, uint64_t write_val);
33 HashTable<void *, write_set_t *, uintptr_t, 4> * getWriteHistory() { return &write_history; }
36 void print_func_node();
40 uint32_t func_counter;
42 /* map function names to integer ids */
43 HashTable<const char *, uint32_t, uintptr_t, 4, model_malloc, model_calloc, model_free> func_map;
44 /* map integer ids to function names */
45 ModelVector<const char *> func_map_rev;
47 ModelVector<FuncNode *> func_nodes;
49 HashTable<void *, write_set_t *, uintptr_t, 4> write_history;
50 HashSet<void *, uintptr_t, 4> write_locations;
53 #endif /* __HISTORY_H__ */