aboutsummaryrefslogtreecommitdiffstats
path: root/certs
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2021-07-22 10:27:06 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-08-16 11:37:20 -0400
commit3347d80baa41c357cf263923f60aa8051a753d76 (patch)
treee4d30c75539ad63456975d6bfafdca0cac753bef /certs
parenttracing/histogram: Update the documentation for the buckets modifier (diff)
downloadlinux-dev-3347d80baa41c357cf263923f60aa8051a753d76.tar.xz
linux-dev-3347d80baa41c357cf263923f60aa8051a753d76.zip
tracing: Have histogram types be constant when possible
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(). Link: https://lkml.kernel.org/r/20210722142837.280718447@goodmis.org Suggested-by: Masami Hiramatsu <mhiramat@kernel.org> Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions