mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Drop support for Cygwin.
This commit is contained in:
parent
12f693372a
commit
07bc665d8c
4
NEWS
4
NEWS
@ -6,7 +6,9 @@ here.
|
|||||||
v0.x.x (xxxx-xx-xx)
|
v0.x.x (xxxx-xx-xx)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
- Cygwin and Mingw are deprecated due to lack of interest.
|
- Support for Cygwin has been dropped. It was not working for a very long
|
||||||
|
time and nobody had complained about it.
|
||||||
|
- Mingw is deprecated due to lack of interest.
|
||||||
- Added TRACY_NO_CALLSTACK_INLINES macro to disable inline functions
|
- Added TRACY_NO_CALLSTACK_INLINES macro to disable inline functions
|
||||||
resolution in call stacks on Windows.
|
resolution in call stacks on Windows.
|
||||||
- Limited client query response rate.
|
- Limited client query response rate.
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
VkTimeDomainEXT data[4];
|
VkTimeDomainEXT data[4];
|
||||||
_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( physdev, &num, data );
|
_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( physdev, &num, data );
|
||||||
VkTimeDomainEXT supportedDomain = VK_TIME_DOMAIN_MAX_ENUM_EXT;
|
VkTimeDomainEXT supportedDomain = VK_TIME_DOMAIN_MAX_ENUM_EXT;
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
supportedDomain = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT;
|
supportedDomain = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT;
|
||||||
#elif defined __linux__ && defined CLOCK_MONOTONIC_RAW
|
#elif defined __linux__ && defined CLOCK_MONOTONIC_RAW
|
||||||
supportedDomain = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT;
|
supportedDomain = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT;
|
||||||
@ -155,7 +155,7 @@ public:
|
|||||||
}
|
}
|
||||||
m_deviation = minDeviation * 3 / 2;
|
m_deviation = minDeviation * 3 / 2;
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
m_qpcToNs = int64_t( 1000000000. / GetFrequencyQpc() );
|
m_qpcToNs = int64_t( 1000000000. / GetFrequencyQpc() );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ private:
|
|||||||
}
|
}
|
||||||
while( deviation > m_deviation );
|
while( deviation > m_deviation );
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
tGpu = ts[0];
|
tGpu = ts[0];
|
||||||
tCpu = ts[1] * m_qpcToNs;
|
tCpu = ts[1] * m_qpcToNs;
|
||||||
#elif defined __linux__ && defined CLOCK_MONOTONIC_RAW
|
#elif defined __linux__ && defined CLOCK_MONOTONIC_RAW
|
||||||
|
@ -115,7 +115,7 @@ extern "C"
|
|||||||
t_SymGetLineFromInlineContext _SymGetLineFromInlineContext = 0;
|
t_SymGetLineFromInlineContext _SymGetLineFromInlineContext = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __CYGWIN__
|
|
||||||
struct ModuleCache
|
struct ModuleCache
|
||||||
{
|
{
|
||||||
uint64_t start;
|
uint64_t start;
|
||||||
@ -134,7 +134,7 @@ struct KernelDriver
|
|||||||
|
|
||||||
KernelDriver* s_krnlCache = nullptr;
|
KernelDriver* s_krnlCache = nullptr;
|
||||||
size_t s_krnlCacheCnt;
|
size_t s_krnlCacheCnt;
|
||||||
#endif
|
|
||||||
|
|
||||||
void InitCallstack()
|
void InitCallstack()
|
||||||
{
|
{
|
||||||
@ -152,7 +152,6 @@ void InitCallstack()
|
|||||||
SymInitialize( GetCurrentProcess(), nullptr, true );
|
SymInitialize( GetCurrentProcess(), nullptr, true );
|
||||||
SymSetOptions( SYMOPT_LOAD_LINES );
|
SymSetOptions( SYMOPT_LOAD_LINES );
|
||||||
|
|
||||||
#ifndef __CYGWIN__
|
|
||||||
DWORD needed;
|
DWORD needed;
|
||||||
LPVOID dev[4096];
|
LPVOID dev[4096];
|
||||||
if( EnumDeviceDrivers( dev, sizeof(dev), &needed ) != 0 )
|
if( EnumDeviceDrivers( dev, sizeof(dev), &needed ) != 0 )
|
||||||
@ -231,7 +230,6 @@ void InitCallstack()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TRACY_DBGHELP_LOCK
|
#ifdef TRACY_DBGHELP_LOCK
|
||||||
DBGHELP_UNLOCK;
|
DBGHELP_UNLOCK;
|
||||||
@ -278,7 +276,6 @@ static const char* GetModuleName( uint64_t addr )
|
|||||||
{
|
{
|
||||||
if( ( addr >> 63 ) != 0 )
|
if( ( addr >> 63 ) != 0 )
|
||||||
{
|
{
|
||||||
#ifndef __CYGWIN__
|
|
||||||
if( s_krnlCache )
|
if( s_krnlCache )
|
||||||
{
|
{
|
||||||
auto it = std::lower_bound( s_krnlCache, s_krnlCache + s_krnlCacheCnt, addr, []( const KernelDriver& lhs, const uint64_t& rhs ) { return lhs.addr > rhs; } );
|
auto it = std::lower_bound( s_krnlCache, s_krnlCache + s_krnlCacheCnt, addr, []( const KernelDriver& lhs, const uint64_t& rhs ) { return lhs.addr > rhs; } );
|
||||||
@ -287,11 +284,9 @@ static const char* GetModuleName( uint64_t addr )
|
|||||||
return it->mod;
|
return it->mod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return "<kernel>";
|
return "<kernel>";
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __CYGWIN__
|
|
||||||
for( auto& v : *s_modCache )
|
for( auto& v : *s_modCache )
|
||||||
{
|
{
|
||||||
if( addr >= v.start && addr < v.end )
|
if( addr >= v.start && addr < v.end )
|
||||||
@ -338,8 +333,6 @@ static const char* GetModuleName( uint64_t addr )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return "[unknown]";
|
return "[unknown]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#ifndef __TRACYCALLSTACK_H__
|
#ifndef __TRACYCALLSTACK_H__
|
||||||
#define __TRACYCALLSTACK_H__
|
#define __TRACYCALLSTACK_H__
|
||||||
|
|
||||||
#if !defined _WIN32 && !defined __CYGWIN__
|
#if !defined _WIN32
|
||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
# define TRACY_HAS_CALLSTACK 1
|
# define TRACY_HAS_CALLSTACK 1
|
||||||
#elif defined __ANDROID__
|
#elif defined __ANDROID__
|
||||||
# if !defined __arm__ || __ANDROID_API__ >= 21
|
# if !defined __arm__ || __ANDROID_API__ >= 21
|
||||||
|
@ -14,12 +14,6 @@
|
|||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
|
||||||
# include <windows.h>
|
|
||||||
# include <unistd.h>
|
|
||||||
# include <tlhelp32.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
#ifdef _GNU_SOURCE
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
@ -95,7 +89,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
# include <lmcons.h>
|
# include <lmcons.h>
|
||||||
extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW );
|
extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW );
|
||||||
extern "C" typedef BOOL (WINAPI *t_GetLogicalProcessorInformationEx)( LOGICAL_PROCESSOR_RELATIONSHIP, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, PDWORD );
|
extern "C" typedef BOOL (WINAPI *t_GetLogicalProcessorInformationEx)( LOGICAL_PROCESSOR_RELATIONSHIP, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, PDWORD );
|
||||||
@ -108,11 +102,11 @@ extern "C" typedef BOOL (WINAPI *t_GetLogicalProcessorInformationEx)( LOGICAL_PR
|
|||||||
# include <sys/utsname.h>
|
# include <sys/utsname.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined _WIN32 && !defined __CYGWIN__ && ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
|
#if !defined _WIN32 && ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
|
||||||
# include <cpuid.h>
|
# include <cpuid.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !( ( ( defined _WIN32 || defined __CYGWIN__ ) && _WIN32_WINNT >= _WIN32_WINNT_VISTA ) || defined __linux__ )
|
#if !( ( defined _WIN32 && _WIN32_WINNT >= _WIN32_WINNT_VISTA ) || defined __linux__ )
|
||||||
# include <mutex>
|
# include <mutex>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -142,7 +136,7 @@ struct ThreadHandleWrapper
|
|||||||
static inline void CpuId( uint32_t* regs, uint32_t leaf )
|
static inline void CpuId( uint32_t* regs, uint32_t leaf )
|
||||||
{
|
{
|
||||||
memset(regs, 0, sizeof(uint32_t) * 4);
|
memset(regs, 0, sizeof(uint32_t) * 4);
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
__cpuidex( (int*)regs, leaf, 0 );
|
__cpuidex( (int*)regs, leaf, 0 );
|
||||||
#else
|
#else
|
||||||
__get_cpuid( leaf, regs, regs+1, regs+2, regs+3 );
|
__get_cpuid( leaf, regs, regs+1, regs+2, regs+3 );
|
||||||
@ -151,7 +145,7 @@ static inline void CpuId( uint32_t* regs, uint32_t leaf )
|
|||||||
|
|
||||||
static void InitFailure( const char* msg )
|
static void InitFailure( const char* msg )
|
||||||
{
|
{
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
bool hasConsole = false;
|
bool hasConsole = false;
|
||||||
bool reopen = false;
|
bool reopen = false;
|
||||||
const auto attached = AttachConsole( ATTACH_PARENT_PROCESS );
|
const auto attached = AttachConsole( ATTACH_PARENT_PROCESS );
|
||||||
@ -199,7 +193,7 @@ static int64_t SetupHwTimer()
|
|||||||
const char* noCheck = GetEnvVar( "TRACY_NO_INVARIANT_CHECK" );
|
const char* noCheck = GetEnvVar( "TRACY_NO_INVARIANT_CHECK" );
|
||||||
if( !noCheck || noCheck[0] != '1' )
|
if( !noCheck || noCheck[0] != '1' )
|
||||||
{
|
{
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
InitFailure( "CPU doesn't support invariant TSC.\nDefine TRACY_NO_INVARIANT_CHECK=1 to ignore this error, *if you know what you are doing*.\nAlternatively you may rebuild the application with the TRACY_TIMER_QPC or TRACY_TIMER_FALLBACK define to use lower resolution timer." );
|
InitFailure( "CPU doesn't support invariant TSC.\nDefine TRACY_NO_INVARIANT_CHECK=1 to ignore this error, *if you know what you are doing*.\nAlternatively you may rebuild the application with the TRACY_TIMER_QPC or TRACY_TIMER_FALLBACK define to use lower resolution timer." );
|
||||||
#else
|
#else
|
||||||
InitFailure( "CPU doesn't support invariant TSC.\nDefine TRACY_NO_INVARIANT_CHECK=1 to ignore this error, *if you know what you are doing*.\nAlternatively you may rebuild the application with the TRACY_TIMER_FALLBACK define to use lower resolution timer." );
|
InitFailure( "CPU doesn't support invariant TSC.\nDefine TRACY_NO_INVARIANT_CHECK=1 to ignore this error, *if you know what you are doing*.\nAlternatively you may rebuild the application with the TRACY_TIMER_FALLBACK define to use lower resolution timer." );
|
||||||
@ -233,7 +227,7 @@ static const char* GetProcessName()
|
|||||||
auto buf = getprogname();
|
auto buf = getprogname();
|
||||||
if( buf ) processName = buf;
|
if( buf ) processName = buf;
|
||||||
# endif
|
# endif
|
||||||
#elif defined _GNU_SOURCE || defined __CYGWIN__
|
#elif defined _GNU_SOURCE
|
||||||
if( program_invocation_short_name ) processName = program_invocation_short_name;
|
if( program_invocation_short_name ) processName = program_invocation_short_name;
|
||||||
#elif defined __APPLE__ || defined BSD
|
#elif defined __APPLE__ || defined BSD
|
||||||
auto buf = getprogname();
|
auto buf = getprogname();
|
||||||
@ -250,7 +244,7 @@ static const char* GetProcessExecutablePath()
|
|||||||
return buf;
|
return buf;
|
||||||
#elif defined __ANDROID__
|
#elif defined __ANDROID__
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#elif defined _GNU_SOURCE || defined __CYGWIN__
|
#elif defined _GNU_SOURCE
|
||||||
return program_invocation_name;
|
return program_invocation_name;
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
static char buf[1024];
|
static char buf[1024];
|
||||||
@ -304,13 +298,11 @@ static const char* GetHostInfo()
|
|||||||
{
|
{
|
||||||
static char buf[1024];
|
static char buf[1024];
|
||||||
auto ptr = buf;
|
auto ptr = buf;
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
t_RtlGetVersion RtlGetVersion = (t_RtlGetVersion)GetProcAddress( GetModuleHandleA( "ntdll.dll" ), "RtlGetVersion" );
|
t_RtlGetVersion RtlGetVersion = (t_RtlGetVersion)GetProcAddress( GetModuleHandleA( "ntdll.dll" ), "RtlGetVersion" );
|
||||||
if( !RtlGetVersion )
|
if( !RtlGetVersion )
|
||||||
{
|
{
|
||||||
# ifdef __CYGWIN__
|
# ifdef __MINGW32__
|
||||||
ptr += sprintf( ptr, "OS: Windows (Cygwin)\n" );
|
|
||||||
# elif defined __MINGW32__
|
|
||||||
ptr += sprintf( ptr, "OS: Windows (MingW)\n" );
|
ptr += sprintf( ptr, "OS: Windows (MingW)\n" );
|
||||||
# else
|
# else
|
||||||
ptr += sprintf( ptr, "OS: Windows\n" );
|
ptr += sprintf( ptr, "OS: Windows\n" );
|
||||||
@ -321,9 +313,7 @@ static const char* GetHostInfo()
|
|||||||
RTL_OSVERSIONINFOW ver = { sizeof( RTL_OSVERSIONINFOW ) };
|
RTL_OSVERSIONINFOW ver = { sizeof( RTL_OSVERSIONINFOW ) };
|
||||||
RtlGetVersion( &ver );
|
RtlGetVersion( &ver );
|
||||||
|
|
||||||
# ifdef __CYGWIN__
|
# ifdef __MINGW32__
|
||||||
ptr += sprintf( ptr, "OS: Windows %i.%i.%i (Cygwin)\n", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber );
|
|
||||||
# elif defined __MINGW32__
|
|
||||||
ptr += sprintf( ptr, "OS: Windows %i.%i.%i (MingW)\n", (int)ver.dwMajorVersion, (int)ver.dwMinorVersion, (int)ver.dwBuildNumber );
|
ptr += sprintf( ptr, "OS: Windows %i.%i.%i (MingW)\n", (int)ver.dwMajorVersion, (int)ver.dwMinorVersion, (int)ver.dwBuildNumber );
|
||||||
# else
|
# else
|
||||||
ptr += sprintf( ptr, "OS: Windows %i.%i.%i\n", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber );
|
ptr += sprintf( ptr, "OS: Windows %i.%i.%i\n", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber );
|
||||||
@ -371,10 +361,9 @@ static const char* GetHostInfo()
|
|||||||
ptr += sprintf( ptr, "Compiler: unknown\n" );
|
ptr += sprintf( ptr, "Compiler: unknown\n" );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
# ifndef __CYGWIN__
|
|
||||||
InitWinSock();
|
InitWinSock();
|
||||||
# endif
|
|
||||||
char hostname[512];
|
char hostname[512];
|
||||||
gethostname( hostname, 512 );
|
gethostname( hostname, 512 );
|
||||||
|
|
||||||
@ -492,7 +481,7 @@ static const char* GetHostInfo()
|
|||||||
|
|
||||||
ptr += sprintf( ptr, "CPU cores: %i\n", std::thread::hardware_concurrency() );
|
ptr += sprintf( ptr, "CPU cores: %i\n", std::thread::hardware_concurrency() );
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
MEMORYSTATUSEX statex;
|
MEMORYSTATUSEX statex;
|
||||||
statex.dwLength = sizeof( statex );
|
statex.dwLength = sizeof( statex );
|
||||||
GlobalMemoryStatusEx( &statex );
|
GlobalMemoryStatusEx( &statex );
|
||||||
@ -524,7 +513,7 @@ static const char* GetHostInfo()
|
|||||||
|
|
||||||
static uint64_t GetPid()
|
static uint64_t GetPid()
|
||||||
{
|
{
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
return uint64_t( GetCurrentProcessId() );
|
return uint64_t( GetCurrentProcessId() );
|
||||||
#else
|
#else
|
||||||
return uint64_t( getpid() );
|
return uint64_t( getpid() );
|
||||||
@ -562,7 +551,7 @@ static BroadcastMessage& GetBroadcastMessage( const char* procname, size_t pnsz,
|
|||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
static DWORD s_profilerThreadId = 0;
|
static DWORD s_profilerThreadId = 0;
|
||||||
static char s_crashText[1024];
|
static char s_crashText[1024];
|
||||||
|
|
||||||
@ -914,7 +903,7 @@ TRACY_API bool ProfilerAvailable() { return s_instance != nullptr; }
|
|||||||
|
|
||||||
TRACY_API int64_t GetFrequencyQpc()
|
TRACY_API int64_t GetFrequencyQpc()
|
||||||
{
|
{
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
LARGE_INTEGER t;
|
LARGE_INTEGER t;
|
||||||
QueryPerformanceFrequency( &t );
|
QueryPerformanceFrequency( &t );
|
||||||
return t.QuadPart;
|
return t.QuadPart;
|
||||||
@ -1127,12 +1116,7 @@ TRACY_API int64_t GetInitTime() { return s_initTime.val; }
|
|||||||
TRACY_API std::atomic<uint32_t>& GetLockCounter() { return s_lockCounter; }
|
TRACY_API std::atomic<uint32_t>& GetLockCounter() { return s_lockCounter; }
|
||||||
TRACY_API std::atomic<uint8_t>& GetGpuCtxCounter() { return s_gpuCtxCounter; }
|
TRACY_API std::atomic<uint8_t>& GetGpuCtxCounter() { return s_gpuCtxCounter; }
|
||||||
TRACY_API GpuCtxWrapper& GetGpuCtx() { return s_gpuCtx; }
|
TRACY_API GpuCtxWrapper& GetGpuCtx() { return s_gpuCtx; }
|
||||||
# ifdef __CYGWIN__
|
|
||||||
// Hackfix for cygwin reporting memory frees without matching allocations. WTF?
|
|
||||||
TRACY_API uint64_t GetThreadHandle() { return detail::GetThreadHandleImpl(); }
|
|
||||||
# else
|
|
||||||
TRACY_API uint64_t GetThreadHandle() { return s_threadHandle.val; }
|
TRACY_API uint64_t GetThreadHandle() { return s_threadHandle.val; }
|
||||||
# endif
|
|
||||||
|
|
||||||
std::atomic<ThreadNameData*>& GetThreadNameData() { return s_threadNameData; }
|
std::atomic<ThreadNameData*>& GetThreadNameData() { return s_threadNameData; }
|
||||||
|
|
||||||
@ -1229,7 +1213,7 @@ void Profiler::SpawnWorkerThreads()
|
|||||||
new(s_compressThread) Thread( LaunchCompressWorker, this );
|
new(s_compressThread) Thread( LaunchCompressWorker, this );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
s_profilerThreadId = GetThreadId( s_thread->Handle() );
|
s_profilerThreadId = GetThreadId( s_thread->Handle() );
|
||||||
m_exceptionHandler = AddVectoredExceptionHandler( 1, CrashFilter );
|
m_exceptionHandler = AddVectoredExceptionHandler( 1, CrashFilter );
|
||||||
#endif
|
#endif
|
||||||
@ -1263,7 +1247,7 @@ Profiler::~Profiler()
|
|||||||
{
|
{
|
||||||
m_shutdown.store( true, std::memory_order_relaxed );
|
m_shutdown.store( true, std::memory_order_relaxed );
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
if( m_crashHandlerInstalled ) RemoveVectoredExceptionHandler( m_exceptionHandler );
|
if( m_crashHandlerInstalled ) RemoveVectoredExceptionHandler( m_exceptionHandler );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2899,7 +2883,7 @@ void Profiler::ReportTopology()
|
|||||||
uint32_t thread;
|
uint32_t thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
t_GetLogicalProcessorInformationEx _GetLogicalProcessorInformationEx = (t_GetLogicalProcessorInformationEx)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetLogicalProcessorInformationEx" );
|
t_GetLogicalProcessorInformationEx _GetLogicalProcessorInformationEx = (t_GetLogicalProcessorInformationEx)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetLogicalProcessorInformationEx" );
|
||||||
if( !_GetLogicalProcessorInformationEx ) return;
|
if( !_GetLogicalProcessorInformationEx ) return;
|
||||||
|
|
||||||
@ -3344,7 +3328,7 @@ void Profiler::SendCodeLocation( uint64_t ptr )
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ( defined _WIN32 || defined __CYGWIN__ ) && defined TRACY_TIMER_QPC
|
#if defined _WIN32 && defined TRACY_TIMER_QPC
|
||||||
int64_t Profiler::GetTimeQpc()
|
int64_t Profiler::GetTimeQpc()
|
||||||
{
|
{
|
||||||
LARGE_INTEGER t;
|
LARGE_INTEGER t;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "../common/TracyMutex.hpp"
|
#include "../common/TracyMutex.hpp"
|
||||||
#include "../common/TracyProtocol.hpp"
|
#include "../common/TracyProtocol.hpp"
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
# include <intrin.h>
|
# include <intrin.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
@ -25,7 +25,7 @@
|
|||||||
# include <mach/mach_time.h>
|
# include <mach/mach_time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined TRACY_TIMER_FALLBACK && ( defined _WIN32 || defined __CYGWIN__ || ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 ) || ( defined TARGET_OS_IOS && TARGET_OS_IOS == 1 ) )
|
#if !defined TRACY_TIMER_FALLBACK && ( defined _WIN32 || ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 ) || ( defined TARGET_OS_IOS && TARGET_OS_IOS == 1 ) )
|
||||||
# define TRACY_HW_TIMER
|
# define TRACY_HW_TIMER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ public:
|
|||||||
#ifdef TRACY_HW_TIMER
|
#ifdef TRACY_HW_TIMER
|
||||||
# if defined TARGET_OS_IOS && TARGET_OS_IOS == 1
|
# if defined TARGET_OS_IOS && TARGET_OS_IOS == 1
|
||||||
return mach_absolute_time();
|
return mach_absolute_time();
|
||||||
# elif defined _WIN32 || defined __CYGWIN__
|
# elif defined _WIN32
|
||||||
# ifdef TRACY_TIMER_QPC
|
# ifdef TRACY_TIMER_QPC
|
||||||
return GetTimeQpc();
|
return GetTimeQpc();
|
||||||
# else
|
# else
|
||||||
@ -748,7 +748,7 @@ private:
|
|||||||
GetProfiler().m_serialQueue.commit_next();
|
GetProfiler().m_serialQueue.commit_next();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ( defined _WIN32 || defined __CYGWIN__ ) && defined TRACY_TIMER_QPC
|
#if defined _WIN32 && defined TRACY_TIMER_QPC
|
||||||
static int64_t GetTimeQpc();
|
static int64_t GetTimeQpc();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -812,7 +812,7 @@ private:
|
|||||||
char* m_queryData;
|
char* m_queryData;
|
||||||
char* m_queryDataPtr;
|
char* m_queryDataPtr;
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
void* m_exceptionHandler;
|
void* m_exceptionHandler;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#ifdef TRACY_HAS_SYSTIME
|
#ifdef TRACY_HAS_SYSTIME
|
||||||
|
|
||||||
# if defined _WIN32 || defined __CYGWIN__
|
# if defined _WIN32
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# elif defined __linux__
|
# elif defined __linux__
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
# if defined _WIN32 || defined __CYGWIN__
|
# if defined _WIN32
|
||||||
|
|
||||||
static inline uint64_t ConvertTime( const FILETIME& t )
|
static inline uint64_t ConvertTime( const FILETIME& t )
|
||||||
{
|
{
|
||||||
@ -95,7 +95,7 @@ float SysTime::Get()
|
|||||||
const auto diffIdle = idle - oldIdle;
|
const auto diffIdle = idle - oldIdle;
|
||||||
const auto diffUsed = used - oldUsed;
|
const auto diffUsed = used - oldUsed;
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
return diffUsed == 0 ? -1 : ( diffUsed - diffIdle ) * 100.f / diffUsed;
|
return diffUsed == 0 ? -1 : ( diffUsed - diffIdle ) * 100.f / diffUsed;
|
||||||
#elif defined __linux__ || defined __APPLE__ || defined BSD
|
#elif defined __linux__ || defined __APPLE__ || defined BSD
|
||||||
const auto total = diffUsed + diffIdle;
|
const auto total = diffUsed + diffIdle;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef __TRACYSYSTIME_HPP__
|
#ifndef __TRACYSYSTIME_HPP__
|
||||||
#define __TRACYSYSTIME_HPP__
|
#define __TRACYSYSTIME_HPP__
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__ || defined __linux__ || defined __APPLE__
|
#if defined _WIN32 || defined __linux__ || defined __APPLE__
|
||||||
# define TRACY_HAS_SYSTIME
|
# define TRACY_HAS_SYSTIME
|
||||||
#else
|
#else
|
||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#ifdef TRACY_HAS_SYSTEM_TRACING
|
#ifdef TRACY_HAS_SYSTEM_TRACING
|
||||||
|
|
||||||
#ifndef TRACY_SAMPLING_HZ
|
#ifndef TRACY_SAMPLING_HZ
|
||||||
# if defined _WIN32 || defined __CYGWIN__
|
# if defined _WIN32
|
||||||
# define TRACY_SAMPLING_HZ 8000
|
# define TRACY_SAMPLING_HZ 8000
|
||||||
# elif defined __linux__
|
# elif defined __linux__
|
||||||
# define TRACY_SAMPLING_HZ 10000
|
# define TRACY_SAMPLING_HZ 10000
|
||||||
@ -17,7 +17,7 @@ namespace tracy
|
|||||||
|
|
||||||
static constexpr int GetSamplingFrequency()
|
static constexpr int GetSamplingFrequency()
|
||||||
{
|
{
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
return TRACY_SAMPLING_HZ > 8000 ? 8000 : ( TRACY_SAMPLING_HZ < 1 ? 1 : TRACY_SAMPLING_HZ );
|
return TRACY_SAMPLING_HZ > 8000 ? 8000 : ( TRACY_SAMPLING_HZ < 1 ? 1 : TRACY_SAMPLING_HZ );
|
||||||
#else
|
#else
|
||||||
return TRACY_SAMPLING_HZ > 1000000 ? 1000000 : ( TRACY_SAMPLING_HZ < 1 ? 1 : TRACY_SAMPLING_HZ );
|
return TRACY_SAMPLING_HZ > 1000000 ? 1000000 : ( TRACY_SAMPLING_HZ < 1 ? 1 : TRACY_SAMPLING_HZ );
|
||||||
@ -31,7 +31,7 @@ static constexpr int GetSamplingPeriod()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# if defined _WIN32 || defined __CYGWIN__
|
# if defined _WIN32
|
||||||
|
|
||||||
# ifndef NOMINMAX
|
# ifndef NOMINMAX
|
||||||
# define NOMINMAX
|
# define NOMINMAX
|
||||||
@ -129,14 +129,6 @@ struct VSyncInfo
|
|||||||
uint64_t flipFenceId;
|
uint64_t flipFenceId;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
|
||||||
extern "C" typedef DWORD (WINAPI *t_GetProcessIdOfThread)( HANDLE );
|
|
||||||
extern "C" typedef DWORD (WINAPI *t_GetProcessImageFileNameA)( HANDLE, LPSTR, DWORD );
|
|
||||||
extern "C" ULONG WMIAPI TraceSetInformation(TRACEHANDLE SessionHandle, TRACE_INFO_CLASS InformationClass, PVOID TraceInformation, ULONG InformationLength);
|
|
||||||
t_GetProcessIdOfThread GetProcessIdOfThread = (t_GetProcessIdOfThread)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetProcessIdOfThread" );
|
|
||||||
t_GetProcessImageFileNameA GetProcessImageFileNameA = (t_GetProcessImageFileNameA)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "K32GetProcessImageFileNameA" );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern "C" typedef NTSTATUS (WINAPI *t_NtQueryInformationThread)( HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG );
|
extern "C" typedef NTSTATUS (WINAPI *t_NtQueryInformationThread)( HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG );
|
||||||
extern "C" typedef BOOL (WINAPI *t_EnumProcessModules)( HANDLE, HMODULE*, DWORD, LPDWORD );
|
extern "C" typedef BOOL (WINAPI *t_EnumProcessModules)( HANDLE, HMODULE*, DWORD, LPDWORD );
|
||||||
extern "C" typedef BOOL (WINAPI *t_GetModuleInformation)( HANDLE, HMODULE, LPMODULEINFO, DWORD );
|
extern "C" typedef BOOL (WINAPI *t_GetModuleInformation)( HANDLE, HMODULE, LPMODULEINFO, DWORD );
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef __TRACYSYSTRACE_HPP__
|
#ifndef __TRACYSYSTRACE_HPP__
|
||||||
#define __TRACYSYSTRACE_HPP__
|
#define __TRACYSYSTRACE_HPP__
|
||||||
|
|
||||||
#if !defined TRACY_NO_SYSTEM_TRACING && ( defined _WIN32 || defined __CYGWIN__ || defined __linux__ )
|
#if !defined TRACY_NO_SYSTEM_TRACING && ( defined _WIN32 || defined __linux__ )
|
||||||
# define TRACY_HAS_SYSTEM_TRACING
|
# define TRACY_HAS_SYSTEM_TRACING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef __TRACYTHREAD_HPP__
|
#ifndef __TRACYTHREAD_HPP__
|
||||||
#define __TRACYTHREAD_HPP__
|
#define __TRACYTHREAD_HPP__
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#else
|
#else
|
||||||
# include <pthread.h>
|
# include <pthread.h>
|
||||||
@ -25,7 +25,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
|
|
||||||
class Thread
|
class Thread
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef __TRACYAPI_H__
|
#ifndef __TRACYAPI_H__
|
||||||
#define __TRACYAPI_H__
|
#define __TRACYAPI_H__
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
# if defined TRACY_EXPORTS
|
# if defined TRACY_EXPORTS
|
||||||
# define TRACY_API __declspec(dllexport)
|
# define TRACY_API __declspec(dllexport)
|
||||||
# elif defined TRACY_IMPORTS
|
# elif defined TRACY_IMPORTS
|
||||||
|
@ -489,7 +489,7 @@ bool ListenSocket::Listen( uint16_t port, int backlog )
|
|||||||
m_sock = addrinfo_and_socket_for_family( port, AF_INET, &res );
|
m_sock = addrinfo_and_socket_for_family( port, AF_INET, &res );
|
||||||
if( m_sock == -1 ) return false;
|
if( m_sock == -1 ) return false;
|
||||||
}
|
}
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
unsigned long val = 0;
|
unsigned long val = 0;
|
||||||
setsockopt( m_sock, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&val, sizeof( val ) );
|
setsockopt( m_sock, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&val, sizeof( val ) );
|
||||||
#elif defined BSD
|
#elif defined BSD
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
#if defined _MSC_VER || defined __CYGWIN__ || defined _WIN32
|
#ifdef _MSC_VER
|
||||||
|
# pragma warning(disable:4996)
|
||||||
|
#endif
|
||||||
|
#if defined _WIN32
|
||||||
# ifndef WIN32_LEAN_AND_MEAN
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# endif
|
# endif
|
||||||
# ifndef NOMINMAX
|
# ifndef NOMINMAX
|
||||||
# define NOMINMAX
|
# define NOMINMAX
|
||||||
# endif
|
# endif
|
||||||
#endif
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
# pragma warning(disable:4996)
|
|
||||||
#endif
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <malloc.h>
|
# include <malloc.h>
|
||||||
#else
|
#else
|
||||||
@ -40,7 +38,7 @@
|
|||||||
|
|
||||||
#include "TracySystem.hpp"
|
#include "TracySystem.hpp"
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
extern "C" typedef HRESULT (WINAPI *t_SetThreadDescription)( HANDLE, PCWSTR );
|
extern "C" typedef HRESULT (WINAPI *t_SetThreadDescription)( HANDLE, PCWSTR );
|
||||||
extern "C" typedef HRESULT (WINAPI *t_GetThreadDescription)( HANDLE, PWSTR* );
|
extern "C" typedef HRESULT (WINAPI *t_GetThreadDescription)( HANDLE, PWSTR* );
|
||||||
#endif
|
#endif
|
||||||
@ -58,7 +56,7 @@ namespace detail
|
|||||||
|
|
||||||
TRACY_API uint64_t GetThreadHandleImpl()
|
TRACY_API uint64_t GetThreadHandleImpl()
|
||||||
{
|
{
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
static_assert( sizeof( decltype( GetCurrentThreadId() ) ) <= sizeof( uint64_t ), "Thread handle too big to fit in protocol" );
|
static_assert( sizeof( decltype( GetCurrentThreadId() ) ) <= sizeof( uint64_t ), "Thread handle too big to fit in protocol" );
|
||||||
return uint64_t( GetCurrentThreadId() );
|
return uint64_t( GetCurrentThreadId() );
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
@ -123,7 +121,7 @@ void ThreadNameMsvcMagic( const THREADNAME_INFO& info )
|
|||||||
|
|
||||||
TRACY_API void SetThreadName( const char* name )
|
TRACY_API void SetThreadName( const char* name )
|
||||||
{
|
{
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
static auto _SetThreadDescription = (t_SetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "SetThreadDescription" );
|
static auto _SetThreadDescription = (t_SetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "SetThreadDescription" );
|
||||||
if( _SetThreadDescription )
|
if( _SetThreadDescription )
|
||||||
{
|
{
|
||||||
@ -142,7 +140,7 @@ TRACY_API void SetThreadName( const char* name )
|
|||||||
ThreadNameMsvcMagic( info );
|
ThreadNameMsvcMagic( info );
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
#elif defined _GNU_SOURCE && !defined __EMSCRIPTEN__ && !defined __CYGWIN__
|
#elif defined _GNU_SOURCE && !defined __EMSCRIPTEN__
|
||||||
{
|
{
|
||||||
const auto sz = strlen( name );
|
const auto sz = strlen( name );
|
||||||
if( sz <= 15 )
|
if( sz <= 15 )
|
||||||
@ -187,7 +185,7 @@ TRACY_API const char* GetThreadName( uint64_t id )
|
|||||||
ptr = ptr->next;
|
ptr = ptr->next;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# if defined _WIN32 || defined __CYGWIN__
|
# if defined _WIN32
|
||||||
static auto _GetThreadDescription = (t_GetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetThreadDescription" );
|
static auto _GetThreadDescription = (t_GetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetThreadDescription" );
|
||||||
if( _GetThreadDescription )
|
if( _GetThreadDescription )
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# define stat64 _stat64
|
# define stat64 _stat64
|
||||||
#endif
|
#endif
|
||||||
#if defined __CYGWIN__ || defined __APPLE__
|
#if defined __APPLE__
|
||||||
# define stat64 stat
|
# define stat64 stat
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ Moreover, the following platforms are not supported due to how secretive their o
|
|||||||
\item Google Stadia
|
\item Google Stadia
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
You may also try your luck with Cygwin or Mingw, but don't get your hopes too high. These platforms were usable some time ago, but nobody is actively working on resolving any issues you might encounter with them.
|
You may also try your luck with Mingw, but don't get your hopes too high. This platform was usable some time ago, but nobody is actively working on resolving any issues you might encounter with it.
|
||||||
|
|
||||||
\subsection{Initial client setup}
|
\subsection{Initial client setup}
|
||||||
\label{initialsetup}
|
\label{initialsetup}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "../server/TracyVersion.hpp"
|
#include "../server/TracyVersion.hpp"
|
||||||
#include "HttpRequest.hpp"
|
#include "HttpRequest.hpp"
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW );
|
extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW );
|
||||||
#elif defined __linux__
|
#elif defined __linux__
|
||||||
@ -21,13 +21,11 @@ static constexpr char CRLF[2] = { '\r', '\n' };
|
|||||||
static const char* GetOsInfo()
|
static const char* GetOsInfo()
|
||||||
{
|
{
|
||||||
static char buf[1024];
|
static char buf[1024];
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
t_RtlGetVersion RtlGetVersion = (t_RtlGetVersion)GetProcAddress( GetModuleHandleA( "ntdll.dll" ), "RtlGetVersion" );
|
t_RtlGetVersion RtlGetVersion = (t_RtlGetVersion)GetProcAddress( GetModuleHandleA( "ntdll.dll" ), "RtlGetVersion" );
|
||||||
if( !RtlGetVersion )
|
if( !RtlGetVersion )
|
||||||
{
|
{
|
||||||
# ifdef __CYGWIN__
|
# ifdef __MINGW32__
|
||||||
sprintf( buf, "Windows (Cygwin)" );
|
|
||||||
# elif defined __MINGW32__
|
|
||||||
sprintf( buf, "Windows (MingW)" );
|
sprintf( buf, "Windows (MingW)" );
|
||||||
# else
|
# else
|
||||||
sprintf( buf, "Windows" );
|
sprintf( buf, "Windows" );
|
||||||
@ -38,9 +36,7 @@ static const char* GetOsInfo()
|
|||||||
RTL_OSVERSIONINFOW ver = { sizeof( RTL_OSVERSIONINFOW ) };
|
RTL_OSVERSIONINFOW ver = { sizeof( RTL_OSVERSIONINFOW ) };
|
||||||
RtlGetVersion( &ver );
|
RtlGetVersion( &ver );
|
||||||
|
|
||||||
# ifdef __CYGWIN__
|
# ifdef __MINGW32__
|
||||||
sprintf( buf, "Windows %i.%i.%i (Cygwin)", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber );
|
|
||||||
# elif defined __MINGW32__
|
|
||||||
sprintf( buf, "Windows %i.%i.%i (MingW)", (int)ver.dwMajorVersion, (int)ver.dwMinorVersion, (int)ver.dwBuildNumber );
|
sprintf( buf, "Windows %i.%i.%i (MingW)", (int)ver.dwMajorVersion, (int)ver.dwMinorVersion, (int)ver.dwBuildNumber );
|
||||||
# else
|
# else
|
||||||
sprintf( buf, "Windows %i.%i.%i", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber );
|
sprintf( buf, "Windows %i.%i.%i", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber );
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# define stat64 _stat64
|
# define stat64 _stat64
|
||||||
#endif
|
#endif
|
||||||
#if defined __CYGWIN__ || defined __APPLE__
|
#if defined __APPLE__
|
||||||
# define stat64 stat
|
# define stat64 stat
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "TracyMmap.hpp"
|
#include "TracyMmap.hpp"
|
||||||
|
|
||||||
#if defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
|
#if defined _WIN32
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef __TRACYMMAP_HPP__
|
#ifndef __TRACYMMAP_HPP__
|
||||||
#define __TRACYMMAP_HPP__
|
#define __TRACYMMAP_HPP__
|
||||||
|
|
||||||
#if !defined _MSC_VER && !defined __MINGW32__ && !defined __CYGWIN__
|
#if !defined _WIN32
|
||||||
# include <sys/mman.h>
|
# include <sys/mman.h>
|
||||||
#else
|
#else
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
@ -13,9 +13,6 @@ SRC := \
|
|||||||
|
|
||||||
OBJ := $(SRC:%.cpp=%.o)
|
OBJ := $(SRC:%.cpp=%.o)
|
||||||
|
|
||||||
ifeq ($(shell uname -o),Cygwin)
|
|
||||||
LIBS += -ldbghelp
|
|
||||||
endif
|
|
||||||
ifeq ($(shell uname -o),FreeBSD)
|
ifeq ($(shell uname -o),FreeBSD)
|
||||||
LIBS += -lexecinfo
|
LIBS += -lexecinfo
|
||||||
endif
|
endif
|
||||||
|
@ -15,9 +15,7 @@
|
|||||||
#include "../../zstd/zstd.h"
|
#include "../../zstd/zstd.h"
|
||||||
#include "../../getopt/getopt.h"
|
#include "../../getopt/getopt.h"
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __APPLE__
|
||||||
# define ftello64(x) ftello(x)
|
|
||||||
#elif defined __APPLE__
|
|
||||||
# define ftello64(x) ftello(x)
|
# define ftello64(x) ftello(x)
|
||||||
#elif defined _WIN32
|
#elif defined _WIN32
|
||||||
# define ftello64(x) _ftelli64(x)
|
# define ftello64(x) _ftelli64(x)
|
||||||
|
Loading…
Reference in New Issue
Block a user