mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Tweaks
This commit is contained in:
parent
5213c53bb0
commit
201dcb6a8a
@ -1473,10 +1473,11 @@ Profiler::Profiler()
|
||||
m_pipeBufSize = 16384;
|
||||
# else
|
||||
m_pipeBufSize = (int)(ptrdiff_t)m_safeSendBufferSize;
|
||||
while( fcntl( m_pipe[0], F_SETPIPE_SZ, m_pipeBufSize ) == -1 && errno == EPERM )
|
||||
while( fcntl( m_pipe[0], F_SETPIPE_SZ, m_pipeBufSize ) < 0 && errno == EPERM )
|
||||
m_pipeBufSize /= 2; // too big; reduce
|
||||
m_pipeBufSize = fcntl( m_pipe[0], F_GETPIPE_SZ );
|
||||
# endif
|
||||
fcntl( m_pipe[1], F_SETFL, O_NONBLOCK );
|
||||
#endif
|
||||
|
||||
#if !defined(TRACY_DELAYED_INIT) || !defined(TRACY_MANUAL_LIFETIME)
|
||||
|
@ -862,7 +862,7 @@ private:
|
||||
// Send through the pipe to ensure safe reads
|
||||
for( size_t offset = 0; offset != size; /*in loop*/ )
|
||||
{
|
||||
size_t sendsize = std::min( size - offset, (size_t)(ptrdiff_t)m_pipeBufSize );
|
||||
size_t sendsize = size - offset;
|
||||
ssize_t result1, result2;
|
||||
while( ( result1 = write( m_pipe[1], p + offset, sendsize ) ) < 0 && errno == EINTR )
|
||||
/* retry */;
|
||||
|
Loading…
Reference in New Issue
Block a user