operf_utils.h File Reference

Header file containing definitions for handling a user request to profile using the new Linux Performance Events Subsystem. More...

#include <linux/perf_event.h>
#include <dirent.h>
#include <vector>
#include "config.h"
#include "op_config.h"
#include "op_types.h"
#include "operf_event.h"
#include <signal.h>
Include dependency graph for operf_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  OP_perf_utils::vmlinux_info

Namespaces

namespace  operf_options
namespace  OP_perf_utils

Defines

#define OP_APPNAME_LEN   1024
#define MMAP_WINDOW_SZ   (32 * 1024 * 1024ULL)
#define OP_MAX_EVENTS   24
#define PPC64_ARCH   (HAVE_LIBPFM) && ((defined(__powerpc__) || defined(__powerpc64__)))
#define likely(x)   __builtin_expect(!!(x), 1)
#define unlikely(x)   __builtin_expect(!!(x), 0)
#define is_header_valid(hdr)

Typedefs

typedef struct
OP_perf_utils::vmlinux_info 
OP_perf_utils::vmlinux_info_t

Functions

void OP_perf_utils::op_record_kernel_info (std::string vmlinux_file, u64 start_addr, u64 end_addr, int output_fd, operf_record *pr)
void OP_perf_utils::op_get_kernel_event_data (struct mmap_data *md, operf_record *pr)
void OP_perf_utils::op_perfrecord_sigusr1_handler (int sig __attribute__((unused)), siginfo_t *siginfo __attribute__((unused)), void *u_context __attribute__((unused)))
int OP_perf_utils::op_get_process_info (bool system_wide, pid_t pid, operf_record *pr)
void OP_perf_utils::op_record_process_exec_mmaps (pid_t pid, pid_t tgid, int output_fd, operf_record *pr)
int OP_perf_utils::op_write_output (int output, void *buf, size_t size)
int OP_perf_utils::op_write_event (event_t *event, u64 sample_type)
int OP_perf_utils::op_read_from_stream (std::ifstream &is, char *buf, std::streamsize sz)
int OP_perf_utils::op_mmap_trace_file (struct mmap_info &info, bool init)
int OP_perf_utils::op_get_next_online_cpu (DIR *dir, struct dirent *entry)
bool OP_perf_utils::op_convert_event_vals (std::vector< operf_event_t > *evt_vec)
void OP_perf_utils::op_reprocess_unresolved_events (u64 sample_type, bool print_progress)
void OP_perf_utils::op_release_resources (void)

Variables

bool operf_options::system_wide
int operf_options::pid
int operf_options::mmap_pages_mult
std::string operf_options::session_dir
bool operf_options::separate_cpu
bool operf_options::separate_thread
bool no_vmlinux
int kptr_restrict
uid_t my_uid
bool throttled
unsigned int op_nr_events

Detailed Description

Header file containing definitions for handling a user request to profile using the new Linux Performance Events Subsystem.

Remarks:
Copyright 2011 OProfile authors
Read the file COPYING

Created on: Dec 7, 2011

Author:
Maynard Johnson (C) Copyright IBM Corp. 2011

Define Documentation

#define is_header_valid ( hdr   ) 
Value:
((hdr.size > sizeof(hdr)) &&            \
        (hdr.type) && (hdr.size))

Referenced by operf_read::convertPerfData().

#define likely (  )     __builtin_expect(!!(x), 1)
#define MMAP_WINDOW_SZ   (32 * 1024 * 1024ULL)
#define OP_APPNAME_LEN   1024
#define OP_MAX_EVENTS   24
#define PPC64_ARCH   (HAVE_LIBPFM) && ((defined(__powerpc__) || defined(__powerpc64__)))
#define unlikely (  )     __builtin_expect(!!(x), 0)

Variable Documentation

Referenced by main().

uid_t my_uid

Referenced by main().

bool no_vmlinux
unsigned int op_nr_events
bool throttled

Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1