[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 <wangn...@huawei.com> AuthorDate: Wed, 6 Dec 2017 01:50:40 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[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
[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 <wangn...@huawei.com> Cc: Arnaldo Carvalho d

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

2017-12-17 Thread Wang Nan
[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 Melo Cc: Jiri Olsa --- tools

[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 <wangn...@huawei.com> AuthorDate: Mon, 4 Dec 2017 16:51:06 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[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't

[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 <wangn...@huawei.com> AuthorDate: Mon, 4 Dec 2017 16:51:07 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[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 <wangn...@huawei.com> AuthorDate: Mon, 4 Dec 2017 16:51:05 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[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 <wangn...@huawei.com> AuthorDate: Sun, 3 Dec 2017 02:00:41 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[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 <wangn...@huawei.com> AuthorDate: Sun, 3 Dec 2017 02:00:40 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[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 <wangn...@huawei.com> AuthorDate: Sun, 3 Dec 2017 02:00:39 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[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 <wangn...@huawei.com> AuthorDate: Sun, 3 Dec 2017 02:00:38 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[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 <wangn...@huawei.com> AuthorDate: Sun, 3 Dec 2017 02:00:37 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[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
[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 <wangn...@huawei.com> --- tools/perf/arch/x8

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

2017-12-05 Thread Wang Nan
[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/x86/util/unwind-libunwind.c | 2

[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 <wangn...@huawei.com> Tested-by: Kan Liang <kan.li...@intel.com> --- tools/perf/util/mmap.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/tools/perf/util/mmap.c b/tool

[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 <wangn...@huawei.com> --- tools/perf/builtin-record.c | 14 +++--- tools/perf/tests/backward-ring-buffer.c | 4 ++-- tools/perf/util/ev

[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| 30

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

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

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

2017-12-04 Thread Wang Nan
, 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/util

[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 record tools/perf/builtin

[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 record tools/perf/builtin

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

2017-12-02 Thread Wang Nan
mhy...@kernel.org> Cc: Zhang Mengting <zhangmengt...@huawei.com> Wang Nan (8): perf tools: Remove 'overwrite' parameter from perf_evlist__mmap perf tools: Remove 'overwrite' parameter from perf_evlist__mmap_ex perf tools: Remove evlist->overwrite perf tools: Rem

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

2017-12-02 Thread Wang Nan
/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 Kim Cc: Zhang Mengting Wang Nan (8): perf tools: Remove 'overwrite' parameter

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

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

[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 <wangn...@huawei.com> Tested-by: Kan Liang <kan.li...@intel.com> --- tools/perf/util/mmap.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/tools/perf/util/mmap.c b/tool

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

2017-12-02 Thread Wang Nan
, 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/evlist.c

[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 <wangn...@huawei.com> --- tools/perf/util/evlist.c | 2 +-

[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 | 28

[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 <wangn...@huawei.com> --- tools/perf/builtin-record.c | 2 +- tools/perf/util/mmap.c | 6 +++--- tools/perf/util/mmap.h | 2 +- 3 files changed, 5 insertions

[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 deletions(-) diff --git

[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 <wangn...@huawei.com> --- tools/perf/builtin-record.c | 2 +- tools/perf/util/evlist.c| 8 tools/perf/util/evlist.h| 2 +- 3 files changed, 6 insertions(+), 6 del

[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 <wangn...@huawei.com> --- tools/perf/builtin-record.c | 14 +++--- tools/perf/tests/backward-ring-buffer.c | 4 ++-- tools/perf/util/ev

[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| 30

[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 <wangn...@huawei.com> --- tools/perf/arch/x86/tests/perf-time-to-tsc.c | 2 +- tools/perf/builtin-kvm.c | 2 +- tools/perf/builtin-top.c

[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 <wangn...@huawei.com> --- 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 --gi

[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 +- tools/perf/builtin

[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 <wangn...@huawei.com> AuthorDate: Mon, 13 Nov 2017 01:38:07 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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 <wangn...@huawei.com> AuthorDate: Mon, 13 Nov 2017 01:38:05 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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 <wangn...@huawei.com> AuthorDate: Mon, 13 Nov 2017 01:38:04 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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 <wangn...@huawei.com> AuthorDate: Mon, 13 Nov 2017 01:38:06 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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 <wangn...@huawei.com> --- tools/perf/util/evlist.c | 17 ++--- tools/perf/util/mmap.c

[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 ++-- tools/perf/util

[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 <wangn...@huawei.com> --- tool

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

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

[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: Fix perf

[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
, 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 index

[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: Fix perf

[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 <wangn...@huawei.com> --- tools/perf/tests/sw-clock.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[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 <wangn...@huawei.com> --- tools/perf/tests/mmap-basic.c | 2 +- 1 file changed, 1 ins

[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 <wangn...@huawei.com> ---

[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/perf/tests/backward

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

2017-11-12 Thread Wang Nan
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 in each event. Signed-off-by: Wang Nan <wangn...@huawei.com> ---

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

2017-11-12 Thread Wang Nan
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 in each event. Signed-off-by: Wang Nan --- tools/perf/arch/x86/tests

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

2017-11-07 Thread Wang Nan
_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 should be safe for

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

2017-11-07 Thread Wang Nan
_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 should be safe for a

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

2017-11-05 Thread Wang Nan
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 <wangn...@huawei.com> Cc: Bob Liu <liub...@huawei.com> Cc: Michal Hocko <mho...@suse.com> Cc: Andrew Morton <a...@linux-foundation.org> C

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

2017-11-05 Thread Wang Nan
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 Khlebnikov Cc: Andrea

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

2017-10-31 Thread Wang Nan
recorder mode, perf only dumps data before something happen. Signed-off-by: Wang Nan <wangn...@huawei.com> --- tools/perf/Documentation/perf-record.txt | 8 tools/perf/builtin-record.c | 4 ++-- tools/perf/perf.h| 2 +- tools/perf/util/evsel.c

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

2017-10-31 Thread Wang Nan
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 'overwrite' by 'flightrecorder' for better naming tools

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

2017-10-31 Thread Wang Nan
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 +- tools/perf/util/evsel.c | 6 +

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

2017-10-31 Thread Wang Nan
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 'overwrite' by 'flightrecorder' for better naming tools

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

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

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

2017-10-31 Thread Wang Nan
, 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/evlist.c

[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 <wangn...@huawei.com> Cc: Liang Kan <kan.li...@intel.com> --- tools/perf/util/mmap.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/tools/perf/util/mmap.c b/tools/perf/u

[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-11 Thread Wang Nan
| 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-off-by: Wang Nan <wa

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

2017-10-11 Thread Wang Nan
| 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-off-by: Wang Nan Cc

[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 <wangn...@huawei.com> AuthorDate: Tue, 15 Aug 2017 11:21:59 +0200 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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 <wangn...@huawei.com> Cc: Arnaldo Carvalho de Melo <a...@kernel.org> Cc: Thomas Richter <tmri...@linux.vnet.ibm.com> Cc: Alexei Starovoitov <alexei.starovoi...@gmail.com> Cc: H

[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 <wangn...@huawei.com> Cc: Arnaldo Carvalho de Melo <a...@kernel.org> Cc: Thomas R

[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 <wangn...@huawei.com> AuthorDate: Wed, 21 Jun 2017 02:32:03 +0800 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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
-by: Wang Nan <wangn...@huawei.com> Cc: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Thomas-Mich Richter <tmri...@linux.vnet.ibm.com> Cc: Hendrik Brueckner <brueck...@linux.vnet.ibm.com> Cc: Alexei Starovoitov <alexei.starovoi...@gmail.com> Cc: Li Zefan <lize...@huaw

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

2017-06-19 Thread Wang Nan
-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/bpf-script-test-prologue.c b/tools/perf

[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; Cc: Vince Weaver <vincent.wea...@maine.edu> Fixes: f63a8daa5812 ("perf: Fix event->ctx locking") Link: http://lkml.kernel.org/r/20170106131444.gz3...@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Wang Nan

[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;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
.@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Wang Nan <wangn...@huawei.com> --- kernel/events/core.c | 49 - 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/k

[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

  1   2   3   4   5   6   7   8   9   10   >