Spdk/include/spdk
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
..
accel.h accel: Do not refer to the "framework" as "engine" 2022-09-06 07:16:17 +00:00
assert.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
barrier.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
base64.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
bdev_module.h bdev: Add functions to [hole,data] seek 2022-09-15 08:23:56 +00:00
bdev_zone.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
bdev.h bdev: Add functions to [hole,data] seek 2022-09-15 08:23:56 +00:00
bit_array.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
bit_pool.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
blob_bdev.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
blob.h blob: Add functions to find [un]allocated io_unit 2022-09-15 08:23:56 +00:00
blobfs_bdev.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
blobfs.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
conf.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
cpuset.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
crc16.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
crc32.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
dif.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
dma.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
endian.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
env_dpdk.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
env.h env/pci: add detach() callback to pci_device_provider 2022-09-01 08:48:32 +00:00
event.h event: pass "const struct option*" to spdk_app_parse_args() 2022-09-13 10:48:58 +00:00
fd_group.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
fd.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
file.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
ftl.h ftl: Unmap functionality 2022-09-09 19:44:29 +00:00
gpt_spec.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
hexlify.h util: made hexlify and unhexlify functions public 2022-09-06 07:17:13 +00:00
histogram_data.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
idxd_spec.h lib/idxd: add some flag overrides when doing PMEM writes 2022-08-18 18:47:02 +00:00
idxd.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
init.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
ioat_spec.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
ioat.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
iscsi_spec.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
json.h json: fix parsing json problems when json config is invalid. 2022-09-02 07:32:21 +00:00
jsonrpc.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
likely.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
log.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
lvol.h blobstore: implement spdk_bs_grow and bdev_lvol_grow_lvstore RPC 2022-06-28 17:55:43 +00:00
memory.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
mmio.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nbd.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
notify.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme_intel.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme_ocssd_spec.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme_ocssd.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme_spec.h nvme: add admin queue size quirk for Hyper-V 2022-09-01 08:31:46 +00:00
nvme_zns.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme.h nvme/tcp: Allow to choose SSL socket implementation 2022-09-14 07:44:53 +00:00
nvmf_cmd.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvmf_fc_spec.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvmf_spec.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvmf_transport.h nvmf: add spdk_nvmf_ctrlr_[save|restore]_migr_data() APIs 2022-09-20 10:17:24 +00:00
nvmf.h nvmf: make opts structures packed 2022-08-18 10:08:40 +00:00
opal_spec.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
opal.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
pci_ids.h nvme: add admin queue size quirk for Hyper-V 2022-09-01 08:31:46 +00:00
pipe.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
queue_extras.h include: remove util.h include from queue_extras.h 2021-04-14 07:25:21 +00:00
queue.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
reduce.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
rpc.h rpc: Add API to get method state mask 2022-09-15 08:25:18 +00:00
scheduler.h include: Remove the last line break. 2022-09-01 08:30:24 +00:00
scsi_spec.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
scsi.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
sock.h sock: make impl_name const char * in all functions 2022-09-05 12:49:28 +00:00
stdinc.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
string.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
thread.h thread: note that spdk_thread_get_last_tsc(NULL) is allowed 2022-09-14 04:35:20 +00:00
trace_parser.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
trace.h trace: allocate shm filesize based on number of cores used 2022-09-20 10:17:45 +00:00
tree.h util: rename RB_ROOT into _RB_ROOT 2021-06-04 22:46:40 +00:00
util.h util: Extract a common lib between iovs and buf. 2022-06-20 10:01:15 +00:00
uuid.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
version.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
vfio_user_pci.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
vfio_user_spec.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
vhost.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
vmd.h vmd: method for forcing a rescan 2022-09-01 08:48:32 +00:00
zipf.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00