trace: only build mask up to SPDK_TRACE_MAX_GROUP_ID

Existing implementation worked, but results in a lot of
unnecessary error messages.

Found while debugging nightly iSCSI tests, which generate
a config file from the existing configuration and calls
spdk_trace_get_tpoint_group_mask() to do it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I36df9ca30c7dd2d0039da2377173edb11b1f47dc

Reviewed-on: https://review.gerrithub.io/393680
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Jim Harris 2018-01-04 10:06:02 -07:00
parent 23db0b85fd
commit 0de66bb129

View File

@ -79,7 +79,7 @@ spdk_trace_get_tpoint_group_mask(void)
uint64_t mask = 0x0;
int i;
for (i = 0; i < 64; i++) {
for (i = 0; i < SPDK_TRACE_MAX_GROUP_ID; i++) {
if (spdk_trace_get_tpoint_mask(i) != 0) {
mask |= (1ULL << i);
}