Linux Perf
hist.c File Reference
#include "util.h"
#include "build-id.h"
#include "hist.h"
#include "map.h"
#include "session.h"
#include "namespaces.h"
#include "sort.h"
#include "units.h"
#include "evlist.h"
#include "evsel.h"
#include "annotate.h"
#include "srcline.h"
#include "thread.h"
#include "ui/progress.h"
#include <errno.h>
#include <math.h>
#include <inttypes.h>
#include <sys/param.h>
Include dependency graph for hist.c:

Go to the source code of this file.

Typedefs

typedef bool(* fmt_chk_fn) (struct perf_hpp_fmt *fmt)
 
typedef bool(* filter_fn_t) (struct hists *hists, struct hist_entry *he)
 

Functions

static bool hists__filter_entry_by_dso (struct hists *hists, struct hist_entry *he)
 
static bool hists__filter_entry_by_thread (struct hists *hists, struct hist_entry *he)
 
static bool hists__filter_entry_by_symbol (struct hists *hists, struct hist_entry *he)
 
static bool hists__filter_entry_by_socket (struct hists *hists, struct hist_entry *he)
 
u16 hists__col_len (struct hists *hists, enum hist_column col)
 
void hists__set_col_len (struct hists *hists, enum hist_column col, u16 len)
 
bool hists__new_col_len (struct hists *hists, enum hist_column col, u16 len)
 
void hists__reset_col_len (struct hists *hists)
 
static void hists__set_unres_dso_col_len (struct hists *hists, int dso)
 
void hists__calc_col_len (struct hists *hists, struct hist_entry *h)
 
void hists__output_recalc_col_len (struct hists *hists, int max_rows)
 
static void he_stat__add_cpumode_period (struct he_stat *he_stat, unsigned int cpumode, u64 period)
 
static void he_stat__add_period (struct he_stat *he_stat, u64 period, u64 weight)
 
static void he_stat__add_stat (struct he_stat *dest, struct he_stat *src)
 
static void he_stat__decay (struct he_stat *he_stat)
 
static void hists__delete_entry (struct hists *hists, struct hist_entry *he)
 
static bool hists__decay_entry (struct hists *hists, struct hist_entry *he)
 
void hists__decay_entries (struct hists *hists, bool zap_user, bool zap_kernel)
 
void hists__delete_entries (struct hists *hists)
 
static int hist_entry__init (struct hist_entry *he, struct hist_entry *template, bool sample_self)
 
static void * hist_entry__zalloc (size_t size)
 
static void hist_entry__free (void *ptr)
 
static struct hist_entryhist_entry__new (struct hist_entry *template, bool sample_self)
 
static u8 symbol__parent_filter (const struct symbol *parent)
 
static void hist_entry__add_callchain_period (struct hist_entry *he, u64 period)
 
static struct hist_entryhists__findnew_entry (struct hists *hists, struct hist_entry *entry, struct addr_location *al, bool sample_self)
 
static struct hist_entry__hists__add_entry (struct hists *hists, struct addr_location *al, struct symbol *sym_parent, struct branch_info *bi, struct mem_info *mi, struct perf_sample *sample, bool sample_self, struct hist_entry_ops *ops)
 
struct hist_entryhists__add_entry (struct hists *hists, struct addr_location *al, struct symbol *sym_parent, struct branch_info *bi, struct mem_info *mi, struct perf_sample *sample, bool sample_self)
 
struct hist_entryhists__add_entry_ops (struct hists *hists, struct hist_entry_ops *ops, struct addr_location *al, struct symbol *sym_parent, struct branch_info *bi, struct mem_info *mi, struct perf_sample *sample, bool sample_self)
 
static int iter_next_nop_entry (struct hist_entry_iter *iter __maybe_unused, struct addr_location *al __maybe_unused)
 
static int iter_add_next_nop_entry (struct hist_entry_iter *iter __maybe_unused, struct addr_location *al __maybe_unused)
 
static int iter_prepare_mem_entry (struct hist_entry_iter *iter, struct addr_location *al)
 
static int iter_add_single_mem_entry (struct hist_entry_iter *iter, struct addr_location *al)
 
static int iter_finish_mem_entry (struct hist_entry_iter *iter, struct addr_location *al __maybe_unused)
 
static int iter_prepare_branch_entry (struct hist_entry_iter *iter, struct addr_location *al)
 
static int iter_add_single_branch_entry (struct hist_entry_iter *iter __maybe_unused, struct addr_location *al __maybe_unused)
 
static int iter_next_branch_entry (struct hist_entry_iter *iter, struct addr_location *al)
 
static int iter_add_next_branch_entry (struct hist_entry_iter *iter, struct addr_location *al)
 
static int iter_finish_branch_entry (struct hist_entry_iter *iter, struct addr_location *al __maybe_unused)
 
static int iter_prepare_normal_entry (struct hist_entry_iter *iter __maybe_unused, struct addr_location *al __maybe_unused)
 
