4 #include "modeltypes.h"
6 /* forward declaration */
9 typedef ModelList<ModelAction *> action_mlist_t;
15 void enter_function(const uint32_t func_id, thread_id_t tid);
16 void exit_function(const uint32_t func_id, thread_id_t tid);
18 uint32_t get_func_counter() { return func_id; }
19 void incr_func_counter() { func_id++; }
21 HashTable<const char *, uint32_t, uintptr_t, 4> * getFuncMap() { return &func_map; }
22 HashTable<uint32_t, action_mlist_t *, uintptr_t, 4> * getFuncHistory() { return &func_history; }
29 /* map function names to integer ids */
30 HashTable<const char *, uint32_t, uintptr_t, 4> func_map;
32 HashTable<uint32_t, action_mlist_t *, uintptr_t, 4> func_history;
34 /* work_list stores a list of function ids for each thread
35 * SnapList<uint32_t> is intended to be used as a stack storing
36 * the functions that thread i has entered and yet to exit from
38 HashTable<thread_id_t, SnapList<uint32_t> *, uintptr_t, 4> work_list;