diff options
author | Tom Zanussi <zanussi@kernel.org> | 2021-09-02 15:57:12 -0500 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-09-08 15:29:16 -0400 |
commit | c910db943d35d4ac4b77570ece76e0799af24233 (patch) | |
tree | 6d6bcf3cbd73b5e82ad79e25dbe90dd40d56491d /kernel/workqueue.c | |
parent | 0be083cee42ec78ba6f9148f5b12a00aa2fb8bd3 (diff) | |
download | linux-stable-c910db943d35d4ac4b77570ece76e0799af24233.tar.gz linux-stable-c910db943d35d4ac4b77570ece76e0799af24233.tar.bz2 linux-stable-c910db943d35d4ac4b77570ece76e0799af24233.zip |
tracing: Dynamically allocate the per-elt hist_elt_data array
Setting the hist_elt_data.field_var_str[] array unconditionally to a
size of SYNTH_FIELD_MAX elements wastes space unnecessarily. The
actual number of elements needed can be calculated at run-time
instead.
In most cases, this will save a lot of space since it's a per-elt
array which isn't normally close to being full. It also allows us to
increase SYNTH_FIELD_MAX without worrying about even more wastage when
we do that.
Link: https://lkml.kernel.org/r/d52ae0ad5e1b59af7c4f54faf3fc098461fd82b3.camel@kernel.org
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Tested-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/workqueue.c')
0 files changed, 0 insertions, 0 deletions