@@ -113,6 +113,9 @@ type Tracer struct {
113113 // samplesPerSecond holds the configured number of samples per second.
114114 samplesPerSecond int
115115
116+ // traceBufferSizeMultiplier scales the trace_events perf buffer size.
117+ traceBufferSizeMultiplier int
118+
116119 // probabilisticInterval is the time interval for which probabilistic profiling will be enabled.
117120 probabilisticInterval time.Duration
118121
@@ -223,20 +226,21 @@ func NewTracer(ctx context.Context, cfg *Config) (*Tracer, error) {
223226 perfEventList := []* perf.Event {}
224227
225228 tracer := & Tracer {
226- kernelSymbolizer : kernelSymbolizer ,
227- processManager : processManager ,
228- triggerPIDProcessing : make (chan bool , 1 ),
229- pidEvents : make (chan libpf.PIDTID , pidEventBufferSize ),
230- ebpfMaps : ebpfMaps ,
231- ebpfProgs : ebpfProgs ,
232- hooks : make (map [hookPoint ]link.Link ),
233- intervals : cfg .Intervals ,
234- hasBatchOperations : hasBatchOperations ,
235- perfEntrypoints : xsync .NewRWMutex (perfEventList ),
236- reporter : cfg .Reporter ,
237- samplesPerSecond : cfg .SamplesPerSecond ,
238- probabilisticInterval : cfg .ProbabilisticInterval ,
239- probabilisticThreshold : cfg .ProbabilisticThreshold ,
229+ kernelSymbolizer : kernelSymbolizer ,
230+ processManager : processManager ,
231+ triggerPIDProcessing : make (chan bool , 1 ),
232+ pidEvents : make (chan libpf.PIDTID , pidEventBufferSize ),
233+ ebpfMaps : ebpfMaps ,
234+ ebpfProgs : ebpfProgs ,
235+ hooks : make (map [hookPoint ]link.Link ),
236+ intervals : cfg .Intervals ,
237+ hasBatchOperations : hasBatchOperations ,
238+ perfEntrypoints : xsync .NewRWMutex (perfEventList ),
239+ reporter : cfg .Reporter ,
240+ samplesPerSecond : cfg .SamplesPerSecond ,
241+ traceBufferSizeMultiplier : cfg .TraceBufferSizeMultiplier ,
242+ probabilisticInterval : cfg .ProbabilisticInterval ,
243+ probabilisticThreshold : cfg .ProbabilisticThreshold ,
240244 }
241245
242246 return tracer , nil
0 commit comments