static int iter_add_single_normal_entry (struct hist_entry_iter *iter, struct addr_location *al)
 
static int iter_finish_normal_entry (struct hist_entry_iter *iter, struct addr_location *al __maybe_unused)
 
static int iter_prepare_cumulative_entry (struct hist_entry_iter *iter, struct addr_location *al __maybe_unused)
 
static int iter_add_single_cumulative_entry (struct hist_entry_iter *iter, struct addr_location *al)
 
static int iter_next_cumulative_entry (struct hist_entry_iter *iter, struct addr_location *al)
 
static int iter_add_next_cumulative_entry (struct hist_entry_iter *iter, struct addr_location *al)
 
static int iter_finish_cumulative_entry (struct hist_entry_iter *iter, struct addr_location *al __maybe_unused)
 
int hist_entry_iter__add (struct hist_entry_iter *iter, struct addr_location *al, int max_stack_depth, void *arg)
 
int64_t hist_entry__cmp (struct hist_entry *left, struct hist_entry *right)
 
int64_t hist_entry__collapse (struct hist_entry *left, struct hist_entry *right)
 
void hist_entry__delete (struct hist_entry *he)
 
int hist_entry__snprintf_alignment (struct hist_entry *he, struct perf_hpp *hpp, struct perf_hpp_fmt *fmt, int printed)
 
static void hists__apply_filters (struct hists *hists, struct hist_entry *he)
 
static void hists__remove_entry_filter (struct hists *hists, struct hist_entry *he, enum hist_filter type)
 
static bool check_thread_entry (struct perf_hpp_fmt *fmt)
 
static void hist_entry__check_and_remove_filter (struct hist_entry *he, enum hist_filter type, fmt_chk_fn check)
 
static void hist_entry__apply_hierarchy_filters (struct hist_entry *he)
 
static struct hist_entryhierarchy_insert_entry (struct hists *hists, struct rb_root *root, struct hist_entry *he, struct hist_entry *parent_he, struct perf_hpp_list *hpp_list)
 
static int hists__hierarchy_insert_entry (struct hists *hists, struct rb_root *root, struct hist_entry *he)
 
static int hists__collapse_insert_entry (struct hists *hists, struct rb_root *root, struct hist_entry *he)
 
struct rb_root * hists__get_rotate_entries_in (struct hists *hists)
 
int hists__collapse_resort (struct hists *hists, struct ui_progress *prog)
 
static int hist_entry__sort (struct hist_entry *a, struct hist_entry *b)
 
static void hists__reset_filter_stats (struct hists *hists)
 
void hists__reset_stats (struct hists *hists)
 
static void hists__inc_filter_stats (struct hists *hists, struct hist_entry *h)
 
void hists__inc_stats (struct hists *hists, struct hist_entry *h)
 
static void hierarchy_recalc_total_periods (struct hists *hists)
 
static void hierarchy_insert_output_entry (struct rb_root *root, struct hist_entry *he)
 
static void hists__hierarchy_output_resort (struct hists *hists, struct ui_progress *prog, struct rb_root *root_in, struct rb_root *root_out, u64 min_callchain_hits, bool use_callchain)
 
static void __hists__insert_output_entry (struct rb_root *entries, struct hist_entry *he, u64 min_callchain_hits, bool use_callchain)
 
static void output_resort (struct hists *hists, struct ui_progress *prog, bool use_callchain, hists__resort_cb_t cb)
 
void perf_evsel__output_resort (struct perf_evsel *evsel, struct ui_progress *prog)
 
void hists__output_resort (struct hists *hists, struct ui_progress *prog)
 
void hists__output_resort_cb (struct hists *hists, struct ui_progress *prog, hists__resort_cb_t cb)
 
static bool can_goto_child (struct hist_entry *he, enum hierarchy_move_dir hmd)
 
struct rb_node * rb_hierarchy_last (struct rb_node *node)
 
struct rb_node * __rb_hierarchy_next (struct rb_node *node, enum hierarchy_move_dir hmd)
 
struct rb_node * rb_hierarchy_prev (struct rb_node *node)
 
bool hist_entry__has_hierarchy_children (struct hist_entry *he, float limit)
 
static void hists__filter_by_type (struct hists *hists, int type, filter_fn_t filter)
 
static void resort_filtered_entry (struct rb_root *root, struct hist_entry *he)
 
static void hists__filter_hierarchy (struct hists *hists, int type, const void *arg)
 
void hists__filter_by_thread (struct hists *hists)
 
void hists__filter_by_dso (struct hists *hists)
 
void hists__filter_by_symbol (struct hists *hists)
 
void hists__filter_by_socket (struct hists *hists)
 
void events_stats__inc (struct events_stats *stats, u32 type)
 
void hists__inc_nr_events (struct hists *hists, u32 type)
 
