Skip to content

Commit 0e96f4f

Browse files
committed
Test frame cache
1 parent c233b1b commit 0e96f4f

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

config/cli_flags.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,14 @@ func parseCLIArgs(osArgs []string) (*Arguments, error) {
395395
Destination: &args.CollectContext,
396396
Sources: cli.EnvVars("DD_HOST_PROFILING_COLLECT_CONTEXT"),
397397
},
398+
&cli.IntFlag{
399+
Name: "frame-cache-size",
400+
Value: -1,
401+
Hidden: true,
402+
Usage: "Size of the frame cache.",
403+
Destination: &args.FrameCacheSize,
404+
Sources: cli.EnvVars("DD_HOST_PROFILING_FRAME_CACHE_SIZE"),
405+
},
398406
},
399407
Action: func(_ context.Context, cmd *cli.Command) error {
400408
args.cmd = cmd

config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,5 @@ type Config struct {
8383
EnableSplitByService bool
8484
SplitServiceSuffix string
8585
CollectContext bool
86+
FrameCacheSize int64
8687
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,4 @@ require (
180180
// To update the Datadog/opentelemetry-ebpf-profiler dependency on latest commit on datadog branch, change the following line to:
181181
// replace go.opentelemetry.io/ebpf-profiler => github.com/DataDog/opentelemetry-ebpf-profiler datadog
182182
// and run `go mod tidy`
183-
replace go.opentelemetry.io/ebpf-profiler => github.com/DataDog/opentelemetry-ebpf-profiler v0.0.0-20251119095038-750fb336791a
183+
replace go.opentelemetry.io/ebpf-profiler => github.com/DataDog/opentelemetry-ebpf-profiler v0.0.0-20251121135054-4e7dcfdb7097

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ github.com/DataDog/gostackparse v0.7.0 h1:i7dLkXHvYzHV308hnkvVGDL3BR4FWl7IsXNPz/
4242
github.com/DataDog/gostackparse v0.7.0/go.mod h1:lTfqcJKqS9KnXQGnyQMCugq3u1FP6UZMfWR0aitKFMM=
4343
github.com/DataDog/jsonapi v0.12.0 h1:N4e9RpmUflcV5hzceltSz8XUpM3PMtQr5C9Bhv0g87s=
4444
github.com/DataDog/jsonapi v0.12.0/go.mod h1:FUSGF3bwMARlVfXEoFo9R/CVlYYy9BGL4C/Prf6Ke3M=
45-
github.com/DataDog/opentelemetry-ebpf-profiler v0.0.0-20251119095038-750fb336791a h1:C2u81b7GBx6/oHR7gVINAKmrkTHrgIb03b9Ffr6ZFHM=
46-
github.com/DataDog/opentelemetry-ebpf-profiler v0.0.0-20251119095038-750fb336791a/go.mod h1:bYhWgro0or2UhzNw7Y8KgdIWhZEmSS0IH74h1Dg+xPU=
45+
github.com/DataDog/opentelemetry-ebpf-profiler v0.0.0-20251121135054-4e7dcfdb7097 h1:Fni84EqjI3coOLh29M2fW/gXypv+dSUqsAKG4DKQm6Y=
46+
github.com/DataDog/opentelemetry-ebpf-profiler v0.0.0-20251121135054-4e7dcfdb7097/go.mod h1:bYhWgro0or2UhzNw7Y8KgdIWhZEmSS0IH74h1Dg+xPU=
4747
github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.27.0 h1:5US5SqqhfkZkg/E64uvn7YmeTwnudJHtlPEH/LOT99w=
4848
github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.27.0/go.mod h1:VRo4D6rj92AExpVBlq3Gcuol9Nm1bber12KyxRjKGWw=
4949
github.com/DataDog/sketches-go v1.4.7 h1:eHs5/0i2Sdf20Zkj0udVFWuCrXGRFig2Dcfm5rtcTxc=

runner/runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ func Run(mainCtx context.Context, c *config.Config) ExitCode {
289289

290290
// Load the eBPF code and map definitions
291291
trc, err := tracer.NewTracer(mainCtx, &tracer.Config{
292-
ExecutableReporter: rep,
293292
TraceReporter: rep,
293+
ExecutableReporter: rep,
294294
Intervals: intervals,
295295
IncludeTracers: includeTracers,
296296
FilterErrorFrames: !c.SendErrorFrames,
@@ -303,6 +303,7 @@ func Run(mainCtx context.Context, c *config.Config) ExitCode {
303303
ProbabilisticInterval: c.ProbabilisticInterval,
304304
ProbabilisticThreshold: uint(c.ProbabilisticThreshold),
305305
IncludeEnvVars: includeEnvVars,
306+
FrameCacheSize: int(c.FrameCacheSize),
306307
})
307308
if err != nil {
308309
return failure("Failed to load eBPF tracer: %v", err)

0 commit comments

Comments
 (0)