diff options
| author | Stefan Boberg <[email protected]> | 2023-12-19 10:55:11 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-19 10:55:11 +0100 |
| commit | 7451d3ab8aa7be6405b6bbbe5e17dcb3ea29e766 (patch) | |
| tree | 67b166d09365c45c43d7d446a6f0816c1428274b /src | |
| parent | various TSAN/ASAN/LeakAnalyzer fixes (#622) (diff) | |
| download | zen-7451d3ab8aa7be6405b6bbbe5e17dcb3ea29e766.tar.xz zen-7451d3ab8aa7be6405b6bbbe5e17dcb3ea29e766.zip | |
ensure we can build without trace (#619)
`xmake config -zentrace=n` would previously not build cleanly
Diffstat (limited to 'src')
| -rw-r--r-- | src/zencore/include/zencore/trace.h | 1 | ||||
| -rw-r--r-- | src/zencore/workthreadpool.cpp | 4 | ||||
| -rw-r--r-- | src/zenhttp/httpshared.cpp | 4 | ||||
| -rw-r--r-- | src/zenserver/config.cpp | 2 | ||||
| -rw-r--r-- | src/zenserver/projectstore/projectstore.cpp | 4 |
5 files changed, 13 insertions, 2 deletions
diff --git a/src/zencore/include/zencore/trace.h b/src/zencore/include/zencore/trace.h index 2d4c1e610..89e4b76bf 100644 --- a/src/zencore/include/zencore/trace.h +++ b/src/zencore/include/zencore/trace.h @@ -35,6 +35,7 @@ bool TraceStop(); #else #define ZEN_TRACE_CPU(x) +#define ZEN_TRACE_CPU_FLUSH(x) #endif // ZEN_WITH_TRACE diff --git a/src/zencore/workthreadpool.cpp b/src/zencore/workthreadpool.cpp index 6ff6463dd..16b2310ff 100644 --- a/src/zencore/workthreadpool.cpp +++ b/src/zencore/workthreadpool.cpp @@ -132,7 +132,9 @@ struct WorkerThreadPool::Impl Impl(int InThreadCount, std::string_view WorkerThreadBaseName) : m_WorkerThreadBaseName(WorkerThreadBaseName) { +# if ZEN_WITH_TRACE trace::ThreadGroupBegin(m_WorkerThreadBaseName.c_str()); +# endif zen::Latch WorkerLatch{InThreadCount}; @@ -143,7 +145,9 @@ struct WorkerThreadPool::Impl WorkerLatch.Wait(); +# if ZEN_WITH_TRACE trace::ThreadGroupEnd(); +# endif } ~Impl() diff --git a/src/zenhttp/httpshared.cpp b/src/zenhttp/httpshared.cpp index 5421fcba5..ca014bf1c 100644 --- a/src/zenhttp/httpshared.cpp +++ b/src/zenhttp/httpshared.cpp @@ -19,6 +19,10 @@ #include <span> #include <vector> +#if ZEN_PLATFORM_WINDOWS +# include <zencore/windows.h> +#endif + ZEN_THIRD_PARTY_INCLUDES_START #include <tsl/robin_map.h> ZEN_THIRD_PARTY_INCLUDES_END diff --git a/src/zenserver/config.cpp b/src/zenserver/config.cpp index e3286bfb8..012925b51 100644 --- a/src/zenserver/config.cpp +++ b/src/zenserver/config.cpp @@ -429,9 +429,11 @@ ParseConfigFile(const std::filesystem::path& Path, ServerOptions.HttpServerConfig.HttpSys.IsRequestLoggingEnabled, "httpsys-enable-request-logging"sv); +#if ZEN_WITH_TRACE ////// trace LuaOptions.AddOption("trace.host"sv, ServerOptions.TraceHost, "tracehost"sv); LuaOptions.AddOption("trace.file"sv, ServerOptions.TraceFile, "tracefile"sv); +#endif ////// stats LuaOptions.AddOption("stats.enable"sv, ServerOptions.StatsConfig.Enabled); diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index 2ee791a74..b7507bd17 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -3660,11 +3660,11 @@ namespace testutils { return Result; } - uint64_t GetCompressedOffset(const CompressedBuffer& Buffer, uint64 RawOffset) + uint64_t GetCompressedOffset(const CompressedBuffer& Buffer, uint64_t RawOffset) { if (RawOffset > 0) { - uint64 BlockSize = 0; + uint64_t BlockSize = 0; OodleCompressor Compressor; OodleCompressionLevel CompressionLevel; if (!Buffer.TryGetCompressParameters(Compressor, CompressionLevel, BlockSize)) |