Skip to content

Commit 65db00f

Browse files
committed
tracing for Cadence is now a build tag
1 parent 196cc2e commit 65db00f

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

cmd/execution_builder.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,13 @@ func (exeNode *ExecutionNode) LoadProviderEngine(
572572
node.FvmOptions...,
573573
)
574574

575-
opts = append(opts, computation.DefaultFVMOptions(
576-
node.RootChainID,
577-
exeNode.exeConf.computationConfig.CadenceTracing,
578-
exeNode.exeConf.computationConfig.ExtensiveTracing,
579-
exeNode.exeConf.scheduleCallbacksEnabled)...)
575+
opts = append(opts,
576+
computation.DefaultFVMOptions(
577+
node.RootChainID,
578+
exeNode.exeConf.computationConfig.ExtensiveTracing,
579+
exeNode.exeConf.scheduleCallbacksEnabled,
580+
)...,
581+
)
580582

581583
vmCtx := fvm.NewContext(opts...)
582584

cmd/execution_config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ func (exeConf *ExecutionConfig) SetupFlags(flags *pflag.FlagSet) {
9696
flags.UintVar(&exeConf.computationConfig.DerivedDataCacheSize, "cadence-execution-cache", derived.DefaultDerivedDataCacheSize,
9797
"cache size for Cadence execution")
9898
flags.BoolVar(&exeConf.computationConfig.ExtensiveTracing, "extensive-tracing", false, "adds high-overhead tracing to execution")
99-
flags.BoolVar(&exeConf.computationConfig.CadenceTracing, "cadence-tracing", false, "enables cadence runtime level tracing")
10099
flags.IntVar(&exeConf.computationConfig.MaxConcurrency, "computer-max-concurrency", 1, "set to greater than 1 to enable concurrent transaction execution")
101100
flags.StringVar(&exeConf.chunkDataPackDir, "chunk-data-pack-dir", filepath.Join(datadir, "chunk_data_packs"), "directory to use for storing chunk data packs")
102101
flags.StringVar(&exeConf.chunkDataPackCheckpointsDir, "chunk-data-pack-checkpoints-dir", filepath.Join(datadir, "chunk_data_packs_checkpoints_dir"), "directory to use storing chunk data packs pebble database checkpoints for querying while the node is running")

engine/execution/computation/manager.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ type ComputationManager interface {
6262

6363
type ComputationConfig struct {
6464
query.QueryConfig
65-
CadenceTracing bool
6665
ExtensiveTracing bool
6766
DerivedDataCacheSize uint
6867
MaxConcurrency int
@@ -107,7 +106,7 @@ func New(
107106
}
108107

109108
chainID := vmCtx.Chain.ChainID()
110-
options := DefaultFVMOptions(chainID, params.CadenceTracing, params.ExtensiveTracing, vmCtx.ScheduleCallbacksEnabled)
109+
options := DefaultFVMOptions(chainID, params.ExtensiveTracing, vmCtx.ScheduleCallbacksEnabled)
111110
vmCtx = fvm.NewContextFromParent(vmCtx, options...)
112111

113112
blockComputer, err := computer.NewBlockComputer(
@@ -224,16 +223,15 @@ func (e *Manager) QueryExecutor() query.Executor {
224223
return e.queryExecutor
225224
}
226225

227-
func DefaultFVMOptions(chainID flow.ChainID, cadenceTracing bool, extensiveTracing bool, scheduleCallbacksEnabled bool) []fvm.Option {
226+
func DefaultFVMOptions(chainID flow.ChainID, extensiveTracing bool, scheduleCallbacksEnabled bool) []fvm.Option {
228227
options := []fvm.Option{
229228
fvm.WithChain(chainID.Chain()),
230229
fvm.WithReusableCadenceRuntimePool(
231230
reusableRuntime.NewReusableCadenceRuntimePool(
232231
ReusableCadenceRuntimePoolSize,
233-
runtime.Config{
234-
TracingEnabled: cadenceTracing,
235-
},
236-
)),
232+
runtime.Config{},
233+
),
234+
),
237235
fvm.WithEVMEnabled(true),
238236
fvm.WithScheduleCallbacksEnabled(scheduleCallbacksEnabled),
239237
}

integration/localnet/builder/bootstrap.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const (
4949
DefaultProfiler = false
5050
DefaultProfileUploader = false
5151
DefaultTracing = true
52-
DefaultCadenceTracing = false
5352
DefaultExtensiveTracing = false
5453
DefaultConsensusDelay = 800 * time.Millisecond
5554
DefaultCollectionDelay = 950 * time.Millisecond
@@ -102,7 +101,6 @@ func init() {
102101
flag.BoolVar(&profiler, "profiler", DefaultProfiler, "whether to enable the auto-profiler")
103102
flag.BoolVar(&profileUploader, "profile-uploader", DefaultProfileUploader, "whether to upload profiles to the cloud")
104103
flag.BoolVar(&tracing, "tracing", DefaultTracing, "whether to enable low-overhead tracing in flow")
105-
flag.BoolVar(&cadenceTracing, "cadence-tracing", DefaultCadenceTracing, "whether to enable the tracing in cadance")
106104
flag.BoolVar(&extensiveTracing, "extensive-tracing", DefaultExtensiveTracing, "enables high-overhead tracing in fvm")
107105
flag.DurationVar(&consensusDelay, "consensus-delay", DefaultConsensusDelay, "delay on consensus node block proposals")
108106
flag.DurationVar(&collectionDelay, "collection-delay", DefaultCollectionDelay, "delay on collection node block proposals")

0 commit comments

Comments
 (0)