From 303cb89a6d708da9c24f6f3390ff68a2bd822a13 Mon Sep 17 00:00:00 2001 From: Wang Nan Date: Fri, 13 Mar 2015 15:02:56 +0800 Subject: perf callchain: Separate eh/debug frame offset cache. Commit f1f13af99a90 ("perf callchain: Cache eh/debug frame offset for dwarf unwind") introduces a cache for .debug_frame and .eh_frame_hdr. Unfortunately, it makes them share a same cache (dso->frame_offset). Which causes unwind failure on ARM: $ perf test unwind Test dwarf unwind: FAILED! The reason is that, if a dso has '.debug_frame' but doesn't have '.eh_frame_hdr' (like ARM), dso->frame_offset will be filled by offset of '.debug_frame' during the first time calling of find_proc_info() -> read_unwind_spec_debug_frame(), and be regarded to '.eh_frame_hdr' when the second time calling of find_proc_info() -> read_unwind_spec_eh_frame(), since '.eh_frame_hdr' is checked prior to '.debug_frame'. This patch solves the problem by creating two cache fields for '.eh_frame_hdr' and '.debug_frame'. Signed-off-by: Wang Nan Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Li Zefan Link: http://lkml.kernel.org/r/55028BA0.1030701@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/dso.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/perf/util/dso.h') diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index ced92841ff97..408c65f1a757 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h @@ -139,7 +139,8 @@ struct dso { u32 status_seen; size_t file_size; struct list_head open_entry; - u64 frame_offset; + u64 debug_frame_offset; + u64 eh_frame_hdr_offset; } data; union { /* Tool specific area */ -- cgit v1.2.3