Spdk/app
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
..
iscsi_tgt app: every app should have an (un)install target 2022-06-21 07:54:12 +00:00
iscsi_top check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvmf_tgt app: every app should have an (un)install target 2022-06-21 07:54:12 +00:00
spdk_dd spdk_dd: Fix SEGV on the error path. 2022-08-29 11:40:08 +00:00
spdk_lspci app: every app should have an (un)install target 2022-06-21 07:54:12 +00:00
spdk_tgt Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk_top spdk_top: Add status columns to THREADS and CORES tabs 2022-09-12 07:25:57 +00:00
trace check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
trace_record trace: allocate shm filesize based on number of cores used 2022-09-20 10:17:45 +00:00
vhost app: every app should have an (un)install target 2022-06-21 07:54:12 +00:00
Makefile Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00