]> git.ipfire.org Git - people/ms/suricata.git/commit
profiling: fix profiling with sample rate
authorEric Leblond <el@stamus-networks.com>
Wed, 17 Nov 2021 15:43:23 +0000 (16:43 +0100)
committerVictor Julien <vjulien@oisf.net>
Fri, 19 Nov 2021 16:41:13 +0000 (17:41 +0100)
commit6d5f59696dda77e1e7b2c45f51413b76690da4e9
treee32a13cb68e6e18515f0a92b8a366862ea57162c
parent16f4e5f31c954b50d878e4579a5feeebc04444dd
profiling: fix profiling with sample rate

Rules profiling was returning invalid results when used with sample
rate. The problem was that the sample condition was run twice in the
packet flow. As a result, the second pass was not initializing the
variable storing the initial CPU ticks and the resulting performance
counters were reporting invalid values.

Bug: #4836.
src/util-profiling.c