Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752961AbcLFHQB (ORCPT ); Tue, 6 Dec 2016 02:16:01 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:46200 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752434AbcLFHOp (ORCPT ); Tue, 6 Dec 2016 02:14:45 -0500 From: Wang Nan To: CC: , , Wang Nan , Arnaldo Carvalho de Melo , "Alexei Starovoitov" , He Kuang , Jiri Olsa , Zefan Li , Subject: [PATCH v4 17/18] perf clang builtin: Define hook helpers by default Date: Tue, 6 Dec 2016 07:13:55 +0000 Message-ID: <20161206071356.5312-18-wangnan0@huawei.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161206071356.5312-1-wangnan0@huawei.com> References: <20161206071356.5312-1-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1346 Lines: 35 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 Cc: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: He Kuang Cc: Jiri Olsa Cc: Zefan Li Cc: pi3orama@163.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