From f24e43687b4e88e43d19e031e87eba3e700b5182 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Wed, 25 Sep 2024 10:00:21 +0100 Subject: [PATCH] mark stop() method as noinline (#1485) * mark stop() method as noinline * Update Dispatch.scala --- .../main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala index 99211122951..1ce9ee1bc21 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala @@ -159,7 +159,9 @@ private[pekko] trait Dispatch { this: ActorCell => catch handleException // ➡➡➡ NEVER SEND THE SAME SYSTEM MESSAGE OBJECT TO TWO ACTORS ⬅⬅⬅ - final def stop(): Unit = + // this function is marked `noinline` because Kamon and other metrics libraries + // instrument this function + @noinline final def stop(): Unit = try dispatcher.systemDispatch(this, Terminate()) catch handleException