[tip:perf/core] perf unwind: Introduce flag to separate local/remote unwind compilation

From: tip-bot for He Kuang
Date: Wed Jun 08 2016 - 04:51:31 EST


Commit-ID: 19473e7ba8f8f443f09d4187791de9d6f95fdc1d
Gitweb: http://git.kernel.org/tip/19473e7ba8f8f443f09d4187791de9d6f95fdc1d
Author: He Kuang <hekuang@xxxxxxxxxx>
AuthorDate: Fri, 3 Jun 2016 03:33:21 +0000
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 7 Jun 2016 15:11:46 -0300

perf unwind: Introduce flag to separate local/remote unwind compilation

This is a preparation for including unwind-libunwind-local.c in other
files for remote libunwind.

Signed-off-by: He Kuang <hekuang@xxxxxxxxxx>
Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Ekaterina Tumanova <tumanova@xxxxxxxxxxxxxxxxxx>
Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Cc: Kan Liang <kan.liang@xxxxxxxxx>
Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Pekka Enberg <penberg@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Cc: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/1464924803-22214-13-git-send-email-hekuang@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/unwind-libunwind-local.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 631b40d..01c2e86 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -22,8 +22,10 @@
#include <unistd.h>
#include <sys/mman.h>
#include <linux/list.h>
+#ifndef REMOTE_UNWIND_LIBUNWIND
#include <libunwind.h>
#include <libunwind-ptrace.h>
+#endif
#include "callchain.h"
#include "thread.h"
#include "session.h"
@@ -689,5 +691,7 @@ _unwind_libunwind_ops = {
.get_entries = _unwind__get_entries,
};

+#ifndef REMOTE_UNWIND_LIBUNWIND
struct unwind_libunwind_ops *
local_unwind_libunwind_ops = &_unwind_libunwind_ops;
+#endif