Re: [PATCH] tracing: Dynamically allocate the per-elt hist_elt_data array

From: Artem Bityutskiy
Date: Fri Sep 03 2021 - 09:52:42 EST


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@xxxxxxxxxx>

Many thanks Tom! I've tested this one.

Tested-by: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>