HPCToolkit
perf-util.h File Reference
#include <sys/syscall.h>
#include <unistd.h>
#include <linux/types.h>
#include <linux/perf_event.h>
#include <linux/version.h>
#include <lib/prof-lean/hpcrun-fmt.h>
#include <sample_event.h>
#include "perf_constants.h"
Include dependency graph for perf-util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  event_threshold_s
 
struct  perf_mmap_data_s
 
struct  event_info_s
 
struct  event_thread_s
 

Macros

#define KERNEL_SAMPLING_ENABLED   (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
 
#define MAX_CALLCHAIN_FRAMES   32
 

Typedefs

typedef struct perf_mmap_data_s perf_mmap_data_t
 
typedef struct event_info_s event_info_t
 
typedef struct perf_event_mmap_page pe_mmap_t
 
typedef struct event_thread_s event_thread_t
 

Enumerations

enum  threshold_e { PERIOD, FREQUENCY }
 

Functions

void perf_util_init ()
 
int perf_util_attr_init (const char *event_name, struct perf_event_attr *attr, bool usePeriod, u64 threshold, u64 sampletype)
 
bool perf_util_is_ksym_available ()
 
int perf_util_get_paranoid_level ()
 
cct_node_tperf_util_add_kernel_callchain (cct_node_t *leaf, void *data_aux)
 
void perf_util_get_default_threshold (struct event_threshold_s *threshold)
 
int perf_util_check_precise_ip_suffix (char *event)
 

Macro Definition Documentation

◆ KERNEL_SAMPLING_ENABLED

#define KERNEL_SAMPLING_ENABLED   (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))

Definition at line 58 of file perf-util.h.

◆ MAX_CALLCHAIN_FRAMES

#define MAX_CALLCHAIN_FRAMES   32

Definition at line 65 of file perf-util.h.

Typedef Documentation

◆ event_info_t

typedef struct event_info_s event_info_t

◆ event_thread_t

◆ pe_mmap_t

typedef struct perf_event_mmap_page pe_mmap_t

Definition at line 144 of file perf-util.h.

◆ perf_mmap_data_t

Enumeration Type Documentation

◆ threshold_e

Enumerator
PERIOD 
FREQUENCY 

Definition at line 71 of file perf-util.h.

Function Documentation

◆ perf_util_add_kernel_callchain()

cct_node_t* perf_util_add_kernel_callchain ( cct_node_t leaf,
void *  data_aux 
)

Definition at line 358 of file perf-util.c.

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

◆ perf_util_attr_init()

int perf_util_attr_init ( const char *  event_name,
struct perf_event_attr *  attr,
bool  usePeriod,
u64  threshold,
u64  sampletype 
)

Definition at line 403 of file perf-util.c.

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

◆ perf_util_check_precise_ip_suffix()

int perf_util_check_precise_ip_suffix ( char *  event)

◆ perf_util_get_default_threshold()

void perf_util_get_default_threshold ( struct event_threshold_s threshold)

Definition at line 347 of file perf-util.c.

Here is the caller graph for this function:

◆ perf_util_get_paranoid_level()

int perf_util_get_paranoid_level ( )

◆ perf_util_init()

void perf_util_init ( )

Definition at line 303 of file perf-util.c.

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

◆ perf_util_is_ksym_available()

bool perf_util_is_ksym_available ( )

Definition at line 339 of file perf-util.c.

Here is the caller graph for this function: