[tip:perf/core] perf tools: Fix compile error with libunwind x86

2018-01-10 Thread tip-bot for Wang Nan
Commit-ID: 44df1afdb174fd6038e419f80efd914c0b5f2f85 Gitweb: https://git.kernel.org/tip/44df1afdb174fd6038e419f80efd914c0b5f2f85 Author: Wang Nan AuthorDate: Wed, 6 Dec 2017 01:50:40 + Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 8 Jan 2018 11:11:57 -0300 perf tools: Fix

[RESEND PATCH] perf tools: Fix compiling error in libunwind x86

2017-12-17 Thread Wang Nan
o such file or directory make[4]: *** [util/libunwind/x86_32.o] Error 1 make[3]: *** [util] Error 2 make[2]: *** [libperf-in.o] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 It happens when libunwind-x86 feature is detected. Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de M

[tip:perf/core] perf mmap: Don't discard prev in backward mode

2017-12-06 Thread tip-bot for Wang Nan
Commit-ID: 7fb4b407a1242dbc85ea3ed1be065dca8f9a6f5b Gitweb: https://git.kernel.org/tip/7fb4b407a1242dbc85ea3ed1be065dca8f9a6f5b Author: Wang Nan AuthorDate: Mon, 4 Dec 2017 16:51:06 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 15:59:37 -0300 perf mmap: Don&#

[tip:perf/core] perf tools: Rename 'backward' to 'overwrite' in evlist, mmap and record

2017-12-06 Thread tip-bot for Wang Nan
Commit-ID: 0b72d69a542873ee098867deeb37d27ad4629c64 Gitweb: https://git.kernel.org/tip/0b72d69a542873ee098867deeb37d27ad4629c64 Author: Wang Nan AuthorDate: Mon, 4 Dec 2017 16:51:07 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 16:02:39 -0300 perf tools: Rename

[tip:perf/core] perf mmap: Fix perf backward recording

2017-12-06 Thread tip-bot for Wang Nan
Commit-ID: 71f566a34986f4a86a8c546c7a36f70f0132b8a9 Gitweb: https://git.kernel.org/tip/71f566a34986f4a86a8c546c7a36f70f0132b8a9 Author: Wang Nan AuthorDate: Mon, 4 Dec 2017 16:51:05 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 15:45:36 -0300 perf mmap: Fix

[tip:perf/core] perf mmap: Remove overwrite and check_messup from mmap read

2017-12-06 Thread tip-bot for Wang Nan
Commit-ID: 8eb7a1fe31612fd3e8ae8042dd2ebaf7575504cb Gitweb: https://git.kernel.org/tip/8eb7a1fe31612fd3e8ae8042dd2ebaf7575504cb Author: Wang Nan AuthorDate: Sun, 3 Dec 2017 02:00:41 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 15:43:54 -0300 perf mmap: Remove

[tip:perf/core] perf mmap: Remove overwrite from arguments list of perf_mmap__push

2017-12-06 Thread tip-bot for Wang Nan
Commit-ID: ca6a9a05391960be5e8161a59a9854b32325d901 Gitweb: https://git.kernel.org/tip/ca6a9a05391960be5e8161a59a9854b32325d901 Author: Wang Nan AuthorDate: Sun, 3 Dec 2017 02:00:40 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 15:43:54 -0300 perf mmap: Remove

[tip:perf/core] perf evlist: Remove evlist->overwrite

2017-12-06 Thread tip-bot for Wang Nan
Commit-ID: 144b9a4fc53039c09007b71a06640560a6e62140 Gitweb: https://git.kernel.org/tip/144b9a4fc53039c09007b71a06640560a6e62140 Author: Wang Nan AuthorDate: Sun, 3 Dec 2017 02:00:39 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 15:43:54 -0300 perf evlist

[tip:perf/core] perf evlist: Remove 'overwrite' parameter from perf_evlist__mmap_ex

2017-12-06 Thread tip-bot for Wang Nan
Commit-ID: 7a276ff6c3202697c3c15cad757dec3bb07d14bf Gitweb: https://git.kernel.org/tip/7a276ff6c3202697c3c15cad757dec3bb07d14bf Author: Wang Nan AuthorDate: Sun, 3 Dec 2017 02:00:38 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 15:43:53 -0300 perf evlist

