app.c: respect all/0xffff argument

After a series of recent patches, introducing individual
tracepoint enabling, the "all" and "0xffff" parameters stopped
working (we call spdk_trace_set_tpoints which sets tracepoints only
once, but we need to iterate over all groups in a given mask).

Change-Id: Id31c15dd0f707777f839791566c10728723090ba
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11126
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Krzysztof Karas 2022-01-17 17:07:32 +00:00 committed by Tomasz Zawadzki
parent de4eac2a05
commit b04f51ac62

View File

@ -370,6 +370,7 @@ app_setup_trace(struct spdk_app_opts *opts)
uint64_t tpoint_group_mask, tpoint_mask = -1ULL;
char *end = NULL, *tpoint_group_mask_str, *tpoint_group_str = NULL;
char *tp_g_str, *tpoint_group, *tpoints;
uint64_t group_id;
if (opts->shm_id >= 0) {
snprintf(shm_name, sizeof(shm_name), "/%s_trace.%d", opts->name, opts->shm_id);
@ -434,7 +435,11 @@ app_setup_trace(struct spdk_app_opts *opts)
tpoint_mask = -1ULL;
}
spdk_trace_set_tpoints(spdk_u64log2(tpoint_group_mask), tpoint_mask);
for (group_id = 0; group_id < SPDK_TRACE_MAX_GROUP_ID; ++group_id) {
if (tpoint_group_mask & (1 << group_id)) {
spdk_trace_set_tpoints(group_id, tpoint_mask);
}
}
}
if (tpoint_group_str != NULL) {