mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Don't depend on View in Worker.
This commit is contained in:
parent
2f35c785ee
commit
18b2e3e5be
@ -15,14 +15,4 @@ bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view, cons
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SourceFileValid( const char* fn, uint64_t olderThan )
|
||||
{
|
||||
struct stat buf;
|
||||
if( stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
|
||||
{
|
||||
return (uint64_t)buf.st_mtime < olderThan;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ static inline bool FileExists( const char* fn )
|
||||
}
|
||||
|
||||
bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view, const Worker& worker );
|
||||
bool SourceFileValid( const char* fn, uint64_t olderThan );
|
||||
|
||||
}
|
||||
|
||||
|
@ -16,13 +16,13 @@
|
||||
# define __STDC_FORMAT_MACROS
|
||||
#endif
|
||||
#include <inttypes.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
#include "../common/TracyProtocol.hpp"
|
||||
#include "../common/TracySystem.hpp"
|
||||
#include "TracyFileRead.hpp"
|
||||
#include "TracyFilesystem.hpp"
|
||||
#include "TracyFileWrite.hpp"
|
||||
#include "TracySort.hpp"
|
||||
#include "TracyTaskDispatch.hpp"
|
||||
@ -44,6 +44,16 @@ static tracy_force_inline uint32_t UnpackFileLine( uint64_t packed, uint32_t& li
|
||||
return packed >> 32;
|
||||
}
|
||||
|
||||
static bool SourceFileValid( const char* fn, uint64_t olderThan )
|
||||
{
|
||||
struct stat buf;
|
||||
if( stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
|
||||
{
|
||||
return (uint64_t)buf.st_mtime < olderThan;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static const uint8_t FileHeader[8] { 't', 'r', 'a', 'c', 'y', Version::Major, Version::Minor, Version::Patch };
|
||||
enum { FileHeaderMagic = 5 };
|
||||
|
Loading…
Reference in New Issue
Block a user