[tip:perf/core] perf evlist: Remove 'overwrite' parameter from perf_evlist__mmap

2017-12-06 Thread tip-bot for Wang Nan
Commit-ID: f74b9d3a1ac2b9c3ae1475f474ca0e6644746fbf Gitweb: https://git.kernel.org/tip/f74b9d3a1ac2b9c3ae1475f474ca0e6644746fbf Author: Wang Nan AuthorDate: Sun, 3 Dec 2017 02:00:37 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 5 Dec 2017 15:43:53 -0300 perf evlist

[PATCH] perf tools: Fix compiling error in libunwind x86

2017-12-05 Thread Wang Nan
o such file or directory make[4]: *** [util/libunwind/x86_32.o] Error 1 make[3]: *** [util] Error 2 make[2]: *** [libperf-in.o] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 It happens when libunwind-x86 feature is detected. Signed-off-by: Wang Nan --- tools/perf/arch/x

[PATCH v3 2/3] perf tools: Don't discard prev in backward mode

2017-12-04 Thread Wang Nan
md->prev is still available. Signed-off-by: Wang Nan Tested-by: Kan Liang --- tools/perf/util/mmap.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c index 3f262e7..5f8cb15 100644 --- a/too

[PATCH v3 3/3] perf tools: Replace 'backward' to 'overwrite' in evlist. mmap and record

2017-12-04 Thread Wang Nan
Remove the backward/forward concept to make it uniform with user interface (the '--overwrite' option). Signed-off-by: Wang Nan --- tools/perf/builtin-record.c | 14 +++--- tools/perf/tests/backward-ring-buffer.c | 4 ++-- tools/perf/util/evlist.c

[PATCH v3 1/3] perf mmap: Fix perf backward recording

2017-12-04 Thread Wang Nan
1 (1, 12cc330, 4, 7fc237280370, 7fc2373d0700, 2c7b0) python 2545 [000] 11079.280850: raw_syscalls:sys_exit: NR 1 = 4 Signed-off-by: Wang Nan --- tools/perf/util/evlist.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/evlist.c b/tools/perf

[PATCH v3 0/3] perf tools: perf tools: Clarify overwrite and backward, bugfix

2017-12-04 Thread Wang Nan
Simplify patch 1/3 following Namhyung's suggestion. Context adjustment for patch 2 and 3. Wang Nan (3): perf mmap: Fix perf backward recording perf tools: Don't discard prev in backward mode perf tools: Replace 'backward' to 'overwrite' in evlist. mmap and

[PATCH v2 0/8] perf tools: perf tools: Clarify overwrite and backward, bugfix

2017-12-02 Thread Wang Nan
een two dumpping commands. Patch 8 is 's/backward/overwrite'. After patch 8, the concept of 'backward' is removed from most of the code, make it uniform with user interface ('--overwrite'). Cc: Kan Liang Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Ki

[PATCH v2 6/8] perf mmap: Fix perf backward recording

2017-12-02 Thread Wang Nan
30, 4, 7fc237280370, 7fc2373d0700, 2c7b0) python 2545 [000] 11079.280850: raw_syscalls:sys_exit: NR 1 = 4 Signed-off-by: Wang Nan --- tools/perf/util/evlist.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evl

[PATCH v2 7/8] perf tools: Don't discard prev in backward mode

2017-12-02 Thread Wang Nan
md->prev is still available. Signed-off-by: Wang Nan Tested-by: Kan Liang --- tools/perf/util/mmap.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c index 3f262e7..5f8cb15 100644 --- a/too

[PATCH v2 5/8] perf tools: Remove overwrite and check_messup from mmap read

2017-12-02 Thread Wang Nan
All perf_mmap__read_forward() read from read-write ring buffer, so no need check_messup. Reading from backward ring buffer doesn't require check_messup because it never mess up. Cleanup arguments lists. Signed-off-by: Wang Nan --- tools/perf/util/evlist.c | 2 +- tools/perf/util/mmap.c

[PATCH v2 4/8] perf tools: Remove overwrite from arguments list of perf_mmap__push

