diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala b/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala index e77cbbcc4e..f2d6aa8d56 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala @@ -34,7 +34,7 @@ import com.typesafe.config.Config final case class Envelope private (message: Any, sender: ActorRef) { - @noinline + @noinline // not inlined to permit downstream bytecode instrumentation to attach context information to the Envelope def copy(message: Any = message, sender: ActorRef = sender) = { Envelope(message, sender) } diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala b/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala index 91fc7b98df..205c2e4ac7 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala @@ -85,6 +85,8 @@ final case class ThreadPoolConfig( queueFactory: ThreadPoolConfig.QueueFactory = ThreadPoolConfig.linkedBlockingQueue(), rejectionPolicy: RejectedExecutionHandler = ThreadPoolConfig.defaultRejectionPolicy) extends ExecutorServiceFactoryProvider { + // Written explicitly to permit non-inlined defn; this is necessary for downstream instrumentation that stores extra + // context information on the config @noinline def copy( allowCorePoolTimeout: Boolean = allowCorePoolTimeout, diff --git a/actor/src/main/scala/org/apache/pekko/util/MessageBuffer.scala b/actor/src/main/scala/org/apache/pekko/util/MessageBuffer.scala index 3e538cc1b4..3b61ac637c 100644 --- a/actor/src/main/scala/org/apache/pekko/util/MessageBuffer.scala +++ b/actor/src/main/scala/org/apache/pekko/util/MessageBuffer.scala @@ -160,7 +160,7 @@ final class MessageBuffer private (private var _head: MessageBuffer.Node, privat object MessageBuffer { private final class Node(var next: Node, val message: Any, val ref: ActorRef) { - @noinline + @noinline // not inlined to permit downstream bytecode instrumentation to apply context information on the Node to the message def apply(f: (Any, ActorRef) => Unit): Unit = { f(message, ref) }