mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 14:43:58 +08:00
fea0cf842c
This is a requirement to create real callchain entries for inlined frames. Since the list of inlines usually contains the target symbol too, i.e. the location where the frames get inlined to, we alias that symbol and reuse it as-is is. This ensures that other dependent functionality keeps working, most notably annotation of the target frames. For all other entries in the inline_list, a fake symbol is created. These are marked by new 'inlined' member which is set to true. Only those symbols are managed by the inline_list and get freed when the inline_list is deleted from within inline_node__delete. Signed-off-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Jiri Olsa <jolsa@redhat.com> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Yao Jin <yao.jin@linux.intel.com> Link: http://lkml.kernel.org/r/20171009203310.17362-4-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
38 lines
929 B
C
38 lines
929 B
C
#ifndef PERF_SRCLINE_H
|
|
#define PERF_SRCLINE_H
|
|
|
|
#include <linux/list.h>
|
|
#include <linux/types.h>
|
|
|
|
struct dso;
|
|
struct symbol;
|
|
|
|
extern bool srcline_full_filename;
|
|
char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
|
|
bool show_sym, bool show_addr);
|
|
char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
|
|
bool show_sym, bool show_addr, bool unwind_inlines);
|
|
void free_srcline(char *srcline);
|
|
|
|
#define SRCLINE_UNKNOWN ((char *) "??:0")
|
|
|
|
struct inline_list {
|
|
struct symbol *symbol;
|
|
char *filename;
|
|
unsigned int line_nr;
|
|
struct list_head list;
|
|
};
|
|
|
|
struct inline_node {
|
|
u64 addr;
|
|
struct list_head val;
|
|
};
|
|
|
|
/* parse inlined frames for the given address */
|
|
struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr,
|
|
struct symbol *sym);
|
|
/* free resources associated to the inline node list */
|
|
void inline_node__delete(struct inline_node *node);
|
|
|
|
#endif /* PERF_SRCLINE_H */
|