2017-12-02 Thread Wang Nan
'overwrite' argument is always 'false'. Revmove it from arguments list of perf_mmap__push. Signed-off-by: Wang Nan --- tools/perf/builtin-record.c | 2 +- tools/perf/util/mmap.c | 6 +++--- tools/perf/util/mmap.h | 2 +- 3 files changed, 5 insertions(+), 5 deleti

[PATCH v2 2/8] perf tools: Remove 'overwrite' parameter from perf_evlist__mmap_ex

2017-12-02 Thread Wang Nan
All users of perf_evlist__mmap_ex set !overwrite. Remove it from its arguments list. Signed-off-by: Wang Nan --- tools/perf/builtin-record.c | 2 +- tools/perf/util/evlist.c| 8 tools/perf/util/evlist.h| 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools

[PATCH v2 8/8] perf tools: Replace 'backward' to 'overwrite' in evlist, mmap and record

2017-12-02 Thread Wang Nan
Remove the backward/forward concept to make it uniform with user interface (the '--overwrite' option). Signed-off-by: Wang Nan --- tools/perf/builtin-record.c | 14 +++--- tools/perf/tests/backward-ring-buffer.c | 4 ++-- tools/perf/util/evlist.c

[PATCH v2 1/8] perf tools: Remove 'overwrite' parameter from perf_evlist__mmap

2017-12-02 Thread Wang Nan
Now all perf_evlist__mmap's users doesn't set 'overwrite'. Remove it from arguments list. Signed-off-by: Wang Nan --- tools/perf/arch/x86/tests/perf-time-to-tsc.c | 2 +- tools/perf/builtin-kvm.c | 2 +- tools/perf/builtin-top.c | 2 +-

[PATCH v2 3/8] perf tools: Remove evlist->overwrite

2017-12-02 Thread Wang Nan
evlist->overwrite is set to false in all users. It can be removed. Signed-off-by: Wang Nan --- tools/perf/builtin-record.c | 2 +- tools/perf/util/evlist.c| 5 ++--- tools/perf/util/evlist.h| 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-recor

[tip:perf/core] perf tests: Set evlist of test__task_exit() to !overwrite

2017-11-18 Thread tip-bot for Wang Nan
Commit-ID: a0e3dd79cdd8ad838cbcefeff530a15193f8336e Gitweb: https://git.kernel.org/tip/a0e3dd79cdd8ad838cbcefeff530a15193f8336e Author: Wang Nan AuthorDate: Mon, 13 Nov 2017 01:38:07 + Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 16 Nov 2017 14:49:58 -0300 perf tests: Set

[tip:perf/core] perf tests: Set evlist of test__sw_clock_freq() to !overwrite

2017-11-18 Thread tip-bot for Wang Nan
Commit-ID: 677b0601768881934f658bebb1713c3c843893fa Gitweb: https://git.kernel.org/tip/677b0601768881934f658bebb1713c3c843893fa Author: Wang Nan AuthorDate: Mon, 13 Nov 2017 01:38:05 + Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 16 Nov 2017 14:49:57 -0300 perf tests: Set

[tip:perf/core] perf tests: Set evlist of test__backward_ring_buffer() to !overwrite

2017-11-18 Thread tip-bot for Wang Nan
Commit-ID: d492326f160e44e08fcf132a63163b36dd8e8839 Gitweb: https://git.kernel.org/tip/d492326f160e44e08fcf132a63163b36dd8e8839 Author: Wang Nan AuthorDate: Mon, 13 Nov 2017 01:38:04 + Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 16 Nov 2017 14:49:57 -0300 perf tests: Set

[tip:perf/core] perf tests: Set evlist of test__basic_mmap() to !overwrite

2017-11-18 Thread tip-bot for Wang Nan
Commit-ID: 301d724aa19add1c0cf3ec8cad0d10151d30393f Gitweb: https://git.kernel.org/tip/301d724aa19add1c0cf3ec8cad0d10151d30393f Author: Wang Nan AuthorDate: Mon, 13 Nov 2017 01:38:06 + Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 16 Nov 2017 14:49:58 -0300 perf tests: Set

