Exemplo n.º 1
0
static
void *trampoline(void *_arg)
{
	struct trampoline_data data = *(struct trampoline_data *)_arg;
	free(_arg);
	fprintf(stderr, "Activating profiler for newly created thread %p\n", (void *)pthread_self());
	ProfilerRegisterThread();
	return data.original_fn(data.original_arg);
}
Exemplo n.º 2
0
void sig_profiler_start_handler(int sig)
{
  char * profile_output = getenv("PROFILEOUTPUT");
  if (NULL != profile_output)
  {
    ProfilerStart(profile_output);
    ProfilerRegisterThread();
  }
}