void hists__inc_nr_samples (struct hists *hists, bool filtered)
 
static struct hist_entryhists__add_dummy_entry (struct hists *hists, struct hist_entry *pair)
 
static struct hist_entryadd_dummy_hierarchy_entry (struct hists *hists, struct rb_root *root, struct hist_entry *pair)
 
static struct hist_entryhists__find_entry (struct hists *hists, struct hist_entry *he)
 
static struct hist_entryhists__find_hierarchy_entry (struct rb_root *root, struct hist_entry *he)
 
static void hists__match_hierarchy (struct rb_root *leader_root, struct rb_root *other_root)
 
void hists__match (struct hists *leader, struct hists *other)
 
static int hists__link_hierarchy (struct hists *leader_hists, struct hist_entry *parent, struct rb_root *leader_root, struct rb_root *other_root)
 
int hists__link (struct hists *leader, struct hists *other)
 
void hist__account_cycles (struct branch_stack *bs, struct addr_location *al, struct perf_sample *sample, bool nonany_branch_mode)
 
size_t perf_evlist__fprintf_nr_events (struct perf_evlist *evlist, FILE *fp)
 
u64 hists__total_period (struct hists *hists)
 
int __hists__scnprintf_title (struct hists *hists, char *bf, size_t size, bool show_freq)
 
int parse_filter_percentage (const struct option *opt __maybe_unused, const char *arg, int unset __maybe_unused)
 
int perf_hist_config (const char *var, const char *value)
 
int __hists__init (struct hists *hists, struct perf_hpp_list *hpp_list)
 
static void hists__delete_remaining_entries (struct rb_root *root)
 
static void hists__delete_all_entries (struct hists *hists)
 
static void hists_evsel__exit (struct perf_evsel *evsel)
 
static int hists_evsel__init (struct perf_evsel *evsel)
 
int hists__init (void)
 
void perf_hpp_list__init (struct perf_hpp_list *list)
 

Variables

static struct hist_entry_ops default_ops
 
const struct hist_iter_ops hist_iter_mem
 
const struct hist_iter_ops hist_iter_branch
 
const struct hist_iter_ops hist_iter_normal
 
const struct hist_iter_ops hist_iter_cumulative
 

Typedef Documentation

◆ filter_fn_t

typedef bool(* filter_fn_t) (struct hists *hists, struct hist_entry *he)

Definition at line 1953 of file hist.c.

◆ fmt_chk_fn

typedef bool(* fmt_chk_fn) (struct perf_hpp_fmt *fmt)

Definition at line 1186 of file hist.c.

Function Documentation

◆ __hists__add_entry()

static struct hist_entry* __hists__add_entry ( struct hists hists,
struct addr_location al,
struct symbol sym_parent,
struct branch_info bi,
struct mem_info mi,
struct perf_sample sample,
bool  sample_self,
struct hist_entry_ops ops 
)
static

Definition at line 581 of file hist.c.

Here is the call graph for this function:

◆ __hists__init()

int __hists__init ( struct hists hists,
struct perf_hpp_list hpp_list 
)

Definition at line 2562 of file hist.c.

Here is the call graph for this function:

◆ __hists__insert_output_entry()

static void __hists__insert_output_entry ( struct rb_root *  entries,
struct hist_entry he,
u64  min_callchain_hits,
bool  use_callchain 
)
static

Definition at line 1659 of file hist.c.

Here is the call graph for this function:

◆ __hists__scnprintf_title()

int __hists__scnprintf_title ( struct hists hists,
char *  bf,
size_t  size,
bool  show_freq 
)

Definition at line 2460 of file hist.c.

Here is the call graph for this function:

◆ __rb_hierarchy_next()

struct rb_node* __rb_hierarchy_next ( struct rb_node *  node,
enum hierarchy_move_dir  hmd 
)

Definition at line 1803 of file hist.c.

Here is the call graph for this function:

◆ add_dummy_hierarchy_entry()

static struct hist_entry* add_dummy_hierarchy_entry ( struct hists hists,
struct rb_root *  root,
struct hist_entry pair 
)
static

Definition at line 2182 of file hist.c.

Here is the call graph for this function:

◆ can_goto_child()

static bool can_goto_child ( struct hist_entry he,
enum hierarchy_move_dir  hmd 
)
static

Definition at line 1781 of file hist.c.

◆ check_thread_entry()

static bool check_thread_entry ( struct perf_hpp_fmt fmt)
static

Definition at line 1188 of file hist.c.

Here is the call graph for this function:

◆ events_stats__inc()

void events_stats__inc ( struct events_stats stats,
u32  type 
)

Definition at line 2118 of file hist.c.

◆ he_stat__add_cpumode_period()

static void he_stat__add_cpumode_period ( struct he_stat he_stat,
unsigned int  cpumode,
u64  period 
)
static

Definition at line 226 of file hist.c.

◆ he_stat__add_period()

