Signed-off-by: Peter Zijlstra (Intel)
Cc: Alexander Shishkin
Cc: Linus Torvalds
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar
Signed-off-by: Wang Nan
---
kernel/events/core.c | 49 -
1 file
These two patch are needed for stable 4.1. They fix CVE-2017-6001.
Peter Zijlstra (2):
perf: Restructure perf syscall point of no return
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
kernel/events/core.c | 102 +--
1
_idx = 3
So, libbpf reports:
libbpf: bpf relocation: map_idx 3 large than 2
Fix map relocation by checking the exact offset of maps when doing
relocation.
Fixes: 4708bbda5cb2 ("tools lib bpf: Fix maps resolution")
Signed-off-by: Joe Stringer <j...@ovn.org>
Signed-off-by: Wang Na
pf reports:
libbpf: bpf relocation: map_idx 3 large than 2
Fix map relocation by checking the exact offset of maps when doing
relocation.
Fixes: 4708bbda5cb2 ("tools lib bpf: Fix maps resolution")
Signed-off-by: Joe Stringer
Signed-off-by: Wang Nan
[Allow different map size in an ob
---[ end trace 98933da8f92b0c9a ]---
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Xia Kaixu <xiaka...@huawei.com>
Cc: Li Zefan <lize...@huawei.com>
Cc: Mathieu Poirier <mathieu.poir...@linaro.org>
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.or
---[ end trace 98933da8f92b0c9a ]---
Signed-off-by: Wang Nan
Cc: Xia Kaixu
Cc: Li Zefan
Cc: Mathieu Poirier
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
drivers/hwtracing/coresight/coresight-etm-perf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers
Commit-ID: a940cad331e79cc03d9ae74f56a2c7cb810bdce9
Gitweb: http://git.kernel.org/tip/a940cad331e79cc03d9ae74f56a2c7cb810bdce9
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Tue, 6 Dec 2016 07:22:30 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: a940cad331e79cc03d9ae74f56a2c7cb810bdce9
Gitweb: http://git.kernel.org/tip/a940cad331e79cc03d9ae74f56a2c7cb810bdce9
Author: Wang Nan
AuthorDate: Tue, 6 Dec 2016 07:22:30 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 6 Dec 2016 13:21:55 -0300
perf build: Check
Commit-ID: edd695b032ba3a90c3bb07d934500b2c390a61ff
Gitweb: http://git.kernel.org/tip/edd695b032ba3a90c3bb07d934500b2c390a61ff
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:39 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: edd695b032ba3a90c3bb07d934500b2c390a61ff
Gitweb: http://git.kernel.org/tip/edd695b032ba3a90c3bb07d934500b2c390a61ff
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:39 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:45 -0300
perf clang
Commit-ID: 5e08a76525b8f5e9aeb8b27d0466614abec070a9
Gitweb: http://git.kernel.org/tip/5e08a76525b8f5e9aeb8b27d0466614abec070a9
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:38 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: 5e08a76525b8f5e9aeb8b27d0466614abec070a9
Gitweb: http://git.kernel.org/tip/5e08a76525b8f5e9aeb8b27d0466614abec070a9
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:38 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:44 -0300
perf clang
Commit-ID: a9495fe9dc63bee1166772b6f10e199ef1747892
Gitweb: http://git.kernel.org/tip/a9495fe9dc63bee1166772b6f10e199ef1747892
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:36 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: a9495fe9dc63bee1166772b6f10e199ef1747892
Gitweb: http://git.kernel.org/tip/a9495fe9dc63bee1166772b6f10e199ef1747892
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:36 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:44 -0300
perf clang: Allow
Commit-ID: e67d52d411c3562263735479db2efd2ebd178db9
Gitweb: http://git.kernel.org/tip/e67d52d411c3562263735479db2efd2ebd178db9
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:37 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: e67d52d411c3562263735479db2efd2ebd178db9
Gitweb: http://git.kernel.org/tip/e67d52d411c3562263735479db2efd2ebd178db9
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:37 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:44 -0300
perf clang: Update
Commit-ID: 77dfa84a843c0bc935a6c8664f2556573e30845f
Gitweb: http://git.kernel.org/tip/77dfa84a843c0bc935a6c8664f2556573e30845f
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:35 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: 77dfa84a843c0bc935a6c8664f2556573e30845f
Gitweb: http://git.kernel.org/tip/77dfa84a843c0bc935a6c8664f2556573e30845f
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:35 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:44 -0300
perf clang: Use
Commit-ID: 00b86691c77c6576861b82a3cfe4d609800758fe
Gitweb: http://git.kernel.org/tip/00b86691c77c6576861b82a3cfe4d609800758fe
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:34 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: 00b86691c77c6576861b82a3cfe4d609800758fe
Gitweb: http://git.kernel.org/tip/00b86691c77c6576861b82a3cfe4d609800758fe
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:34 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:43 -0300
perf clang: Add
Commit-ID: d58ac0bf8d1e6ffbfcb0a77e459cf4737b131b75
Gitweb: http://git.kernel.org/tip/d58ac0bf8d1e6ffbfcb0a77e459cf4737b131b75
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:33 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: d58ac0bf8d1e6ffbfcb0a77e459cf4737b131b75
Gitweb: http://git.kernel.org/tip/d58ac0bf8d1e6ffbfcb0a77e459cf4737b131b75
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:33 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:43 -0300
perf build: Add
Commit-ID: cb40d55b595cd117ef7c1880247605875b2115e8
Gitweb: http://git.kernel.org/tip/cb40d55b595cd117ef7c1880247605875b2115e8
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:31 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: cb40d55b595cd117ef7c1880247605875b2115e8
Gitweb: http://git.kernel.org/tip/cb40d55b595cd117ef7c1880247605875b2115e8
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:31 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:42 -0300
tools build: Add
Commit-ID: c7fb4f62e2a97bd25d555263ef501fe053edcbb6
Gitweb: http://git.kernel.org/tip/c7fb4f62e2a97bd25d555263ef501fe053edcbb6
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:32 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: c7fb4f62e2a97bd25d555263ef501fe053edcbb6
Gitweb: http://git.kernel.org/tip/c7fb4f62e2a97bd25d555263ef501fe053edcbb6
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:32 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:43 -0300
tools build: Add
Commit-ID: 2bd42de0e196f89994cbae1990d2c7c5a9b6a529
Gitweb: http://git.kernel.org/tip/2bd42de0e196f89994cbae1990d2c7c5a9b6a529
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:30 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: 2bd42de0e196f89994cbae1990d2c7c5a9b6a529
Gitweb: http://git.kernel.org/tip/2bd42de0e196f89994cbae1990d2c7c5a9b6a529
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:30 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:42 -0300
perf llvm: Extract
Commit-ID: 8ad85e9e6fdaf996bf3ff60303ea00e696bcdd36
Gitweb: http://git.kernel.org/tip/8ad85e9e6fdaf996bf3ff60303ea00e696bcdd36
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:29 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate
Commit-ID: 8ad85e9e6fdaf996bf3ff60303ea00e696bcdd36
Gitweb: http://git.kernel.org/tip/8ad85e9e6fdaf996bf3ff60303ea00e696bcdd36
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:29 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 5 Dec 2016 15:51:42 -0300
perf tools: Pass
-by: Wang Nan <wangn...@huawei.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: He Kuang <heku...@huawei.com>
Cc: Jiri Olsa <jo...@kernel.org>
Cc: Joe Stringer <j...@ovn.org>
Cc: Zefan Li <lize...@huawei.com>
Cc:
-by: Wang Nan
Cc: Alexei Starovoitov
Cc: Arnaldo Carvalho de Melo
Cc: He Kuang
Cc: Jiri Olsa
Cc: Joe Stringer
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/build/feature/Makefile | 8 ++--
tools/build/feature/test-llvm-version.cpp | 11 +++
tools/build/feature/test
iled: -95, try external compiler
I.e. it falls back to using the external compiler.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: He Kuang <heku...@huawei.com>
Cc: Jiri Olsa <jo...@kernel.
iled: -95, try external compiler
I.e. it falls back to using the external compiler.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri Olsa
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/perf/util/c++/clang.cpp | 105 +++
Follow Alexei's suggestion, remove "-ferror-limit=19",
"-fmessage-length=127", "-vectorize-loops" and "-vectorize-slp"
clang options: they are meaningless. Add comment for
"-Wno-unused-value" and "-Wno-pointer-sign".
Signed-off-by:
Follow Alexei's suggestion, remove "-ferror-limit=19",
"-fmessage-length=127", "-vectorize-loops" and "-vectorize-slp"
clang options: they are meaningless. Add comment for
"-Wno-unused-value" and "-Wno-pointer-sign".
Signed-off-by: Wa
upport dynamic linking LLVM and clang libraries.
4. Rebase to Arnaldo's newest perf/core.
Wang Nan (18):
perf build: Check LLVM version in feature check
perf build: Support dynamic linking clang libraries
perf clang: Cleanup clang options
perf clang: Pass full path to builtin clang
perf
upport dynamic linking LLVM and clang libraries.
4. Rebase to Arnaldo's newest perf/core.
Wang Nan (18):
perf build: Check LLVM version in feature check
perf build: Support dynamic linking clang libraries
perf clang: Cleanup clang options
perf clang: Pass full path to builtin clang
perf
If clang changes its working directory, relative path passed to
perf_clang__compile_bpf() becomes invalid. Before running clang,
convert it to absolute path so file can be found even working directory
is changed.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho d
If clang changes its working directory, relative path passed to
perf_clang__compile_bpf() becomes invalid. Before running clang,
convert it to absolute path so file can be found even working directory
is changed.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc
/wn/perf
$ strip ~/perf
$ ls -sh ~/perf
52M /home/wn/perf
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: He Kuang <heku...@huawei.com>
Cc: Jiri Olsa <jo...@kernel.org>
Cc: Zefan Li
/wn/perf
$ strip ~/perf
$ ls -sh ~/perf
52M /home/wn/perf
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri Olsa
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/perf/Makefile.perf | 20 ++--
1 file changed, 18 insertions(+), 2
-by: Wang Nan <wangn...@huawei.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: He Kuang <heku...@huawei.com>
Cc: Jiri Olsa <jo...@kernel.org>
Cc: Joe Stringer <j...@ovn.org>
Cc: Zefan Li <lize...@huawei.com>
Cc:
-by: Wang Nan
Cc: Alexei Starovoitov
Cc: Arnaldo Carvalho de Melo
Cc: He Kuang
Cc: Jiri Olsa
Cc: Joe Stringer
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/build/feature/Makefile | 8 ++--
tools/build/feature/test-llvm-version.cpp | 12
tools/build/feature/test
nkage like this so they won't be compiled
into BPF objects.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Acked-by: Alexei Starovoitov <a...@fb.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: He Kuang <heku...@huawei.com>
Cc: Jiri Olsa <jo...@kernel.org>
Cc: Zefan
Automatically include some commonly used macros and struct definitions
into BPF scripts. Script writers are no longer required to define
'SEC' and 'struct bpf_map_def' in each of their scripts.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
**/
$ perf record -e ./test.c sleep 1
Welcom to perf record
[ perf record: Woken up 1 times to write data ]
Goodbye, perf record
[ perf record: Captured and wrote 0.014 MB perf.data ]
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carv
nkage like this so they won't be compiled
into BPF objects.
Signed-off-by: Wang Nan
Acked-by: Alexei Starovoitov
Cc: Arnaldo Carvalho de Melo
Cc: He Kuang
Cc: Jiri Olsa
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/perf/util/c++/clang.cpp | 38 ++
tools/p
Automatically include some commonly used macros and struct definitions
into BPF scripts. Script writers are no longer required to define
'SEC' and 'struct bpf_map_def' in each of their scripts.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri
**/
$ perf record -e ./test.c sleep 1
Welcom to perf record
[ perf record: Woken up 1 times to write data ]
Goodbye, perf record
[ perf record: Captured and wrote 0.014 MB perf.data ]
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
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 <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
After this patch perf hooks can retrive pid of perf itself by calling
getpid. It is important for excluding event from perf.
This commit is also an example to show how to export more helpers to
hooked script.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho d
During jitting, find the lowest address in maps section and store its
value to _map_base. Pass its value out through perf_clang__compile_bpf().
map_base is useful for jitted functions accessing BPF maps.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@r
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
After this patch perf hooks can retrive pid of perf itself by calling
getpid. It is important for excluding event from perf.
This commit is also an example to show how to export more helpers to
hooked script.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He
During jitting, find the lowest address in maps section and store its
value to _map_base. Pass its value out through perf_clang__compile_bpf().
map_base is useful for jitted functions accessing BPF maps.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
right after jitted because bpf_object is unavailable
during jitting but it should be the context of jitted functions.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Acked-by: Alexei Starovoitov <a...@fb.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: He Kuang <heku...
After this patch functions attached on perf hooks is allowed to invoke
external functions. Add a testcase for this feature.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: He Kuang <heku...
bpf__map_fd() is introduced to retrive fd of a BPF map through its
offset in BPF object. This function is going be used in further
commits which allow scripts jitted by builtin clang access BPF maps.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redha
Use PerfModule wrap llvm::Module and return perf::PerfModule in APIs to
replace llvm::Module. Following commits are going to add new functions
to PerfModule.
getBPFObjectFromModule is merged to a method of perf::PerfModule.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carva
bpf__map_fd() is introduced to retrive fd of a BPF map through its
offset in BPF object. This function is going be used in further
commits which allow scripts jitted by builtin clang access BPF maps.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
Cc
Use PerfModule wrap llvm::Module and return perf::PerfModule in APIs to
replace llvm::Module. Following commits are going to add new functions
to PerfModule.
getBPFObjectFromModule is merged to a method of perf::PerfModule.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei
right after jitted because bpf_object is unavailable
during jitting but it should be the context of jitted functions.
Signed-off-by: Wang Nan
Acked-by: Alexei Starovoitov
Cc: Arnaldo Carvalho de Melo
Cc: He Kuang
Cc: Jiri Olsa
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/perf/tests/bpf
After this patch functions attached on perf hooks is allowed to invoke
external functions. Add a testcase for this feature.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri Olsa
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/perf/tests/Build
defined, and keep
undefined when using external clang. Passing a
-UBUILTIN_CLANG_DEFAULT_INCLUDE to cancel this defaudefinition.
Test cases are updated to avoid redefinition of these functions.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
defined, and keep
undefined when using external clang. Passing a
-UBUILTIN_CLANG_DEFAULT_INCLUDE to cancel this defaudefinition.
Test cases are updated to avoid redefinition of these functions.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri Olsa
/
$ sudo perf record -e ./test.c echo Hehe
Welcom to perf record
Hehe
[ perf record: Woken up 1 times to write data ]
Goodbye, perf record, value=10644
[ perf record: Captured and wrote 0.014 MB perf.data ]
Signed-off-by: Wang Nan <
, that script is fragile so not included by this commit.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: He Kuang <heku...@huawei.com>
Cc: Jiri Olsa <jo...@kernel.org>
Cc: Zefan Li
/
$ sudo perf record -e ./test.c echo Hehe
Welcom to perf record
Hehe
[ perf record: Woken up 1 times to write data ]
Goodbye, perf record, value=10644
[ perf record: Captured and wrote 0.014 MB perf.data ]
Signed-off-by: Wang Nan
Acked-by: Alexe
, that script is fragile so not included by this commit.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri Olsa
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/perf/util/c++/Build| 1 +
tools/perf/util/c++/bpf-funcs-str.c | 49
Commit-ID: 5a6acad17d2e81765dd4c2fce7346a6f045eab25
Gitweb: http://git.kernel.org/tip/5a6acad17d2e81765dd4c2fce7346a6f045eab25
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:27 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate:
Commit-ID: 5a6acad17d2e81765dd4c2fce7346a6f045eab25
Gitweb: http://git.kernel.org/tip/5a6acad17d2e81765dd4c2fce7346a6f045eab25
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:27 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 29 Nov 2016 12:10:19 -0300
tools lib bpf
Commit-ID: a074865e60edd762b99ec5dacec69b406f702e66
Gitweb: http://git.kernel.org/tip/a074865e60edd762b99ec5dacec69b406f702e66
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:28 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate:
Commit-ID: a074865e60edd762b99ec5dacec69b406f702e66
Gitweb: http://git.kernel.org/tip/a074865e60edd762b99ec5dacec69b406f702e66
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:28 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 29 Nov 2016 12:13:27 -0300
perf tools
Commit-ID: 9742da0150788e6ea7796372c3e643f876a49741
Gitweb: http://git.kernel.org/tip/9742da0150788e6ea7796372c3e643f876a49741
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:25 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate:
Commit-ID: 9742da0150788e6ea7796372c3e643f876a49741
Gitweb: http://git.kernel.org/tip/9742da0150788e6ea7796372c3e643f876a49741
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:25 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 29 Nov 2016 12:09:36 -0300
tools lib bpf
Commit-ID: 10931d2413478239bdceac5546cce85d7a497a4e
Gitweb: http://git.kernel.org/tip/10931d2413478239bdceac5546cce85d7a497a4e
Author: Wang Nan <wangn...@huawei.com>
AuthorDate: Sat, 26 Nov 2016 07:03:26 +
Committer: Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate:
Commit-ID: 10931d2413478239bdceac5546cce85d7a497a4e
Gitweb: http://git.kernel.org/tip/10931d2413478239bdceac5546cce85d7a497a4e
Author: Wang Nan
AuthorDate: Sat, 26 Nov 2016 07:03:26 +
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 29 Nov 2016 12:09:41 -0300
tools lib bpf
, that script is fragile so not included by this commit.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: He Kuang <heku...@huawei.com>
Cc: Jiri Olsa <jo...@kernel.org>
Cc: Zefan Li
, that script is fragile so not included by this commit.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri Olsa
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/perf/util/c++/Build| 1 +
tools/perf/util/c++/bpf-funcs-str.c | 49
libraries ordering, use
--start-group and --end-group.
In this test case, manually identify required clang libs and hope it to
be stable. Putting all clang libraries here is possible (use make's
wildcard), but then feature checking becomes very slow.
Signed-off-by: Wang Nan <wangn...@huawei.
Pass a pointer to perf hook functions so they receive context
information created durnig setup.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: He Kuang <heku...@huawei.com>
Cc: Jiri Ol
e.c >> ./test.c
$ ./perf record -v --dry-run -e ./test.c 2>&1 | grep builtin
bpf: builtin compiling successful
Can't pass cflags so unable to include kernel headers now. Will be fixed
by following commits.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Alexei Starovoitov <
syscall 293 count: 2
syscall 8 count: 7
syscall 11count: 763
syscall 4 count: 43
syscall 21count: 48
syscall 86count: 1
syscall 5 count: 791
...
Wang Nan (30):
tools lib bpf: Add missing BPF functions
tools lib bpf: Add private field for bpf_object
**/
$ perf record -e ./test.c sleep 1
Welcom to perf record
[ perf record: Woken up 1 times to write data ]
Goodbye, perf record
[ perf record: Captured and wrote 0.014 MB perf.data ]
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carv
e.c >> ./test.c
$ ./perf record -v --dry-run -e ./test.c 2>&1 | grep builtin
bpf: builtin compiling successful
Can't pass cflags so unable to include kernel headers now. Will be fixed
by following commits.
Signed-off-by: Wang Nan
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri Olsa
syscall 293 count: 2
syscall 8 count: 7
syscall 11count: 763
syscall 4 count: 43
syscall 21count: 48
syscall 86count: 1
syscall 5 count: 791
...
Wang Nan (30):
tools lib bpf: Add missing BPF functions
tools lib bpf: Add private field for bpf_object
**/
$ perf record -e ./test.c sleep 1
Welcom to perf record
[ perf record: Woken up 1 times to write data ]
Goodbye, perf record
[ perf record: Captured and wrote 0.014 MB perf.data ]
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
libraries ordering, use
--start-group and --end-group.
In this test case, manually identify required clang libs and hope it to
be stable. Putting all clang libraries here is possible (use make's
wildcard), but then feature checking becomes very slow.
Signed-off-by: Wang Nan
Cc: Alexei Starovoitov
Pass a pointer to perf hook functions so they receive context
information created durnig setup.
Signed-off-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri Olsa
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/perf/tests/perf-hooks.c | 14
-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: He Kuang <heku...@huawei.com>
Cc: Jiri Olsa <jo...@kernel.org>
Cc: Zefan Li <lize...@huawei.com>
Cc: pi3or...@163.com
---
tools/perf/tests/Build
-by: Wang Nan
Cc: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri Olsa
Cc: Zefan Li
Cc: pi3or...@163.com
---
tools/perf/tests/Build | 1 +
tools/perf/tests/builtin-test.c| 9
tools/perf/tests/clang.c | 42 +
tools/perf/tests
/
$ sudo perf record -e ./test.c echo Hehe
Welcom to perf record
Hehe
[ perf record: Woken up 1 times to write data ]
Goodbye, perf record, value=10644
[ perf record: Captured and wrote 0.014 MB perf.data ]
Signed-off-by: Wang Nan <wangn...@h
/
$ sudo perf record -e ./test.c echo Hehe
Welcom to perf record
Hehe
[ perf record: Woken up 1 times to write data ]
Goodbye, perf record, value=10644
[ perf record: Captured and wrote 0.014 MB perf.data ]
Signed-off-by: Wang Nan
Cc: Arnal
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 <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Use PerfModule wrap llvm::Module and return perf::PerfModule in APIs to
replace llvm::Module. Following commits are going to add new functions
to PerfModule.
getBPFObjectFromModule is merged to a method of perf::PerfModule.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carva
Improve getModuleFromSource() API to accept a cflags list. This feature
will be used to pass LINUX_VERSION_CODE and -I flags.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: He Kuang <heku...@huawei.com>
Cc: Jiri Olsa <jo...@kernel.or
Automatically include some commonly used macros and struct definitions
into BPF scripts. Script writers are no longer required to define
'SEC' and 'struct bpf_map_def' in each of their scripts.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
right after jitted because bpf_object is unavailable
during jitting but it should be the context of jitted functions.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: He Kuang <heku...@huaw
by a BUILTIN_CLANG_NO_DEFAULT_INCLUDE.
This macro will be used by following commits to allow user disable this
and other builtin includes.
Signed-off-by: Wang Nan <wangn...@huawei.com>
Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
Cc: Alexei Starovoitov <a...@fb.com>
Cc: He Kuang <heku...@huawei.c
101 - 200 of 5282 matches
Mail list logo