mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 21:23:52 +00:00
Skip context switch events in on demand mode, if no connection.
This commit is contained in:
parent
602c38c6c0
commit
54a9132bb5
@ -162,6 +162,8 @@ void SysTraceWorker( void* ptr )
|
|||||||
# include <string.h>
|
# include <string.h>
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
|
|
||||||
|
# include "TracyProfiler.hpp"
|
||||||
|
|
||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -270,6 +272,10 @@ void SysTraceWorker( void* ptr )
|
|||||||
auto rd = getline( &line, &lsz, f );
|
auto rd = getline( &line, &lsz, f );
|
||||||
if( rd < 0 ) break;
|
if( rd < 0 ) break;
|
||||||
|
|
||||||
|
#ifdef TRACY_ON_DEMAND
|
||||||
|
if( !GetProfiler().IsConnected() ) continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
const char* ptr = line + 24;
|
const char* ptr = line + 24;
|
||||||
const auto cpu = (uint8_t)ReadNumber( ptr );
|
const auto cpu = (uint8_t)ReadNumber( ptr );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user