Fixed current counter id check

This commit is contained in:
Andrey Skobtsov 2020-05-19 01:29:46 +03:00
parent 04a902ba68
commit f98c53e8d8

View File

@ -271,7 +271,7 @@ void PerfEventsCounters::initializeProfileEvents(PerfEventsCounters & counters)
{
if (current_thread_counters_id.has_value())
{
if (current_thread_counters_id != counters.id)
if (current_thread_counters_id == counters.id)
LOG_WARNING(getLogger(), "Only one instance of `PerfEventsCounters` can be used on the thread");
return;
}