Linux Perf
|
#include "../perf.h"
#include <linux/list.h>
#include <linux/rbtree.h>
#include "event.h"
#include "map.h"
#include "symbol.h"
#include "branch.h"
Go to the source code of this file.
Classes | |
struct | callchain_node |
struct | callchain_root |
struct | callchain_param |
struct | callchain_list |
struct | callchain_cursor_node |
struct | callchain_cursor |
Macros | |
#define | HELP_PAD "\t\t\t\t" |
#define | CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace):\n\n" |
#define | RECORD_MODE_HELP HELP_PAD "record_mode:\tcall graph recording mode (fp|dwarf|lbr)\n" |
#define | RECORD_SIZE_HELP |
#define | CALLCHAIN_RECORD_HELP CALLCHAIN_HELP RECORD_MODE_HELP RECORD_SIZE_HELP |
#define | CALLCHAIN_REPORT_HELP |
Typedefs | |
typedef void(* | sort_chain_func_t) (struct rb_root *, struct callchain_root *, u64, struct callchain_param *) |
Enumerations | |
enum | perf_call_graph_mode { CALLCHAIN_NONE, CALLCHAIN_FP, CALLCHAIN_DWARF, CALLCHAIN_LBR, CALLCHAIN_MAX } |
enum | chain_mode { CHAIN_NONE, CHAIN_FLAT, CHAIN_GRAPH_ABS, CHAIN_GRAPH_REL, CHAIN_FOLDED } |
enum | chain_order { ORDER_CALLER, ORDER_CALLEE } |
enum | chain_key { CCKEY_FUNCTION, CCKEY_ADDRESS, CCKEY_SRCLINE } |
enum | chain_value { CCVAL_PERCENT, CCVAL_PERIOD, CCVAL_COUNT } |
Functions | |
static void | callchain_init (struct callchain_root *root) |
static u64 | callchain_cumul_hits (struct callchain_node *node) |
static unsigned | callchain_cumul_counts (struct callchain_node *node) |
int | callchain_register_param (struct callchain_param *param) |
int | callchain_append (struct callchain_root *root, struct callchain_cursor *cursor, u64 period) |
int | callchain_merge (struct callchain_cursor *cursor, struct callchain_root *dst, struct callchain_root *src) |
static void | callchain_cursor_reset (struct callchain_cursor *cursor) |
int | callchain_cursor_append (struct callchain_cursor *cursor, u64 ip, struct map *map, struct symbol *sym, bool branch, struct branch_flags *flags, int nr_loop_iter, u64 iter_cycles, u64 branch_from, const char *srcline) |
static void | callchain_cursor_commit (struct callchain_cursor *cursor) |
static struct callchain_cursor_node * | callchain_cursor_current (struct callchain_cursor *cursor) |
static void | callchain_cursor_advance (struct callchain_cursor *cursor) |
int | callchain_cursor__copy (struct callchain_cursor *dst, struct callchain_cursor *src) |
int | record_parse_callchain_opt (const struct option *opt, const char *arg, int unset) |
int | record_callchain_opt (const struct option *opt, const char *arg, int unset) |
int | record_opts__parse_callchain (struct record_opts *record, struct callchain_param *callchain, const char *arg, bool unset) |
int | sample__resolve_callchain (struct perf_sample *sample, struct callchain_cursor *cursor, struct symbol **parent, struct perf_evsel *evsel, struct addr_location *al, int max_stack) |
int | hist_entry__append_callchain (struct hist_entry *he, struct perf_sample *sample) |
int | fill_callchain_info (struct addr_location *al, struct callchain_cursor_node *node, bool hide_unresolved) |
int | parse_callchain_record (const char *arg, struct callchain_param *param) |
int | parse_callchain_record_opt (const char *arg, struct callchain_param *param) |
int | parse_callchain_report_opt (const char *arg) |
int | parse_callchain_top_opt (const char *arg) |
int | perf_callchain_config (const char *var, const char *value) |
static void | callchain_cursor_snapshot (struct callchain_cursor *dest, struct callchain_cursor *src) |
static int | arch_skip_callchain_idx (struct thread *thread __maybe_unused, struct ip_callchain *chain __maybe_unused) |
char * | callchain_list__sym_name (struct callchain_list *cl, char *bf, size_t bfsize, bool show_dso) |
char * | callchain_node__scnprintf_value (struct callchain_node *node, char *bf, size_t bfsize, u64 total) |
int | callchain_node__fprintf_value (struct callchain_node *node, FILE *fp, u64 total) |
int | callchain_list_counts__printf_value (struct callchain_list *clist, FILE *fp, char *bf, int bfsize) |
void | free_callchain (struct callchain_root *root) |
void | decay_callchain (struct callchain_root *root) |
int | callchain_node__make_parent_list (struct callchain_node *node) |
int | callchain_branch_counts (struct callchain_root *root, u64 *branch_count, u64 *predicted_count, u64 *abort_count, u64 *cycles_count) |
Variables | |
bool | dwarf_callchain_users |
struct callchain_param | callchain_param |
struct callchain_param | callchain_param_default |
__thread struct callchain_cursor | callchain_cursor |
const char | record_callchain_help [] |
#define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace):\n\n" |
Definition at line 15 of file callchain.h.
#define CALLCHAIN_RECORD_HELP CALLCHAIN_HELP RECORD_MODE_HELP RECORD_SIZE_HELP |
Definition at line 23 of file callchain.h.
#define CALLCHAIN_REPORT_HELP |
Definition at line 25 of file callchain.h.
#define HELP_PAD "\t\t\t\t" |
Definition at line 13 of file callchain.h.
#define RECORD_MODE_HELP HELP_PAD "record_mode:\tcall graph recording mode (fp|dwarf|lbr)\n" |
Definition at line 17 of file callchain.h.
#define RECORD_SIZE_HELP |
Definition at line 19 of file callchain.h.
typedef void(* sort_chain_func_t) (struct rb_root *, struct callchain_root *, u64, struct callchain_param *) |
Definition at line 77 of file callchain.h.
enum chain_key |
Enumerator | |
---|---|
CCKEY_FUNCTION | |
CCKEY_ADDRESS | |
CCKEY_SRCLINE |
Definition at line 80 of file callchain.h.
enum chain_mode |
Enumerator | |
---|---|
CHAIN_NONE | |
CHAIN_FLAT | |
CHAIN_GRAPH_ABS | |
CHAIN_GRAPH_REL | |
CHAIN_FOLDED |
Definition at line 42 of file callchain.h.
enum chain_order |
Enumerator | |
---|---|
ORDER_CALLER | |
ORDER_CALLEE |
Definition at line 50 of file callchain.h.
enum chain_value |
Enumerator | |
---|---|
CCVAL_PERCENT | |
CCVAL_PERIOD | |
CCVAL_COUNT |
Definition at line 86 of file callchain.h.
enum perf_call_graph_mode |
Enumerator | |
---|---|
CALLCHAIN_NONE | |
CALLCHAIN_FP | |
CALLCHAIN_DWARF | |
CALLCHAIN_LBR | |
CALLCHAIN_MAX |
Definition at line 34 of file callchain.h.
|
inlinestatic |
int callchain_append | ( | struct callchain_root * | root, |
struct callchain_cursor * | cursor, | ||
u64 | period | ||
) |
int callchain_branch_counts | ( | struct callchain_root * | root, |
u64 * | branch_count, | ||
u64 * | predicted_count, | ||
u64 * | abort_count, | ||
u64 * | cycles_count | ||
) |
|
inlinestatic |
|
inlinestatic |
Definition at line 172 of file callchain.h.
int callchain_cursor__copy | ( | struct callchain_cursor * | dst, |
struct callchain_cursor * | src | ||
) |
|
inlinestatic |
int callchain_cursor_append | ( | struct callchain_cursor * | cursor, |
u64 | ip, | ||
struct map * | map, | ||
struct symbol * | sym, | ||
bool | branch, | ||
struct branch_flags * | flags, | ||
int | nr_loop_iter, | ||
u64 | iter_cycles, | ||
u64 | branch_from, | ||
const char * | srcline | ||
) |
|
inlinestatic |
Definition at line 212 of file callchain.h.
|
static |
Definition at line 220 of file callchain.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 160 of file callchain.h.
char* callchain_list__sym_name | ( | struct callchain_list * | cl, |
char * | bf, | ||
size_t | bfsize, | ||
bool | show_dso | ||
) |
Definition at line 1139 of file callchain.c.
int callchain_list_counts__printf_value | ( | struct callchain_list * | clist, |
FILE * | fp, | ||
char * | bf, | ||
int | bfsize | ||
) |
int callchain_merge | ( | struct callchain_cursor * | cursor, |
struct callchain_root * | dst, | ||
struct callchain_root * | src | ||
) |
int callchain_node__fprintf_value | ( | struct callchain_node * | node, |
FILE * | fp, | ||
u64 | total | ||
) |
int callchain_node__make_parent_list | ( | struct callchain_node * | node | ) |
char* callchain_node__scnprintf_value | ( | struct callchain_node * | node, |
char * | bf, | ||
size_t | bfsize, | ||
u64 | total | ||
) |
int callchain_register_param | ( | struct callchain_param * | param | ) |
void decay_callchain | ( | struct callchain_root * | root | ) |
int fill_callchain_info | ( | struct addr_location * | al, |
struct callchain_cursor_node * | node, | ||
bool | hide_unresolved | ||
) |
void free_callchain | ( | struct callchain_root * | root | ) |
int hist_entry__append_callchain | ( | struct hist_entry * | he, |
struct perf_sample * | sample | ||
) |
int parse_callchain_record | ( | const char * | arg, |
struct callchain_param * | param | ||
) |
int parse_callchain_record_opt | ( | const char * | arg, |
struct callchain_param * | param | ||
) |
int parse_callchain_report_opt | ( | const char * | arg | ) |
int parse_callchain_top_opt | ( | const char * | arg | ) |
int perf_callchain_config | ( | const char * | var, |
const char * | value | ||
) |
int record_callchain_opt | ( | const struct option * | opt, |
const char * | arg, | ||
int | unset | ||
) |
int record_opts__parse_callchain | ( | struct record_opts * | record, |
struct callchain_param * | callchain, | ||
const char * | arg, | ||
bool | unset | ||
) |
int record_parse_callchain_opt | ( | const struct option * | opt, |
const char * | arg, | ||
int | unset | ||
) |
int sample__resolve_callchain | ( | struct perf_sample * | sample, |
struct callchain_cursor * | cursor, | ||
struct symbol ** | parent, | ||
struct perf_evsel * | evsel, | ||
struct addr_location * | al, | ||
int | max_stack | ||
) |
__thread struct callchain_cursor callchain_cursor |
Definition at line 53 of file callchain.c.
struct callchain_param callchain_param |
Definition at line 36 of file callchain.c.
struct callchain_param callchain_param_default |
Definition at line 49 of file callchain.c.
bool dwarf_callchain_users |
Definition at line 47 of file callchain.c.
const char record_callchain_help[] |
Definition at line 1535 of file builtin-record.c.