Linux Perf
annotate.c File Reference
#include "../../util/util.h"
#include "../browser.h"
#include "../helpline.h"
#include "../ui.h"
#include "../util.h"
#include "../../util/annotate.h"
#include "../../util/hist.h"
#include "../../util/sort.h"
#include "../../util/symbol.h"
#include "../../util/evsel.h"
#include "../../util/evlist.h"
#include <inttypes.h>
#include <pthread.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <sys/ttydefaults.h>
Include dependency graph for annotate.c:

Go to the source code of this file.

Classes

struct  disasm_line_samples
 
struct  annotate_browser
 

Macros

#define SYM_TITLE_MAX_SIZE   (PATH_MAX + 64)
 

Functions

static struct annotationbrowser__annotation (struct ui_browser *browser)
 
static bool disasm_line__filter (struct ui_browser *browser, void *entry)
 
static int ui_browser__jumps_percent_color (struct ui_browser *browser, int nr, bool current)
 
static int ui_browser__set_jumps_percent_color (void *browser, int nr, bool current)
 
static int annotate_browser__set_color (void *browser, int color)
 
static void annotate_browser__write_graph (void *browser, int graph)
 
static void annotate_browser__set_percent_color (void *browser, double percent, bool current)
 
static void annotate_browser__printf (void *browser, const char *fmt,...)
 
static void annotate_browser__write (struct ui_browser *browser, void *entry, int row)
 
static bool is_fused (struct annotate_browser *ab, struct disasm_line *cursor)
 
static void annotate_browser__draw_current_jump (struct ui_browser *browser)
 
static unsigned int annotate_browser__refresh (struct ui_browser *browser)
 
static int disasm__cmp (struct annotation_line *a, struct annotation_line *b)
 
static void disasm_rb_tree__insert (struct rb_root *root, struct annotation_line *al)
 
static void annotate_browser__set_top (struct annotate_browser *browser, struct annotation_line *pos, u32 idx)
 
static void annotate_browser__set_rb_top (struct annotate_browser *browser, struct rb_node *nd)
 
static void annotate_browser__calc_percent (struct annotate_browser *browser, struct perf_evsel *evsel)
 
static bool annotate_browser__toggle_source (struct annotate_browser *browser)
 
static void ui_browser__init_asm_mode (struct ui_browser *browser)
 
static int sym_title (struct symbol *sym, struct map *map, char *title, size_t sz)
 
static bool annotate_browser__callq (struct annotate_browser *browser, struct perf_evsel *evsel, struct hist_browser_timer *hbt)
 
static struct disasm_lineannotate_browser__find_offset (struct annotate_browser *browser, s64 offset, s64 *idx)
 
static bool annotate_browser__jump (struct annotate_browser *browser, struct perf_evsel *evsel, struct hist_browser_timer *hbt)
 
static struct annotation_lineannotate_browser__find_string (struct annotate_browser *browser, char *s, s64 *idx)
 
static bool __annotate_browser__search (struct annotate_browser *browser)
 
static struct annotation_lineannotate_browser__find_string_reverse (struct annotate_browser *browser, char *s, s64 *idx)
 
static bool __annotate_browser__search_reverse (struct annotate_browser *browser)
 
static bool annotate_browser__search_window (struct annotate_browser *browser, int delay_secs)
 
static bool annotate_browser__search (struct annotate_browser *browser, int delay_secs)
 
static bool annotate_browser__continue_search (struct annotate_browser *browser, int delay_secs)
 
static bool annotate_browser__search_reverse (struct annotate_browser *browser, int delay_secs)
 
static bool annotate_browser__continue_search_reverse (struct annotate_browser *browser, int delay_secs)
 
static int annotate_browser__show (struct ui_browser *browser, char *title, const char *help)
 
static int annotate_browser__run (struct annotate_browser *browser, struct perf_evsel *evsel, struct hist_browser_timer *hbt)
 
int map_symbol__tui_annotate (struct map_symbol *ms, struct perf_evsel *evsel, struct hist_browser_timer *hbt, struct annotation_options *opts)
 
int hist_entry__tui_annotate (struct hist_entry *he, struct perf_evsel *evsel, struct hist_browser_timer *hbt, struct annotation_options *opts)
 
int symbol__tui_annotate (struct symbol *sym, struct map *map, struct perf_evsel *evsel, struct hist_browser_timer *hbt, struct annotation_options *opts)
 

Macro Definition Documentation

◆ SYM_TITLE_MAX_SIZE

#define SYM_TITLE_MAX_SIZE   (PATH_MAX + 64)

Definition at line 380 of file annotate.c.

Function Documentation

◆ __annotate_browser__search()

static bool __annotate_browser__search ( struct annotate_browser browser)
static

Definition at line 495 of file annotate.c.

Here is the call graph for this function:

◆ __annotate_browser__search_reverse()

static bool __annotate_browser__search_reverse ( struct annotate_browser browser)
static

Definition at line 532 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__calc_percent()

static void annotate_browser__calc_percent ( struct annotate_browser browser,
struct perf_evsel evsel 
)
static

Definition at line 294 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__callq()

static bool annotate_browser__callq ( struct annotate_browser browser,
struct perf_evsel evsel,
struct hist_browser_timer hbt 
)
static

Definition at line 397 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__continue_search()

static bool annotate_browser__continue_search ( struct annotate_browser browser,
int  delay_secs 
)
static

Definition at line 568 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__continue_search_reverse()

static bool annotate_browser__continue_search_reverse ( struct annotate_browser browser,
int  delay_secs 
)
static