static void he_stat__add_period ( struct he_stat he_stat,
u64  period,
u64  weight 
)
static

Definition at line 247 of file hist.c.

◆ he_stat__add_stat()

static void he_stat__add_stat ( struct he_stat dest,
struct he_stat src 
)
static

Definition at line 256 of file hist.c.

◆ he_stat__decay()

static void he_stat__decay ( struct he_stat he_stat)
static

Definition at line 267 of file hist.c.

Here is the call graph for this function:

◆ hierarchy_insert_entry()

static struct hist_entry* hierarchy_insert_entry ( struct hists hists,
struct rb_root *  root,
struct hist_entry he,
struct hist_entry parent_he,
struct perf_hpp_list hpp_list 
)
static

Definition at line 1277 of file hist.c.

Here is the call graph for this function:

◆ hierarchy_insert_output_entry()

static void hierarchy_insert_output_entry ( struct rb_root *  root,
struct hist_entry he 
)
static

Definition at line 1577 of file hist.c.

Here is the call graph for this function:

◆ hierarchy_recalc_total_periods()

static void hierarchy_recalc_total_periods ( struct hists hists)
static

Definition at line 1552 of file hist.c.

◆ hist__account_cycles()

void hist__account_cycles ( struct branch_stack bs,
struct addr_location al,
struct perf_sample sample,
bool  nonany_branch_mode 
)

Definition at line 2406 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__add_callchain_period()

static void hist_entry__add_callchain_period ( struct hist_entry he,
u64  period 
)
static

Definition at line 493 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__apply_hierarchy_filters()

static void hist_entry__apply_hierarchy_filters ( struct hist_entry he)
static

Definition at line 1263 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__check_and_remove_filter()

static void hist_entry__check_and_remove_filter ( struct hist_entry he,
enum hist_filter  type,
fmt_chk_fn  check 
)
static

Definition at line 1193 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__cmp()

int64_t hist_entry__cmp ( struct hist_entry left,
struct hist_entry right 
)

Definition at line 1087 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__collapse()

int64_t hist_entry__collapse ( struct hist_entry left,
struct hist_entry right 
)

Definition at line 1107 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__delete()

void hist_entry__delete ( struct hist_entry he)

Definition at line 1126 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__free()

static void hist_entry__free ( void *  ptr)
static

Definition at line 450 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__has_hierarchy_children()

bool hist_entry__has_hierarchy_children ( struct hist_entry he,
float  limit 
)

Definition at line 1837 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__init()

static int hist_entry__init ( struct hist_entry he,
struct hist_entry template,
bool  sample_self 
)
static

Definition at line 371 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__new()

static struct hist_entry* hist_entry__new ( struct hist_entry template,
bool  sample_self 
)
static

Definition at line 460 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__snprintf_alignment()

int hist_entry__snprintf_alignment ( struct hist_entry he,
struct perf_hpp hpp,
struct perf_hpp_fmt fmt,
int  printed 
)

Definition at line 1164 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__sort()

static int hist_entry__sort ( struct hist_entry a,
struct hist_entry b 
)
static

Definition at line 1505 of file hist.c.

Here is the call graph for this function:

◆ hist_entry__zalloc()

static void* hist_entry__zalloc ( size_t  size)
static

Definition at line 445 of file hist.c.

Here is the call graph for this function:

◆ hist_entry_iter__add()

int hist_entry_iter__add ( struct hist_entry_iter iter,
struct addr_location al,
int  max_stack_depth,
void *  arg 
)

Definition at line 1036 of file hist.c.

Here is the call graph for this function:

◆ hists__add_dummy_entry()

static struct hist_entry* hists__add_dummy_entry ( struct hists hists,
struct hist_entry pair 
)
static

Definition at line 2136 of file hist.c.

Here is the call graph for this function:

◆ hists__add_entry()

struct hist_entry* hists__add_entry ( struct hists hists,
struct addr_location al,
struct symbol sym_parent,
struct branch_info bi,
struct mem_info mi,
struct perf_sample sample,
bool  sample_self 
)

Definition at line 627 of file hist.c.

Here is the call graph for this function:

◆ hists__add_entry_ops()

struct hist_entry* hists__add_entry_ops ( struct hists hists,
struct hist_entry_ops ops,
struct addr_location al,
struct symbol sym_parent,
struct branch_info bi,
struct mem_info mi,
struct perf_sample sample,
bool  sample_self 
)

Definition at line 639 of file hist.c.

Here is the call graph for this function:

◆ hists__apply_filters()

static void hists__apply_filters ( struct hists hists,
struct hist_entry he 
)
static

Definition at line 1456 of file hist.c.

Here is the call graph for this function:

◆ hists__calc_col_len()

void hists__calc_col_len ( struct hists hists,
struct hist_entry h 
)

Definition at line 67 of file hist.c.

Here is the call graph for this function:

◆ hists__col_len()

