Go to the source code of this file.
◆ _linux_get_real_cycles()
| long long _linux_get_real_cycles |
( |
void |
| ) |
|
Definition at line 302 of file linux-timer.c.
305 #if defined(HAVE_GETTIMEOFDAY)||defined(__arm__)||defined(__mips__) long long(* get_real_usec)(void)
papi_os_vector_t _papi_os_vector
papi_mdi_t _papi_hwi_system_info
◆ _linux_get_real_nsec_gettime()
| long long _linux_get_real_nsec_gettime |
( |
void |
| ) |
|
Definition at line 523 of file linux-timer.c.
529 #ifdef HAVE_CLOCK_GETTIME_REALTIME_HR 530 syscall( __NR_clock_gettime, CLOCK_REALTIME_HR, &foo );
532 syscall( __NR_clock_gettime, CLOCK_REALTIME, &foo );
534 retval = (
long long ) foo.tv_sec * (
long long ) 1000000000;
535 retval += (
long long ) ( foo.tv_nsec );
◆ _linux_get_real_usec_cycles()
| long long _linux_get_real_usec_cycles |
( |
void |
| ) |
|
◆ _linux_get_real_usec_gettime()
| long long _linux_get_real_usec_gettime |
( |
void |
| ) |
|
Definition at line 330 of file linux-timer.c.
336 #ifdef HAVE_CLOCK_GETTIME_REALTIME_HR 337 syscall( __NR_clock_gettime, CLOCK_REALTIME_HR, &foo );
339 syscall( __NR_clock_gettime, CLOCK_REALTIME, &foo );
341 retval = (
long long ) foo.tv_sec * (
long long ) 1000000;
342 retval += (
long long ) ( foo.tv_nsec / 1000 );
◆ _linux_get_real_usec_gettimeofday()
| long long _linux_get_real_usec_gettimeofday |
( |
void |
| ) |
|
Definition at line 352 of file linux-timer.c.
359 retval = (
long long )
buffer.tv_sec * (
long long ) 1000000;
int gettimeofday(void *ptr1, void *ptr2)
◆ _linux_get_virt_nsec_gettime()
| long long _linux_get_virt_nsec_gettime |
( |
void |
| ) |
|
Definition at line 546 of file linux-timer.c.
553 syscall( __NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &foo );
554 retval = (
long long ) foo.tv_sec * (
long long ) 1000000000;
555 retval += (
long long ) foo.tv_nsec ;
◆ _linux_get_virt_usec_gettime()
| long long _linux_get_virt_usec_gettime |
( |
void |
| ) |
|
Definition at line 433 of file linux-timer.c.
440 syscall( __NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &foo );
441 retval = (
long long ) foo.tv_sec * (
long long ) 1000000;
442 retval += (
long long ) foo.tv_nsec / 1000;
◆ _linux_get_virt_usec_pttimer()
| long long _linux_get_virt_usec_pttimer |
( |
void |
| ) |
|
Definition at line 452 of file linux-timer.c.
457 long long utime, stime;
458 int rv,
cnt = 0,
i = 0;
463 sprintf(
buf,
"/proc/%d/task/%d/stat", getpid( ),
mygettid( ) );
464 stat_fd =
open(
buf, O_RDONLY );
465 if ( stat_fd == -1 ) {
470 rv =
read( stat_fd,
buf, LINE_MAX *
sizeof (
char ) );
472 if (
errno == EBADF ) {
480 lseek( stat_fd, 0, SEEK_SET );
482 if (rv == LINE_MAX) rv--;
484 SUBDBG(
"Thread stat file is:%s\n",
buf );
485 while ( (
cnt != 13 ) && (
i < rv ) ) {
486 if (
buf[
i] ==
' ' ) {
493 PAPIERROR(
"utime and stime not in thread stat file?" );
498 if ( sscanf(
buf +
i,
"%llu %llu", &utime, &stime ) != 2 ) {
500 PAPIERROR(
"Unable to scan two items from thread stat file at 13th space?");
ssize_t read(int fd, void *buf, size_t count)
off_t lseek(int fd, off_t offset, int whence)
static pid_t mygettid(void)
int open(const char *pathname, int flags, mode_t mode)
PAPI_os_info_t _papi_os_info
#define SUBDBG(format, args...)
void PAPIERROR(char *format,...)
int cnt[ctr_pcp_ntv_code_to_info+1]
volatile int buf[CACHE_FLUSH_BUFFER_SIZE_INTS]
◆ _linux_get_virt_usec_rusage()
| long long _linux_get_virt_usec_rusage |
( |
void |
| ) |
|
Definition at line 387 of file linux-timer.c.
394 getrusage( RUSAGE_SELF, &
buffer );
395 SUBDBG(
"user %d system %d\n", (
int )
buffer.ru_utime.tv_sec,
396 (
int )
buffer.ru_stime.tv_sec );
398 * (
long long ) 1000000;
#define SUBDBG(format, args...)
◆ _linux_get_virt_usec_times()
| long long _linux_get_virt_usec_times |
( |
void |
| ) |
|
Definition at line 409 of file linux-timer.c.
418 SUBDBG(
"user %d system %d\n", (
int )
buffer.tms_utime,
419 (
int )
buffer.tms_stime );
421 1000000 / sysconf( _SC_CLK_TCK ));
#define SUBDBG(format, args...)
◆ mmtimer_setup()
| int mmtimer_setup |
( |
void |
| ) |
|
Definition at line 130 of file linux-timer.c.
132 #if defined(__powerpc__)
papi_mdi_t _papi_hwi_system_info