Definition at line 587 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__draw_current_jump()

static void annotate_browser__draw_current_jump ( struct ui_browser browser)
static

Definition at line 143 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__find_offset()

static struct disasm_line* annotate_browser__find_offset ( struct annotate_browser browser,
s64  offset,
s64 *  idx 
)
static

Definition at line 429 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__find_string()

static struct annotation_line* annotate_browser__find_string ( struct annotate_browser browser,
char *  s,
s64 *  idx 
)
static

Definition at line 475 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__find_string_reverse()

static struct annotation_line* annotate_browser__find_string_reverse ( struct annotate_browser browser,
char *  s,
s64 *  idx 
)
static

Definition at line 512 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__jump()

static bool annotate_browser__jump ( struct annotate_browser browser,
struct perf_evsel evsel,
struct hist_browser_timer hbt 
)
static

Definition at line 446 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__printf()

static void annotate_browser__printf ( void *  browser,
const char *  fmt,
  ... 
)
static

Definition at line 84 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__refresh()

static unsigned int annotate_browser__refresh ( struct ui_browser browser)
static

Definition at line 212 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__run()

static int annotate_browser__run ( struct annotate_browser browser,
struct perf_evsel evsel,
struct hist_browser_timer hbt 
)
static

Definition at line 613 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__search()

static bool annotate_browser__search ( struct annotate_browser browser,
int  delay_secs 
)
static

Definition at line 560 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__search_reverse()

static bool annotate_browser__search_reverse ( struct annotate_browser browser,
int  delay_secs 
)
static

Definition at line 577 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__search_window()

static bool annotate_browser__search_window ( struct annotate_browser browser,
int  delay_secs 
)
static

Definition at line 548 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__set_color()

static int annotate_browser__set_color ( void *  browser,
int  color 
)
static

Definition at line 69 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__set_percent_color()

static void annotate_browser__set_percent_color ( void *  browser,
double  percent,
bool  current 
)
static

Definition at line 79 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__set_rb_top()

static void annotate_browser__set_rb_top ( struct annotate_browser browser,
struct rb_node *  nd 
)
static

Definition at line 281 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__set_top()

static void annotate_browser__set_top ( struct annotate_browser browser,
struct annotation_line pos,
u32  idx 
)
static

Definition at line 257 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__show()

static int annotate_browser__show ( struct ui_browser browser,
char *  title,
const char *  help 
)
static

Definition at line 596 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__toggle_source()

static bool annotate_browser__toggle_source ( struct annotate_browser browser)
static

Definition at line 335 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__write()

static void annotate_browser__write ( struct ui_browser browser,
void *  entry,
int  row 
)
static

Definition at line 93 of file annotate.c.

Here is the call graph for this function:

◆ annotate_browser__write_graph()

static void annotate_browser__write_graph ( void *  browser,
int  graph 
)
static

Definition at line 74 of file annotate.c.

Here is the call graph for this function:

◆ browser__annotation()

static struct annotation* browser__annotation ( struct ui_browser browser)
static

Definition at line 37 of file annotate.c.

Here is the call graph for this function:

◆ disasm__cmp()

static int disasm__cmp ( struct annotation_line a,
struct annotation_line b 
)
static

Definition at line 226 of file annotate.c.

◆ disasm_line__filter()

static bool disasm_line__filter ( struct ui_browser browser,
void *  entry 
)
static

Definition at line 43 of file annotate.c.

Here is the call graph for this function:

◆ disasm_rb_tree__insert()

static void disasm_rb_tree__insert ( struct rb_root *  root,
struct annotation_line al 
)
static

Definition at line 238 of file annotate.c.

Here is the call graph for this function:

◆ hist_entry__tui_annotate()

int hist_entry__tui_annotate ( struct hist_entry he,
struct perf_evsel evsel,
struct hist_browser_timer hbt,
struct annotation_options opts 
)

Definition at line 827 of file annotate.c.

Here is the call graph for this function:

◆ is_fused()

static bool is_fused ( struct annotate_browser ab,
struct disasm_line cursor 
)
static

Definition at line 124 of file annotate.c.

Here is the call graph for this function:

◆ map_symbol__tui_annotate()

int map_symbol__tui_annotate ( struct map_symbol ms,
struct perf_evsel evsel,
struct hist_browser_timer hbt,
struct annotation_options opts 
)

Definition at line 820 of file annotate.c.

Here is the call graph for this function:

◆ sym_title()

static int sym_title ( struct symbol sym,
struct map map,
char *  title,
size_t  sz 
)
static

Definition at line 382 of file annotate.c.

◆ symbol__tui_annotate()

int symbol__tui_annotate ( struct symbol sym,
struct map map,
struct perf_evsel evsel,
struct hist_browser_timer hbt,
struct annotation_options opts 
)

Definition at line 838 of file annotate.c.

Here is the call graph for this function:

◆ ui_browser__init_asm_mode()

static void ui_browser__init_asm_mode ( struct ui_browser browser)
static

Definition at line 373 of file annotate.c.

Here is the call graph for this function:

◆ ui_browser__jumps_percent_color()

static int ui_browser__jumps_percent_color ( struct ui_browser browser,
int  nr,
bool  current 
)
static

Definition at line 50 of file annotate.c.

Here is the call graph for this function:

◆ ui_browser__set_jumps_percent_color()

static int ui_browser__set_jumps_percent_color ( void *  browser,
int  nr,
bool  current 
)
static

Definition at line 63 of file annotate.c.

Here is the call graph for this function: