Linux Perf
srcline.c File Reference
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <linux/kernel.h>
#include "util/dso.h"
#include "util/util.h"
#include "util/debug.h"
#include "util/callchain.h"
#include "srcline.h"
#include "string2.h"
#include "symbol.h"
Include dependency graph for srcline.c:

Go to the source code of this file.

Classes

struct  srcline_node
 

Macros

#define A2L_FAIL_LIMIT   123
 

Functions

static const char * dso__name (struct dso *dso)
 
static int inline_list__append (struct symbol *symbol, char *srcline, struct inline_node *node)
 
static const char * gnu_basename (const char *path)
 
static char * srcline_from_fileline (const char *file, unsigned int line)
 
static struct symbolnew_inline_sym (struct dso *dso, struct symbol *base_sym, const char *funcname)
 
static int filename_split (char *filename, unsigned int *line_nr)
 
static int addr2line (const char *dso_name, u64 addr, char **file, unsigned int *line_nr, struct dso *dso __maybe_unused, bool unwind_inlines __maybe_unused, struct inline_node *node __maybe_unused, struct symbol *sym __maybe_unused)
 
void dso__free_a2l (struct dso *dso __maybe_unused)
 
static struct inline_nodeaddr2inlines (const char *dso_name, u64 addr, struct dso *dso __maybe_unused, struct symbol *sym)
 
char * __get_srcline (struct dso *dso, u64 addr, struct symbol *sym, bool show_sym, bool show_addr, bool unwind_inlines, u64 ip)
 
void free_srcline (char *srcline)
 
char * get_srcline (struct dso *dso, u64 addr, struct symbol *sym, bool show_sym, bool show_addr, u64 ip)
 
void srcline__tree_insert (struct rb_root *tree, u64 addr, char *srcline)
 
char * srcline__tree_find (struct rb_root *tree, u64 addr)
 
void srcline__tree_delete (struct rb_root *tree)
 
struct inline_nodedso__parse_addr_inlines (struct dso *dso, u64 addr, struct symbol *sym)
 
void inline_node__delete (struct inline_node *node)
 
void inlines__tree_insert (struct rb_root *tree, struct inline_node *inlines)
 
struct inline_nodeinlines__tree_find (struct rb_root *tree, u64 addr)
 
void inlines__tree_delete (struct rb_root *tree)
 

Variables

bool srcline_full_filename
 

Macro Definition Documentation

◆ A2L_FAIL_LIMIT

#define A2L_FAIL_LIMIT   123

Definition at line 497 of file srcline.c.

Function Documentation

◆ __get_srcline()

char* __get_srcline ( struct dso dso,
u64  addr,
struct symbol sym,
bool  show_sym,
bool  show_addr,
bool  unwind_inlines,
u64  ip 
)

Definition at line 499 of file srcline.c.

Here is the call graph for this function:

◆ addr2inlines()

static struct inline_node* addr2inlines ( const char *  dso_name,
u64  addr,
struct dso *dso  __maybe_unused,
struct symbol sym 
)
static

Definition at line 429 of file srcline.c.

Here is the call graph for this function:

◆ addr2line()

static int addr2line ( const char *  dso_name,
u64  addr,
char **  file,
unsigned int *  line_nr,
struct dso *dso  __maybe_unused,
bool unwind_inlines  __maybe_unused,
struct inline_node *node  __maybe_unused,
struct symbol *sym  __maybe_unused 
)
static

Definition at line 385 of file srcline.c.

Here is the call graph for this function:

◆ dso__free_a2l()

void dso__free_a2l ( struct dso *dso  __maybe_unused)

Definition at line 425 of file srcline.c.

◆ dso__name()

static const char* dso__name ( struct dso dso)
static

Definition at line 19 of file srcline.c.

◆ dso__parse_addr_inlines()

struct inline_node* dso__parse_addr_inlines ( struct dso dso,
u64  addr,
struct symbol sym 
)

Definition at line 626 of file srcline.c.

Here is the call graph for this function:

◆ filename_split()

static int filename_split ( char *  filename,
unsigned int *  line_nr 
)
static

Definition at line 364 of file srcline.c.

◆ free_srcline()

void free_srcline ( char *  srcline)

Definition at line 548 of file srcline.c.

Here is the call graph for this function:

◆ get_srcline()

char* get_srcline ( struct dso dso,
u64  addr,
struct symbol sym,
bool  show_sym,
bool  show_addr,
u64  ip 
)

Definition at line 554 of file srcline.c.

Here is the call graph for this function:

◆ gnu_basename()

static const char* gnu_basename ( const char *  path)
static

Definition at line 58 of file srcline.c.

◆ inline_list__append()

static int inline_list__append ( struct symbol symbol,
char *  srcline,
struct inline_node node 
)
static

Definition at line 37 of file srcline.c.

Here is the call graph for this function:

◆ inline_node__delete()

void inline_node__delete ( struct inline_node node)

Definition at line 638 of file srcline.c.

Here is the call graph for this function:

◆ inlines__tree_delete()

void inlines__tree_delete ( struct rb_root *  tree)

Definition at line 692 of file srcline.c.

Here is the call graph for this function:

◆ inlines__tree_find()

struct inline_node* inlines__tree_find ( struct rb_root *  tree,
u64  addr 
)

Definition at line 673 of file srcline.c.

◆ inlines__tree_insert()

void inlines__tree_insert ( struct rb_root *  tree,
struct inline_node inlines 
)

Definition at line 654 of file srcline.c.

◆ new_inline_sym()

static struct symbol* new_inline_sym ( struct dso dso,
struct symbol base_sym,
const char *  funcname 
)
static

Definition at line 81 of file srcline.c.

Here is the call graph for this function:

◆ srcline__tree_delete()

void srcline__tree_delete ( struct rb_root *  tree)

Definition at line 612 of file srcline.c.

Here is the call graph for this function:

◆ srcline__tree_find()

char* srcline__tree_find ( struct rb_root *  tree,
u64  addr 
)

Definition at line 593 of file srcline.c.

◆ srcline__tree_insert()

void srcline__tree_insert ( struct rb_root *  tree,
u64  addr,
char *  srcline 
)

Definition at line 566 of file srcline.c.

Here is the call graph for this function:

◆ srcline_from_fileline()

static char* srcline_from_fileline ( const char *  file,
unsigned int  line 
)
static

Definition at line 65 of file srcline.c.

Here is the call graph for this function:

Variable Documentation

◆ srcline_full_filename

bool srcline_full_filename

Definition at line 17 of file srcline.c.