[PATCH 7/7] perf tools: Remove prot field in mmap param

2017-11-12 Thread Wang Nan
After removing the concept of 'overwrite' in code level, now the prot is determinated by write_backward. There's no need to pass prot from perf_evlist__mmap_ex(). Signed-off-by: Wang Nan --- tools/perf/util/evlist.c | 17 ++--- tools/perf/util/mmap.c | 4 ++--

[PATCH 5/7] perf tests: Set evlist of test__task_exit() to !overwrite

2017-11-12 Thread Wang Nan
Changing ringbuffer to !overwrite in this task is harmless because this test uses a very low frequency (1) and using a very simple program (true). There should have only 3 events in the whole test. Overwriting is impossible to happen. Signed-off-by: Wang Nan --- tools/perf/tests/task-exit.c | 2

[PATCH 1/7] perf mmap: Fix perf backward recording

2017-11-12 Thread Wang Nan
30, 4, 7fc237280370, 7fc2373d0700, 2c7b0) python 2545 [000] 11079.280850: raw_syscalls:sys_exit: NR 1 = 4 Signed-off-by: Wang Nan --- tools/perf/util/evlist.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c

[PATCH 0/7] perf tools: Clarify overwrite and backward, bugfix

2017-11-12 Thread Wang Nan
Based on previous discussion, perf needs to support only two types of ringbuffer: read-write + forward, readonly + backward. This patchset completly removes the concept of 'overwrite' from code level, controls mapping permission using write_backward instead. Wang Nan (7): perf mmap

[PATCH 3/7] perf tests: Set evlist of test__sw_clock_freq() to !overwrite

2017-11-12 Thread Wang Nan
Unsetting overwrite when calling perf_evlist__mmap is harmless. This commit passes false to it, makes following commits eliminate the overwrite argument easier. Signed-off-by: Wang Nan --- tools/perf/tests/sw-clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf

[PATCH 4/7] perf tests: Set evlist of test__basic_mmap() to !overwrite

2017-11-12 Thread Wang Nan
In this test, a large ring buffer is required so all events can feed into, so overwrite or not is meaningless. Change to !overwrite so following commits can remove this argument. Signed-off-by: Wang Nan --- tools/perf/tests/mmap-basic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 2/7] perf tests: Set evlist of test__backward_ring_buffer() to !overwrite

2017-11-12 Thread Wang Nan
Setting overwrite in perf_evlist__mmap() is meaningless because the event in this evlist is already have 'overwrite' postfix and goes to backward ring buffer automatically. Pass 'false' to perf_evlist__mmap() to make it similar to others. Signed-off-by: Wang Nan --- tools

[PATCH 6/7] perf tools: Remove 'overwrite' concept from code level

2017-11-12 Thread Wang Nan
s no 'overwrite' concept. Each evlist has two ringbuffer groups. One is read-write/forward, another is readonly/backward. Don't support read-write/backward and readonly/forward. 2. In user interface, we keep '--overwrite' and translate it into write_backward i

[RESEND PATCH] mm, oom_reaper: gather each vma to prevent leaking TLB entry

2017-11-07 Thread Wang Nan
reover, a copy_to_user() can also write to these pages without generating page fault, causes use-after-free bugs. This patch gathers each vma instead of gathering full vm space. In this case tlb->fullmm is not true. The behavior of oom reaper become similar to munmapping before do_exit, which s

[RFC PATCH] mm, oom_reaper: gather each vma to prevent leaking TLB entry

2017-11-05 Thread Wang Nan
mm is not true. The behavior of oom reaper become similar to munmapping before do_exit, which should be safe for all archs. Signed-off-by: Wang Nan Cc: Bob Liu Cc: Michal Hocko Cc: Andrew Morton Cc: Michal Hocko Cc: David Rientjes Cc: Ingo Molnar Cc: Roman Gushchin Cc: Konstantin Khle

[PATCH 2/2] perf record: Replace 'overwrite' by 'flightrecorder' for better naming

2017-10-31 Thread Wang Nan
er, wraps them into a record mode. In flight recorder mode, perf only dumps data before something happen. Signed-off-by: Wang Nan --- tools/perf/Documentation/perf-record.txt | 8 tools/perf/builtin-record.c | 4 ++-- tools/perf/perf.h| 2 +- to

