File 1051-erts-Remove-unused-variable-erts_system_monitor.patch of Package erlang
From cf68b1c76c6182d7a92e7f39752de57488ba37f7 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Wed, 26 Jun 2024 14:39:49 +0200
Subject: [PATCH 1/6] erts: Remove unused variable erts_system_monitor
---
erts/emulator/beam/erl_process.c | 2 +-
erts/emulator/beam/erl_process.h | 6 +-----
erts/emulator/beam/export.c | 2 +-
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 8dbb4498c0..dfdcb0baba 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -421,7 +421,7 @@ static ErtsAlignedBlockPollThreadData *ERTS_WRITE_UNLIKELY(block_poll_thread_dat
static Uint last_reductions;
static Uint last_exact_reductions;
-Eterm ERTS_WRITE_UNLIKELY(erts_system_monitor);
+
Eterm ERTS_WRITE_UNLIKELY(erts_system_monitor_long_gc);
Uint ERTS_WRITE_UNLIKELY(erts_system_monitor_long_schedule);
Eterm ERTS_WRITE_UNLIKELY(erts_system_monitor_large_heap);
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index d1f373d1fc..451a0f4113 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -1575,11 +1575,7 @@ ERTS_GLB_INLINE void erts_heap_frag_shrink(Process* p, Eterm* hp)
Eterm* erts_heap_alloc(Process* p, Uint need, Uint xtra);
extern erts_rwmtx_t erts_cpu_bind_rwmtx;
-/* If any of the erts_system_monitor_* variables are set (enabled),
-** erts_system_monitor must be != NIL, to allow testing on just
-** the erts_system_monitor_* variables.
-*/
-extern Eterm ERTS_WRITE_UNLIKELY(erts_system_monitor);
+
extern Uint ERTS_WRITE_UNLIKELY(erts_system_monitor_long_gc);
extern Uint ERTS_WRITE_UNLIKELY(erts_system_monitor_long_schedule);
extern Uint ERTS_WRITE_UNLIKELY(erts_system_monitor_large_heap);
diff --git a/erts/emulator/beam/export.c b/erts/emulator/beam/export.c
index 84ac916daa..a471c561ec 100644
--- a/erts/emulator/beam/export.c
+++ b/erts/emulator/beam/export.c
@@ -401,7 +401,7 @@ Export *erts_export_put(Eterm mod, Eterm func, unsigned int arity)
* export entry (making a call through it will cause the error_handler to
* be called).
*
- * Stub export entries will be placed in the loader export table.
+ * Stub export entries will be placed in the staging export table.
*/
Export*
--
2.43.0