numam-spdk/lib/trace
Sylvain Didelot 1fd3d8e994 lib/trace: Don't initialize traces if requested num entries is 0
Context:
Every-time the SPDK starts, it creates a large file under
/dev/shm (130 MB in my setup) which is never removed when
the application terminates.

The number of trace entries can be tuned using the SPDK runtime
option 'num_entries'. A value of 0 for this option considerably
reduces the size of the trace file (few MBs) but it is still
created.

This patch adds a special case in the code when num_entries=0:
the trace system would not be initialized, and the trace file
would not be created in this case.

The rest of the code properly handle the case where the trace
system is never initialized.

Signed-off-by: Sylvain Didelot <sdidelot@ddn.com>
Change-Id: If54a548de4a2ce2def8e57d527d0dc20bc55fe4d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/606
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:23:53 +00:00
..
Makefile lib: move trace_rpc into lib/trace 2019-08-19 06:10:30 +00:00
trace_flags.c log: remove old-style errlog entries. 2019-09-26 16:15:11 +00:00
trace_rpc.c rpc: Rename get_tpoint_group_mask trace_get_tpoint_group_mask 2019-10-01 13:59:37 +00:00
trace.c lib/trace: Don't initialize traces if requested num entries is 0 2020-02-10 10:23:53 +00:00