[PATCH 0/2] perf record: Fix --overwrite and clarify concepts

2017-10-31 Thread Wang Nan
by introducing the concept of 'flightrecorder' and convert many 'overwrite' to it to clarify that what we really want is a perf record flightrecorder mode, not only mapping the ring buffer overwritable. Wang Nan (2): perf mmap: Fix perf backward recording perf record: Replace 'o

[PATCH 1/2] perf mmap: Fix perf backward recording

2017-10-31 Thread Wang Nan
1 (1, 12cc330, 4, 7fc237280370, 7fc2373d0700, 2c7b0) python 2545 [000] 11079.280850: raw_syscalls:sys_exit: NR 1 = 4 Signed-off-by: Wang Nan --- tools/perf/util/evlist.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evl

[PATCH] perf tool: Don't discard prev in backward mode

2017-10-12 Thread Wang Nan
md->prev is still available. Signed-off-by: Wang Nan Cc: Liang Kan --- tools/perf/util/mmap.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c index 9fe5f9c..df1de55 100644 --- a/tools/perf

[PATCH] perf tools: fix: Force backward ring buffer mapped readonly

2017-10-10 Thread Wang Nan
ata.2017101221540551 | head -n 1 dd 5126 [003] 183076.108093: raw_syscalls:sys_enter: NR 1 (1, af8000, 200, 871, 0, af8060) $ ~/linux/tools/perf$ sudo ./perf script -i ./perf.data.2017101221540651 | head -n 1 dd 5126 [003] 183077.109676: raw_syscalls:sys_exit: NR 1 = 512 Signed-

[tip:perf/core] perf bpf: Fix endianness problem when loading parameters in prologue

2017-08-17 Thread tip-bot for Wang Nan
Commit-ID: db26984a363e8b8e35783c402978e8acdf9041a5 Gitweb: http://git.kernel.org/tip/db26984a363e8b8e35783c402978e8acdf9041a5 Author: Wang Nan AuthorDate: Tue, 15 Aug 2017 11:21:59 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 16 Aug 2017 10:31:11 -0300 perf bpf: Fix

[PATCH] perf bpf: Fix endianness problem when loading parameters in prologue

2017-08-11 Thread Wang Nan
argument and converts data from memory to expected type. Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de Melo Cc: Thomas Richter Cc: Alexei Starovoitov Cc: Hendrik Brueckner Cc: Li Zefan --- tools/perf/tests/bpf-script-test-prologue.c | 4 ++- tools/perf/util/bpf-prologue.c

[PATCH] perf test llvm: Fix f_mode endianness problem

2017-08-10 Thread Wang Nan
Perf BPF prologue generator unconditionally fetches 8 bytes for function parameters. On big endian machine, a casting is resquired if the parameter is not u64. Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de Melo Cc: Thomas Richter Cc: Alexei Starovoitov Cc: Hendrik Brueckner Cc: Li Zefan

[tip:perf/core] perf test llvm: Avoid error when PROFILE_ALL_BRANCHES is set

2017-06-20 Thread tip-bot for Wang Nan
Commit-ID: 9b57fb7e35957c6838f89f4ed7e3f8433a4bbfc5 Gitweb: http://git.kernel.org/tip/9b57fb7e35957c6838f89f4ed7e3f8433a4bbfc5 Author: Wang Nan AuthorDate: Wed, 21 Jun 2017 02:32:03 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 19 Jun 2017 16:11:26 -0300 perf test llvm

[PATCH] perf test llvm: Avoid error when PROFILE_ALL_BRANCHES is set

2017-06-19 Thread Wang Nan
make it passes perf test. Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de Melo Cc: Thomas-Mich Richter Cc: Hendrik Brueckner Cc: Alexei Starovoitov Cc: Li Zefan --- tools/perf/tests/bpf-script-test-prologue.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tools/perf/tests/

[PATCH -stable 4.1 2/2] perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race

