Enable thread_local in Arcadia build

This commit is contained in:
Yuriy Chernyshov 2021-05-12 13:32:50 +03:00
parent ed3f89a7be
commit 5a2bd0b6ba
3 changed files with 5 additions and 7 deletions

View File

@ -125,7 +125,7 @@ void TasksStatsCounters::incrementProfileEvents(const ::taskstats & prev, const
#endif
#if defined(__linux__) && !defined(ARCADIA_BUILD)
#if defined(__linux__)
namespace DB
{
@ -568,7 +568,7 @@ void PerfDescriptorsHolder::releaseResources()
namespace DB
{
// Not on Linux or in Arcadia: the functionality is disabled.
// the functionality is disabled when we are not running on Linux.
PerfEventsCounters current_thread_counters;
}

View File

@ -140,9 +140,7 @@ private:
}
};
// thread_local is disabled in Arcadia, so we have to use a dummy implementation
// there.
#if defined(__linux__) && !defined(ARCADIA_BUILD)
#if defined(__linux__)
struct PerfEventInfo
{
@ -199,7 +197,7 @@ extern thread_local PerfEventsCounters current_thread_counters;
#else
// Not on Linux, or in Arcadia: the functionality is disabled.
// the functionality is disabled when we are not running on Linux.
struct PerfEventsCounters
{
void initializeProfileEvents(const std::string & /* events_list */) {}
@ -207,7 +205,6 @@ struct PerfEventsCounters
void closeEventDescriptors() {}
};
// thread_local is disabled in Arcadia, so we are going to use a static dummy.
extern PerfEventsCounters current_thread_counters;
#endif

View File

@ -18,6 +18,7 @@ PEERDIR(
contrib/libs/openssl
contrib/libs/poco/NetSSL_OpenSSL
contrib/libs/re2
contrib/libs/cxxsupp/libcxxabi-parts
contrib/restricted/dragonbox
)