[PATCH v5 12/17] perf ftrace: add support for tracing option 'irq-info'

2020-07-11 Thread Changbin Du
This adds support to display irq context info for function tracer. To do this, just specify a '--func-opts irq-info' option. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 1 + tools/perf/builtin-ftrace.c | 21 - 2 files c

[PATCH v5 17/17] perf ftrace: add change log

2020-07-11 Thread Changbin Du
Add a change log after previous enhancements. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index a70951938308..56dfce646d30 100644 --- a/tools/perf/builtin-ftrace.c +++ b

[PATCH v5 13/17] perf ftrace: add option 'verbose' to show more info for graph tracer

2020-07-11 Thread Changbin Du
te(); 14160.770888 | 0) <...>-47814 | d... | 0.430 us| fpregs_assert_state_consistent(); 14160.770889 | 0) <...>-47814 | d... | | do_syscall_64() { 14160.770889 | 0) <...>-47814 | | | __x64_sys_close() { Signed-off-by: Chang

[PATCH v5 10/17] perf ftrace: add support for trace option sleep-time

2020-07-11 Thread Changbin Du
This adds an option '--graph-opts nosleep-time' which allow us only to measure on-CPU time. This option is function_graph tracer only. Signed-off-by: Changbin Du --- v3: switch to uniform option --graph-opts. v2: option name '--nosleep-time' -> '--graph-no

[PATCH v5 15/17] perf: ftrace: allow set graph depth by '--graph-opts'

2020-07-11 Thread Changbin Du
This is to have a consistent view of all graph tracer options. The original option '--graph-depth' is marked as deprecated. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 5 + tools/perf/builtin-ftrace.c | 5 ++--- 2 files changed, 3 insert

[PATCH v5 11/17] perf ftrace: add support for trace option funcgraph-irqs

2020-07-11 Thread Changbin Du
This adds an option '--graph-opts noirqs' to filter out functions executed in irq context. Signed-off-by: Changbin Du --- v2: option name '--nofuncgraph-irqs' -> '--graph-noirqs'. --- tools/perf/Documentation/perf-ftrace.txt | 1 + tools/perf/b

[PATCH v5 14/17] perf ftrace: add support for trace option tracing_thresh

2020-07-11 Thread Changbin Du
# 4140.051 us | } /* do_idle */ Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 1 + tools/perf/builtin-ftrace.c | 26 +++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/tools/perf/Documentation/perf-ftrace.txt b/

[PATCH v5 16/17] perf ftrace: add option -D/--delay to delay tracing

2020-07-11 Thread Changbin Du
This adds an option '-D/--delay' to allow us to start tracing some times later after workload is launched. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 4 tools/perf/builtin-ftrace.c | 19 --- 2 files changed, 20 insert

[PATCH v5 05/17] perf ftrace: add option '-m/--buffer-size' to set per-cpu buffer size

2020-07-11 Thread Changbin Du
This adds an option '-m/--buffer-size' to allow us set the size of per-cpu tracing buffer. Signed-off-by: Changbin Du --- v2: support units as a suffix. --- tools/perf/Documentation/perf-ftrace.txt | 5 +++ tools/perf/builtin-ftrace.c | 56 +++

[PATCH v5 04/17] perf ftrace: factor out function write_tracing_file_int()

2020-07-11 Thread Changbin Du
We will reuse this function later. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 1188b82c6541..342861a1d152 100644 --- a/tools/perf

[PATCH v5 07/17] perf ftrace: add option '--inherit' to trace children processes

2020-07-11 Thread Changbin Du
This adds an option '--inherit' to allow us trace children processes spawned by our target. Signed-off-by: Changbin Du --- v2: option name '--trace-children' -> '--inherit'. --- tools/perf/Documentation/perf-ftrace.txt | 3 ++ tools/perf/b

[PATCH v5 06/17] perf ftrace: show trace column header

2020-07-11 Thread Changbin Du
_write <...>-9246 [006] 10726.262767: fpregs_assert_state_consistent <-do_syscall_64 Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 348e2

[PATCH v5 09/17] perf ftrace: add support for tracing option 'func_stack_trace'

2020-07-11 Thread Changbin Du
=> vfs_read => ksys_read => __x64_sys_read => do_syscall_64 => entry_SYSCALL_64_after_hwframe ... Signed-off-by: Changbin Du --- v3: switch to uniform option --func-opts. v2: option name '-s' -> '--func-call-graph' --- tools/perf/Documentation/pe

[PATCH v5 03/17] perf ftrace: add option -t/--tid to filter by thread id

2020-07-11 Thread Changbin Du
This allows us to trace single thread instead of the whole process. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 4 tools/perf/builtin-ftrace.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tools/perf/Documentation/perf-ftrace.txt b/tools

[PATCH v5 02/17] perf ftrace: add option '-F/--funcs' to list available functions

2020-07-11 Thread Changbin Du
_cb run_init_process try_to_run_init_process match_dev_by_label match_dev_by_uuid rootfs_init_fs_context Signed-off-by: Changbin Du --- v2: option name '-l/--list-functions' -> '-F/--funcs' --- tools/perf/Documentation/perf-ftrace.txt | 4 +++ tools/perf/builtin-ftrace.c

[PATCH v5 08/17] perf: util: add general function to parse sublevel options

2020-07-11 Thread Changbin Du
This factors out a general function perf_parse_sublevel_options() to parse sublevel options. The 'sublevel' options is something like the '--debug' options which allow more sublevel options. Signed-off-by: Changbin Du --- v2: add util/parse-sublevel-options.c --- t

[PATCH v5 01/17] perf ftrace: select function/function_graph tracer automatically

2020-07-11 Thread Changbin Du
e This will trace all functions using function graph tracer: $ sudo perf ftrace -G '*' This will trace function vfs_read using function graph tracer: $ sudo perf ftrace -G vfs_read Signed-off-by: Changbin Du --- v3: remove default '*' for -G/-T. --- tools/perf/Documen

[PATCH v5 00/17] perf: ftrace enhancement

2020-07-11 Thread Changbin Du
7;. o mark old options deprecated instead of removing them. Changbin Du (17): perf ftrace: select function/function_graph tracer automatically perf ftrace: add option '-F/--funcs' to list available functions perf ftrace: add option -t/--tid to filter by thread id perf ftrace

Re: [PATCH v4 08/17] perf: util: add general function to parse sublevel options

2020-07-11 Thread Changbin Du
On Fri, Jul 10, 2020 at 11:29:49PM +0900, Namhyung Kim wrote: > On Fri, Jul 10, 2020 at 10:44 PM Changbin Du wrote: > > > > This factors out a general function perf_parse_sublevel_options() to parse > > sublevel options. The 'sublevel' options is something like

Re: [PATCH v4 01/17] perf ftrace: select function/function_graph tracer automatically

2020-07-11 Thread Changbin Du
On Fri, Jul 10, 2020 at 11:14:05PM +0900, Namhyung Kim wrote: > Hello, > > On Fri, Jul 10, 2020 at 10:43 PM Changbin Du wrote: > > > > The '-g/-G' options have already implied function_graph tracer should be > > used instead of function tracer. So the extr

[PATCH v4 11/17] perf ftrace: add support for trace option funcgraph-irqs

2020-07-10 Thread Changbin Du
This adds an option '--graph-opts noirqs' to filter out functions executed in irq context. Signed-off-by: Changbin Du --- v2: option name '--nofuncgraph-irqs' -> '--graph-noirqs'. --- tools/perf/Documentation/perf-ftrace.txt | 1 + tools/perf/b

[PATCH v4 07/17] perf ftrace: add option '--inherit' to trace children processes

2020-07-10 Thread Changbin Du
This adds an option '--inherit' to allow us trace children processes spawned by our target. Signed-off-by: Changbin Du --- v2: option name '--trace-children' -> '--inherit'. --- tools/perf/Documentation/perf-ftrace.txt | 3 ++ tools/perf/b

[PATCH v4 08/17] perf: util: add general function to parse sublevel options

2020-07-10 Thread Changbin Du
This factors out a general function perf_parse_sublevel_options() to parse sublevel options. The 'sublevel' options is something like the '--debug' options which allow more sublevel options. Signed-off-by: Changbin Du --- v2: add util/parse-sublevel-options.c --- t

[PATCH v4 09/17] perf ftrace: add support for tracing option 'func_stack_trace'

2020-07-10 Thread Changbin Du
=> vfs_read => ksys_read => __x64_sys_read => do_syscall_64 => entry_SYSCALL_64_after_hwframe ... Signed-off-by: Changbin Du --- v3: switch to uniform option --func-opts. v2: option name '-s' -> '--func-call-graph' --- tools/perf/Documentation/pe

[PATCH v4 12/17] perf ftrace: add support for tracing option 'irq-info'

2020-07-10 Thread Changbin Du
This adds support to display irq context info for function tracer. To do this, just specify a '--func-opts irq-info' option. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 1 + tools/perf/builtin-ftrace.c | 21 - 2 files c

[PATCH v4 10/17] perf ftrace: add support for trace option sleep-time

2020-07-10 Thread Changbin Du
This adds an option '--graph-opts nosleep-time' which allow us only to measure on-CPU time. This option is function_graph tracer only. Signed-off-by: Changbin Du --- v3: switch to uniform option --graph-opts. v2: option name '--nosleep-time' -> '--graph-no

[PATCH v4 05/17] perf ftrace: add option '-m/--buffer-size' to set per-cpu buffer size

2020-07-10 Thread Changbin Du
This adds an option '-m/--buffer-size' to allow us set the size of per-cpu tracing buffer. Signed-off-by: Changbin Du --- v2: support units as a suffix. --- tools/perf/Documentation/perf-ftrace.txt | 5 +++ tools/perf/builtin-ftrace.c | 56 +++

[PATCH v4 06/17] perf ftrace: show trace column header

2020-07-10 Thread Changbin Du
_write <...>-9246 [006] 10726.262767: fpregs_assert_state_consistent <-do_syscall_64 Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 348e2

[PATCH v4 03/17] perf ftrace: add option -t/--tid to filter by thread id

2020-07-10 Thread Changbin Du
This allows us to trace single thread instead of the whole process. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 4 tools/perf/builtin-ftrace.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tools/perf/Documentation/perf-ftrace.txt b/tools

[PATCH v4 02/17] perf ftrace: add option '-F/--funcs' to list available functions

2020-07-10 Thread Changbin Du
_cb run_init_process try_to_run_init_process match_dev_by_label match_dev_by_uuid rootfs_init_fs_context Signed-off-by: Changbin Du --- v2: option name '-l/--list-functions' -> '-F/--funcs' --- tools/perf/Documentation/perf-ftrace.txt | 4 +++ tools/perf/builtin-ftrace.c

[PATCH v4 01/17] perf ftrace: select function/function_graph tracer automatically

2020-07-10 Thread Changbin Du
e This will trace all functions using function graph tracer: $ sudo perf ftrace -G This will trace function vfs_read using function graph tracer: $ sudo perf ftrace -G vfs_read Signed-off-by: Changbin Du --- v3: remove default '*' for -G/-T. --- tools/perf/Documentation/per

[PATCH v4 04/17] perf ftrace: factor out function write_tracing_file_int()

2020-07-10 Thread Changbin Du
We will reuse this function later. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 1188b82c6541..342861a1d152 100644 --- a/tools/perf

[PATCH v4 00/17] perf: ftrace enhancement

2020-07-10 Thread Changbin Du
-userstacktrace' and '--no-pager' are dropped. o update all related perf documentation. o rename some options. Now all funcgraph tracer options are prefixed with '--graph-', while all function tracer options are prefixed with '--func-'. o mark old option

Re: [PATCH v3 00/17] perf: ftrace enhancement

2020-07-10 Thread Changbin Du
On Wed, Jul 08, 2020 at 02:39:59PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Jul 09, 2020 at 12:45:48AM +0800, Changbin Du escreveu: > > Here is a glance of all ftrace functions with this serias: > > > > $ sudo perf ftrace -h > > > Usage: perf ftrace

Re: [PATCH v3 09/17] perf: util: add general function to parse sublevel options

2020-07-10 Thread Changbin Du
On Wed, Jul 08, 2020 at 02:34:23PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Jul 09, 2020 at 12:45:57AM +0800, Changbin Du escreveu: > > This factors out a general function perf_parse_sublevel_options() to parse > > sublevel options. The 'sublevel' options is so

[PATCH v3 15/17] perf ftrace: add support for trace option tracing_thresh

2020-07-08 Thread Changbin Du
# 4140.051 us | } /* do_idle */ Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 1 + tools/perf/builtin-ftrace.c | 26 +++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/tools/perf/Documentation/perf-ftrace.txt b/

[PATCH v3 13/17] perf ftrace: add support for tracing option 'irq-info'

2020-07-08 Thread Changbin Du
This adds support to display irq context info for function tracer. To do this, just specify a '--func-opts irq-info' option. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 1 + tools/perf/builtin-ftrace.c | 21 - 2 files c

[PATCH v3 17/17] perf ftrace: add change log

2020-07-08 Thread Changbin Du
Add a change log after previous enhancements. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index a20187b1556a..664cdfabc77b 100644 --- a/tools/perf/builtin-ftrace.c +++ b

[PATCH v3 14/17] perf ftrace: add option 'verbose' to show more info for graph tracer

2020-07-08 Thread Changbin Du
te(); 14160.770888 | 0) <...>-47814 | d... | 0.430 us| fpregs_assert_state_consistent(); 14160.770889 | 0) <...>-47814 | d... | | do_syscall_64() { 14160.770889 | 0) <...>-47814 | | | __x64_sys_close() { Signed-off-by: Chang

[PATCH v3 12/17] perf ftrace: add support for trace option funcgraph-irqs

2020-07-08 Thread Changbin Du
This adds an option '--graph-opts noirqs' to filter out functions executed in irq context. Signed-off-by: Changbin Du --- v2: option name '--nofuncgraph-irqs' -> '--graph-noirqs'. --- tools/perf/Documentation/perf-ftrace.txt | 1 + tools/perf/b

[PATCH v3 16/17] perf: ftrace: allow set graph depth by '--graph-opts'

2020-07-08 Thread Changbin Du
This is to have a consistent view of all graph tracer options. The original option '--graph-depth' is marked as deprecated. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 4 +++- tools/perf/builtin-ftrace.c | 5 +++-- 2 files changed, 6 insert

[PATCH v3 07/17] perf ftrace: show trace column header

2020-07-08 Thread Changbin Du
_write <...>-9246 [006] 10726.262767: fpregs_assert_state_consistent <-do_syscall_64 Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 66cdf

[PATCH v3 04/17] perf ftrace: add option -d/--delay to delay tracing

2020-07-08 Thread Changbin Du
This adds an option '-d/--delay' to allow us to start tracing some times later after workload is launched. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 4 tools/perf/builtin-ftrace.c | 19 --- 2 files changed, 20 insert

[PATCH v3 05/17] perf ftrace: factor out function write_tracing_file_int()

2020-07-08 Thread Changbin Du
We will reuse this function later. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 7793c3d083e0..7eb41f7027c8 100644 --- a/tools/perf

[PATCH v3 11/17] perf ftrace: add support for trace option sleep-time

2020-07-08 Thread Changbin Du
This adds an option '--graph-opts nosleep-time' which allow us only to measure on-CPU time. This option is function_graph tracer only. Signed-off-by: Changbin Du --- v3: switch to uniform option --graph-opts. v2: option name '--nosleep-time' -> '--graph-no

[PATCH v3 08/17] perf ftrace: add option '--inherit' to trace children processes

2020-07-08 Thread Changbin Du
This adds an option '--inherit' to allow us trace children processes spawned by our target. Signed-off-by: Changbin Du --- v2: option name '--trace-children' -> '--inherit'. --- tools/perf/Documentation/perf-ftrace.txt | 3 ++ tools/perf/b

[PATCH v3 10/17] perf ftrace: add support for tracing option 'func_stack_trace'

2020-07-08 Thread Changbin Du
=> vfs_read => ksys_read => __x64_sys_read => do_syscall_64 => entry_SYSCALL_64_after_hwframe ... Signed-off-by: Changbin Du --- v3: switch to uniform option --func-opts. v2: option name '-s' -> '--func-call-graph' --- tools/perf/Documentation/pe

[PATCH v3 06/17] perf ftrace: add option '-m/--buffer-size' to set per-cpu buffer size

2020-07-08 Thread Changbin Du
This adds an option '-m/--buffer-size' to allow us set the size of per-cpu tracing buffer. Signed-off-by: Changbin Du --- v2: support units as a suffix. --- tools/perf/Documentation/perf-ftrace.txt | 5 +++ tools/perf/builtin-ftrace.c | 56 +++

[PATCH v3 09/17] perf: util: add general function to parse sublevel options

2020-07-08 Thread Changbin Du
This factors out a general function perf_parse_sublevel_options() to parse sublevel options. The 'sublevel' options is something like the '--debug' options which allow more sublevel options. Signed-off-by: Changbin Du --- tools/pe

[PATCH v3 02/17] perf ftrace: add option '-F/--funcs' to list available functions

2020-07-08 Thread Changbin Du
_cb run_init_process try_to_run_init_process match_dev_by_label match_dev_by_uuid rootfs_init_fs_context Signed-off-by: Changbin Du --- v2: option name '-l/--list-functions' -> '-F/--funcs' --- tools/perf/Documentation/perf-ftrace.txt | 4 +++ tools/perf/builtin-ftrace.c

[PATCH v3 01/17] perf ftrace: select function/function_graph tracer automatically

2020-07-08 Thread Changbin Du
e This will trace all functions using function graph tracer: $ sudo perf ftrace -G This will trace function vfs_read using function graph tracer: $ sudo perf ftrace -G vfs_read Signed-off-by: Changbin Du --- v3: remove default '*' for -G/-T. --- tools/perf/Documentation/per

[PATCH v3 03/17] perf ftrace: add option -t/--tid to filter by thread id

2020-07-08 Thread Changbin Du
This allows us to trace single thread instead of the whole process. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 4 tools/perf/builtin-ftrace.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tools/perf/Documentation/perf-ftrace.txt b/tools

[PATCH v3 00/17] perf: ftrace enhancement

2020-07-08 Thread Changbin Du
th '--func-'. o mark old options deprecated instead of removing them. Changbin Du (17): perf ftrace: select function/function_graph tracer automatically perf ftrace: add option '-F/--funcs' to list available functions perf ftrace: add option -t/--tid to filter by threa

Re: [PATCH v2 10/15] perf ftrace: add support for trace option sleep-time

2020-07-08 Thread Changbin Du
On Tue, Jul 07, 2020 at 01:09:43PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Jul 07, 2020 at 11:35:14PM +0800, Changbin Du escreveu: > > On Fri, Jul 03, 2020 at 03:40:59PM +0900, Namhyung Kim wrote: > > > On Sat, Jun 27, 2020 at 10:38 PM Changbin Du > > >

Re: [PATCH v2 05/15] perf ftrace: factor out function write_tracing_file_int()

2020-07-08 Thread Changbin Du
On Tue, Jul 07, 2020 at 12:09:23PM -0400, Steven Rostedt wrote: > On Sat, 27 Jun 2020 21:36:44 +0800 > Changbin Du wrote: > > > We will reuse this function later. > > > > BTW, trace-cmd.git now has a libtracefs.so library, which I'm hoping > within a month

Re: [PATCH v2 10/15] perf ftrace: add support for trace option sleep-time

2020-07-07 Thread Changbin Du
On Fri, Jul 03, 2020 at 03:40:59PM +0900, Namhyung Kim wrote: > On Sat, Jun 27, 2020 at 10:38 PM Changbin Du wrote: > > > > This adds an option '--graph-nosleep-time' which allow us only to measure > > on-CPU time. This option is function_graph tracer only. >

Re: [PATCH v2 09/15] perf ftrace: add support for tracing option 'func_stack_trace'

2020-07-07 Thread Changbin Du
On Fri, Jul 03, 2020 at 03:30:32PM +0900, Namhyung Kim wrote: > On Sat, Jun 27, 2020 at 10:38 PM Changbin Du wrote: > > > > This adds support to display call trace for function tracer. To do this, > > just specify a '--func-call-graph' option. > > What if it&

Re: [PATCH v2 02/15] perf ftrace: add option '-F/--funcs' to list available functions

2020-07-07 Thread Changbin Du
On Fri, Jul 03, 2020 at 02:58:19PM +0900, Namhyung Kim wrote: > On Sat, Jun 27, 2020 at 10:37 PM Changbin Du wrote: > > > > This adds an option '-F/--funcs' to list all available functions to trace, > > which is read from tracing file 'available_filter_functio

Re: [PATCH v2 01/15] perf ftrace: select function/function_graph tracer automatically

2020-07-07 Thread Changbin Du
On Fri, Jul 03, 2020 at 02:47:09PM +0900, Namhyung Kim wrote: > Hello, > > On Sat, Jun 27, 2020 at 10:37 PM Changbin Du wrote: > > > > The '-g/-G' options have already implied function_graph tracer should be > > used instead of function tracer. So the extr

Re: [PATCH v2 07/15] perf ftrace: show trace column header

2020-07-07 Thread Changbin Du
On Fri, Jul 03, 2020 at 03:20:15PM +0900, Namhyung Kim wrote: > On Sat, Jun 27, 2020 at 10:38 PM Changbin Du wrote: > > > > This makes perf-ftrace display column header before printing trace. > > > > $ sudo perf ftrace > > \# tracer: function > > \# > &

[PATCH v2 15/15] perf ftrace: add change log

2020-06-27 Thread Changbin Du
Add a change log after previous enhancements. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 0f8716ea0da4..3d73809150c8 100644 --- a/tools/perf/builtin-ftrace.c +++ b

[PATCH v2 14/15] perf ftrace: add support for trace option tracing_thresh

2020-06-27 Thread Changbin Du
140.051 us | } /* do_idle */ Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 3 +++ tools/perf/builtin-ftrace.c | 25 2 files changed, 28 insertions(+) diff --git a/tools/perf/Documentation/perf-ftrace.txt b/tools/perf/Document

