• Home
  • Raw
  • Download

Lines Matching refs:thread

177     ThreadDesc* thread;  in get_thread_from_tid()  local
186 QLIST_FOREACH(thread, &thread_list, global_entry) { in get_thread_from_tid()
187 if (tid == thread->tid) { in get_thread_from_tid()
189 current_thread = thread; in get_thread_from_tid()
191 return thread; in get_thread_from_tid()
210 ThreadDesc* thread; in get_current_thread() local
211 QLIST_FOREACH(thread, &thread_list, global_entry) { in get_current_thread()
212 if (current_tid == thread->tid) { in get_current_thread()
213 current_thread = thread; in get_current_thread()
231 const ThreadDesc* thread = get_thread_from_tid(tid); in get_process_from_tid() local
232 return (thread != NULL) ? thread->process : NULL; in get_process_from_tid()
285 threaddesc_free(ThreadDesc* thread) in threaddesc_free() argument
289 if (thread == NULL) { in threaddesc_free()
293 if (thread->call_stack != NULL) { in threaddesc_free()
294 for (indx = 0; indx < thread->call_stack_count; indx++) { in threaddesc_free()
295 if (thread->call_stack[indx].module_path != NULL) { in threaddesc_free()
296 qemu_free(thread->call_stack[indx].module_path); in threaddesc_free()
299 qemu_free(thread->call_stack); in threaddesc_free()
301 qemu_free(thread); in threaddesc_free()
352 ThreadDesc* thread = get_current_thread(); in memcheck_on_call() local
353 if (thread == NULL) { in memcheck_on_call()
358 if (!procdesc_is_executing(thread->process)) { in memcheck_on_call()
362 const MMRangeDesc* rdesc = procdesc_get_range_desc(thread->process, from); in memcheck_on_call()
365 from, thread->process->image_path, thread->process->pid); in memcheck_on_call()
371 if (thread->call_stack_count >= max_stack) { in memcheck_on_call()
375 thread->process->image_path, thread->process->pid, thread->tid, in memcheck_on_call()
376 thread->call_stack_count); in memcheck_on_call()
381 if (thread->call_stack_count >= thread->call_stack_max) { in memcheck_on_call()
383 thread->call_stack_max += grow_by; in memcheck_on_call()
385 qemu_malloc(thread->call_stack_max * sizeof(ThreadCallStackEntry)); in memcheck_on_call()
388 thread->call_stack_max * sizeof(ThreadCallStackEntry)); in memcheck_on_call()
389 thread->call_stack_max -= grow_by; in memcheck_on_call()
392 if (thread->call_stack_count != 0) { in memcheck_on_call()
393 memcpy(new_array, thread->call_stack, in memcheck_on_call()
394 thread->call_stack_count * sizeof(ThreadCallStackEntry)); in memcheck_on_call()
396 if (thread->call_stack != NULL) { in memcheck_on_call()
397 qemu_free(thread->call_stack); in memcheck_on_call()
399 thread->call_stack = new_array; in memcheck_on_call()
401 thread->call_stack[thread->call_stack_count].call_address = from; in memcheck_on_call()
402 thread->call_stack[thread->call_stack_count].call_address_rel = in memcheck_on_call()
404 thread->call_stack[thread->call_stack_count].ret_address = ret; in memcheck_on_call()
405 thread->call_stack[thread->call_stack_count].ret_address_rel = in memcheck_on_call()
407 thread->call_stack[thread->call_stack_count].module_path = in memcheck_on_call()
409 if (thread->call_stack[thread->call_stack_count].module_path == NULL) { in memcheck_on_call()
414 strcpy(thread->call_stack[thread->call_stack_count].module_path, in memcheck_on_call()
416 thread->call_stack_count++; in memcheck_on_call()
422 ThreadDesc* thread = get_current_thread(); in memcheck_on_ret() local
423 if (thread == NULL) { in memcheck_on_ret()
428 if (!procdesc_is_executing(thread->process)) { in memcheck_on_ret()
432 if (thread->call_stack_count > 0) { in memcheck_on_ret()
433 int indx = (int)thread->call_stack_count - 1; in memcheck_on_ret()
435 if (thread->call_stack[indx].ret_address == ret) { in memcheck_on_ret()
436 thread->call_stack_count = indx; in memcheck_on_ret()
583 ThreadDesc* thread = get_current_thread(); in memcheck_exit() local
584 if (thread == NULL) { in memcheck_exit()
589 proc = thread->process; in memcheck_exit()
595 QLIST_REMOVE(thread, proc_entry); in memcheck_exit()
596 QLIST_REMOVE(thread, global_entry); in memcheck_exit()
597 threaddesc_free(thread); in memcheck_exit()