mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Close perf_event file descriptor on exec.
This commit is contained in:
parent
9cd1b26bc7
commit
16101571e0
@ -715,7 +715,7 @@ static void SetupSampling( int64_t& samplingPeriod )
|
|||||||
|
|
||||||
for( int i=0; i<s_numCpus; i++ )
|
for( int i=0; i<s_numCpus; i++ )
|
||||||
{
|
{
|
||||||
const int fd = perf_event_open( &pe, -1, i, -1, 0 );
|
const int fd = perf_event_open( &pe, -1, i, -1, PERF_FLAG_FD_CLOEXEC );
|
||||||
if( fd == -1 )
|
if( fd == -1 )
|
||||||
{
|
{
|
||||||
for( int j=0; j<s_numBuffers; j++ ) s_ring[j].~RingBuffer<RingBufSize>();
|
for( int j=0; j<s_numBuffers; j++ ) s_ring[j].~RingBuffer<RingBufSize>();
|
||||||
|
Loading…
Reference in New Issue
Block a user