[FEATURE] Allow defining shared memory size at runtime
Officeyutong opened this issue · 4 comments
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
Should the size be passed as flag?
or we should use environment variable and set it's value using export before invoking the tool?
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
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?
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?
- CLI is at https://github.com/eunomia-bpf/bpftime/blob/master/tools/cli/main.cpp
- invocation should be like
bpftime --shared-memory-size
or other things you like. CLI should set environment variable likeBPFTIME_SHARED_MEMORY_SIZE
for bpftime-agent. Agent should use the value ofBPFTIME_SHARED_MEMORY_SIZE
if provided