]> git.ipfire.org Git - thirdparty/pdns.git/commit
Our "StatBag" statistics class was 1) 32 bit 2) heavily locked 3) still allowed for...
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 28 Nov 2014 15:14:18 +0000 (16:14 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 28 Nov 2014 15:14:18 +0000 (16:14 +0100)
commit1566533a4319d6d4a8e46e8d8e3f23136ead3b53
treea855efcb5308a28733f9b2dbe15244c703fa34af
parent297bb6acf7902068693a4aae1443c424d0e8dd52
Our "StatBag" statistics class was 1) 32 bit 2) heavily locked 3) still allowed for lock-free operations for high speed counters.
This commit 1) makes the StatBag 64 bit on 64 bit systems, 2) removes all locks and 3) has gone AtomicCounter 'native'
The upshot of this is that 64 bit users will suddenly get 64 bit counters. A second upshot is that multicore systems should now see consistent statistics again.
One important thing that changed is that the StatBag class used to be completely thread safe, and now it no longer is. You can't declare new counters while the StatBag is in use. This should not be happening, but you never know.
Finally, there is now a StatBag unit test.
12 files changed:
pdns/Makefile.am
pdns/common_startup.cc
pdns/dnsproxy.hh
pdns/misc.hh
pdns/nameserver.cc
pdns/packetcache.cc
pdns/packetcache.hh
pdns/packethandler.cc
pdns/statbag.cc
pdns/statbag.hh
pdns/test-statbag_cc.cc [new file with mode: 0644]
pdns/ueberbackend.cc