MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ProbePreciseIp

Function ProbePreciseIp

Source/ThirdParty/tracy/client/TracySysTrace.cpp:690–716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688};
689
690static void ProbePreciseIp( perf_event_attr& pe, unsigned long long config0, unsigned long long config1, pid_t pid )
691{
692 pe.config = config1;
693 pe.precise_ip = 3;
694 while( pe.precise_ip != 0 )
695 {
696 const int fd = perf_event_open( &pe, pid, 0, -1, PERF_FLAG_FD_CLOEXEC );
697 if( fd != -1 )
698 {
699 close( fd );
700 break;
701 }
702 pe.precise_ip--;
703 }
704 pe.config = config0;
705 while( pe.precise_ip != 0 )
706 {
707 const int fd = perf_event_open( &pe, pid, 0, -1, PERF_FLAG_FD_CLOEXEC );
708 if( fd != -1 )
709 {
710 close( fd );
711 break;
712 }
713 pe.precise_ip--;
714 }
715 TracyDebug( " Probed precise_ip: %i\n", pe.precise_ip );
716}
717
718static void ProbePreciseIp( perf_event_attr& pe, pid_t pid )
719{

Callers 1

SysTraceStartFunction · 0.85

Calls 2

perf_event_openFunction · 0.85
closeFunction · 0.85

Tested by

no test coverage detected