mirror of
https://github.com/Zygo/bees.git
synced 2025-05-18 05:45:45 +02:00
context: log dedups with single unbroken log message
When BEESLOGINFO is called multiple times it generates separate log records that can be mixed up when multiple threads dedup. Use a single BEESLOGINFO call for each dedup to prevent this. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
8938caa029
commit
b22db12390
@ -183,8 +183,8 @@ BeesContext::dedup(const BeesRangePair &brp)
|
|||||||
BeesAddress first_addr(brp.first.fd(), brp.first.begin());
|
BeesAddress first_addr(brp.first.fd(), brp.first.begin());
|
||||||
BeesAddress second_addr(brp.second.fd(), brp.second.begin());
|
BeesAddress second_addr(brp.second.fd(), brp.second.begin());
|
||||||
|
|
||||||
BEESLOGINFO("dedup: src " << pretty(brp.first.size()) << " [" << to_hex(brp.first.begin()) << ".." << to_hex(brp.first.end()) << "] {" << first_addr << "} " << name_fd(brp.first.fd()));
|
BEESLOGINFO("dedup: src " << pretty(brp.first.size()) << " [" << to_hex(brp.first.begin()) << ".." << to_hex(brp.first.end()) << "] {" << first_addr << "} " << name_fd(brp.first.fd()) << "\n"
|
||||||
BEESLOGINFO(" dst " << pretty(brp.second.size()) << " [" << to_hex(brp.second.begin()) << ".." << to_hex(brp.second.end()) << "] {" << second_addr << "} " << name_fd(brp.second.fd()));
|
<< " dst " << pretty(brp.second.size()) << " [" << to_hex(brp.second.begin()) << ".." << to_hex(brp.second.end()) << "] {" << second_addr << "} " << name_fd(brp.second.fd()));
|
||||||
|
|
||||||
if (first_addr.get_physical_or_zero() == second_addr.get_physical_or_zero()) {
|
if (first_addr.get_physical_or_zero() == second_addr.get_physical_or_zero()) {
|
||||||
BEESLOGTRACE("equal physical addresses in dedup");
|
BEESLOGTRACE("equal physical addresses in dedup");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user