diff --git a/ompi/contrib/vt/vt/ChangeLog b/ompi/contrib/vt/vt/ChangeLog index 59a23b2252..53abafb3b9 100644 --- a/ompi/contrib/vt/vt/ChangeLog +++ b/ompi/contrib/vt/vt/ChangeLog @@ -1,5 +1,6 @@ 5.4.9 - updated version of internal OTF to 1.3.12 (see extlib/otf/ChangeLog) + - added support for cycle counter timer on Alpha and Sparc platforms - install header files to 'PREFIX/include/vampirtrace' by default to avoid conflicts with the OpenMPI integrated version of VT - added configure option '--with[out]-bfd' to control usage of BFD diff --git a/ompi/contrib/vt/vt/vtlib/vt_pform_linux.c b/ompi/contrib/vt/vt/vtlib/vt_pform_linux.c index efaf6219a6..38bbd869a2 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_pform_linux.c +++ b/ompi/contrib/vt/vt/vtlib/vt_pform_linux.c @@ -159,25 +159,31 @@ uint64_t vt_pform_wtime() uint32_t low = 0; uint32_t higha = 0; uint32_t highb = 0; - + do { - asm volatile ("mftbu %0" : "=r"(highb)); - asm volatile ("mftb %0" : "=r"(low)); - asm volatile ("mftbu %0" : "=r"(higha)); + asm volatile ("mftbu %0" : "=r"(highb)); + asm volatile ("mftb %0" : "=r"(low)); + asm volatile ("mftbu %0" : "=r"(higha)); } while (highb != higha); clock_value = ((uint64_t)higha << 32) | (uint64_t)low; } # elif defined(__ia64__) /* ... ITC */ clock_value = __getReg(_IA64_REG_AR_ITC); +# elif defined(__alpha__) + /* ... Alpha */ + asm volatile ("rpcc %0" : "=r"(clock_value)); +# elif defined(__sparc__) + /* ... Sparc */ + asm ("rd %%tick, %0" : "=r"(clock_value)); # else /* ... TSC */ { uint32_t low = 0; uint32_t high = 0; - + asm volatile ("rdtsc" : "=a" (low), "=d" (high)); - + clock_value = ((uint64_t)high << 32) | (uint64_t)low; } # endif