[PATCH v2 13/15] perf ftrace: add option '--graph-verbose' to show more info for graph tracer

2020-06-27 Thread Changbin Du
te(); 14160.770888 | 0) <...>-47814 | d... | 0.430 us| fpregs_assert_state_consistent(); 14160.770889 | 0) <...>-47814 | d... | | do_syscall_64() { 14160.770889 | 0) <...>-47814 | | | __x64_sys_close() { Signed-off-by: Chang

[PATCH v2 12/15] perf ftrace: add support for tracing option 'irq-info'

2020-06-27 Thread Changbin Du
This adds support to display irq context info for function tracer. To do this, just specify a '--func-irq-info' option. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 3 +++ tools/perf/builtin-ftrace.c | 20 2 files c

[PATCH v2 11/15] perf ftrace: add support for trace option funcgraph-irqs

2020-06-27 Thread Changbin Du
This adds an option '--graph-noirqs' to filter out functions executed in irq context. Signed-off-by: Changbin Du --- v2: option name '--nofuncgraph-irqs' -> '--graph-noirqs'. --- tools/perf/Documentation/perf-ftrace.txt | 3 +++ tools/perf/b

[PATCH v2 07/15] perf ftrace: show trace column header

2020-06-27 Thread Changbin Du
<...>-9246 [006] 10726.262767: fpregs_assert_state_consistent <-do_syscall_64 Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index e45496012611..686d744d5025 1

[PATCH v2 04/15] perf ftrace: add option -d/--delay to delay tracing

2020-06-27 Thread Changbin Du
This adds an option '-d/--delay' to allow us to start tracing some times later after workload is launched. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 4 tools/perf/builtin-ftrace.c | 19 --- 2 files changed, 20 insert

[PATCH v2 10/15] perf ftrace: add support for trace option sleep-time

2020-06-27 Thread Changbin Du
This adds an option '--graph-nosleep-time' which allow us only to measure on-CPU time. This option is function_graph tracer only. Signed-off-by: Changbin Du --- v2: option name '--nosleep-time' -> '--graph-nosleep-time'. --- tools/perf/Documentation/perf-ftrace

[PATCH v2 06/15] perf ftrace: add option '-m/--buffer-size' to set per-cpu buffer size

2020-06-27 Thread Changbin Du
This adds an option '-m/--buffer-size' to allow us set the size of per-cpu tracing buffer. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 4 tools/perf/builtin-ftrace.c | 22 ++ 2 files changed, 26 insertions(+) di

[PATCH v2 03/15] perf ftrace: add option -t/--tid to filter by thread id

2020-06-27 Thread Changbin Du
This allows us to trace single thread instead of the whole process. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 4 tools/perf/builtin-ftrace.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tools/perf/Documentation/perf-ftrace.txt b/tools

[PATCH v2 08/15] perf ftrace: add option '--inherit' to trace children processes

2020-06-27 Thread Changbin Du
This adds an option '--inherit' to allow us trace children processes spawned by our target. Signed-off-by: Changbin Du --- v2: option name '--trace-children' -> '--inherit'. --- tools/perf/Documentation/perf-ftrace.txt | 3 ++ tools/perf/b

[PATCH v2 09/15] perf ftrace: add support for tracing option 'func_stack_trace'

2020-06-27 Thread Changbin Du
=> vfs_read => ksys_read => __x64_sys_read => do_syscall_64 => entry_SYSCALL_64_after_hwframe ... Signed-off-by: Changbin Du --- v2: option name '-s' -> '--func-call-graph' --- tools/perf/Documentation/perf-ftrace.txt | 3 +++ tools/perf/builtin-ftrace.c

[PATCH v2 05/15] perf ftrace: factor out function write_tracing_file_int()

2020-06-27 Thread Changbin Du
We will reuse this function later. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index dceae70c3a22..003efa756322 100644 --- a/tools/perf

[PATCH v2 02/15] perf ftrace: add option '-F/--funcs' to list available functions

2020-06-27 Thread Changbin Du
_cb run_init_process try_to_run_init_process match_dev_by_label match_dev_by_uuid rootfs_init_fs_context Signed-off-by: Changbin Du --- v2: option name '-l/--list-functions' -> '-F/--funcs' --- tools/perf/Documentation/perf-ftrace.txt | 4 +++ tools/perf/builtin-ftrace.c

[PATCH v2 01/15] perf ftrace: select function/function_graph tracer automatically

2020-06-27 Thread Changbin Du
ng all functions using function tracer: $ sudo perf ftrace This will trace all functions using function graph tracer: $ sudo perf ftrace -G This will trace function vfs_read using function graph tracer: $ sudo perf ftrace -G vfs_read Signed-off-by: Changbin Du --- tools/perf/Documentati

[PATCH v2 00/15] perf: ftrace enhancement

2020-06-27 Thread Changbin Du
. o rename some options. Now all funcgraph tracer options are prefixed with '--graph-', while all function tracer options are prefixed with '--func-'. o mark old options deprecated instead of removing them. Changbin Du (15): perf ftrace: select function/function_graph t

Re: [PATCH 10/19] perf ftrace: add support for trace option funcgraph-tail

2020-06-25 Thread Changbin Du
Hi Arnaldo, First appologize for so long dealy! Maybe you have forgot the context of this serias ;) On Wed, May 20, 2020 at 06:05:09PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, May 10, 2020 at 11:06:19PM +0800, Changbin Du escreveu: > > This adds an option '--funcgraph-tail

