[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161126070354.141764-30-wangnan0@huawei.com>
Date: Sat, 26 Nov 2016 07:03:53 +0000
From: Wang Nan <wangnan0@...wei.com>
To: <acme@...hat.com>, <ast@...com>
CC: <lizefan@...wei.com>, <hekuang@...wei.com>,
<linux-kernel@...r.kernel.org>, <pi3orama@....com>, <joe@....org>,
Wang Nan <wangnan0@...wei.com>, Jiri Olsa <jolsa@...nel.org>
Subject: [PATCH v3 29/30] perf clang builtin: Define hook helpers by default
Append declarations of helpers to default include file. All functions
appear in exported_funcs array should be declared here except
test__clang_callback, because it is used for perf test only.
Signed-off-by: Wang Nan <wangnan0@...wei.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Alexei Starovoitov <ast@...com>
Cc: He Kuang <hekuang@...wei.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Zefan Li <lizefan@...wei.com>
Cc: pi3orama@....com
---
tools/perf/util/c++/bpf-helper-str.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/util/c++/bpf-helper-str.c b/tools/perf/util/c++/bpf-helper-str.c
index 17f915c..f4d6d57 100644
--- a/tools/perf/util/c++/bpf-helper-str.c
+++ b/tools/perf/util/c++/bpf-helper-str.c
@@ -10,6 +10,13 @@ const char clang_builtin_bpf_helper_str[] =
" unsigned int max_entries;\n"
"};\n"
"#define SEC(NAME) __attribute__((section(NAME), used))\n"
+"extern int printf(const char *, ...);\n"
+"extern int puts(const char *);\n"
+"extern int perf_map_update_elem(void *, void *, void *, void *, unsigned long);\n"
+"extern int perf_map_lookup_elem(void *, void *, void *, void *);\n"
+"extern int perf_map_get_next_key(void *, void *, void *, void *);\n"
+"extern int perf_map_pin(void *, void *, const char *);\n"
+"extern int perf_map_get(const char *);\n"
"#endif\n"
"#endif"
;
--
2.10.1
Powered by blists - more mailing lists