mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Don't set sample_max_stack with kernel headers < 4.8.
This commit is contained in:
parent
b0c7a1f288
commit
24c834bf8c
@ -594,6 +594,7 @@ void SysTraceSendExternalName( uint64_t thread )
|
|||||||
# include <atomic>
|
# include <atomic>
|
||||||
# include <thread>
|
# include <thread>
|
||||||
# include <linux/perf_event.h>
|
# include <linux/perf_event.h>
|
||||||
|
# include <linux/version.h>
|
||||||
# include <sys/mman.h>
|
# include <sys/mman.h>
|
||||||
# include <sys/ioctl.h>
|
# include <sys/ioctl.h>
|
||||||
|
|
||||||
@ -649,7 +650,9 @@ static void SetupSampling( int64_t& samplingPeriod )
|
|||||||
|
|
||||||
pe.sample_freq = 10000;
|
pe.sample_freq = 10000;
|
||||||
pe.sample_type = PERF_SAMPLE_TID | PERF_SAMPLE_TIME | PERF_SAMPLE_CALLCHAIN;
|
pe.sample_type = PERF_SAMPLE_TID | PERF_SAMPLE_TIME | PERF_SAMPLE_CALLCHAIN;
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION( 4, 8, 0 )
|
||||||
pe.sample_max_stack = 127;
|
pe.sample_max_stack = 127;
|
||||||
|
#endif
|
||||||
pe.exclude_callchain_kernel = 1;
|
pe.exclude_callchain_kernel = 1;
|
||||||
|
|
||||||
pe.disabled = 1;
|
pe.disabled = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user