From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Yang Jihong <yangjihong1@huawei.com>
Cc: peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
namhyung@kernel.org, pc@us.ibm.com, linux-kernel@vger.kernel.org,
linux-perf-users@vger.kernel.org
Subject: Re: [RFC v3 01/17] perf kwork: New tool
Date: Tue, 26 Jul 2022 14:27:58 -0300 [thread overview]
Message-ID: <YuAkHkxgYyvdHKOO@kernel.org> (raw)
In-Reply-To: <20220709015033.38326-2-yangjihong1@huawei.com>
Em Sat, Jul 09, 2022 at 09:50:17AM +0800, Yang Jihong escreveu:
> The perf-kwork tool is used to trace time properties of kernel work
> (such as irq, softirq, and workqueue), including runtime, latency,
> and timehist, using the infrastructure in the perf tools to allow
> tracing extra targets.
>
> This is the first commit to reuse perf_record framework code to
> implement a simple record function, kwork is not supported currently.
So, since I have to fix some issues I'm adding small stylistic changes,
starting with this:
- multiline if/for blocks need {}
- remove needless spaces between variable declaration + initialization.
- Arnaldo
diff --git a/tools/perf/builtin-kwork.c b/tools/perf/builtin-kwork.c
index f3552c56ede3c501..bfa5c53f1273c631 100644
--- a/tools/perf/builtin-kwork.c
+++ b/tools/perf/builtin-kwork.c
@@ -49,9 +49,10 @@ static void setup_event_list(struct perf_kwork *kwork,
break;
}
}
- if (i == KWORK_CLASS_MAX)
+ if (i == KWORK_CLASS_MAX) {
usage_with_options_msg(usage_msg, options,
"Unknown --event key: `%s'", tok);
+ }
}
free(str);
@@ -59,10 +60,12 @@ static void setup_event_list(struct perf_kwork *kwork,
/*
* config all kwork events if not specified
*/
- if (list_empty(&kwork->class_list))
- for (i = 0; i < KWORK_CLASS_MAX; i++)
+ if (list_empty(&kwork->class_list)) {
+ for (i = 0; i < KWORK_CLASS_MAX; i++) {
list_add_tail(&kwork_class_supported_list[i]->list,
&kwork->class_list);
+ }
+ }
pr_debug("Config event list:");
list_for_each_entry(class, &kwork->class_list, list)
@@ -125,7 +128,6 @@ int cmd_kwork(int argc, const char **argv)
.force = false,
.event_list_str = NULL,
};
-
const struct option kwork_options[] = {
OPT_INCR('v', "verbose", &verbose,
"be more verbose (show symbol address, etc)"),
next prev parent reply other threads:[~2022-07-26 17:28 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-09 1:50 [RFC v3 00/17] perf: Add perf kwork Yang Jihong
2022-07-09 1:50 ` [RFC v3 01/17] perf kwork: New tool Yang Jihong
2022-07-26 17:27 ` Arnaldo Carvalho de Melo [this message]
2022-07-27 0:38 ` Yang Jihong
2022-07-27 23:33 ` Namhyung Kim
2022-07-28 11:48 ` Yang Jihong
2022-07-09 1:50 ` [RFC v3 02/17] perf kwork: Add irq kwork record support Yang Jihong
2022-07-27 23:42 ` Namhyung Kim
2022-07-28 11:50 ` Yang Jihong
2022-07-09 1:50 ` [RFC v3 03/17] perf kwork: Add softirq " Yang Jihong
2022-07-09 1:50 ` [RFC v3 04/17] perf kwork: Add workqueue " Yang Jihong
2022-07-09 1:50 ` [RFC v3 05/17] tools lib: Add list_last_entry_or_null Yang Jihong
2022-07-09 1:50 ` [RFC v3 06/17] perf kwork: Implement perf kwork report Yang Jihong
2022-07-26 17:40 ` Arnaldo Carvalho de Melo
2022-07-27 0:39 ` Yang Jihong
2022-07-27 14:04 ` Arnaldo Carvalho de Melo
2022-07-28 12:01 ` Yang Jihong
2022-07-28 0:00 ` Namhyung Kim
2022-07-28 11:55 ` Yang Jihong
2022-07-09 1:50 ` [RFC v3 07/17] perf kwork: Add irq report support Yang Jihong
2022-07-09 1:50 ` [RFC v3 08/17] perf kwork: Add softirq " Yang Jihong
2022-07-09 1:50 ` [RFC v3 09/17] perf kwork: Add workqueue " Yang Jihong
2022-07-09 1:50 ` [RFC v3 10/17] perf kwork: Implement perf kwork latency Yang Jihong
2022-07-09 1:50 ` [RFC v3 11/17] perf kwork: Add softirq latency support Yang Jihong
2022-07-09 1:50 ` [RFC v3 12/17] perf kwork: Add workqueue " Yang Jihong
2022-07-09 1:50 ` [RFC v3 13/17] perf kwork: Implement perf kwork timehist Yang Jihong
2022-07-09 1:50 ` [RFC v3 14/17] perf kwork: Implement bpf trace Yang Jihong
2022-07-09 1:50 ` [RFC v3 15/17] perf kwork: Add irq trace bpf support Yang Jihong
2022-07-25 21:39 ` Arnaldo Carvalho de Melo
2022-07-09 1:50 ` [RFC v3 16/17] perf kwork: Add softirq " Yang Jihong
2022-07-09 1:50 ` [RFC v3 17/17] perf kwork: Add workqueue " Yang Jihong
2022-07-16 9:14 ` [RFC v3 00/17] perf: Add perf kwork Yang Jihong
2022-07-17 13:29 ` Arnaldo Carvalho de Melo
2022-07-25 21:45 ` [RFC v3 00/17] perf: Add perf kwork (using BPF skels) Arnaldo Carvalho de Melo
2022-07-27 0:36 ` Yang Jihong
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=YuAkHkxgYyvdHKOO@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=pc@us.ibm.com \
--cc=peterz@infradead.org \
--cc=yangjihong1@huawei.com \
/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).