From 9c4a807cc1b83a6918c0ccf19cdc3837d746f53b Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 5 Apr 2017 14:11:56 +0200 Subject: erts: Remove hipe_bifs:remove_refs_from/1 which serves no purpose after all the hipe load&purge fixes merged at 32729cab75325de58bf127e6e8836348071b8682 --- erts/emulator/hipe/hipe_bif0.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'erts/emulator/hipe/hipe_bif0.c') diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c index e51e9f2733..9076c65c2a 100644 --- a/erts/emulator/hipe/hipe_bif0.c +++ b/erts/emulator/hipe/hipe_bif0.c @@ -1616,46 +1616,6 @@ static void purge_mfa(struct hipe_mfa_info* p) erts_free(ERTS_ALC_T_HIPE_LL, p); } -/* Called by init:restart after unloading all hipe compiled modules - * to work around old bug that caused execution of deallocated beam code. - * Can be removed now when delete/purge of native modules works better. - * Test: Do init:restart in debug compiled vm with hipe compiled kernel. - */ -static void hipe_purge_all_refs(void) -{ - struct hipe_mfa_info **bucket; - unsigned int i, nrbuckets; - - hipe_mfa_info_table_rwlock(); - - ASSERT(hipe_mfa_info_table.used == 0); - bucket = hipe_mfa_info_table.bucket; - nrbuckets = 1 << hipe_mfa_info_table.log2size; - for (i = 0; i < nrbuckets; ++i) { - ASSERT(bucket[i] == NULL); - while (bucket[i] != NULL) { - struct hipe_mfa_info* mfa = bucket[i]; - bucket[i] = mfa->bucket.next; - - hash_erase(&mod2mfa_tab, mfa); - erts_free(ERTS_ALC_T_HIPE_LL, mfa); - } - } - hipe_mfa_info_table.used = 0; - hipe_mfa_info_table_rwunlock(); -} - -BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1) -{ - if (BIF_ARG_1 == am_all) { - hipe_purge_all_refs(); - BIF_RET(am_ok); - } - - ASSERT(!"hipe_bifs_remove_refs_from_1() called"); - BIF_ERROR(BIF_P, BADARG); -} - int hipe_purge_need_blocking(Module* modp) { /* SVERK: Verify if this is really necessary */ -- cgit v1.2.3