lkml.org 
[lkml]   [2019]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf: add support for logging debug messages to file
On Sun, Sep 15, 2019 at 06:27:40PM +0800, Changbin Du wrote:
> When in TUI mode, it is impossible to show all the debug messages to
> console. This make it hard to debug perf issues using debug messages.
> This patch adds support for logging debug messages to file to resolve
> this problem.
>
> The usage is:
> perf -debug verbose=2 --debug file=1 COMMAND
>
> And the path of log file is '~/perf.log'.
>
> Signed-off-by: Changbin Du <changbin.du@gmail.com>
> ---
> tools/perf/Documentation/perf.txt | 4 +++-
> tools/perf/util/debug.c | 20 ++++++++++++++++++++
> 2 files changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/Documentation/perf.txt b/tools/perf/Documentation/perf.txt
> index 401f0ed67439..45db7b22d1a5 100644
> --- a/tools/perf/Documentation/perf.txt
> +++ b/tools/perf/Documentation/perf.txt
> @@ -16,7 +16,8 @@ OPTIONS
> Setup debug variable (see list below) in value
> range (0, 10). Use like:
> --debug verbose # sets verbose = 1
> - --debug verbose=2 # sets verbose = 2
> + --debug verbose=2 --debug file=1
> + # sets verbose = 2 and save log to file

it's variable already, why not allow to pass the path directly like:

--debug file=~/perf.log

would be great if we won't need to use --debug twice and allow:

--debug verbose=2,file=perf.log

jirka

\
 
 \ /
  Last update: 2019-09-20 22:54    [W:0.060 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site