1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Force inline AppendData(), NeedDataSize().

This commit is contained in:
Bartosz Taudul
2020-02-23 14:44:19 +01:00
parent 6968a42abe
commit 96034bca3e
2 changed files with 19 additions and 21 deletions
-19
View File
@@ -48,7 +48,6 @@
#include <thread>
#include "../common/TracyAlign.hpp"
#include "../common/TracyProtocol.hpp"
#include "../common/TracySocket.hpp"
#include "../common/TracySystem.hpp"
#include "../common/tracy_lz4.hpp"
@@ -2033,13 +2032,6 @@ Profiler::DequeueStatus Profiler::DequeueSerial()
return DequeueStatus::DataDequeued;
}
bool Profiler::AppendData( const void* data, size_t len )
{
const auto ret = NeedDataSize( len );
AppendDataUnsafe( data, len );
return ret;
}
bool Profiler::CommitData()
{
bool ret = SendData( m_buffer + m_bufferStart, m_bufferOffset - m_bufferStart );
@@ -2048,17 +2040,6 @@ bool Profiler::CommitData()
return ret;
}
bool Profiler::NeedDataSize( size_t len )
{
assert( len <= TargetFrameSize );
bool ret = true;
if( m_bufferOffset - m_bufferStart + len > TargetFrameSize )
{
ret = CommitData();
}
return ret;
}
bool Profiler::SendData( const char* data, size_t len )
{
const lz4sz_t lz4sz = LZ4_compress_fast_continue( (LZ4_stream_t*)m_stream, data, m_lz4Buf + sizeof( lz4sz_t ), (int)len, LZ4Size, 1 );