Skip to content
Snippets Groups Projects
user avatar
Nadav Har'El authored
The current code the trace_log - a 4MB array which stores tracepoint data -
is a global array. In other words, as explained in issue #96, it is part
of the BSS, which always adds 4MB memory usage to OSv - whether or not
tracepoints are actually enabled.

This patch changes trace_log to be a dynamically-allocated array, allocated
when the first tracepoint is enabled (e.g., with a --trace=...  boot
option).

This will also allow us (in the future) to choose the size of the trace log
at run time rather than compile time.

This patch reduces 4 MB of BSS (from 13MB to 9MB), and correspondly lowers
our minimum memory use by 4 MB. Whereas the minimum memory requirement of
the "rogue" image used to be 59 MB, now it is 55 MB.

Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
c50a090f
History
Name Last commit Last update
..