Re: [PATCH 11/19] perf ftrace: add option '-u/--userstacktrace' to show userspace stacktrace

2020-06-14 Thread Changbin Du
On Wed, May 20, 2020 at 06:07:41PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, May 10, 2020 at 11:06:20PM +0800, Changbin Du escreveu: > > This adds an option ''-u/--userstacktrace' for function tracer to display > > userspace back trace. > > Probably we s

Re: [PATCH] perf trace: add default value for opt 'call-graph'

2020-06-06 Thread Changbin Du
Hi Arnaldo, Have you checked this one? thanks. On Sun, May 03, 2020 at 04:00:56AM +, Changbin Du wrote: > The documentation says the default value of call-graph.record_mode is 'fp'. > But actually we never can omit value of call-graph parameter. This patch > can fix this is

Re: [PATCH 13/19] perf ftrace: add option '-b/--buffer-size' to set per-cpu buffer size

2020-06-06 Thread Changbin Du
On Wed, May 20, 2020 at 06:08:14PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, May 10, 2020 at 11:06:22PM +0800, Changbin Du escreveu: > > This adds an option '-b/--buffer-size' to allow us set the size of per-cpu > > tracing buffer. > > -m > sur

Re: [PATCH 05/19] perf ftrace: add option '-l/--list-functions' to list available functions

