• Home
  • Raw
  • Download

Lines Matching refs:CLG_

62 ThreadId CLG_(current_tid);
66 thread_info** CLG_(get_threads)() in CLG_() function
71 thread_info* CLG_(get_current_thread)() in CLG_() function
73 return thread[CLG_(current_tid)]; in CLG_()
76 void CLG_(init_threads)() in CLG_() function
81 CLG_(current_tid) = VG_INVALID_THREADID; in CLG_()
85 void CLG_(forall_threads)(void (*func)(thread_info*)) in CLG_() function
87 Int t, orig_tid = CLG_(current_tid); in CLG_()
91 CLG_(switch_thread)(t); in CLG_()
94 CLG_(switch_thread)(orig_tid); in CLG_()
107 CLG_(init_exec_stack)( &(t->states) ); in new_thread()
108 CLG_(init_call_stack)( &(t->calls) ); in new_thread()
109 CLG_(init_fn_stack) ( &(t->fns) ); in new_thread()
113 t->lastdump_cost = CLG_(get_eventset_cost)( CLG_(sets).full ); in new_thread()
114 t->sighandler_cost = CLG_(get_eventset_cost)( CLG_(sets).full ); in new_thread()
115 CLG_(init_cost)( CLG_(sets).full, t->lastdump_cost ); in new_thread()
116 CLG_(init_cost)( CLG_(sets).full, t->sighandler_cost ); in new_thread()
119 CLG_(init_fn_array)( &(t->fn_active) ); in new_thread()
120 CLG_(init_bbcc_hash)( &(t->bbccs) ); in new_thread()
121 CLG_(init_jcc_hash)( &(t->jccs) ); in new_thread()
127 void CLG_(switch_thread)(ThreadId tid) in CLG_() function
129 if (tid == CLG_(current_tid)) return; in CLG_()
131 CLG_DEBUG(0, ">> thread %d (was %d)\n", tid, CLG_(current_tid)); in CLG_()
133 if (CLG_(current_tid) != VG_INVALID_THREADID) { in CLG_()
135 thread_info* t = thread[CLG_(current_tid)]; in CLG_()
141 CLG_(copy_current_exec_stack)( &(t->states) ); in CLG_()
142 CLG_(copy_current_call_stack)( &(t->calls) ); in CLG_()
143 CLG_(copy_current_fn_stack) ( &(t->fns) ); in CLG_()
145 CLG_(copy_current_fn_array) ( &(t->fn_active) ); in CLG_()
147 if (!CLG_(clo).separate_threads) t = thread[1]; in CLG_()
148 CLG_(copy_current_bbcc_hash)( &(t->bbccs) ); in CLG_()
149 CLG_(copy_current_jcc_hash) ( &(t->jccs) ); in CLG_()
152 CLG_(current_tid) = tid; in CLG_()
164 CLG_(set_current_exec_stack)( &(t->states) ); in CLG_()
166 CLG_(set_current_call_stack)( &(t->calls) ); in CLG_()
167 CLG_(set_current_fn_stack) ( &(t->fns) ); in CLG_()
169 CLG_(set_current_fn_array) ( &(t->fn_active) ); in CLG_()
171 if (!CLG_(clo).separate_threads) t = thread[1]; in CLG_()
172 CLG_(set_current_bbcc_hash) ( &(t->bbccs) ); in CLG_()
173 CLG_(set_current_jcc_hash) ( &(t->jccs) ); in CLG_()
178 void CLG_(run_thread)(ThreadId tid) in CLG_() function
184 if (CLG_(clo).dump_every_bb >0) { in CLG_()
185 if (CLG_(stat).bb_executions - bbs_done > CLG_(clo).dump_every_bb) { in CLG_()
186 VG_(sprintf)(buf, "--dump-every-bb=%llu", CLG_(clo).dump_every_bb); in CLG_()
187 CLG_(dump_profile)(buf, False); in CLG_()
188 bbs_done = CLG_(stat).bb_executions; in CLG_()
192 CLG_(check_command)(); in CLG_()
195 CLG_(switch_thread)(tid); in CLG_()
198 void CLG_(pre_signal)(ThreadId tid, Int sigNum, Bool alt_stack) in CLG_() function
206 CLG_(switch_thread)(tid); in CLG_()
213 CLG_(zero_cost)( CLG_(sets).full, es->cost ); in CLG_()
214 CLG_(current_state).cost = es->cost; in CLG_()
215 es->call_stack_bottom = CLG_(current_call_stack).sp; in CLG_()
218 CLG_(init_exec_state)( &CLG_(current_state) ); in CLG_()
219 CLG_(current_state).sig = sigNum; in CLG_()
220 CLG_(push_cxt)(0); in CLG_()
228 void CLG_(run_post_signal_on_call_stack_bottom)() in CLG_() function
232 CLG_ASSERT(CLG_(current_state).sig >0); in CLG_()
234 if (CLG_(current_call_stack).sp == es->call_stack_bottom) in CLG_()
235 CLG_(post_signal)( CLG_(current_tid), CLG_(current_state).sig ); in CLG_()
238 void CLG_(post_signal)(ThreadId tid, Int sigNum) in CLG_() function
247 CLG_(switch_thread)(tid); in CLG_()
248 CLG_ASSERT(sigNum == CLG_(current_state).sig); in CLG_()
255 while(CLG_(current_call_stack).sp > es->call_stack_bottom) in CLG_()
256 CLG_(pop_call_stack)(); in CLG_()
258 if (CLG_(current_state).cxt) { in CLG_()
260 fn_number = CLG_(current_state).cxt->fn[0]->number; in CLG_()
261 pactive = CLG_(get_fn_entry)(fn_number); in CLG_()
264 CLG_(current_state).cxt->fn[0]->name, *pactive); in CLG_()
267 if (CLG_(current_fn_stack).top > CLG_(current_fn_stack).bottom) { in CLG_()
272 if (*(CLG_(current_fn_stack).top) != 0) { in CLG_()
273 CLG_(current_fn_stack).top--; in CLG_()
274 CLG_ASSERT(*(CLG_(current_fn_stack).top) == 0); in CLG_()
276 if (CLG_(current_fn_stack).top > CLG_(current_fn_stack).bottom) in CLG_()
277 CLG_(current_fn_stack).top--; in CLG_()
281 CLG_ASSERT(CLG_(current_state).cost == es->cost); in CLG_()
282 CLG_(add_and_zero_cost)( CLG_(sets).full, in CLG_()
283 thread[CLG_(current_tid)]->sighandler_cost, in CLG_()
284 CLG_(current_state).cost ); in CLG_()
290 CLG_(current_state).sig = es->sig; in CLG_()
314 void CLG_(init_exec_state)(exec_state* es) in CLG_() function
316 es->collect = CLG_(clo).collect_atstart; in CLG_()
332 es->cost = CLG_(get_eventset_cost)(CLG_(sets).full); in new_exec_state()
333 CLG_(zero_cost)( CLG_(sets).full, es->cost ); in new_exec_state()
334 CLG_(init_exec_state)(es); in new_exec_state()
341 void CLG_(init_exec_stack)(exec_stack* es) in CLG_() function
352 void CLG_(copy_current_exec_stack)(exec_stack* dst) in CLG_() function
361 void CLG_(set_current_exec_stack)(exec_stack* dst) in CLG_() function
415 es->cxt = CLG_(current_state).cxt; in exec_state_save()
416 es->collect = CLG_(current_state).collect; in exec_state_save()
417 es->jmps_passed = CLG_(current_state).jmps_passed; in exec_state_save()
418 es->bbcc = CLG_(current_state).bbcc; in exec_state_save()
419 es->nonskipped = CLG_(current_state).nonskipped; in exec_state_save()
420 CLG_ASSERT(es->cost == CLG_(current_state).cost); in exec_state_save()
425 CLG_(print_bbcc)(-9, es->bbcc); in exec_state_save()
426 CLG_(print_cost)(-9, CLG_(sets).full, es->cost); in exec_state_save()
430 CLG_ASSERT(CLG_(current_state).sig == es->sig); in exec_state_save()
440 CLG_(current_state).cxt = es->cxt; in exec_state_restore()
441 CLG_(current_state).collect = es->collect; in exec_state_restore()
442 CLG_(current_state).jmps_passed = es->jmps_passed; in exec_state_restore()
443 CLG_(current_state).bbcc = es->bbcc; in exec_state_restore()
444 CLG_(current_state).nonskipped = es->nonskipped; in exec_state_restore()
445 CLG_(current_state).cost = es->cost; in exec_state_restore()
446 CLG_(current_state).sig = es->sig; in exec_state_restore()
451 CLG_(print_bbcc)(-9, es->bbcc); in exec_state_restore()
452 CLG_(print_cxt)(-9, es->cxt, 0); in exec_state_restore()
453 CLG_(print_cost)(-9, CLG_(sets).full, es->cost); in exec_state_restore()