mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-24 09:40:53 +00:00
Move IsFrameExternal from View to TracyUtility.hpp.
This commit is contained in:
@@ -213,4 +213,12 @@ std::vector<std::string> SplitLines( const char* data, size_t sz )
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool IsFrameExternal( const char* filename, const char* image )
|
||||
{
|
||||
if( strncmp( filename, "/usr/", 5 ) == 0 || strncmp( filename, "/lib/", 5 ) == 0 || strcmp( filename, "[unknown]" ) == 0 || strcmp( filename, "<kernel>" ) == 0 ) return true;
|
||||
if( strncmp( filename, "C:\\Program Files\\", 17 ) == 0 || strncmp( filename, "d:\\a01\\_work\\", 13 ) == 0 ) return true;
|
||||
if( !image ) return false;
|
||||
return strncmp( image, "/usr/", 5 ) == 0 || strncmp( image, "/lib/", 5 ) == 0 || strncmp( image, "/lib64/", 7 ) == 0 || strcmp( image, "<kernel>" ) == 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,6 +33,8 @@ const char* FormatPlotValue( double val, PlotValueFormatting format );
|
||||
|
||||
std::vector<std::string> SplitLines( const char* data, size_t sz );
|
||||
|
||||
bool IsFrameExternal( const char* filename, const char* image );
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -338,7 +338,6 @@ private:
|
||||
|
||||
void AddAnnotation( int64_t start, int64_t end );
|
||||
|
||||
bool IsFrameExternal( const char* filename, const char* image ) const;
|
||||
uint32_t GetThreadColor( uint64_t thread, int depth );
|
||||
uint32_t GetSrcLocColor( const SourceLocation& srcloc, int depth );
|
||||
uint32_t GetRawSrcLocColor( const SourceLocation& srcloc, int depth );
|
||||
|
||||
@@ -8,14 +8,6 @@
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
bool View::IsFrameExternal( const char* filename, const char* image ) const
|
||||
{
|
||||
if( strncmp( filename, "/usr/", 5 ) == 0 || strncmp( filename, "/lib/", 5 ) == 0 || strcmp( filename, "[unknown]" ) == 0 || strcmp( filename, "<kernel>" ) == 0 ) return true;
|
||||
if( strncmp( filename, "C:\\Program Files\\", 17 ) == 0 || strncmp( filename, "d:\\a01\\_work\\", 13 ) == 0 ) return true;
|
||||
if( !image ) return false;
|
||||
return strncmp( image, "/usr/", 5 ) == 0 || strncmp( image, "/lib/", 5 ) == 0 || strncmp( image, "/lib64/", 7 ) == 0 || strcmp( image, "<kernel>" ) == 0;
|
||||
}
|
||||
|
||||
uint32_t View::GetThreadColor( uint64_t thread, int depth )
|
||||
{
|
||||
return tracy::GetThreadColor( thread, depth, m_vd.dynamicColors != 0 );
|
||||
|
||||
Reference in New Issue
Block a user