Bug #343 » 0002-introduce-SCPerfSyncCounters-SCPerfSyncCounters-macr.patch
src/app-layer-detect-proto.c | ||
---|---|---|
}
|
||
if (TmThreadsCheckFlag(tv, THV_KILL)) {
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
SCPerfSyncCounters(tv, 0);
|
||
run = 0;
|
||
}
|
||
}
|
src/counters.h | ||
---|---|---|
SCMutex pctmi_lock;
|
||
} SCPerfOPIfaceContext;
|
||
/* the initialization functions */
|
||
void SCPerfInitCounterApi(void);
|
||
void SCPerfSpawnThreads(void);
|
||
... | ... | |
void SCPerfCounterAddUI64(uint16_t, SCPerfCounterArray *, uint64_t);
|
||
void SCPerfCounterAddDouble(uint16_t, SCPerfCounterArray *, double);
|
||
#define SCPerfSyncCounters(tv, reset_lc) \
|
||
SCPerfUpdateCounterArray((tv)->sc_perf_pca, &(tv)->sc_perf_pctx, (reset_lc)); \
|
||
#define SCPerfSyncCountersIfSignalled(tv, reset_lc) \
|
||
do { \
|
||
if ((tv)->sc_perf_pctx.perf_flag == 1) { \
|
||
SCPerfUpdateCounterArray((tv)->sc_perf_pca, &(tv)->sc_perf_pctx, (reset_lc)); \
|
||
} \
|
||
} while (0)
|
||
#endif /* __COUNTERS_H__ */
|
src/cuda-packet-batcher.c | ||
---|---|---|
}
|
||
if (TmThreadsCheckFlag(tv, THV_KILL)) {
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
SCPerfSyncCounters(tv, 0);
|
||
run = 0;
|
||
}
|
||
}
|
src/flow-manager.c | ||
---|---|---|
}
|
||
if (TmThreadsCheckFlag(th_v, THV_KILL)) {
|
||
SCPerfUpdateCounterArray(th_v->sc_perf_pca, &th_v->sc_perf_pctx, 0);
|
||
SCPerfSyncCounters(th_v, 0);
|
||
break;
|
||
}
|
||
src/source-af-packet.c | ||
---|---|---|
ptv->afp_state = AFP_STATE_DOWN;
|
||
continue;
|
||
}
|
||
if (tv->sc_perf_pctx.perf_flag == 1) {
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
}
|
||
SCPerfSyncCountersIfSignalled(tv, 0);
|
||
}
|
||
if (suricata_ctl_flags & SURICATA_STOP ||
|
src/source-pcap-file.c | ||
---|---|---|
EngineStop();
|
||
break;
|
||
}
|
||
if (tv->sc_perf_pctx.perf_flag == 1) {
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
}
|
||
SCPerfSyncCountersIfSignalled(tv, 0);
|
||
}
|
||
SCReturnInt(TM_ECODE_OK);
|
src/source-pcap.c | ||
---|---|---|
break;
|
||
}
|
||
}
|
||
if (tv->sc_perf_pctx.perf_flag == 1) {
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
}
|
||
SCPerfSyncCountersIfSignalled(tv, 0);
|
||
}
|
||
SCReturnInt(TM_ECODE_OK);
|
src/source-pfring.c | ||
---|---|---|
TmqhOutputPacketpool(ptv->tv, p);
|
||
return TM_ECODE_FAILED;
|
||
}
|
||
if (tv->sc_perf_pctx.perf_flag == 1) {
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
}
|
||
SCPerfSyncCountersIfSignalled(tv, 0);
|
||
}
|
||
return TM_ECODE_OK;
|
src/tm-threads.c | ||
---|---|---|
}
|
||
if (TmThreadsCheckFlag(tv, THV_KILL)) {
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
SCPerfSyncCounters(tv, 0);
|
||
run = 0;
|
||
}
|
||
} /* while (run) */
|
||
... | ... | |
}
|
||
if (TmThreadsCheckFlag(tv, THV_KILL)) {
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
SCPerfSyncCounters(tv, 0);
|
||
run = 0;
|
||
}
|
||
} /* while (run) */
|
||
... | ... | |
}
|
||
if (TmThreadsCheckFlag(tv, THV_KILL)) {
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
SCPerfSyncCounters(tv, 0);
|
||
run = 0;
|
||
}
|
||
} /* while (run) */
|
||
... | ... | |
}
|
||
if (TmThreadsCheckFlag(tv, THV_KILL)) {
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
SCPerfSyncCounters(tv, 0);
|
||
run = 0;
|
||
}
|
||
} /* while (run) */
|
||
... | ... | |
run = 0;
|
||
}
|
||
}
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
SCPerfSyncCounters(tv, 0);
|
||
TmThreadWaitForFlag(tv, THV_DEINIT);
|
||
... | ... | |
run = 0;
|
||
}
|
||
} /* while (run) */
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
SCPerfSyncCounters(tv, 0);
|
||
TmThreadWaitForFlag(tv, THV_DEINIT);
|
||
src/tmqh-flow.c | ||
---|---|---|
SCCondWait(&q->cond_q, &q->mutex_q);
|
||
}
|
||
if (tv->sc_perf_pctx.perf_flag == 1)
|
||
SCPerfUpdateCounterArray(tv->sc_perf_pca, &tv->sc_perf_pctx, 0);
|
||
SCPerfSyncCountersIfSignalled(tv, 0);
|
||
if (q->len > 0) {
|
||
Packet *p = PacketDequeue(q);
|
src/tmqh-ringbuffer.c | ||
---|---|---|
Packet *p = (Packet *)RingBufferMrSw8Get(rb);
|
||
if (t->sc_perf_pctx.perf_flag == 1)
|
||
SCPerfUpdateCounterArray(t->sc_perf_pca, &t->sc_perf_pctx, 0);
|
||
SCPerfSyncCountersIfSignalled(t, 0);
|
||
return p;
|
||
}
|
||
... | ... | |
Packet *p = (Packet *)RingBufferSrSw8Get(rb);
|
||
if (t->sc_perf_pctx.perf_flag == 1)
|
||
SCPerfUpdateCounterArray(t->sc_perf_pca, &t->sc_perf_pctx, 0);
|
||
SCPerfSyncCountersIfSignalled(t, 0);
|
||
return p;
|
||
}
|
||
... | ... | |
Packet *p = (Packet *)RingBufferSrMw8Get(rb);
|
||
if (t->sc_perf_pctx.perf_flag == 1)
|
||
SCPerfUpdateCounterArray(t->sc_perf_pca, &t->sc_perf_pctx, 0);
|
||
SCPerfSyncCountersIfSignalled(t, 0);
|
||
return p;
|
||
}
|
src/tmqh-simple.c | ||
---|---|---|
SCCondWait(&q->cond_q, &q->mutex_q);
|
||
}
|
||
if (t->sc_perf_pctx.perf_flag == 1)
|
||
SCPerfUpdateCounterArray(t->sc_perf_pca, &t->sc_perf_pctx, 0);
|
||
SCPerfSyncCountersIfSignalled(t, 0);
|
||
if (q->len > 0) {
|
||
Packet *p = PacketDequeue(q);
|
- « Previous
- 1
- 2
- Next »