honggfuzz  2.2
About: honggfuzz is a security oriented, feedback-driven, evolutionary, easy-to-use fuzzer with powerful analysis options.
  Fossies Dox: honggfuzz-2.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

perf.c File Reference
#include "perf.h"
#include <asm/mman.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <linux/hw_breakpoint.h>
#include <linux/perf_event.h>
#include <linux/sysctl.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/poll.h>
#include <sys/ptrace.h>
#include <sys/syscall.h>
#include <unistd.h>
#include "libhfcommon/common.h"
#include "libhfcommon/files.h"
#include "libhfcommon/log.h"
#include "libhfcommon/util.h"
#include "pt.h"
Include dependency graph for perf.c:

Go to the source code of this file.

Macros

#define _HF_PERF_MAP_SZ   (1024 * 512)
 
#define _HF_PERF_AUX_SZ   (1024 * 1024)
 
#define PERF_FLAG_FD_CLOEXEC   0
 

Functions

static void arch_perfMmapParse (run_t *run)
 
static long perf_event_open (struct perf_event_attr *hw_event, pid_t pid, int cpu, int group_fd, unsigned long flags)
 
static bool arch_perfCreate (run_t *run, pid_t pid, dynFileMethod_t method, int *perfFd)
 
bool arch_perfOpen (run_t *run)
 
void arch_perfClose (run_t *run)
 
bool arch_perfEnable (run_t *run)
 
static void arch_perfMmapReset (run_t *run)
 
void arch_perfAnalyze (run_t *run)
 
bool arch_perfInit (honggfuzz_t *hfuzz)
 

Variables

static int32_t perfIntelPtPerfType = -1
 
static int32_t perfIntelBtsPerfType = -1
 

Macro Definition Documentation

◆ _HF_PERF_AUX_SZ

#define _HF_PERF_AUX_SZ   (1024 * 1024)

Definition at line 51 of file perf.c.

◆ _HF_PERF_MAP_SZ

#define _HF_PERF_MAP_SZ   (1024 * 512)

Definition at line 50 of file perf.c.

◆ PERF_FLAG_FD_CLOEXEC

#define PERF_FLAG_FD_CLOEXEC   0

Function Documentation

◆ arch_perfAnalyze()

◆ arch_perfClose()

◆ arch_perfCreate()

◆ arch_perfEnable()

◆ arch_perfInit()

bool arch_perfInit ( honggfuzz_t hfuzz)

◆ arch_perfMmapParse()

static void arch_perfMmapParse ( run_t run)
inlinestatic

Definition at line 93 of file perf.c.

References _HF_DYNFILE_BTS_EDGE, _HF_DYNFILE_IPT_BLOCK, arch_ptAnalyze(), if(), and LOG_F.

Referenced by arch_perfAnalyze().

◆ arch_perfMmapReset()

static void arch_perfMmapReset ( run_t run)
static

Definition at line 319 of file perf.c.

References run_t::arch_linux, ATOMIC_SET, run_t::perfMmapBuf, and wmb.

Referenced by arch_perfAnalyze().

◆ arch_perfOpen()

◆ perf_event_open()

static long perf_event_open ( struct perf_event_attr *  hw_event,
pid_t  pid,
int  cpu,
int  group_fd,
unsigned long  flags 
)
static

Definition at line 111 of file perf.c.

Referenced by arch_perfCreate().

Variable Documentation

◆ perfIntelBtsPerfType

int32_t perfIntelBtsPerfType = -1
static

Definition at line 53 of file perf.c.

Referenced by arch_perfCreate(), and arch_perfInit().

◆ perfIntelPtPerfType

int32_t perfIntelPtPerfType = -1
static

Definition at line 52 of file perf.c.

Referenced by arch_perfCreate(), and arch_perfInit().