From e2b0268d7a5f00a470ca5aa4eecba4959890a386 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 22 Feb 2022 20:50:04 +0100 Subject: [PATCH] Allow disabling callstack handling. --- client/TracyCallstack.h | 48 ++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/client/TracyCallstack.h b/client/TracyCallstack.h index 6a125010..2c7ecad9 100644 --- a/client/TracyCallstack.h +++ b/client/TracyCallstack.h @@ -1,31 +1,35 @@ #ifndef __TRACYCALLSTACK_H__ #define __TRACYCALLSTACK_H__ -#if !defined _WIN32 -# include -#endif +#ifndef TRACY_NO_CALLSTACK -#if defined _WIN32 -# include "../common/TracyUwp.hpp" -# ifndef TRACY_UWP -# define TRACY_HAS_CALLSTACK 1 +# if !defined _WIN32 +# include # endif -#elif defined __ANDROID__ -# if !defined __arm__ || __ANDROID_API__ >= 21 -# define TRACY_HAS_CALLSTACK 2 -# else -# define TRACY_HAS_CALLSTACK 5 + +# if defined _WIN32 +# include "../common/TracyUwp.hpp" +# ifndef TRACY_UWP +# define TRACY_HAS_CALLSTACK 1 +# endif +# elif defined __ANDROID__ +# if !defined __arm__ || __ANDROID_API__ >= 21 +# define TRACY_HAS_CALLSTACK 2 +# else +# define TRACY_HAS_CALLSTACK 5 +# endif +# elif defined __linux +# if defined _GNU_SOURCE && defined __GLIBC__ +# define TRACY_HAS_CALLSTACK 3 +# else +# define TRACY_HAS_CALLSTACK 2 +# endif +# elif defined __APPLE__ +# define TRACY_HAS_CALLSTACK 4 +# elif defined BSD +# define TRACY_HAS_CALLSTACK 6 # endif -#elif defined __linux -# if defined _GNU_SOURCE && defined __GLIBC__ -# define TRACY_HAS_CALLSTACK 3 -# else -# define TRACY_HAS_CALLSTACK 2 -# endif -#elif defined __APPLE__ -# define TRACY_HAS_CALLSTACK 4 -#elif defined BSD -# define TRACY_HAS_CALLSTACK 6 + #endif #endif