2020-06-06 Thread Changbin Du
On Wed, May 20, 2020 at 05:59:40PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, May 10, 2020 at 11:06:14PM +0800, Changbin Du escreveu: > > This adds an option '-l/--list-functions' to list all available functions > > which is read from tracing file 'available_fi

Re: [PATCH 14/19] perf ftrace: add option -P/--no-pager to disable pager

2020-06-06 Thread Changbin Du
On Wed, May 20, 2020 at 06:09:14PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, May 10, 2020 at 11:06:23PM +0800, Changbin Du escreveu: > > Sometimes we want perf displays trace immediately. So this adds an option > > '-P/--no-pager' to disable pager if needed. >

Re: [PATCH 15/19] perf ftrace: show trace column header

2020-06-06 Thread Changbin Du
On Wed, May 20, 2020 at 06:11:01PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, May 10, 2020 at 11:06:24PM +0800, Changbin Du escreveu: > > This makes perf-ftrace display column header before printing trace. > > [acme@five perf]$ perf report -h header > >

Re: [PATCH 16/19] perf ftrace: add option -t/--tid to filter by thread id

2020-06-06 Thread Changbin Du
On Wed, May 20, 2020 at 06:12:28PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, May 10, 2020 at 11:06:25PM +0800, Changbin Du escreveu: > > This allows us to trace single thread instead of the whole process. > > I was going to adjust the patch to add, but you forgot to add

