Merge pull request #5080 from filecoin-project/feat/enable-stack-with-gas-tracing

Enable Callers tracing when GasTracing is enabled
This commit is contained in:
Łukasz Magiera 2020-12-01 14:56:41 +01:00 committed by GitHub
commit fc5120621b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@ import (
"context" "context"
"encoding/binary" "encoding/binary"
"fmt" "fmt"
gruntime "runtime"
"time" "time"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
@ -534,7 +535,7 @@ func (rt *Runtime) chargeGasInternal(gas GasCharge, skip int) aerrors.ActorError
if EnableGasTracing { if EnableGasTracing {
var callers [10]uintptr var callers [10]uintptr
cout := 0 //gruntime.Callers(2+skip, callers[:]) cout := gruntime.Callers(2+skip, callers[:])
now := build.Clock.Now() now := build.Clock.Now()
if rt.lastGasCharge != nil { if rt.lastGasCharge != nil {