trace: verify tpoint_id does not execeed SPDK_TRACE_MAX_TPOINT_ID
Change-Id: I8b873ba2ebfd8dc4736572206caac11a51ab985e Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/434022 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
9d2f39ab0b
commit
9e2f1bff81
@ -195,6 +195,7 @@ void spdk_trace_record(uint16_t tpoint_id, uint16_t poller_id, uint32_t size,
|
||||
* within the group, the remaining upper bits determine the tracepoint group. Each
|
||||
* tracepoint group has its own tracepoint mask.
|
||||
*/
|
||||
assert(tpoint_id < SPDK_TRACE_MAX_TPOINT_ID);
|
||||
if (g_trace_histories == NULL ||
|
||||
!((1ULL << (tpoint_id & 0x3F)) & g_trace_histories->flags.tpoint_mask[tpoint_id >> 6])) {
|
||||
return;
|
||||
@ -224,6 +225,7 @@ void spdk_trace_record_tsc(uint64_t tsc, uint16_t tpoint_id, uint16_t poller_id,
|
||||
* within the group, the remaining upper bits determine the tracepoint group. Each
|
||||
* tracepoint group has its own tracepoint mask.
|
||||
*/
|
||||
assert(tpoint_id < SPDK_TRACE_MAX_TPOINT_ID);
|
||||
if (g_trace_histories == NULL ||
|
||||
!((1ULL << (tpoint_id & 0x3F)) & g_trace_histories->flags.tpoint_mask[tpoint_id >> 6])) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user