From: Milian Wolff <milian.wolff@kdab.com>
To: linux-perf-users@vger.kernel.org
Cc: acme@kernel.org
Subject: Re: [PATCH] perf record: Allow to disable callchains by setting mode to "none"
Date: Tue, 16 Aug 2016 16:33:14 +0200 [thread overview]
Message-ID: <1889732.MY2fur9umb@agathebauer> (raw)
In-Reply-To: <20160816103427.5567-1-milian.wolff@kdab.com>
[-- Attachment #1: Type: text/plain, Size: 2113 bytes --]
Hey,
sorry for the noise. This patch can be dropped. Not only is it broken (doesn't
set param->enabled = false), the functionality I was looking for exists
already in the form of call-graph=no (see evsel.c).
Is there a reason that the disabling feature is handled outside of
parse_callchain_record? Otherwise one should centralize the code imo for
readability.
I'd also like to see "none" being accepted as a synonym to "no".
If any of the two things above sound valid, then I'd respin the patch below
attend to them.
Cheers
On Dienstag, 16. August 2016 12:34:27 CEST Milian Wolff wrote:
> This change is mostly useful for symmetry purposes. Before, we could:
>
> --event foo/call-graph=fp/
> --event bar/call-graph=dwarf/
> --event asdf/call-graph=lbr/
>
> Now, we can also use
>
> --event xyz/call-graph=none/
>
> The latter is equivalent to
>
> --event xyz
>
> when the `perf record` invocation does not specify a global call-graph
> option. If it does, then this patch also allows us to selectively
> disable the call-graph for single events.
>
> Signed-off-by: Milian Wolff <milian.wolff@kdab.com>
> ---
> tools/perf/util/util.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
> index 85c5680..a549fee 100644
> --- a/tools/perf/util/util.c
> +++ b/tools/perf/util/util.c
> @@ -536,6 +536,14 @@ int parse_callchain_record(const char *arg, struct
> callchain_param *param) pr_err("callchain: No more arguments "
> "needed for --call-graph lbr\n");
> break;
> + } else if (!strncmp(name, "none", sizeof("none"))) {
> + if (!strtok_r(NULL, ",", &saveptr)) {
> + param->record_mode = CALLCHAIN_NONE;
> + ret = 0;
> + } else
> + pr_err("callchain: No more arguments "
> + "needed for --call-graph none\n");
> + break;
> } else {
> pr_err("callchain: Unknown --call-graph option "
> "value: %s\n", arg);
--
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5903 bytes --]
next prev parent reply other threads:[~2016-08-16 14:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 10:34 [PATCH] perf record: Allow to disable callchains by setting mode to "none" Milian Wolff
2016-08-16 14:33 ` Milian Wolff [this message]
2016-08-16 14:43 ` Arnaldo Carvalho de Melo
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=1889732.MY2fur9umb@agathebauer \
--to=milian.wolff@kdab.com \
--cc=acme@kernel.org \
--cc=linux-perf-users@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).