@@ -429,21 +429,27 @@ func mainWithExitCode() flags.ExitCode {
429429 }
430430
431431 // Load the eBPF code and map definitions
432+ traceBufferMultiplier := 1
433+ if f .InstrumentCudaLaunch {
434+ // GPU profiling generates high trace volume, increase buffer
435+ traceBufferMultiplier = 50
436+ }
432437 trc , err := tracer .NewTracer (mainCtx , & tracer.Config {
433- VerboseMode : f .BPF .VerboseLogging ,
434- Reporter : rep ,
435- Intervals : intervals ,
436- IncludeTracers : includeTracers ,
437- SamplesPerSecond : f .Profiling .CPUSamplingFrequency ,
438- MapScaleFactor : f .BPF .MapScaleFactor ,
439- FilterErrorFrames : ! f .Profiling .EnableErrorFrames ,
440- KernelVersionCheck : ! f .Hidden .IgnoreUnsafeKernelVersion ,
441- BPFVerifierLogLevel : f .BPF .VerifierLogLevel ,
442- ProbabilisticInterval : f .Profiling .ProbabilisticInterval ,
443- ProbabilisticThreshold : f .Profiling .ProbabilisticThreshold ,
444- OffCPUThreshold : uint32 (f .OffCPUThreshold * math .MaxUint32 ),
445- IncludeEnvVars : includeEnvVars ,
446- InstrumentCudaLaunch : f .InstrumentCudaLaunch ,
438+ VerboseMode : f .BPF .VerboseLogging ,
439+ Reporter : rep ,
440+ Intervals : intervals ,
441+ IncludeTracers : includeTracers ,
442+ SamplesPerSecond : f .Profiling .CPUSamplingFrequency ,
443+ MapScaleFactor : f .BPF .MapScaleFactor ,
444+ FilterErrorFrames : ! f .Profiling .EnableErrorFrames ,
445+ KernelVersionCheck : ! f .Hidden .IgnoreUnsafeKernelVersion ,
446+ BPFVerifierLogLevel : f .BPF .VerifierLogLevel ,
447+ ProbabilisticInterval : f .Profiling .ProbabilisticInterval ,
448+ ProbabilisticThreshold : f .Profiling .ProbabilisticThreshold ,
449+ OffCPUThreshold : uint32 (f .OffCPUThreshold * math .MaxUint32 ),
450+ IncludeEnvVars : includeEnvVars ,
451+ InstrumentCudaLaunch : f .InstrumentCudaLaunch ,
452+ TraceBufferSizeMultiplier : traceBufferMultiplier ,
447453 })
448454 metrics .SetReporter (parcaReporter )
449455 if err != nil {
0 commit comments