diff options
author | Sverker Eriksson <sverker@erlang.org> | 2022-01-31 18:29:55 +0100 |
---|---|---|
committer | Sverker Eriksson <sverker@erlang.org> | 2022-01-31 18:29:55 +0100 |
commit | ef2003fa30776a4cb7e366ab487b4e10f91bbb54 (patch) | |
tree | 3e5148dd7e69d67258feb2bfb20e28bbd89ea8f7 /erts/emulator | |
parent | ea3302449a5ff31fe9676c7d5101b3729e07c2e0 (diff) | |
parent | 40db3924182379f875c41f288768597ee9dad663 (diff) | |
download | erlang-ef2003fa30776a4cb7e366ab487b4e10f91bbb54.tar.gz |
Merge branch 'sverker/erts/compiler-warnings/GH-5613' into maint
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_db_util.c | 2 | ||||
-rw-r--r-- | erts/emulator/beam/erl_process.c | 12 | ||||
-rw-r--r-- | erts/emulator/sys/common/erl_mmap.c | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c index 1c3738d3b6..db33ba47f1 100644 --- a/erts/emulator/beam/erl_db_util.c +++ b/erts/emulator/beam/erl_db_util.c @@ -4168,7 +4168,6 @@ static DMCRet dmc_all_bindings(DMCContext *context, int *constant) { int i; - int heap_used = 0; DMC_PUSH(*text, matchPushC); DMC_PUSH(*text, NIL); @@ -4176,7 +4175,6 @@ static DMCRet dmc_all_bindings(DMCContext *context, if (heap->vars[i].is_bound) { dmc_add_pushv_variant(context, heap, text, i); DMC_PUSH(*text, matchConsB); - heap_used += 2; } } ++context->stack_used; diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index 97315b0608..19e4a518b3 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -4616,7 +4616,6 @@ typedef struct { int full_reds; int full_reds_history_sum; int full_reds_history_change; - int oowc; int max_len; #if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT int sched_util; @@ -4654,7 +4653,8 @@ do { \ run_queue_info[(QIX)].full_reds_history_change = (LAST_REDS); \ } while (0) -#define ERTS_DBG_CHK_FULL_REDS_HISTORY(RQ) \ +#ifdef DEBUG +# define ERTS_DBG_CHK_FULL_REDS_HISTORY(RQ) \ do { \ int sum__ = 0; \ int rix__; \ @@ -4662,6 +4662,9 @@ do { \ sum__ += (RQ)->full_reds_history[rix__]; \ ASSERT(sum__ == (RQ)->full_reds_history_sum); \ } while (0); +#else +# define ERTS_DBG_CHK_FULL_REDS_HISTORY(RQ) +#endif #define ERTS_PRE_ALLOCED_MPATHS 8 @@ -4782,7 +4785,7 @@ check_balance(ErtsRunQueue *c_rq) ErtsMigrationPaths *new_mpaths, *old_mpaths; ErtsRunQueueBalance avg = {0}; Sint64 scheds_reds, full_scheds_reds; - int forced, active, current_active, oowc, half_full_scheds, full_scheds, + int forced, active, current_active, half_full_scheds, full_scheds, mmax_len, blnc_no_rqs, qix, pix, freds_hist_ix; #if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT int sched_util_balancing; @@ -4873,7 +4876,6 @@ check_balance(ErtsRunQueue *c_rq) run_queue_info[qix].full_reds_history_change = rq->full_reds_history[freds_hist_ix]; - run_queue_info[qix].oowc = rq->out_of_work_count; run_queue_info[qix].max_len = rq->max_len; rq->check_balance_reds = INT_MAX; @@ -4889,7 +4891,6 @@ check_balance(ErtsRunQueue *c_rq) half_full_scheds = 0; full_scheds_reds = 0; scheds_reds = 0; - oowc = 0; mmax_len = 0; /* Calculate availability for each priority in each run queues */ @@ -4946,7 +4947,6 @@ check_balance(ErtsRunQueue *c_rq) } run_queue_info[qix].reds = treds; scheds_reds += treds; - oowc += run_queue_info[qix].oowc; if (mmax_len < run_queue_info[qix].max_len) mmax_len = run_queue_info[qix].max_len; } diff --git a/erts/emulator/sys/common/erl_mmap.c b/erts/emulator/sys/common/erl_mmap.c index 1a49471252..364c2a3234 100644 --- a/erts/emulator/sys/common/erl_mmap.c +++ b/erts/emulator/sys/common/erl_mmap.c @@ -1897,7 +1897,7 @@ erts_mremap(ErtsMemMapper* mm, #endif #ifdef ERTS_HAVE_OS_MREMAP if (superaligned) { - return remap_move(mm, flags, new_ptr, old_size, sizep); + return remap_move(mm, flags, ptr, old_size, sizep); } else { new_ptr = os_mremap(ptr, old_size, asize, 0); if (!new_ptr) |