From: Jiri Olsa <jolsa@redhat.com>
To: Changbin Du <changbin.du@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Namhyung Kim <namhyung@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: add support for logging debug messages to file
Date: Fri, 20 Sep 2019 22:53:56 +0200 [thread overview]
Message-ID: <20190920205356.GA1041@krava> (raw)
In-Reply-To: <20190915102740.24209-1-changbin.du@gmail.com>
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
next prev parent reply other threads:[~2019-09-20 20:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-15 10:27 [PATCH] perf: add support for logging debug messages to file Changbin Du
2019-09-20 20:53 ` Jiri Olsa [this message]
2019-09-21 2:04 ` Changbin Du
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190920205356.GA1041@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=changbin.du@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.