2017-02-24 Thread Wang Nan
t;perf: Fix event->ctx locking") Link: http://lkml.kernel.org/r/20170106131444.gz3...@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar Signed-off-by: Wang Nan [ - Correct code context - Use group_flags instead of group_caps ] --- kernel/events/core.c | 57

[PATCH -stable 4.1 1/2] perf: Restructure perf syscall point of no return

2017-02-24 Thread Wang Nan
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

[PATCH -stable 4.1 0/2] perf/core: Fix CVE-2017-6001

2017-02-24 Thread Wang Nan
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 fil

[PATCH -improve] tools lib bpf: Fix map offsets in relocation

2017-01-19 Thread Wang Nan
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

[PATCH] coresight: fix kernel panic caused by invalid CPU

2016-12-25 Thread Wang Nan
de: 912040a5 d0001c00 f873d821 911c6000 (b8656822) ---[ 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

[tip:perf/core] perf build: Check LLVM version in feature check

2016-12-07 Thread tip-bot for Wang Nan
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

[tip:perf/core] perf clang: Compile BPF script using builtin clang support

2016-12-06 Thread tip-bot for Wang Nan
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

[tip:perf/core] perf clang: Support compile IR to BPF object and add testcase

2016-12-06 Thread tip-bot for Wang Nan
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

[tip:perf/core] perf clang: Allow passing CFLAGS to builtin clang

2016-12-06 Thread tip-bot for Wang Nan
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

[tip:perf/core] perf clang: Update test case to use real BPF script

2016-12-06 Thread tip-bot for Wang Nan
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

[tip:perf/core] perf clang: Use real file system for #include

2016-12-06 Thread tip-bot for Wang Nan
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

[tip:perf/core] perf clang: Add builtin clang support ant test case

2016-12-06 Thread tip-bot for Wang Nan
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

[tip:perf/core] perf build: Add clang and llvm compile and linking support

2016-12-06 Thread tip-bot for Wang Nan
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

[tip:perf/core] tools build: Add feature detection for LLVM

2016-12-06 Thread tip-bot for Wang Nan
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

[tip:perf/core] tools build: Add feature detection for clang

2016-12-06 Thread tip-bot for Wang Nan
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

[tip:perf/core] perf llvm: Extract helpers in llvm-utils.c

2016-12-06 Thread tip-bot for Wang Nan
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

[tip:perf/core] perf tools: Pass context to perf hook functions

2016-12-06 Thread tip-bot for Wang Nan
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

[PATCH v4 01/18 -cleanup] perf build: Check LLVM version in feature check

2016-12-05 Thread Wang Nan
ff-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

[PATCH v4 05/18] perf clang: Pass CFLAGS to builtin clang

2016-12-05 Thread Wang Nan
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 +++

[PATCH v4 03/18] perf clang: Cleanup clang options

2016-12-05 Thread Wang Nan
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-b

[PATCH v4 00/18] perf clang: Builtin clang and perfhook support

2016-12-05 Thread Wang Nan
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

[PATCH v4 04/18] perf clang: Pass full path to builtin clang

2016-12-05 Thread Wang Nan
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

[PATCH v4 02/18] perf build: Support dynamic linking clang libraries

2016-12-05 Thread Wang Nan
969M /home/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 insert

[PATCH v4 01/18] perf build: Check LLVM version in feature check

2016-12-05 Thread Wang Nan
ff-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

[PATCH v4 07/18] perf clang jit: Insignt BPF and JIT functions in a Module

2016-12-05 Thread Wang Nan
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 ++ to

[PATCH v4 16/18] perf clang: Include helpers to BPF scripts

2016-12-05 Thread Wang Nan
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

[PATCH v4 10/18] perf clang jit: Actually JIT and hook in bpf loader

2016-12-05 Thread Wang Nan
***/ $ 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

[PATCH v4 17/18] perf clang builtin: Define hook helpers by default

2016-12-05 Thread Wang Nan
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

[PATCH v4 18/18] perf clang jit: Export getpid() to perf hook

2016-12-05 Thread Wang Nan
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

[PATCH v4 11/18] perf clang jit: Collect the lowest address in maps section as map_base

2016-12-05 Thread Wang Nan
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

[PATCH v4 12/18] perf clang jit: Retrive fd of BPF map from its offset

2016-12-05 Thread Wang Nan
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

[PATCH v4 06/18] perf clang jit: Wrap llvm::Module using PerfModule

2016-12-05 Thread Wang Nan
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

[PATCH v4 08/18] perf clang jit: add PerfModule::doJIT to JIT perfhook functions

2016-12-05 Thread Wang Nan
hook functions 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

[PATCH v4 09/18] perf clang jit: Export functions for jitted code

2016-12-05 Thread Wang Nan
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

[PATCH v4 15/18] perf clang: Declare BPF functions for BPF scripts automatically

2016-12-05 Thread Wang Nan
can be automatically 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

[PATCH v4 13/18] perf clang jit: Allow jitted perf hook access BPF maps

2016-12-05 Thread Wang Nan
e); printf("Goodbye, perf record, value=%d\n", value); } char _license[] SEC("license") = "GPL"; int _version SEC("version") = LINUX_VERSION_CODE; /***/ $ sudo perf record -e ./test.c echo Hehe Welcom to perf record Hehe [ perf record: Woken up 1 t

[PATCH v4 14/18] perf clang: Link BPF functions declaration into perf

2016-12-05 Thread Wang Nan
wever, 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

[tip:perf/core] tools lib bpf: Retrive bpf_map through offset of bpf_map_def

2016-12-02 Thread tip-bot for Wang Nan
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

[tip:perf/core] perf tools: Introduce perf hooks

2016-12-02 Thread tip-bot for Wang Nan
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

[tip:perf/core] tools lib bpf: Add missing BPF functions

2016-12-02 Thread tip-bot for Wang Nan
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

[tip:perf/core] tools lib bpf: Add private field for bpf_object

2016-12-02 Thread tip-bot for Wang Nan
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

[PATCH v3 26/30 - cleanup] perf clang: Link BPF functions declaration into perf

2016-11-30 Thread Wang Nan
wever, 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

[PATCH v3 15/30] perf clang: Compile BPF script use builtin clang support

2016-11-25 Thread Wang Nan
ipt-example.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

[PATCH v3 00/30] perf clang: Builtin clang and perfhook support

2016-11-25 Thread Wang Nan
-s # ulimit -l unlimited # perf record -e ./count_syscalls.c echo "Haha" Start count, perfpid=25209 Haha [ perf record: Woken up 1 times to write data ] syscall 293 count: 2 syscall 8 count: 7 syscall 11count: 763 syscall 4 count: 43 syscall 21count: 48

[PATCH v3 22/30] perf clang jit: Actually JIT and hook in bpf loader

2016-11-25 Thread Wang Nan
***/ $ 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

[PATCH v3 08/30] tools build: Add feature detection for clang

2016-11-25 Thread Wang Nan
d new clang breaking 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 Na

[PATCH v3 05/30] perf tools: Pass context to perf hook functions

2016-11-25 Thread Wang Nan
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

[PATCH v3 10/30] perf clang: Add builtin clang support ant test case

2016-11-25 Thread Wang Nan
: 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

[PATCH v3 25/30] perf clang jit: Allow jitted perf hook access BPF maps

2016-11-25 Thread Wang Nan
e); printf("Goodbye, perf record, value=%d\n", value); } char _license[] SEC("license") = "GPL"; int _version SEC("version") = LINUX_VERSION_CODE; /***/ $ sudo perf record -e ./test.c echo Hehe Welcom to perf record Hehe [ perf record: Woken up 1 time

[PATCH v3 29/30] perf clang builtin: Define hook helpers by default

2016-11-25 Thread Wang Nan
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

[PATCH v3 18/30] perf clang jit: Wrap llvm::Module using PerfModule

2016-11-25 Thread Wang Nan
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

[PATCH v3 12/30] perf clang: Allow passing CFLAGS to builtin clang

2016-11-25 Thread Wang Nan
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 Cc: Alexei Starovoitov Cc: He Kuang Cc: Jiri Olsa Cc: Zefan Li Cc: pi3or...@163.com Link: http://lkml.kernel.org/r/1474874832-134786-9-git

  1   2   3   4   5   6   7   8   9   10   >