Linux Perf
|
#include <errno.h>
#include <inttypes.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/stringify.h>
#include <asm/bug.h>
#include <sys/param.h>
#include "util.h"
#include "debug.h"
#include "builtin.h"
#include <subcmd/parse-options.h>
#include "mem-events.h"
#include "session.h"
#include "hist.h"
#include "sort.h"
#include "tool.h"
#include "data.h"
#include "event.h"
#include "evlist.h"
#include "evsel.h"
#include "ui/browsers/hists.h"
#include "thread.h"
#include "mem2node.h"
Go to the source code of this file.
Classes | |
struct | c2c_hists |
struct | compute_stats |
struct | c2c_hist_entry |
struct | perf_c2c |
struct | c2c_header |
struct | c2c_dimension |
struct | c2c_fmt |
Macros | |
#define | C2C_HEADER_MAX 2 |
#define | SYMBOL_WIDTH 30 |
#define | HEX_STR(__s, __v) |
#define | STAT_FN_ENTRY(__f) |
#define | STAT_FN_CMP(__f) |
#define | STAT_FN(__f) |
#define | PERC_STR(__s, __v) |
#define | PERCENT(__h, __f) percent(he_stats(__h)->__f, total_stats(__h)->__f) |
#define | PERCENT_FN(__f) |
#define | DISPLAY_HITM(__h) |
#define | MEAN_ENTRY(__func, __val) |
#define | HEADER_LOW(__h) |
#define | HEADER_BOTH(__h0, __h1) |
#define | HEADER_SPAN(__h0, __h1, __s) |
#define | HEADER_SPAN_LOW(__h) |
#define | PARSE_LIST(_list, _fn) |
#define | DISPLAY_LINE_LIMIT 0.0005 |
#define | FILTER_HITM(__h) |
#define | HAS_HITMS(__h) ((__h)->stats.lcl_hitm || (__h)->stats.rmt_hitm) |
#define | CALLCHAIN_DEFAULT_OPT "graph,0.5,caller,function,percent" |
#define | for_each_token(__tok, __buf, __sep, __tmp) |
Typedefs | |
typedef double() | get_percent_cb(struct c2c_hist_entry *) |
Enumerations | |
enum | { DISPLAY_LCL, DISPLAY_RMT, DISPLAY_TOT, DISPLAY_MAX } |
Functions | |
static void * | c2c_he_zalloc (size_t size) |
static void | c2c_he_free (void *he) |
static int | c2c_hists__init (struct c2c_hists *hists, const char *sort, int nr_header_lines) |
static struct c2c_hists * | he__get_c2c_hists (struct hist_entry *he, const char *sort, int nr_header_lines) |
static void | c2c_he__set_cpu (struct c2c_hist_entry *c2c_he, struct perf_sample *sample) |
static void | c2c_he__set_node (struct c2c_hist_entry *c2c_he, struct perf_sample *sample) |
static void | compute_stats (struct c2c_hist_entry *c2c_he, struct c2c_stats *stats, u64 weight) |
static int | process_sample_event (struct perf_tool *tool __maybe_unused, union perf_event *event, struct perf_sample *sample, struct perf_evsel *evsel, struct machine *machine) |
static int | symbol_width (struct hists *hists, struct sort_entry *se) |
static int | c2c_width (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp __maybe_unused, struct hists *hists) |
static int | c2c_header (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hists *hists, int line, int *span) |
static int64_t | dcacheline_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static int | dcacheline_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int | dcacheline_node_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int | dcacheline_node_count (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int | offset_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | offset_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static int | iaddr_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | iaddr_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static int | tot_hitm_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | tot_hitm_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static uint64_t | llc_miss (struct c2c_stats *stats) |
static int | ld_llcmiss_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | ld_llcmiss_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static uint64_t | total_records (struct c2c_stats *stats) |
static int | tot_recs_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | tot_recs_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static uint64_t | total_loads (struct c2c_stats *stats) |
static int | tot_loads_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | tot_loads_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static int | percent_color (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he, get_percent_cb get_percent) |
static double | percent_hitm (struct c2c_hist_entry *c2c_he) |
static int | percent_hitm_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int | percent_hitm_color (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | percent_hitm_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static struct c2c_stats * | he_stats (struct hist_entry *he) |
static struct c2c_stats * | total_stats (struct hist_entry *he) |
static double | percent (int st, int tot) |
static int | percent_rmt_hitm_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int | percent_rmt_hitm_color (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | percent_rmt_hitm_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static int | percent_lcl_hitm_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int | percent_lcl_hitm_color (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | percent_lcl_hitm_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static int | percent_stores_l1hit_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int | percent_stores_l1hit_color (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | percent_stores_l1hit_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static int | percent_stores_l1miss_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int | percent_stores_l1miss_color (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | percent_stores_l1miss_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static int | pid_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | pid_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left, struct hist_entry *right) |
static int64_t | empty_cmp (struct perf_hpp_fmt *fmt __maybe_unused, struct hist_entry *left __maybe_unused, struct hist_entry *right __maybe_unused) |
static int | node_entry (struct perf_hpp_fmt *fmt __maybe_unused, struct perf_hpp *hpp, struct hist_entry *he) |
static int | mean_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he, double mean) |
MEAN_ENTRY (mean_rmt_entry, rmt_hitm) | |
MEAN_ENTRY (mean_lcl_entry, lcl_hitm) | |
MEAN_ENTRY (mean_load_entry, load) | |
static int | cpucnt_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int | cl_idx_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int | cl_idx_empty_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static void | fmt_free (struct perf_hpp_fmt *fmt) |
static bool | fmt_equal (struct perf_hpp_fmt *a, struct perf_hpp_fmt *b) |
static struct c2c_dimension * | get_dimension (const char *name) |
static int | c2c_se_entry (struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) |
static int64_t | c2c_se_cmp (struct perf_hpp_fmt *fmt, struct hist_entry *a, struct hist_entry *b) |
static int64_t | c2c_se_collapse (struct perf_hpp_fmt *fmt, struct hist_entry *a, struct hist_entry *b) |
static struct c2c_fmt * | get_format (const char *name) |
static int | c2c_hists__init_output (struct perf_hpp_list *hpp_list, char *name) |
static int | c2c_hists__init_sort (struct perf_hpp_list *hpp_list, char *name) |
static int | hpp_list__parse (struct perf_hpp_list *hpp_list, const char *output_, const char *sort_) |
static int | c2c_hists__reinit (struct c2c_hists *c2c_hists, const char *output, const char *sort) |
static bool | he__display (struct hist_entry *he, struct c2c_stats *stats) |
static int | valid_hitm_or_store (struct hist_entry *he) |
static void | set_node_width (struct c2c_hist_entry *c2c_he, int len) |
static int | set_nodestr (struct c2c_hist_entry *c2c_he) |
static void | calc_width (struct c2c_hist_entry *c2c_he) |
static int | filter_cb (struct hist_entry *he) |
static int | resort_cl_cb (struct hist_entry *he) |
static void | setup_nodes_header (void) |
static int | setup_nodes (struct perf_session *session) |
static int | resort_hitm_cb (struct hist_entry *he) |
static int | hists__iterate_cb (struct hists *hists, hists__resort_cb_t cb) |
static void | print_c2c__display_stats (FILE *out) |
static void | print_shared_cacheline_info (FILE *out) |
static void | print_cacheline (struct c2c_hists *c2c_hists, struct hist_entry *he_cl, struct perf_hpp_list *hpp_list, FILE *out) |
static void | print_pareto (FILE *out) |
static void | print_c2c_info (FILE *out, struct perf_session *session) |
static void | perf_c2c__hists_fprintf (FILE *out, struct perf_session *session) |
static void | perf_c2c_display (struct perf_session *session) |
static char * | fill_line (const char *orig, int len) |
static int | ui_quirks (void) |
static int | parse_callchain_opt (const struct option *opt, const char *arg, int unset) |
static int | setup_callchain (struct perf_evlist *evlist) |
static int | setup_display (const char *str) |
static int | build_cl_output (char *cl_sort, bool no_source) |
static int | setup_coalesce (const char *coalesce, bool no_source) |
static int | perf_c2c__report (int argc, const char **argv) |
static int | parse_record_events (const struct option *opt, const char *str, int unset __maybe_unused) |
static int | perf_c2c__record (int argc, const char **argv) |
int | cmd_c2c (int argc, const char **argv) |
#define C2C_HEADER_MAX 2 |
Definition at line 376 of file builtin-c2c.c.
Definition at line 2538 of file builtin-c2c.c.
#define DISPLAY_HITM | ( | __h | ) |
#define DISPLAY_LINE_LIMIT 0.0005 |
Definition at line 1881 of file builtin-c2c.c.
#define FILTER_HITM | ( | __h | ) |
#define for_each_token | ( | __tok, | |
__buf, | |||
__sep, | |||
__tmp | |||
) |
Definition at line 2609 of file builtin-c2c.c.
#define HAS_HITMS | ( | __h | ) | ((__h)->stats.lcl_hitm || (__h)->stats.rmt_hitm) |
Definition at line 2074 of file builtin-c2c.c.
#define HEADER_BOTH | ( | __h0, | |
__h1 | |||
) |
Definition at line 1237 of file builtin-c2c.c.
#define HEADER_LOW | ( | __h | ) |
Definition at line 1230 of file builtin-c2c.c.
#define HEADER_SPAN | ( | __h0, | |
__h1, | |||
__s | |||
) |
Definition at line 1247 of file builtin-c2c.c.
#define HEADER_SPAN_LOW | ( | __h | ) |
Definition at line 1258 of file builtin-c2c.c.
#define HEX_STR | ( | __s, | |
__v | |||
) |
Definition at line 470 of file builtin-c2c.c.
#define MEAN_ENTRY | ( | __func, | |
__val | |||
) |
Definition at line 1180 of file builtin-c2c.c.
#define PARSE_LIST | ( | _list, | |
_fn | |||
) |
Definition at line 1802 of file builtin-c2c.c.
#define PERC_STR | ( | __s, | |
__v | |||
) |
Definition at line 838 of file builtin-c2c.c.
#define PERCENT | ( | __h, | |
__f | |||
) | percent(he_stats(__h)->__f, total_stats(__h)->__f) |
Definition at line 904 of file builtin-c2c.c.
#define PERCENT_FN | ( | __f | ) |
Definition at line 906 of file builtin-c2c.c.
#define STAT_FN | ( | __f | ) |
Definition at line 626 of file builtin-c2c.c.
#define STAT_FN_CMP | ( | __f | ) |
Definition at line 614 of file builtin-c2c.c.
#define STAT_FN_ENTRY | ( | __f | ) |
Definition at line 601 of file builtin-c2c.c.
#define SYMBOL_WIDTH 30 |
Definition at line 404 of file builtin-c2c.c.
typedef double() get_percent_cb(struct c2c_hist_entry *) |
Definition at line 785 of file builtin-c2c.c.
anonymous enum |
Enumerator | |
---|---|
DISPLAY_LCL | |
DISPLAY_RMT | |
DISPLAY_TOT | |
DISPLAY_MAX |
Definition at line 102 of file builtin-c2c.c.
|
static |
|
static |
Definition at line 201 of file builtin-c2c.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1719 of file builtin-c2c.c.
|
static |
Definition at line 1728 of file builtin-c2c.c.
|
static |
|
static |
|
static |
|
static |
|
static |
int cmd_c2c | ( | int | argc, |
const char ** | argv | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1064 of file builtin-c2c.c.
|
static |
|
static |
|
static |
Definition at line 1680 of file builtin-c2c.c.
|
static |
|
static |
Definition at line 1688 of file builtin-c2c.c.
|
static |
|
static |
Definition at line 1883 of file builtin-c2c.c.
|
static |
|
static |
Definition at line 883 of file builtin-c2c.c.
|
static |
Definition at line 2089 of file builtin-c2c.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 641 of file builtin-c2c.c.
|
static |
MEAN_ENTRY | ( | mean_rmt_entry | , |
rmt_hitm | |||
) |
MEAN_ENTRY | ( | mean_lcl_entry | , |
lcl_hitm | |||
) |
MEAN_ENTRY | ( | mean_load_entry | , |
load | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 899 of file builtin-c2c.c.
|
static |
|
static |
Definition at line 805 of file builtin-c2c.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 970 of file builtin-c2c.c.
|
static |
|
static |
|
static |
Definition at line 939 of file builtin-c2c.c.
|
static |
|
static |
|
static |
Definition at line 1001 of file builtin-c2c.c.
|
static |
|
static |
|
static |
Definition at line 1032 of file builtin-c2c.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1057 of file builtin-c2c.c.
|
static |
|
static |
Definition at line 2107 of file builtin-c2c.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 2152 of file builtin-c2c.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 1932 of file builtin-c2c.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 2591 of file builtin-c2c.c.
|
static |
|
static |
Definition at line 2013 of file builtin-c2c.c.
|
static |
|
static |
Definition at line 584 of file builtin-c2c.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 734 of file builtin-c2c.c.
|
static |
Definition at line 679 of file builtin-c2c.c.
|
static |
Definition at line 891 of file builtin-c2c.c.
|
static |
|
inlinestatic |
Definition at line 1920 of file builtin-c2c.c.
|
static |
Definition at line 2861 of file builtin-c2c.c.
|
static |
Definition at line 369 of file builtin-c2c.c.
|
static |
Definition at line 120 of file builtin-c2c.c.
|
static |
Definition at line 166 of file builtin-c2c.c.
|
static |
Definition at line 115 of file builtin-c2c.c.
|
static |
Definition at line 364 of file builtin-c2c.c.
const char callchain_help[] |
Definition at line 2540 of file builtin-c2c.c.
|
static |
Definition at line 71 of file builtin-c2c.c.
|
static |
Definition at line 1347 of file builtin-c2c.c.
|
static |
Definition at line 1339 of file builtin-c2c.c.
|
static |
Definition at line 1379 of file builtin-c2c.c.
|
static |
Definition at line 1387 of file builtin-c2c.c.
|
static |
Definition at line 1587 of file builtin-c2c.c.
|
static |
Definition at line 1265 of file builtin-c2c.c.
|
static |
Definition at line 1281 of file builtin-c2c.c.
|
static |
Definition at line 1600 of file builtin-c2c.c.
|
static |
Definition at line 1273 of file builtin-c2c.c.
|
static |
Definition at line 1608 of file builtin-c2c.c.
|
static |
Definition at line 1616 of file builtin-c2c.c.
|
static |
Definition at line 1509 of file builtin-c2c.c.
|
static |
Definition at line 1517 of file builtin-c2c.c.
|
static |
Definition at line 1544 of file builtin-c2c.c.
|
static |
Definition at line 1307 of file builtin-c2c.c.
|
static |
Definition at line 1323 of file builtin-c2c.c.
|
static |
Definition at line 1395 of file builtin-c2c.c.
|
static |
Definition at line 1403 of file builtin-c2c.c.
|
static |
Definition at line 1411 of file builtin-c2c.c.
|
static |
Definition at line 1419 of file builtin-c2c.c.
|
static |
Definition at line 1435 of file builtin-c2c.c.
|
static |
Definition at line 1427 of file builtin-c2c.c.
|
static |
Definition at line 1571 of file builtin-c2c.c.
|
static |
Definition at line 1579 of file builtin-c2c.c.
|
static |
Definition at line 1563 of file builtin-c2c.c.
|
static |
Definition at line 1556 of file builtin-c2c.c.
|
static |
Definition at line 1291 of file builtin-c2c.c.
|
static |
Definition at line 1299 of file builtin-c2c.c.
|
static |
Definition at line 1465 of file builtin-c2c.c.
|
static |
Definition at line 1482 of file builtin-c2c.c.
|
static |
Definition at line 1473 of file builtin-c2c.c.
|
static |
Definition at line 1491 of file builtin-c2c.c.
|
static |
Definition at line 1500 of file builtin-c2c.c.
|
static |
Definition at line 1525 of file builtin-c2c.c.
|
static |
Definition at line 1331 of file builtin-c2c.c.
|
static |
Definition at line 407 of file builtin-c2c.c.
|
static |
Definition at line 1355 of file builtin-c2c.c.
|
static |
Definition at line 1363 of file builtin-c2c.c.
|
static |
Definition at line 1371 of file builtin-c2c.c.
|
static |
Definition at line 406 of file builtin-c2c.c.
|
static |
Definition at line 1533 of file builtin-c2c.c.
|
static |
Definition at line 1315 of file builtin-c2c.c.
|
static |
Definition at line 1451 of file builtin-c2c.c.
|
static |
Definition at line 1443 of file builtin-c2c.c.
|
static |
Definition at line 1624 of file builtin-c2c.c.
|
static |
Definition at line 109 of file builtin-c2c.c.
|
static |
Definition at line 1550 of file builtin-c2c.c.
|
static |
Definition at line 1289 of file builtin-c2c.c.
|
static |
Definition at line 1459 of file builtin-c2c.c.
|
static |
Definition at line 2867 of file builtin-c2c.c.
|
static |
Definition at line 374 of file builtin-c2c.c.