mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 04:51:11 +00:00
mttcg: translate-all: Enable locking debug in a debug build
Enable tcg lock debug asserts in a debug build by default instead of relying on DEBUG_LOCKING. None of the other DEBUG_* macros have asserts, so this patch removes DEBUG_LOCKING and enable these asserts in a debug build. Backports commit 6ac3d7e845549f08473f020c1c70f14b8911a67e from qemu
This commit is contained in:
parent
89d8e58718
commit
616becc2dc
|
@ -63,7 +63,6 @@
|
|||
|
||||
/* #define DEBUG_TB_INVALIDATE */
|
||||
/* #define DEBUG_TB_FLUSH */
|
||||
/* #define DEBUG_LOCKING */
|
||||
/* make various TB consistency checks */
|
||||
/* #define DEBUG_TB_CHECK */
|
||||
|
||||
|
@ -78,20 +77,10 @@
|
|||
* access to the memory related structures are protected with the
|
||||
* mmap_lock.
|
||||
*/
|
||||
#ifdef DEBUG_LOCKING
|
||||
#define DEBUG_MEM_LOCKS 1
|
||||
#else
|
||||
#define DEBUG_MEM_LOCKS 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOFTMMU
|
||||
#define assert_memory_lock() do { /* nothing */ } while (0)
|
||||
#else
|
||||
#define assert_memory_lock() do { \
|
||||
if (DEBUG_MEM_LOCKS) { \
|
||||
g_assert(have_mmap_lock()); \
|
||||
} \
|
||||
} while (0)
|
||||
#define assert_memory_lock() tcg_debug_assert(have_mmap_lock())
|
||||
#endif
|
||||
|
||||
#define SMC_BITMAP_USE_THRESHOLD 10
|
||||
|
@ -132,22 +121,6 @@ typedef struct PageDesc {
|
|||
#define V_L1_MAX_BITS (V_L2_BITS + 3)
|
||||
#define V_L1_MAX_SIZE (1 << V_L1_MAX_BITS)
|
||||
|
||||
#ifdef DEBUG_LOCKING
|
||||
#define DEBUG_TB_LOCKS 1
|
||||
#else
|
||||
#define DEBUG_TB_LOCKS 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOFTMMU
|
||||
#define assert_tb_lock() do { /* nothing */ } while (0)
|
||||
#else
|
||||
#define assert_tb_lock() do { \
|
||||
if (DEBUG_TB_LOCKS) { \
|
||||
g_assert(have_tb_lock); \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
static TranslationBlock *tb_find_pc(struct uc_struct *uc, uintptr_t tc_ptr);
|
||||
|
||||
// Unicorn: for cleaning up memory later.
|
||||
|
|
Loading…
Reference in a new issue