HPCToolkit
perf_mmap.h File Reference
#include <linux/perf_event.h>
#include "perf-util.h"
Include dependency graph for perf_mmap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BUFFER_FRONT(current_perf_mmap)   ((char *) current_perf_mmap + pagesize)
 
#define BUFFER_SIZE   (tail_mask + 1)
 
#define BUFFER_OFFSET(tail)   ((tail) & tail_mask)
 

Typedefs

typedef struct perf_event_header pe_header_t
 

Functions

void perf_mmap_init ()
 
pe_mmap_tset_mmap (int perf_fd)
 
void perf_unmmap (pe_mmap_t *mmap)
 
int read_perf_buffer (pe_mmap_t *current_perf_mmap, struct perf_event_attr *attr, perf_mmap_data_t *mmap_info)
 

Macro Definition Documentation

◆ BUFFER_FRONT

#define BUFFER_FRONT (   current_perf_mmap)    ((char *) current_perf_mmap + pagesize)

Definition at line 65 of file perf_mmap.h.

◆ BUFFER_OFFSET

#define BUFFER_OFFSET (   tail)    ((tail) & tail_mask)

Definition at line 67 of file perf_mmap.h.

◆ BUFFER_SIZE

#define BUFFER_SIZE   (tail_mask + 1)

Definition at line 66 of file perf_mmap.h.

Typedef Documentation

◆ pe_header_t

typedef struct perf_event_header pe_header_t

Definition at line 73 of file perf_mmap.h.

Function Documentation

◆ perf_mmap_init()

void perf_mmap_init ( )

initialize perf_mmap. caller needs to call this in the beginning before calling any API.

Definition at line 537 of file perf_mmap.c.

Here is the caller graph for this function:

◆ perf_unmmap()

void perf_unmmap ( pe_mmap_t mmap)

Definition at line 527 of file perf_mmap.c.

Here is the caller graph for this function:

◆ read_perf_buffer()

int read_perf_buffer ( pe_mmap_t current_perf_mmap,
struct perf_event_attr *  attr,
perf_mmap_data_t mmap_info 
)

Definition at line 430 of file perf_mmap.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_mmap()

pe_mmap_t* set_mmap ( int  perf_fd)

Definition at line 498 of file perf_mmap.c.

Here is the call graph for this function:
Here is the caller graph for this function: