From 7503303b0cba1e02320bdf604e0d0997b7c2ff59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20L=C3=A5ng?= Date: Sat, 8 Apr 2017 10:48:01 +0200 Subject: HiPE: Support literal tags Literal tags are used by the VM as an alternative to reserving a large virtual memory space in order to be able to quickly identify which terms are literals. The use of literal tags harms performance, but is useful to support systems where allocating a large amount of virtual memory is not an option. --- erts/emulator/beam/erl_term.h | 3 --- erts/emulator/hipe/hipe_mkliterals.c | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'erts/emulator') diff --git a/erts/emulator/beam/erl_term.h b/erts/emulator/beam/erl_term.h index 5ec6b6b44b..7d42d1b396 100644 --- a/erts/emulator/beam/erl_term.h +++ b/erts/emulator/beam/erl_term.h @@ -55,9 +55,6 @@ struct erl_node_; /* Declared in erl_node_tables.h */ #if defined(ARCH_64) # define TAG_PTR_MASK__ 0x7 # if !defined(ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION) -# ifdef HIPE -# error Hipe on 64-bit needs a real mmap as it does not support the literal tag -# endif # define TAG_LITERAL_PTR 0x4 # else # undef TAG_LITERAL_PTR diff --git a/erts/emulator/hipe/hipe_mkliterals.c b/erts/emulator/hipe/hipe_mkliterals.c index 6ea120c65c..de00994d64 100644 --- a/erts/emulator/hipe/hipe_mkliterals.c +++ b/erts/emulator/hipe/hipe_mkliterals.c @@ -460,6 +460,15 @@ static const struct rts_param rts_params[] = { 1 #else 0 +#endif + }, + /* This flag is always defined, but its value is configuration-dependent. */ + { 17, "ERTS_USE_LITERAL_TAG", + 1, +#if defined(TAG_LITERAL_PTR) + 1 +#else + 0 #endif }, /* This parameter is always defined, but its value depends on ERTS_SMP. */ -- cgit v1.2.3