mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Remove MOODYCAMEL_QUEUE_INTERNAL_DEBUG.
This commit is contained in:
parent
beaadc3a56
commit
b496f1ff90
@ -246,10 +246,6 @@ namespace
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG
|
|
||||||
#include "internal/concurrentqueue_internal_debug.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace moodycamel {
|
namespace moodycamel {
|
||||||
namespace details {
|
namespace details {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
@ -763,15 +759,6 @@ public:
|
|||||||
implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed);
|
implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed);
|
||||||
populate_initial_implicit_producer_hash();
|
populate_initial_implicit_producer_hash();
|
||||||
populate_initial_block_list(capacity / BLOCK_SIZE + ((capacity & (BLOCK_SIZE - 1)) == 0 ? 0 : 1));
|
populate_initial_block_list(capacity / BLOCK_SIZE + ((capacity & (BLOCK_SIZE - 1)) == 0 ? 0 : 1));
|
||||||
|
|
||||||
#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG
|
|
||||||
// Track all the producers using a fully-resolved typed list for
|
|
||||||
// each kind; this makes it possible to debug them starting from
|
|
||||||
// the root queue object (otherwise wacky casts are needed that
|
|
||||||
// don't compile in the debugger's expression evaluator).
|
|
||||||
explicitProducers.store(nullptr, std::memory_order_relaxed);
|
|
||||||
implicitProducers.store(nullptr, std::memory_order_relaxed);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Computes the correct amount of pre-allocated blocks for you based
|
// Computes the correct amount of pre-allocated blocks for you based
|
||||||
@ -788,11 +775,6 @@ public:
|
|||||||
populate_initial_implicit_producer_hash();
|
populate_initial_implicit_producer_hash();
|
||||||
size_t blocks = (((minCapacity + BLOCK_SIZE - 1) / BLOCK_SIZE) - 1) * (maxExplicitProducers + 1) + 2 * (maxExplicitProducers + maxImplicitProducers);
|
size_t blocks = (((minCapacity + BLOCK_SIZE - 1) / BLOCK_SIZE) - 1) * (maxExplicitProducers + 1) + 2 * (maxExplicitProducers + maxImplicitProducers);
|
||||||
populate_initial_block_list(blocks);
|
populate_initial_block_list(blocks);
|
||||||
|
|
||||||
#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG
|
|
||||||
explicitProducers.store(nullptr, std::memory_order_relaxed);
|
|
||||||
implicitProducers.store(nullptr, std::memory_order_relaxed);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: The queue should not be accessed concurrently while it's
|
// Note: The queue should not be accessed concurrently while it's
|
||||||
@ -871,13 +853,6 @@ public:
|
|||||||
other.nextExplicitConsumerId.store(0, std::memory_order_relaxed);
|
other.nextExplicitConsumerId.store(0, std::memory_order_relaxed);
|
||||||
other.globalExplicitConsumerOffset.store(0, std::memory_order_relaxed);
|
other.globalExplicitConsumerOffset.store(0, std::memory_order_relaxed);
|
||||||
|
|
||||||
#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG
|
|
||||||
explicitProducers.store(other.explicitProducers.load(std::memory_order_relaxed), std::memory_order_relaxed);
|
|
||||||
other.explicitProducers.store(nullptr, std::memory_order_relaxed);
|
|
||||||
implicitProducers.store(other.implicitProducers.load(std::memory_order_relaxed), std::memory_order_relaxed);
|
|
||||||
other.implicitProducers.store(nullptr, std::memory_order_relaxed);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
other.initialBlockPoolIndex.store(0, std::memory_order_relaxed);
|
other.initialBlockPoolIndex.store(0, std::memory_order_relaxed);
|
||||||
other.initialBlockPoolSize = 0;
|
other.initialBlockPoolSize = 0;
|
||||||
other.initialBlockPool = nullptr;
|
other.initialBlockPool = nullptr;
|
||||||
@ -921,11 +896,6 @@ private:
|
|||||||
reown_producers();
|
reown_producers();
|
||||||
other.reown_producers();
|
other.reown_producers();
|
||||||
|
|
||||||
#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG
|
|
||||||
details::swap_relaxed(explicitProducers, other.explicitProducers);
|
|
||||||
details::swap_relaxed(implicitProducers, other.implicitProducers);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2363,12 +2333,6 @@ private:
|
|||||||
size_t pr_blockIndexFront; // Next slot (not current)
|
size_t pr_blockIndexFront; // Next slot (not current)
|
||||||
BlockIndexEntry* pr_blockIndexEntries;
|
BlockIndexEntry* pr_blockIndexEntries;
|
||||||
void* pr_blockIndexRaw;
|
void* pr_blockIndexRaw;
|
||||||
|
|
||||||
#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG
|
|
||||||
public:
|
|
||||||
ExplicitProducer* nextExplicitProducer;
|
|
||||||
private:
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ExplicitProducer* get_explicit_producer(producer_token_t const& token)
|
ExplicitProducer* get_explicit_producer(producer_token_t const& token)
|
||||||
@ -2964,12 +2928,6 @@ private:
|
|||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG
|
|
||||||
public:
|
|
||||||
ImplicitProducer* nextImplicitProducer;
|
|
||||||
private:
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX
|
#if MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX
|
||||||
mutable debug::DebugMutex mutex;
|
mutable debug::DebugMutex mutex;
|
||||||
#endif
|
#endif
|
||||||
@ -3091,21 +3049,6 @@ private:
|
|||||||
producer->next = prevTail;
|
producer->next = prevTail;
|
||||||
} while (!producerListTail.compare_exchange_weak(prevTail, producer, std::memory_order_release, std::memory_order_relaxed));
|
} while (!producerListTail.compare_exchange_weak(prevTail, producer, std::memory_order_release, std::memory_order_relaxed));
|
||||||
|
|
||||||
#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG
|
|
||||||
if (producer->isExplicit) {
|
|
||||||
auto prevTailExplicit = explicitProducers.load(std::memory_order_relaxed);
|
|
||||||
do {
|
|
||||||
static_cast<ExplicitProducer*>(producer)->nextExplicitProducer = prevTailExplicit;
|
|
||||||
} while (!explicitProducers.compare_exchange_weak(prevTailExplicit, static_cast<ExplicitProducer*>(producer), std::memory_order_release, std::memory_order_relaxed));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
auto prevTailImplicit = implicitProducers.load(std::memory_order_relaxed);
|
|
||||||
do {
|
|
||||||
static_cast<ImplicitProducer*>(producer)->nextImplicitProducer = prevTailImplicit;
|
|
||||||
} while (!implicitProducers.compare_exchange_weak(prevTailImplicit, static_cast<ImplicitProducer*>(producer), std::memory_order_release, std::memory_order_relaxed));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return producer;
|
return producer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3475,11 +3418,6 @@ private:
|
|||||||
#if MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH
|
#if MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH
|
||||||
debug::DebugMutex implicitProdMutex;
|
debug::DebugMutex implicitProdMutex;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG
|
|
||||||
std::atomic<ExplicitProducer*> explicitProducers;
|
|
||||||
std::atomic<ImplicitProducer*> implicitProducers;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user