Exemple #1
0
static
void thread_exit_event2(void *drcontext)
{
    inc_count_second(EVENT_THREAD_EXIT_2);
    if (!dr_unregister_thread_exit_event(thread_exit_event2))
        dr_fprintf(STDERR, "unregister failed!\n");
}
Exemple #2
0
void dr_exit() {
  dr_fprintf(STDERR, "info: stopping dtrace..\n");

  tb_delete(trace_buffer);
  dr_mutex_destroy(trace_buffer_lock);

  dr_close_file(trace_file);
  dr_mutex_destroy(trace_file_lock);

  hashtable_delete(&tags);
  dr_mutex_destroy(tags_lock);

  dr_unregister_exit_event(&dr_exit);
  dr_unregister_thread_init_event(&handle_thread_init);
  dr_unregister_thread_exit_event(&handle_thread_exit);
  dr_unregister_bb_event(&handle_bb);
  dr_unregister_trace_event(&handle_trace);
  dr_unregister_delete_event(&handle_delete);
  dr_unregister_signal_event(&handle_signal);
  dr_unregister_restore_state_event(&handle_restore_state);
}