u16 hists__col_len ( struct hists hists,
enum hist_column  col 
)

Definition at line 30 of file hist.c.

◆ hists__collapse_insert_entry()

static int hists__collapse_insert_entry ( struct hists hists,
struct rb_root *  root,
struct hist_entry he 
)
static

Definition at line 1393 of file hist.c.

Here is the call graph for this function:

◆ hists__collapse_resort()

int hists__collapse_resort ( struct hists hists,
struct ui_progress prog 
)

Definition at line 1464 of file hist.c.

Here is the call graph for this function:

◆ hists__decay_entries()

void hists__decay_entries ( struct hists hists,
bool  zap_user,
bool  zap_kernel 
)

Definition at line 338 of file hist.c.

Here is the call graph for this function:

◆ hists__decay_entry()

static bool hists__decay_entry ( struct hists hists,
struct hist_entry he 
)
static

Definition at line 276 of file hist.c.

Here is the call graph for this function:

◆ hists__delete_all_entries()

static void hists__delete_all_entries ( struct hists hists)
static

Definition at line 2590 of file hist.c.

Here is the call graph for this function:

◆ hists__delete_entries()

void hists__delete_entries ( struct hists hists)

Definition at line 354 of file hist.c.

Here is the call graph for this function:

◆ hists__delete_entry()

static void hists__delete_entry ( struct hists hists,
struct hist_entry he 
)
static

Definition at line 312 of file hist.c.

Here is the call graph for this function:

◆ hists__delete_remaining_entries()

static void hists__delete_remaining_entries ( struct rb_root *  root)
static

Definition at line 2576 of file hist.c.

Here is the call graph for this function:

◆ hists__filter_by_dso()

void hists__filter_by_dso ( struct hists hists)

Definition at line 2088 of file hist.c.

Here is the call graph for this function:

◆ hists__filter_by_socket()

void hists__filter_by_socket ( struct hists hists)

Definition at line 2108 of file hist.c.

Here is the call graph for this function:

◆ hists__filter_by_symbol()

void hists__filter_by_symbol ( struct hists hists)

Definition at line 2098 of file hist.c.

Here is the call graph for this function:

◆ hists__filter_by_thread()

void hists__filter_by_thread ( struct hists hists)

Definition at line 2078 of file hist.c.

Here is the call graph for this function:

◆ hists__filter_by_type()

static void hists__filter_by_type ( struct hists hists,
int  type,
filter_fn_t  filter 
)
static

Definition at line 1955 of file hist.c.

Here is the call graph for this function:

◆ hists__filter_entry_by_dso()

static bool hists__filter_entry_by_dso ( struct hists hists,
struct hist_entry he 
)
static

Definition at line 1904 of file hist.c.

◆ hists__filter_entry_by_socket()

static bool hists__filter_entry_by_socket ( struct hists hists,
struct hist_entry he 
)
static

Definition at line 1941 of file hist.c.

◆ hists__filter_entry_by_symbol()

static bool hists__filter_entry_by_symbol ( struct hists hists,
struct hist_entry he 
)
static

Definition at line 1928 of file hist.c.

◆ hists__filter_entry_by_thread()

static bool hists__filter_entry_by_thread ( struct hists hists,
struct hist_entry he 
)
static

Definition at line 1916 of file hist.c.

◆ hists__filter_hierarchy()

static void hists__filter_hierarchy ( struct hists hists,
int  type,
const void *  arg 
)
static

Definition at line 2011 of file hist.c.

Here is the call graph for this function:

◆ hists__find_entry()

static struct hist_entry* hists__find_entry ( struct hists hists,
struct hist_entry he 
)
static

Definition at line 2226 of file hist.c.

Here is the call graph for this function:

◆ hists__find_hierarchy_entry()

static struct hist_entry* hists__find_hierarchy_entry ( struct rb_root *  root,
struct hist_entry he 
)
static

Definition at line 2251 of file hist.c.

◆ hists__findnew_entry()

static struct hist_entry* hists__findnew_entry ( struct hists hists,
struct hist_entry entry,
struct addr_location al,
bool  sample_self 
)
static

Definition at line 503 of file hist.c.

Here is the call graph for this function:

◆ hists__get_rotate_entries_in()

struct rb_root* hists__get_rotate_entries_in ( struct hists hists)

Definition at line 1441 of file hist.c.

◆ hists__hierarchy_insert_entry()

static int hists__hierarchy_insert_entry ( struct hists hists,
struct rb_root *  root,
struct hist_entry he 
)
static

Definition at line 1346 of file hist.c.

Here is the call graph for this function:

◆ hists__hierarchy_output_resort()

static void hists__hierarchy_output_resort ( struct hists hists,
struct ui_progress prog,
struct rb_root *  root_in,
struct rb_root *  root_out,
u64  min_callchain_hits,
bool  use_callchain 
)
static

Definition at line 1605 of file hist.c.

Here is the call graph for this function:

◆ hists__inc_filter_stats()

static void hists__inc_filter_stats ( struct hists hists,
struct hist_entry h 
)
static

Definition at line 1537 of file hist.c.

◆ hists__inc_nr_events()

void hists__inc_nr_events ( struct hists hists,
u32  type 
)

Definition at line 2124 of file hist.c.

Here is the call graph for this function:

◆ hists__inc_nr_samples()

void hists__inc_nr_samples ( struct hists hists,
bool  filtered 
)

Definition at line 2129 of file hist.c.

Here is the call graph for this function:

◆ hists__inc_stats()

void hists__inc_stats ( struct hists hists,
struct hist_entry h 
)

Definition at line 1543 of file hist.c.

Here is the call graph for this function:

◆ hists__init()

int hists__init ( void  )

Definition at line 2629 of file hist.c.

Here is the call graph for this function:

◆ hists__link()

int hists__link ( struct hists leader,
struct hists other 
)

Definition at line 2374 of file hist.c.

Here is the call graph for this function:

◆ hists__link_hierarchy()

static int hists__link_hierarchy ( struct hists leader_hists,
struct hist_entry parent,
struct rb_root *  leader_root,
struct rb_root *  other_root 
)
static

Definition at line 2325 of file hist.c.

Here is the call graph for this function:

◆ hists__match()

void hists__match ( struct hists leader,
struct hists other 
)

Definition at line 2299 of file hist.c.

Here is the call graph for this function:

◆ hists__match_hierarchy()

static void hists__match_hierarchy ( struct rb_root *  leader_root,
struct rb_root *  other_root 
)
static

Definition at line 2279 of file hist.c.

Here is the call graph for this function:

◆ hists__new_col_len()

bool hists__new_col_len ( struct hists hists,
enum hist_column  col,
u16  len 
)

Definition at line 40 of file hist.c.

Here is the call graph for this function:

◆ hists__output_recalc_col_len()

void hists__output_recalc_col_len ( struct hists hists,
int  max_rows 
)

Definition at line 210 of file hist.c.

Here is the call graph for this function:

◆ hists__output_resort()

void hists__output_resort ( struct hists hists,
struct ui_progress prog 
)

Definition at line 1770 of file hist.c.

Here is the call graph for this function:

◆ hists__output_resort_cb()

void hists__output_resort_cb ( struct hists hists,
struct ui_progress prog,
hists__resort_cb_t  cb 
)

Definition at line 1775 of file hist.c.

Here is the call graph for this function:

◆ hists__remove_entry_filter()

static void hists__remove_entry_filter ( struct hists hists,
struct hist_entry he,
enum hist_filter  type 
)
static

Definition at line 1862 of file hist.c.

Here is the call graph for this function:

◆ hists__reset_col_len()

void hists__reset_col_len ( struct hists hists)

Definition at line 49 of file hist.c.

Here is the call graph for this function:

◆ hists__reset_filter_stats()

static void hists__reset_filter_stats ( struct hists hists)
static

Definition at line 1523 of file hist.c.

◆ hists__reset_stats()

void hists__reset_stats ( struct hists hists)

Definition at line 1529 of file hist.c.

Here is the call graph for this function:

◆ hists__set_col_len()

void hists__set_col_len ( struct hists hists,
enum hist_column  col,
u16  len 
)

Definition at line 35 of file hist.c.

◆ hists__set_unres_dso_col_len()

static void hists__set_unres_dso_col_len ( struct hists hists,
int  dso 
)
static

Definition at line 57 of file hist.c.

Here is the call graph for this function:

◆ hists__total_period()

u64 hists__total_period ( struct hists hists)

Definition at line 2454 of file hist.c.

◆ hists_evsel__exit()

static void hists_evsel__exit ( struct perf_evsel evsel)
static

Definition at line 2598 of file hist.c.

Here is the call graph for this function:

◆ hists_evsel__init()

static int hists_evsel__init ( struct perf_evsel evsel)
static

Definition at line 2616 of file hist.c.

Here is the call graph for this function:

◆ iter_add_next_branch_entry()

static int iter_add_next_branch_entry ( struct hist_entry_iter iter,
struct addr_location al 
)
static

Definition at line 785 of file hist.c.

Here is the call graph for this function:

◆ iter_add_next_cumulative_entry()

static int iter_add_next_cumulative_entry ( struct hist_entry_iter iter,
struct addr_location al 
)
static

Definition at line 940 of file hist.c.

Here is the call graph for this function:

◆ iter_add_next_nop_entry()

static int iter_add_next_nop_entry ( struct hist_entry_iter *iter  __maybe_unused,
struct addr_location *al  __maybe_unused 
)
static

Definition at line 660 of file hist.c.

◆ iter_add_single_branch_entry()

static int iter_add_single_branch_entry ( struct hist_entry_iter *iter  __maybe_unused,
struct addr_location *al  __maybe_unused 
)
static

