detect: optimize struct layout

Move reference count to top of DetectEngineThreadCtx, to move it to the
same cache line as the other members that are checked first in Detect().
pull/9999/head
Victor Julien 1 year ago committed by Victor Julien
parent 53591702aa
commit 0014077a36

@ -1082,6 +1082,8 @@ typedef struct DetectEngineThreadCtx_ {
* on this being the first member */
uint32_t tenant_id;
SC_ATOMIC_DECLARE(int, so_far_used_by_detect);
/* the thread to which this detection engine thread belongs */
ThreadVars *tv;
@ -1157,8 +1159,6 @@ typedef struct DetectEngineThreadCtx_ {
uint16_t alert_queue_capacity;
PacketAlert *alert_queue;
SC_ATOMIC_DECLARE(int, so_far_used_by_detect);
/** array of signature pointers we're going to inspect in the detection
* loop. */
Signature **match_array;

Loading…
Cancel
Save