#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <math.h>
#include <sys/syscall.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
#include <linux/perf_event.h>
#include <linux/version.h>
#include <monitor.h>
#include "sample-sources/simple_oo.h"
#include "sample-sources/sample_source_obj.h"
#include "sample-sources/common.h"
#include "sample-sources/ss-errno.h"
#include <hpcrun/cct_insert_backtrace.h>
#include <hpcrun/files.h>
#include <hpcrun/hpcrun_stats.h>
#include <hpcrun/loadmap.h>
#include <hpcrun/messages/messages.h>
#include <hpcrun/metrics.h>
#include <hpcrun/safe-sampling.h>
#include <hpcrun/sample_event.h>
#include <hpcrun/sample_sources_registered.h>
#include <hpcrun/sample-sources/blame-shift/blame-shift.h>
#include <hpcrun/utilities/tokenize.h>
#include <hpcrun/utilities/arch/context-pc.h>
#include <evlist.h>
#include <limits.h>
#include <lib/prof-lean/hpcrun-metric.h>
#include <lib/support-lean/OSUtil.h>
#include <include/linux_info.h>
#include "perfmon-util.h"
#include "perf-util.h"
#include "perf_mmap.h"
#include "perf_skid.h"
#include "perf_event_open.h"
#include "event_custom.h"
#include "sample-sources/display.h"
#include "kernel_blocking.h"
#include "sample-sources/datacentric/datacentric.h"
#include "sample-sources/datacentric/memaddress.h"
#include "lib/support-lean/compress.h"
#include "sample-sources/ss_obj.h"
Go to the source code of this file.
|
static void | perf_thread_fini (int nevents, event_thread_t *event_thread) |
|
static int | perf_event_handler (int sig, siginfo_t *siginfo, void *context) |
|
static int | perf_was_finalized (int nevents, event_thread_t *event_thread) |
|
static void | perf_start_all (int nevents, event_thread_t *event_thread) |
|
static void | perf_stop_all (int nevents, event_thread_t *event_thread) |
|
static int | perf_get_pmu_support (const char *name, struct perf_event_attr *event_attr) |
|
static int | copy_kallsyms () |
|
static void | perf_init () |
|
static bool | perf_thread_init (event_info_t *event, event_thread_t *et) |
|
static int | get_fd_index (int nevents, int fd, event_thread_t *event_thread) |
|
static double | record_sample (event_thread_t *current, perf_mmap_data_t *mmap_data, void *context, int metric, int freq, sample_val_t *sv) |
|
static size_t | exist_precise_ip_modifier (const char *original_event) |
|
static void | METHOD_FN (init) |
|
static void | METHOD_FN (thread_init) |
|
static void | METHOD_FN (thread_init_action) |
|
static void | METHOD_FN (start) |
|
static void | METHOD_FN (thread_fini_action) |
|
static void | METHOD_FN (stop) |
|
static void | METHOD_FN (shutdown) |
|
static bool | METHOD_FN (supports_event, const char *ev_str) |
|
static void | METHOD_FN (process_event_list, int lush_metrics) |
|
static void | METHOD_FN (gen_event_set, int lush_metrics) |
|
static void | METHOD_FN (display_events) |
|
long | read_fd (int fd) |
|
◆ DEFAULT_COMPRESSION
#define DEFAULT_COMPRESSION 5 |
◆ DEFAULT_THRESHOLD
◆ FILE_BUFFER_SIZE
#define FILE_BUFFER_SIZE (1024*1024) |
◆ LINUX_PERF_DEBUG
#define LINUX_PERF_DEBUG 0 |
◆ PERF_EVENT_AVAILABLE_NO
#define PERF_EVENT_AVAILABLE_NO 1 |
◆ PERF_EVENT_AVAILABLE_UNKNOWN
#define PERF_EVENT_AVAILABLE_UNKNOWN 0 |
◆ PERF_EVENT_AVAILABLE_YES
#define PERF_EVENT_AVAILABLE_YES 2 |
◆ PERF_FD_FINALIZED
#define PERF_FD_FINALIZED (-2) |
◆ PERF_MULTIPLEX_RANGE
#define PERF_MULTIPLEX_RANGE 1.2 |
◆ PERF_SIGNAL
#define PERF_SIGNAL (SIGRTMIN+4) |
◆ PERIOD_DEFAULT
◆ PERIOD_FREQUENCY
#define PERIOD_FREQUENCY 2 |
◆ PERIOD_THRESHOLD
#define PERIOD_THRESHOLD 1 |
◆ sigev_notify_thread_id
#define sigev_notify_thread_id _sigev_un._tid |
◆ ss_cls
◆ ss_name
#define ss_name linux_perf |
◆ ss_sort_order
◆ copy_kallsyms()
static int copy_kallsyms |
( |
| ) |
|
|
static |
◆ exist_precise_ip_modifier()
static size_t exist_precise_ip_modifier |
( |
const char * |
original_event | ) |
|
|
static |
return the position of precise_ip modifier if exist if not exist, returns 0
Definition at line 587 of file linux_perf.c.
◆ get_fd_index()
static int get_fd_index |
( |
int |
nevents, |
|
|
int |
fd, |
|
|
event_thread_t * |
event_thread |
|
) |
| |
|
static |
◆ METHOD_FN() [1/11]
static void METHOD_FN |
( |
init |
| ) |
|
|
static |
◆ METHOD_FN() [2/11]
static void METHOD_FN |
( |
thread_init |
| ) |
|
|
static |
◆ METHOD_FN() [3/11]
static void METHOD_FN |
( |
thread_init_action |
| ) |
|
|
static |
◆ METHOD_FN() [4/11]
static void METHOD_FN |
( |
start |
| ) |
|
|
static |
◆ METHOD_FN() [5/11]
static void METHOD_FN |
( |
thread_fini_action |
| ) |
|
|
static |
◆ METHOD_FN() [6/11]
static void METHOD_FN |
( |
stop |
| ) |
|
|
static |
◆ METHOD_FN() [7/11]
static void METHOD_FN |
( |
shutdown |
| ) |
|
|
static |
◆ METHOD_FN() [8/11]
static bool METHOD_FN |
( |
supports_event |
, |
|
|
const char * |
ev_str |
|
) |
| |
|
static |
◆ METHOD_FN() [9/11]
static void METHOD_FN |
( |
process_event_list |
, |
|
|
int |
lush_metrics |
|
) |
| |
|
static |
◆ METHOD_FN() [10/11]
static void METHOD_FN |
( |
gen_event_set |
, |
|
|
int |
lush_metrics |
|
) |
| |
|
static |
◆ METHOD_FN() [11/11]
static void METHOD_FN |
( |
display_events |
| ) |
|
|
static |
◆ perf_event_handler()
static int perf_event_handler |
( |
int |
sig, |
|
|
siginfo_t * |
siginfo, |
|
|
void * |
context |
|
) |
| |
|
static |
◆ perf_get_pmu_support()
static int perf_get_pmu_support |
( |
const char * |
name, |
|
|
struct perf_event_attr * |
event_attr |
|
) |
| |
|
static |
◆ perf_init()
static void perf_init |
( |
| ) |
|
|
static |
◆ perf_start_all()
static void perf_start_all |
( |
int |
nevents, |
|
|
event_thread_t * |
event_thread |
|
) |
| |
|
static |
◆ perf_stop_all()
static void perf_stop_all |
( |
int |
nevents, |
|
|
event_thread_t * |
event_thread |
|
) |
| |
|
static |
◆ perf_thread_fini()
static void perf_thread_fini |
( |
int |
nevents, |
|
|
event_thread_t * |
event_thread |
|
) |
| |
|
static |
◆ perf_thread_init()
◆ perf_was_finalized()
static int perf_was_finalized |
( |
int |
nevents, |
|
|
event_thread_t * |
event_thread |
|
) |
| |
|
static |
◆ read_fd()
◆ record_sample()
◆ hpcrun_thread_suppress_sample
__thread bool hpcrun_thread_suppress_sample |
◆ nowait
const struct timespec nowait = {0, 0} |
|
static |