perf probe: Support comp_dir to find an absolute source path

Gcc generates DW_AT_comp_dir and stores relative source path if building kernel
without O= option. In that case, perf probe --line sometimes doesn't work
without --source option, because it tries to access relative source path.

This adds DW_AT_comp_dir support to perf probe for finding an absolute source
path when no --source option.

LKML-Reference: <4C36EBE7.3060802@hitachi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Masami Hiramatsu
2010-07-09 18:29:11 +09:00
committed by Arnaldo Carvalho de Melo
parent 7cf0b79e6f
commit 6a330a3c8a
3 changed files with 44 additions and 12 deletions

View File

@@ -86,6 +86,7 @@ struct line_range {
int end; /* End line number */
int offset; /* Start line offset */
char *path; /* Real path name */
char *comp_dir; /* Compile directory */
struct list_head line_list; /* Visible lines */
};