aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-10-07 15:54:33 +0200
committerSverker Eriksson <[email protected]>2016-10-14 14:37:20 +0200
commitdf9e09fc1f938f9902052dcb896b42558ee9779d (patch)
tree34490ac1102f1aa47bd807b00d8f50f9f501b862 /erts/emulator
parent9aa58e5e93af074d1e5e54848c29d40d826de361 (diff)
downloadotp-df9e09fc1f938f9902052dcb896b42558ee9779d.tar.gz
otp-df9e09fc1f938f9902052dcb896b42558ee9779d.tar.bz2
otp-df9e09fc1f938f9902052dcb896b42558ee9779d.zip
erts: Remove dead alloc stats in hipe_amd64.c
erlang:system_info({allocator, exec_alloc}) have stats if we need it.
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/hipe/hipe_amd64.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/erts/emulator/hipe/hipe_amd64.c b/erts/emulator/hipe/hipe_amd64.c
index 96b8c22265..3173afad0a 100644
--- a/erts/emulator/hipe/hipe_amd64.c
+++ b/erts/emulator/hipe/hipe_amd64.c
@@ -83,29 +83,6 @@ int hipe_patch_call(void *callAddress, void *destAddress, void *trampoline)
return 0;
}
-#if 0 /* change to non-zero to get allocation statistics at exit() */
-static unsigned int total_mapped, nr_joins, nr_splits, total_alloc, nr_allocs, nr_large, total_lost;
-static unsigned int atexit_done;
-
-static void alloc_code_stats(void)
-{
- printf("\r\nalloc_code_stats: %u bytes mapped, %u joins, %u splits, %u bytes allocated, %u average alloc, %u large allocs, %u bytes lost\r\n",
- total_mapped, nr_joins, nr_splits, total_alloc, nr_allocs ? total_alloc/nr_allocs : 0, nr_large, total_lost);
-}
-
-static void atexit_alloc_code_stats(void)
-{
- if (!atexit_done) {
- atexit_done = 1;
- (void)atexit(alloc_code_stats);
- }
-}
-
-#define ALLOC_CODE_STATS(X) do{X;}while(0)
-#else
-#define ALLOC_CODE_STATS(X) do{}while(0)
-#endif
-
/*
* Memory allocator for executable code.
*
@@ -116,9 +93,6 @@ static void atexit_alloc_code_stats(void)
*/
static void *alloc_code(unsigned int alloc_bytes)
{
- ALLOC_CODE_STATS(++nr_allocs);
- ALLOC_CODE_STATS(total_alloc += alloc_bytes);
-
return erts_alloc(ERTS_ALC_T_HIPE_EXEC, alloc_bytes);
}
@@ -132,9 +106,6 @@ void *hipe_alloc_code(Uint nrbytes, Eterm callees, Eterm *trampolines, Process *
void hipe_free_code(void* code, unsigned int bytes)
{
- ALLOC_CODE_STATS(--nr_allocs);
- ALLOC_CODE_STATS(total_alloc -= bytes);
-
erts_free(ERTS_ALC_T_HIPE_EXEC, code);
}
@@ -244,9 +215,6 @@ void *hipe_make_native_stub(void *callee_exp, unsigned int beamArity)
void hipe_free_native_stub(void* stub)
{
- ALLOC_CODE_STATS(++nr_allocs);
- /*ALLOC_CODE_STATS(total_alloc += alloc_bytes);*/
-
erts_free(ERTS_ALC_T_HIPE_EXEC, stub);
}