lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190921020444.qtrsqxweuyoeomzq@mail.google.com>
Date:   Sat, 21 Sep 2019 02:04:45 +0000
From:   Changbin Du <changbin.du@...il.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Changbin Du <changbin.du@...il.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf: add support for logging debug messages to file

On Fri, Sep 20, 2019 at 10:53:56PM +0200, Jiri Olsa wrote:
> 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@...il.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
>
This could be done, but first we need to change the option parsing code
first. will do it later.

> jirka

-- 
Cheers,
Changbin Du

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