From: Tom Zanussi <zanussi@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>, linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH v2 1/2] tracing: Have histogram types be constant when possible
Date: Thu, 22 Jul 2021 17:11:28 -0500 [thread overview]
Message-ID: <19e90ddf9745b28aadd838ca205e548b0139b157.camel@kernel.org> (raw)
In-Reply-To: <20210722142837.280718447@goodmis.org>
On Thu, 2021-07-22 at 10:27 -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
>
> Instead of kstrdup("const", GFP_KERNEL), have the hist_field type
> simply
> assign the constant hist_field->type = "const"; And when the value
> passed
> to it is a variable, use "kstrdup_const(var, GFP_KERNEL);" which will
> just
> copy the value if the variable is already a constant. This saves on
> having
> to allocate when not needed.
>
> All frees of the hist_field->type will need to use kfree_const().
>
> Suggested-by: Masami Hiramatsu <mhiramat@kernel.org>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Looks good to me.
Thanks,
Reviewed-by: <zanussi@kernel.org>
next prev parent reply other threads:[~2021-07-22 22:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 14:27 [PATCH v2 0/2] tracing: Allow execnames to be passed as args for synthetic events Steven Rostedt
2021-07-22 14:27 ` [PATCH v2 1/2] tracing: Have histogram types be constant when possible Steven Rostedt
2021-07-22 15:24 ` Masami Hiramatsu
2021-07-22 22:11 ` Tom Zanussi [this message]
2021-07-22 14:27 ` [PATCH v2 2/2] tracing: Allow execnames to be passed as args for synthetic events Steven Rostedt
2021-07-22 16:19 ` Masami Hiramatsu
2021-07-22 16:32 ` Steven Rostedt
2021-07-23 1:11 ` Masami Hiramatsu
2021-07-23 1:22 ` Masami Hiramatsu
2021-07-23 1:26 ` Steven Rostedt
2021-07-23 1:24 ` Steven Rostedt
2021-07-24 10:31 ` Masami Hiramatsu
2021-07-25 2:18 ` Masami Hiramatsu
2021-07-25 3:45 ` Masami Hiramatsu
2021-07-26 13:28 ` Steven Rostedt
2021-07-27 22:54 ` Masami Hiramatsu
2021-07-22 22:09 ` Tom Zanussi
2021-07-22 15:14 ` [PATCH v2 0/2] " Steven Rostedt
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=19e90ddf9745b28aadd838ca205e548b0139b157.camel@kernel.org \
--to=zanussi@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.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).