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> |
||
---|---|---|
.. | ||
.gitignore | ||
Makefile | ||
trace_record.c |