Definition at line 760 of file hist.c.

◆ iter_add_single_cumulative_entry()

static int iter_add_single_cumulative_entry ( struct hist_entry_iter iter,
struct addr_location al 
)
static

Definition at line 895 of file hist.c.

Here is the call graph for this function:

◆ iter_add_single_mem_entry()

static int iter_add_single_mem_entry ( struct hist_entry_iter iter,
struct addr_location al 
)
static

Definition at line 681 of file hist.c.

Here is the call graph for this function:

◆ iter_add_single_normal_entry()

static int iter_add_single_normal_entry ( struct hist_entry_iter iter,
struct addr_location al 
)
static

Definition at line 838 of file hist.c.

Here is the call graph for this function:

◆ iter_finish_branch_entry()

static int iter_finish_branch_entry ( struct hist_entry_iter iter,
struct addr_location *al  __maybe_unused 
)
static

Definition at line 821 of file hist.c.

◆ iter_finish_cumulative_entry()

static int iter_finish_cumulative_entry ( struct hist_entry_iter iter,
struct addr_location *al  __maybe_unused 
)
static

Definition at line 995 of file hist.c.

◆ iter_finish_mem_entry()

static int iter_finish_mem_entry ( struct hist_entry_iter iter,
struct addr_location *al  __maybe_unused 
)
static

Definition at line 715 of file hist.c.

Here is the call graph for this function:

◆ iter_finish_normal_entry()

static int iter_finish_normal_entry ( struct hist_entry_iter iter,
struct addr_location *al  __maybe_unused 
)
static

Definition at line 854 of file hist.c.

Here is the call graph for this function:

◆ iter_next_branch_entry()

static int iter_next_branch_entry ( struct hist_entry_iter iter,
struct addr_location al 
)
static

Definition at line 767 of file hist.c.

◆ iter_next_cumulative_entry()

static int iter_next_cumulative_entry ( struct hist_entry_iter iter,
struct addr_location al 
)
static

Definition at line 927 of file hist.c.

Here is the call graph for this function:

◆ iter_next_nop_entry()

static int iter_next_nop_entry ( struct hist_entry_iter *iter  __maybe_unused,
struct addr_location *al  __maybe_unused 
)
static

Definition at line 653 of file hist.c.

◆ iter_prepare_branch_entry()

static int iter_prepare_branch_entry ( struct hist_entry_iter iter,
struct addr_location al 
)
static

Definition at line 743 of file hist.c.

Here is the call graph for this function:

◆ iter_prepare_cumulative_entry()

static int iter_prepare_cumulative_entry ( struct hist_entry_iter iter,
struct addr_location *al  __maybe_unused 
)
static

Definition at line 872 of file hist.c.

Here is the call graph for this function:

◆ iter_prepare_mem_entry()

static int iter_prepare_mem_entry ( struct hist_entry_iter iter,
struct addr_location al 
)
static

Definition at line 667 of file hist.c.

Here is the call graph for this function:

◆ iter_prepare_normal_entry()

static int iter_prepare_normal_entry ( struct hist_entry_iter *iter  __maybe_unused,
struct addr_location *al  __maybe_unused 
)
static

Definition at line 831 of file hist.c.

◆ output_resort()

static void output_resort ( struct hists hists,
struct ui_progress prog,
bool  use_callchain,
hists__resort_cb_t  cb 
)
static

Definition at line 1702 of file hist.c.

Here is the call graph for this function:

◆ parse_filter_percentage()

int parse_filter_percentage ( const struct option *opt  __maybe_unused,
const char *  arg,
int unset  __maybe_unused 
)

Definition at line 2539 of file hist.c.

◆ perf_evlist__fprintf_nr_events()

size_t perf_evlist__fprintf_nr_events ( struct perf_evlist evlist,
FILE *  fp 
)

Definition at line 2440 of file hist.c.

Here is the call graph for this function:

◆ perf_evsel__output_resort()

void perf_evsel__output_resort ( struct perf_evsel evsel,
struct ui_progress prog 
)

Definition at line 1756 of file hist.c.

Here is the call graph for this function:

◆ perf_hist_config()

int perf_hist_config ( const char *  var,
const char *  value 
)

Definition at line 2554 of file hist.c.

Here is the call graph for this function:

◆ perf_hpp_list__init()

void perf_hpp_list__init ( struct perf_hpp_list list)

Definition at line 2640 of file hist.c.

◆ rb_hierarchy_last()

struct rb_node* rb_hierarchy_last ( struct rb_node *  node)

Definition at line 1792 of file hist.c.

Here is the call graph for this function:

◆ rb_hierarchy_prev()

struct rb_node* rb_hierarchy_prev ( struct rb_node *  node)

Definition at line 1822 of file hist.c.

Here is the call graph for this function:

◆ resort_filtered_entry()

static void resort_filtered_entry ( struct rb_root *  root,
struct hist_entry he 
)
static

