From 5e08a76525b8f5e9aeb8b27d0466614abec070a9 Mon Sep 17 00:00:00 2001 From: Wang Nan Date: Sat, 26 Nov 2016 07:03:38 +0000 Subject: perf clang: Support compile IR to BPF object and add testcase getBPFObjectFromModule() is introduced to compile LLVM IR(Module) to BPF object. Add new testcase for it. Test result: $ ./buildperf/perf test -v clang 51: builtin clang support : 51.1: builtin clang compile C source to IR : --- start --- test child forked, pid 21822 test child finished with 0 ---- end ---- builtin clang support subtest 0: Ok 51.2: builtin clang compile C source to ELF object : --- start --- test child forked, pid 21823 test child finished with 0 ---- end ---- builtin clang support subtest 1: Ok Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: He Kuang Cc: Jiri Olsa Cc: Joe Stringer Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/20161126070354.141764-15-wangnan0@huawei.com [ Remove redundant "Test" from entry descriptions ] Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/c++/clang.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/perf/util/c++/clang.h') diff --git a/tools/perf/util/c++/clang.h b/tools/perf/util/c++/clang.h index b4fc2a96b79d..dd8b0427550d 100644 --- a/tools/perf/util/c++/clang.h +++ b/tools/perf/util/c++/clang.h @@ -19,5 +19,8 @@ std::unique_ptr getModuleFromSource(opt::ArgStringList CFlags, StringRef Path); +std::unique_ptr> +getBPFObjectFromModule(llvm::Module *Module); + } #endif -- cgit v1.2.3-70-g09d2