lkml.org 
[lkml]   [2021]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] tracing: Dynamically allocate the per-elt hist_elt_data array
From
Date
On Thu, 2021-09-02 at 15:57 -0500, Tom Zanussi wrote:
> 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.
>
> Signed-off-by: Tom Zanussi <zanussi@kernel.org>

Many thanks Tom! I've tested this one.

Tested-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

\
 
 \ /
  Last update: 2021-09-03 15:53    [W:0.065 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site