Re: [PATCH 17/19] perf ftrace: add option -d/--delay to delay tracing

2020-06-06 Thread Changbin Du
On Wed, May 20, 2020 at 06:13:31PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, May 10, 2020 at 11:06:26PM +0800, Changbin Du escreveu: > > This adds an option '-d/--delay' to allow us to start tracing some > > times later after workload is launched. > > [acme@f

Re: [PATCH 03/19] perf ftrace: select function/function_graph tracer automatically

2020-06-06 Thread Changbin Du
On Sun, May 31, 2020 at 02:52:23PM +0900, Namhyung Kim wrote: > Hello, > > On Mon, May 11, 2020 at 12:07 AM Changbin Du wrote: > > > > The '-g/-G' options have already implied function_graph tracer should be > > used instead of function tracer. So the extr

Re: [PATCH 06/19] perf ftrace: add support for trace option sleep-time

2020-06-06 Thread Changbin Du
On Sun, May 31, 2020 at 02:56:41PM +0900, Namhyung Kim wrote: > On Thu, May 21, 2020 at 6:01 AM Arnaldo Carvalho de Melo > wrote: > > > > Em Sun, May 10, 2020 at 11:06:15PM +0800, Changbin Du escreveu: > > > This adds an option '--nosleep-time' which allow

Re: [PATCH 08/19] perf ftrace: add option -l/--long-info to show more info

2020-06-06 Thread Changbin Du
On Wed, May 20, 2020 at 06:02:57PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, May 10, 2020 at 11:06:17PM +0800, Changbin Du escreveu: > > Sometimes we want ftrace display more and longer information about trace. > > Humm, -v? Or that would bring too much stuff from other par

Re: [PATCH 00/19] perf: ftrace enhancement

2020-05-25 Thread Changbin Du
On Wed, May 20, 2020 at 05:31:28PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, May 10, 2020 at 11:06:09PM +0800, Changbin Du escreveu: > > The perf has basic kernel ftrace support but lack support of most tracing > > options. This serias is target to enhance the perf ftrace f

Re: [PATCH] tracing: do not create option file latency-format

2020-05-17 Thread Changbin Du
Hi Steven, On Sat, May 16, 2020 at 01:15:21PM -0400, Steven Rostedt wrote: > On Sun, 17 May 2020 00:10:17 +0800 > Changbin Du wrote: > > > The flag LATENCY_FMT actually is usually set by latency tracers internally. > > So I think we should not export it to userspace. T

[PATCH] tracing: do not create option file latency-format

2020-05-16 Thread Changbin Du
The flag LATENCY_FMT actually is usually set by latency tracers internally. So I think we should not export it to userspace. This patch removes the option file 'latency-format' but keep the flag defined as usual. Signed-off-by: Changbin Du --- kernel/trace/trace.c | 4 kernel/tra

[PATCH] function_graph: apply tracing option 'irq-info'

2020-05-16 Thread Changbin Du
The tracing option 'irq-info' is only used by function tracer by far. This patch makes it also against function graph tracer. Then the two tracers have consistent behavior of this option. Signed-off-by: Changbin Du --- kernel/trace/trace_functions_graph.c | 6 +++--- 1 file

[PATCH v6] streamline_config.pl: add LMC_KEEP to preserve some kconfigs

2020-05-12 Thread Changbin Du
Sometimes it is useful to preserve batches of configs when making localmodconfig. For example, I usually don't want any usb and fs modules to be disabled. Now we can do it by: $ make LMC_KEEP="drivers/usb:fs" localmodconfig Signed-off-by: Changbin Du Acked-by: Steven Rostedt (V

Re: [PATCH v5] streamline_config.pl: add LMC_KEEP to preserve some kconfigs

2020-05-12 Thread Changbin Du
On Tue, May 12, 2020 at 03:52:04PM +0900, Masahiro Yamada wrote: > On Sun, May 10, 2020 at 10:06 AM Changbin Du wrote: > > > > Sometimes it is useful to preserve batches of configs when making > > localmodconfig. For example, I usually don't want any usb and fs > >

[PATCH 17/19] perf ftrace: add option -d/--delay to delay tracing

2020-05-10 Thread Changbin Du
This adds an option '-d/--delay' to allow us to start tracing some times later after workload is launched. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-ftrace.c b/

[PATCH 19/19] perf ftrace: add change log

2020-05-10 Thread Changbin Du
Add a change log after previous enhancements. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index fd8e2f305136..8170746f94fd 100644 --- a/tools/perf/builtin-ftrace.c +++ b

[PATCH 18/19] perf ftrace: add option --latency-format to display more info about delay

2020-05-10 Thread Changbin Du
) | 1.023 us| fsnotify(); 1) | 0.335 us| __sb_end_write(); 1) d... | 0.439 us| fpregs_assert_state_consistent(); 1) d... | | do_syscall_64() { 1) | |__x64_sys_close() { Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 20

[PATCH 16/19] perf ftrace: add option -t/--tid to filter by thread id

2020-05-10 Thread Changbin Du
This allows us to trace single thread instead of the whole process. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 0b39b6a88026..8d04e5afe2d3 100644 --- a/tools/perf

[PATCH 12/19] perf ftrace: add support for tracing children processes

2020-05-10 Thread Changbin Du
This adds an option '--trace-children' to allow us trace children processes spawned by our target. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 20 1 file changed, 20 insertions(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftra

[PATCH 13/19] perf ftrace: add option '-b/--buffer-size' to set per-cpu buffer size

2020-05-10 Thread Changbin Du
This adds an option '-b/--buffer-size' to allow us set the size of per-cpu tracing buffer. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 45 - 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/tools/perf/builtin-ftrace

<    1   2   3   4   5   6   7   >