示例#1
0
void __cyg_profile_func_enter (void *this_fn, void *call_site)
{
#if defined(DEBUG)
	fprintf (stderr, PACKAGE_NAME": DEBUG TID %d __cyg_profile_func_enter (%p, %p)\n", THREADID, this_fn, call_site);
#else
	UNREFERENCED_PARAMETER (call_site);
#endif

	if (mpitrace_on && UF_tracing_enabled)
	{
		if (LookForUFaddress (this_fn))
		{
#if defined(DEBUG)
			fprintf (stderr, PACKAGE_NAME": DEBUG TID %d LookForUFaddress (%p) == TRUE\n", THREADID, this_fn);
#endif
			TRACE_EVENTANDCOUNTERS (TIME, USRFUNC_EV, (uintptr_t) this_fn, TRACING_HWC_UF);
		}
		else
		{
#if defined(DEBUG)
			fprintf (stderr, PACKAGE_NAME": DEBUG TID %d LookForUFaddress (%p) == FALSE\n", THREADID, this_fn);
#endif
		}
	}
}
示例#2
0
void Extrae_counters_at_Time_Wrapper (UINT64 time)
{
#if USE_HARDWARE_COUNTERS
	TRACE_EVENTANDCOUNTERS (time, HWC_EV, 0, TRUE);
#else
	UNREFERENCED_PARAMETER(time);
#endif
}
示例#3
0
void Extrae_function_from_address_Wrapper (extrae_type_t type, void *address)
{
	if (type == USRFUNC_EV || type == OMPFUNC_EV)
	{
#if USE_HARDWARE_COUNTERS
		int filter = (type==USRFUNC_EV)?tracejant_hwc_uf:tracejant_hwc_omp;
		TRACE_EVENTANDCOUNTERS (LAST_READ_TIME, type, (UINT64) address, filter);
#else
		TRACE_EVENT(LAST_READ_TIME, type, (UINT64) address);
#endif
	}
}
void __func_trace_exit (const char *const function_name,
                        const char *const file_name, int line_number, void **const user_data)
{
    UNREFERENCED_PARAMETER (file_name);
    UNREFERENCED_PARAMETER (line_number);
    UNREFERENCED_PARAMETER (user_data);

    if (mpitrace_on && UF_names_count > 0)
    {
        if (LookForUF (function_name))
        {
            TRACE_EVENTANDCOUNTERS (TIME, USRFUNC_EV, 0, tracejant_hwc_uf);
        }
    }
}
示例#5
0
void Extrae_emit_CombinedEvents_Wrapper (struct extrae_CombinedEvents *ptr)
{
	unsigned i;
	int events_id[ptr->nEvents];

	/* Emit events first */
	if (ptr->nEvents > 0)
	{
		for (i = 0; i < ptr->nEvents; i++)
			events_id[i] = USER_EV;
		if (ptr->HardwareCounters)
		{
			TRACE_N_MISCEVENTANDCOUNTERS(LAST_READ_TIME, ptr->nEvents, events_id, ptr->Types, ptr->Values);
		}
		else
		{
			TRACE_N_MISCEVENT(LAST_READ_TIME, ptr->nEvents, events_id, ptr->Types, ptr->Values);
		}
	}

	/* Emit user function. If hwc were emitted before, don't emit now because they
	   will share the same timestamp and Paraver won't handle that well. Otherwise,
	   honor tracejant_hwc_uf
	*/
	if (ptr->UserFunction != EXTRAE_USER_FUNCTION_NONE)
	{
		UINT64 ip = (ptr->UserFunction == EXTRAE_USER_FUNCTION_ENTER)?Extrae_get_caller(4):EMPTY;
#if USE_HARDWARE_COUNTERS
		int EmitHWC = (!ptr->HardwareCounters && tracejant_hwc_uf);
		TRACE_EVENTANDCOUNTERS (LAST_READ_TIME, USRFUNC_EV, ip, EmitHWC);
#else
		TRACE_EVENT (LAST_READ_TIME, USRFUNC_EV, ip);
#endif
	}

	/* Now emit the callers */
	if (ptr->Callers)
	{
		Extrae_trace_callers (LAST_READ_TIME, 4, CALLER_MPI);
	}

	/* Finally emit user communications */
	for (i = 0; i < ptr->nCommunications ; i++)
		TRACE_USER_COMMUNICATION_EVENT(LAST_READ_TIME,
		  (ptr->Communications[i].type==EXTRAE_USER_SEND)?USER_SEND_EV:USER_RECV_EV,
		  ptr->Communications[i].partner, ptr->Communications[i].size,
		  ptr->Communications[i].tag, ptr->Communications[i].id) 
}
示例#6
0
void Extrae_Suspend_virtual_thread_Wrapper (void)
{
	TRACE_EVENTANDCOUNTERS(LAST_READ_TIME, SUSPEND_VIRTUAL_THREAD_EV, EMPTY, FALSE);
}
示例#7
0
void Extrae_Resume_virtual_thread_Wrapper (unsigned u)
{
	TRACE_EVENTANDCOUNTERS(LAST_READ_TIME, RESUME_VIRTUAL_THREAD_EV, u, FALSE);
}
示例#8
0
UINT64 Extrae_user_function_Wrapper (unsigned enter)
{
	UINT64 ip = (enter)?Extrae_get_caller(4):EMPTY;
	TRACE_EVENTANDCOUNTERS (LAST_READ_TIME, USRFUNC_EV, ip, tracejant_hwc_uf);
	return ip;
}
示例#9
0
void Extrae_counters_Wrapper (void)
{
#if USE_HARDWARE_COUNTERS
	TRACE_EVENTANDCOUNTERS (LAST_READ_TIME, HWC_EV, 0, TRUE);
#endif
}