void omp_set_lock (void *p1) { #if defined(DEBUG) fprintf (stderr, PACKAGE_NAME": omp_set_lock is at %p\n", omp_set_lock_real); fprintf (stderr, PACKAGE_NAME": omp_set_lock params %p\n", p1); #endif if (omp_set_lock_real != NULL && EXTRAE_INITIALIZED()) { Backend_Enter_Instrumentation (2); Probe_OpenMP_Named_Lock_Entry(); omp_set_lock_real (p1); Probe_OpenMP_Named_Lock_Exit(p1); Backend_Leave_Instrumentation (); } else if (omp_set_lock_real != NULL) { omp_set_lock_real (p1); } else { fprintf (stderr, PACKAGE_NAME": omp_set_lock is not hooked! exiting!!\n"); exit (0); } }
void omp_set_lock (int *p1) { Record_Event Event = Event_init (); Event.event_name = "omp_set_lock"; Event.eid = 230; Event.type = NONE; Event.omp_rank = get_thread_num (); Event.omp_level = get_level (); Event.p_rank = omp_get_ancestor_thread_num (get_level () - 1); omp_set_lock_real = (void(*)(int*)) dlsym (RTLD_NEXT, "omp_set_lock"); if (omp_set_lock_real != NULL) { Event.starttime=gettime(); omp_set_lock_real(p1); Event.endtime=gettime(); Record(&Event, OMPI_TRACE); } else { printf_d("omp_set_lock is not hooked! exiting!!\n"); } }