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

Store RingBuffer identifier.

This commit is contained in:
Bartosz Taudul
2021-05-19 01:25:13 +02:00
committed by Bartosz Taudul
parent 07778badcc
commit b7d52d2eab
2 changed files with 10 additions and 2 deletions
+6 -1
View File
@@ -675,6 +675,11 @@ static int perf_event_open( struct perf_event_attr* hw_event, pid_t pid, int cpu
return syscall( __NR_perf_event_open, hw_event, pid, cpu, group_fd, flags );
}
enum TraceEventId
{
EventCallstack
};
static void SetupSampling( int64_t& samplingPeriod )
{
#ifndef CLOCK_MONOTONIC_RAW
@@ -715,7 +720,7 @@ static void SetupSampling( int64_t& samplingPeriod )
tracy_free( s_ring );
return;
}
new( s_ring+i ) RingBuffer<RingBufSize>( fd );
new( s_ring+i ) RingBuffer<RingBufSize>( fd, EventCallstack );
}
s_threadSampling = (Thread*)tracy_malloc( sizeof( Thread ) );