From 42b9addae9c19bf27dc72f24d35bedf9123f8f11 Mon Sep 17 00:00:00 2001 From: matkt Date: Mon, 15 Nov 2021 10:01:00 +0100 Subject: [PATCH] improve perf trace (#3032) Signed-off-by: Karim TAAM --- .../org/hyperledger/besu/ethereum/debug/TraceFrame.java | 2 +- .../hyperledger/besu/ethereum/vm/DebugOperationTracer.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/debug/TraceFrame.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/debug/TraceFrame.java index 31143f907f1c..53b77068bcdb 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/debug/TraceFrame.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/debug/TraceFrame.java @@ -93,7 +93,7 @@ public TraceFrame( this.exceptionalHaltReason = exceptionalHaltReason; this.recipient = recipient; this.value = value; - this.inputData = inputData.copy(); + this.inputData = inputData; this.outputData = outputData; this.stack = stack; this.memory = memory; diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/vm/DebugOperationTracer.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/vm/DebugOperationTracer.java index 12a64dc77ede..470ccec3b11c 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/vm/DebugOperationTracer.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/vm/DebugOperationTracer.java @@ -80,7 +80,7 @@ public void traceExecution(final MessageFrame frame, final ExecuteOperation exec operationResult.getHaltReason(), frame.getRecipientAddress(), frame.getApparentValue(), - inputData, + pc == 0 ? inputData.copy() : inputData, outputData, stack, memory, @@ -113,7 +113,7 @@ public void tracePrecompileCall( Optional.empty(), frame.getRecipientAddress(), frame.getValue(), - frame.getInputData(), + frame.getInputData().copy(), frame.getOutputData(), Optional.empty(), Optional.empty(), @@ -159,7 +159,7 @@ public void traceAccountCreationResult( Optional.of(exceptionalHaltReason), frame.getRecipientAddress(), frame.getValue(), - frame.getInputData(), + frame.getInputData().copy(), frame.getOutputData(), Optional.empty(), Optional.empty(),