perfmon: fix per-worker data initialization 13/24013/2
authorBenoît Ganne <bganne@cisco.com>
Mon, 16 Dec 2019 14:26:49 +0000 (15:26 +0100)
committerDamjan Marion <dmarion@me.com>
Tue, 17 Dec 2019 17:53:07 +0000 (17:53 +0000)
commit7176b800fa5570a14d9d403183131f5115158baf
tree89cd45e23a73165a95690f9ab241d27f85b7d0df
parente11dce20c99775884877ad6dcf879e8995c78ebf
perfmon: fix per-worker data initialization

When perfmon_init is called at initialization time worker threads are
not created yet and vec_len(vlib_mains) returns 1.
Initialize per-worker data when the number of workers is known, when
enabling data collection instead.

Type: fix

Change-Id: I36887cc7b2a3e88d9728d3cd7262d9b1c968dd3c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
MAINTAINERS
src/plugins/perfmon/perfmon.c
src/plugins/perfmon/perfmon_periodic.c