[PATCH v6 02/11] perf tools: Decouple thread->address_space on libunwind

From: He Kuang
Date: Sat May 28 2016 - 08:00:51 EST


Currently, the type of thread->addr_space is unw_addr_space_t, which
is a pointer defined in libunwind headers. For local libunwind, we can
simple include "libunwind.h", but for remote libunwind, the header
file is depends on the target libunwind platform. This patch uses
'void *' instead to decouple the dependence on libunwind.

Signed-off-by: He Kuang <hekuang@xxxxxxxxxx>
---
tools/perf/util/thread.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 45fba13..aa3a8ff 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -9,9 +9,6 @@
#include "symbol.h"
#include <strlist.h>
#include <intlist.h>
-#ifdef HAVE_LIBUNWIND_SUPPORT
-#include <libunwind.h>
-#endif

struct thread_stack;

@@ -36,7 +33,7 @@ struct thread {
void *priv;
struct thread_stack *ts;
#ifdef HAVE_LIBUNWIND_SUPPORT
- unw_addr_space_t addr_space;
+ void *addr_space;
#endif
};

--
1.8.5.2