aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-06-17 12:54:26 +0200
committerBjörn Gustavsson <[email protected]>2016-06-22 11:58:11 +0200
commit6a6c72801e6fb021851b4f2591b03ed136a27363 (patch)
treebccddc199ec2fe69a6bc01610731295f83eccc88 /erts/emulator/beam
parent4443bc775442d568357f72d96e2fbdae2ea58c3d (diff)
downloadotp-6a6c72801e6fb021851b4f2591b03ed136a27363.tar.gz
otp-6a6c72801e6fb021851b4f2591b03ed136a27363.tar.bz2
otp-6a6c72801e6fb021851b4f2591b03ed136a27363.zip
beam_makeops: Separate static information from counters
The counters are only used in the special 'icount' emulator. We will save some memory by including the counters in the OpEntry. It will also make it possible to make opc 'const'.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_bif_info.c2
-rw-r--r--erts/emulator/beam/erl_vm.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index 3fb866733c..e5d3f38ce4 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -2394,7 +2394,7 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
ERTS_ATOM_ENC_LATIN1,
1),
erts_bld_uint(hpp, hszp,
- opc[i].count)),
+ erts_instr_count[i])),
res);
}
diff --git a/erts/emulator/beam/erl_vm.h b/erts/emulator/beam/erl_vm.h
index f97716d030..22c8e8ee12 100644
--- a/erts/emulator/beam/erl_vm.h
+++ b/erts/emulator/beam/erl_vm.h
@@ -146,12 +146,13 @@ typedef struct op_entry {
int sz; /* Number of loaded words. */
char* pack; /* Instructions for packing engine. */
char* sign; /* Signature string. */
- unsigned count; /* Number of times executed. */
} OpEntry;
extern OpEntry opc[]; /* Description of all instructions. */
extern int num_instructions; /* Number of instruction in opc[]. */
+extern Uint erts_instr_count[];
+
/* some constants for various table sizes etc */
#define ATOM_TEXT_SIZE 32768 /* Increment for allocating atom text space */