eunomia-bpf / bpftime

Userspace eBPF runtime for fast Uprobe & Syscall hook & Extensions with LLVM JIT
https://eunomia.dev/bpftime/
MIT License
686 stars 68 forks source link

[FEATURE] Allow defining shared memory size at runtime #282

Open Officeyutong opened 2 months ago

Officeyutong commented 2 months ago

Currently the size of shared memory is hard coded in bpftime_shm_internal.hpp and is set to 20MB

This might be too small for some cases. Allow setting that size at runtime using an environment variable

NobinPegasus commented 2 months ago

Should the size be passed as flag? or we should use environment variable and set it's value using export before invoking the tool?

Officeyutong commented 2 months ago

Should the size be passed as flag?

or we should use environment variable and set it's value using export before invoking the tool?

Use flags to set environment variables

NobinPegasus commented 2 months ago

Can you provide some more guidelines on which files should I make the changes. And if I am not wrong, we would be able to invoke bpftime like this if implemented correctly. sudo ~/.bpftime/bpftime SHARED_MEMORY=100 Right?

Officeyutong commented 2 months ago

Can you provide some more guidelines on which files should I make the changes. And if I am not wrong, we would be able to invoke bpftime like this if implemented correctly. sudo ~/.bpftime/bpftime SHARED_MEMORY=100 Right?