Definition at line 1974 of file hist.c.

Here is the call graph for this function:

◆ symbol__parent_filter()

static u8 symbol__parent_filter ( const struct symbol parent)
static

Definition at line 486 of file hist.c.

Variable Documentation

◆ default_ops

struct hist_entry_ops default_ops
static
Initial value:
= {
}
static void * hist_entry__zalloc(size_t size)
Definition: hist.c:445
static void hist_entry__free(void *ptr)
Definition: hist.c:450

Definition at line 455 of file hist.c.

◆ hist_iter_branch

const struct hist_iter_ops hist_iter_branch
Initial value:
= {
.prepare_entry = iter_prepare_branch_entry,
.add_single_entry = iter_add_single_branch_entry,
.next_entry = iter_next_branch_entry,
.add_next_entry = iter_add_next_branch_entry,
.finish_entry = iter_finish_branch_entry,
}
static int iter_add_next_branch_entry(struct hist_entry_iter *iter, struct addr_location *al)
Definition: hist.c:785
static int iter_next_branch_entry(struct hist_entry_iter *iter, struct addr_location *al)
Definition: hist.c:767
static int iter_add_single_branch_entry(struct hist_entry_iter *iter __maybe_unused, struct addr_location *al __maybe_unused)
Definition: hist.c:760
static int iter_prepare_branch_entry(struct hist_entry_iter *iter, struct addr_location *al)
Definition: hist.c:743
static int iter_finish_branch_entry(struct hist_entry_iter *iter, struct addr_location *al __maybe_unused)
Definition: hist.c:821

Definition at line 1012 of file hist.c.

◆ hist_iter_cumulative

const struct hist_iter_ops hist_iter_cumulative
Initial value:
= {
.add_single_entry = iter_add_single_cumulative_entry,
.add_next_entry = iter_add_next_cumulative_entry,
}
static int iter_next_cumulative_entry(struct hist_entry_iter *iter, struct addr_location *al)
Definition: hist.c:927
static int iter_add_next_cumulative_entry(struct hist_entry_iter *iter, struct addr_location *al)
Definition: hist.c:940
static int iter_finish_cumulative_entry(struct hist_entry_iter *iter, struct addr_location *al __maybe_unused)
Definition: hist.c:995
static int iter_add_single_cumulative_entry(struct hist_entry_iter *iter, struct addr_location *al)
Definition: hist.c:895
static int iter_prepare_cumulative_entry(struct hist_entry_iter *iter, struct addr_location *al __maybe_unused)
Definition: hist.c:872

Definition at line 1028 of file hist.c.

◆ hist_iter_mem

const struct hist_iter_ops hist_iter_mem
Initial value:
= {
.prepare_entry = iter_prepare_mem_entry,
.add_single_entry = iter_add_single_mem_entry,
.next_entry = iter_next_nop_entry,
.add_next_entry = iter_add_next_nop_entry,
.finish_entry = iter_finish_mem_entry,
}
static int iter_next_nop_entry(struct hist_entry_iter *iter __maybe_unused, struct addr_location *al __maybe_unused)
Definition: hist.c:653
static int iter_finish_mem_entry(struct hist_entry_iter *iter, struct addr_location *al __maybe_unused)
Definition: hist.c:715
static int iter_add_single_mem_entry(struct hist_entry_iter *iter, struct addr_location *al)
Definition: hist.c:681
static int iter_prepare_mem_entry(struct hist_entry_iter *iter, struct addr_location *al)
Definition: hist.c:667
static int iter_add_next_nop_entry(struct hist_entry_iter *iter __maybe_unused, struct addr_location *al __maybe_unused)
Definition: hist.c:660

Definition at line 1004 of file hist.c.

◆ hist_iter_normal

const struct hist_iter_ops hist_iter_normal
Initial value:
= {
.prepare_entry = iter_prepare_normal_entry,
.add_single_entry = iter_add_single_normal_entry,
.next_entry = iter_next_nop_entry,
.add_next_entry = iter_add_next_nop_entry,
.finish_entry = iter_finish_normal_entry,
}
static int iter_add_single_normal_entry(struct hist_entry_iter *iter, struct addr_location *al)
Definition: hist.c:838
static int iter_next_nop_entry(struct hist_entry_iter *iter __maybe_unused, struct addr_location *al __maybe_unused)
Definition: hist.c:653
static int iter_prepare_normal_entry(struct hist_entry_iter *iter __maybe_unused, struct addr_location *al __maybe_unused)
Definition: hist.c:831
static int iter_finish_normal_entry(struct hist_entry_iter *iter, struct addr_location *al __maybe_unused)
Definition: hist.c:854
static int iter_add_next_nop_entry(struct hist_entry_iter *iter __maybe_unused, struct addr_location *al __maybe_unused)
Definition: hist.c:660

Definition at line 1020 of file hist.c.