Spdk/mk
Jim Harris 18c8b52afa trace: allocate shm filesize based on number of cores used
Previously we would always allocate the shm file based on
max (128) cores which is unnecessary.  So use
spdk_env APIs to only allocate shm file size based
on the cores we might possible use.

With default settings, an shm file was 135MB before this
change, now an app using cores 0-7 will just use
about 9MB.

A lot of the trace-related code depended on there
*always* being a history for every core, even unused
ones, so a few additional changes were needed,
mainly the trace_parser library.

Tested by starting an app using a 0x4 core mask and
enabling a trace mask, generating some events, then
checking both the size of the shm file and that
spdk_trace works properly with the resulting file.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie868b3e3658d6f82b2fea37cb87453e8a9e0abc4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14044
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-09-20 10:17:45 +00:00
..
nvme.libtest.mk Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk_blank.map mk: add a placeholder map file. 2020-05-14 10:37:14 +00:00
spdk.app_cxx.mk Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk.app_vars.mk Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk.app.mk libvfio-user: compile shared library based on CONFIG_SHARED flag 2022-06-23 07:43:26 +00:00
spdk.common.mk bdev/daos: support custom DAOS installation dir 2022-09-20 00:45:40 +00:00
spdk.deps.mk Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk.fio.mk Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk.lib_deps.mk vmd: method for removing devices behind VMD 2022-09-01 08:48:32 +00:00
spdk.lib.mk configure: Allow to define custom libdir location 2022-07-04 07:25:39 +00:00
spdk.mock.unittest.mk Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk.modules.mk bdev/daos: introduction of daos bdev 2022-08-23 07:15:13 +00:00
spdk.nvmecli.mk Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk.subdirs.mk Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk.unittest.mk trace: allocate shm filesize based on number of cores used 2022-09-20 10:17:45 +00:00