PAPI 7.1.0.0
Loading...
Searching...
No Matches
pfmlib_os_linux_v3.c File Reference
Include dependency graph for pfmlib_os_linux_v3.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE   /* for getline */
 
#define PFM_pfm_create   (_pfmlib_get_sys_base()+0)
 
#define PFM_pfm_write   (_pfmlib_get_sys_base()+1)
 
#define PFM_pfm_read   (_pfmlib_get_sys_base()+2)
 
#define PFM_pfm_attach   (_pfmlib_get_sys_base()+3)
 
#define PFM_pfm_set_state   (_pfmlib_get_sys_base()+4)
 
#define PFM_pfm_create_sets   (_pfmlib_get_sys_base()+5)
 
#define PFM_pfm_getinfo_sets   (_pfmlib_get_sys_base()+6)
 

Functions

int pfm_create (int flags, pfarg_sinfo_t *sif,...)
 
int pfm_write (int fd, int flags, int type, void *pms, size_t sz)
 
int pfm_read (int fd, int flags, int type, void *pms, size_t sz)
 
int pfm_create_sets (int fd, int flags, pfarg_set_desc_t *setd, size_t sz)
 
int pfm_getinfo_sets (int fd, int flags, pfarg_set_info_t *info, size_t sz)
 
int pfm_attach (int fd, int flags, int target)
 
int pfm_set_state (int fd, int flags, int state)
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE   /* for getline */

Definition at line 25 of file pfmlib_os_linux_v3.c.

◆ PFM_pfm_attach

#define PFM_pfm_attach   (_pfmlib_get_sys_base()+3)

Definition at line 45 of file pfmlib_os_linux_v3.c.

◆ PFM_pfm_create

#define PFM_pfm_create   (_pfmlib_get_sys_base()+0)

Definition at line 42 of file pfmlib_os_linux_v3.c.

◆ PFM_pfm_create_sets

#define PFM_pfm_create_sets   (_pfmlib_get_sys_base()+5)

Definition at line 47 of file pfmlib_os_linux_v3.c.

◆ PFM_pfm_getinfo_sets

#define PFM_pfm_getinfo_sets   (_pfmlib_get_sys_base()+6)

Definition at line 48 of file pfmlib_os_linux_v3.c.

◆ PFM_pfm_read

#define PFM_pfm_read   (_pfmlib_get_sys_base()+2)

Definition at line 44 of file pfmlib_os_linux_v3.c.

◆ PFM_pfm_set_state

#define PFM_pfm_set_state   (_pfmlib_get_sys_base()+4)

Definition at line 46 of file pfmlib_os_linux_v3.c.

◆ PFM_pfm_write

#define PFM_pfm_write   (_pfmlib_get_sys_base()+1)

Definition at line 43 of file pfmlib_os_linux_v3.c.

Function Documentation

◆ pfm_attach()

int pfm_attach ( int  fd,
int  flags,
int  target 
)

Definition at line 118 of file pfmlib_os_linux_v3.c.

119{
120 if (_pfmlib_major_version < 3)
121 return -ENOSYS;
122 return (int)syscall(PFM_pfm_attach, fd, flags, target);
123}
int _pfmlib_major_version
#define PFM_pfm_attach
Here is the caller graph for this function:

◆ pfm_create()

int pfm_create ( int  flags,
pfarg_sinfo_t sif,
  ... 
)

Definition at line 55 of file pfmlib_os_linux_v3.c.

56{
57 va_list ap;
58 char *name = NULL;
59 void *smpl_arg = NULL;
60 size_t smpl_size = 0;
61 int ret;
62
63 if (_pfmlib_major_version < 3) {
64 errno = ENOSYS;
65 return -1;
66 }
67
68 if (flags & PFM_FL_SMPL_FMT)
69 va_start(ap, sif);
70
71 if (flags & PFM_FL_SMPL_FMT) {
72 name = va_arg(ap, char *);
73 smpl_arg = va_arg(ap, void *);
74 smpl_size = va_arg(ap, size_t);
75 }
76
77 ret = (int)syscall(PFM_pfm_create, flags, sif, name, smpl_arg, smpl_size);
78
79 if (flags & PFM_FL_SMPL_FMT)
80 va_end(ap);
81
82 return ret;
83}
int errno
__gnuc_va_list va_list
#define PFM_pfm_create
va_end(arg_list)
va_start(arg_list, fmt)
const char * name
Definition: rocs.c:225
int
Definition: sde_internal.h:89
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pfm_create_sets()

int pfm_create_sets ( int  fd,
int  flags,
pfarg_set_desc_t setd,
size_t  sz 
)

Definition at line 102 of file pfmlib_os_linux_v3.c.

103{
104 if (_pfmlib_major_version < 3)
105 return -ENOSYS;
106 return (int)syscall(PFM_pfm_create_sets, fd, flags, setd, sz);
107}
#define PFM_pfm_create_sets
Here is the caller graph for this function:

◆ pfm_getinfo_sets()

int pfm_getinfo_sets ( int  fd,
int  flags,
pfarg_set_info_t info,
size_t  sz 
)

Definition at line 110 of file pfmlib_os_linux_v3.c.

111{
112 if (_pfmlib_major_version < 3)
113 return -ENOSYS;
114 return (int)syscall(PFM_pfm_getinfo_sets, fd, flags, info, sz);
115}
#define PFM_pfm_getinfo_sets
Here is the caller graph for this function:

◆ pfm_read()

int pfm_read ( int  fd,
int  flags,
int  type,
void *  pms,
size_t  sz 
)

Definition at line 94 of file pfmlib_os_linux_v3.c.

95{
97 return -ENOSYS;
98 return (int)syscall(PFM_pfm_read, fd, flags, type, pms, sz);
99}
uint16_t type
#define PFM_pfm_read
Here is the caller graph for this function:

◆ pfm_set_state()

int pfm_set_state ( int  fd,
int  flags,
int  state 
)

Definition at line 126 of file pfmlib_os_linux_v3.c.

127{
128 if (_pfmlib_major_version < 3)
129 return -ENOSYS;
130 return (int)syscall(PFM_pfm_set_state, fd, flags, state);
131}
bool state
Definition: papi_hl.c:155
#define PFM_pfm_set_state
Here is the caller graph for this function:

◆ pfm_write()

int pfm_write ( int  fd,
int  flags,
int  type,
void *  pms,
size_t  sz 
)

Definition at line 86 of file pfmlib_os_linux_v3.c.

87{
89 return -ENOSYS;
90 return (int)syscall(PFM_pfm_write, fd, flags, type, pms, sz);
91}
#define PFM_pfm_write
Here is the caller graph for this function: