MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / setupManagerOptions

Method setupManagerOptions

user/module/brk.go:60–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58}
59
60func (this *PerfBRK) setupManagerOptions() {
61 if this.mconf.ExternalBTF != "" {
62 byteBuf, err := assets.Asset("user/assets/" + this.mconf.ExternalBTF)
63 if err != nil {
64 this.logger.Fatalf("[setupManagerOptions] failed, err:%v", err)
65 return
66 }
67 spec, err := btf.LoadSpecFromReader((bytes.NewReader(byteBuf)))
68
69 this.bpfManagerOptions = manager.Options{
70 DefaultKProbeMaxActive: 512,
71 VerifierOptions: ebpf.CollectionOptions{
72 Programs: ebpf.ProgramOptions{
73 LogSize: 2097152,
74 KernelTypes: spec,
75 },
76 },
77 RLimit: &unix.Rlimit{
78 Cur: math.MaxUint64,
79 Max: math.MaxUint64,
80 },
81 }
82 } else {
83 this.bpfManagerOptions = manager.Options{
84 DefaultKProbeMaxActive: 512,
85 VerifierOptions: ebpf.CollectionOptions{
86 Programs: ebpf.ProgramOptions{
87 LogSize: 2097152,
88 },
89 },
90 RLimit: &unix.Rlimit{
91 Cur: math.MaxUint64,
92 Max: math.MaxUint64,
93 },
94 }
95 }
96}
97
98func (this *PerfBRK) GetConf() config.IConfig {
99 return this.mconf

Callers 1

startMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected