diff options
-rw-r--r-- | profcollectd/libprofcollectd/config.rs | 7 | ||||
-rw-r--r-- | profcollectd/libprofcollectd/scheduler.rs | 2 | ||||
-rw-r--r-- | profcollectd/libprofcollectd/simpleperf_etm_trace_provider.rs | 1 |
3 files changed, 4 insertions, 6 deletions
diff --git a/profcollectd/libprofcollectd/config.rs b/profcollectd/libprofcollectd/config.rs index 8c8d06b9..7dbd708c 100644 --- a/profcollectd/libprofcollectd/config.rs +++ b/profcollectd/libprofcollectd/config.rs @@ -61,7 +61,7 @@ pub struct Config { /// An optional filter to limit which binaries to or not to profile. pub binary_filter: String, /// Maximum size of the trace directory. - pub max_trace_limit: u64, + pub max_trace_limit_mb: u64, /// The kernel release version pub kernel_release: String, } @@ -77,10 +77,7 @@ impl Config { 600, )?), binary_filter: get_device_config("binary_filter", DEFAULT_BINARY_FILTER.to_string())?, - max_trace_limit: get_device_config( - "max_trace_limit", - /* 512MB */ 512 * 1024 * 1024, - )?, + max_trace_limit_mb: get_device_config("max_trace_limit_mb", 768)?, kernel_release: get_kernel_release(), }) } diff --git a/profcollectd/libprofcollectd/scheduler.rs b/profcollectd/libprofcollectd/scheduler.rs index 8695f57c..9e4914fb 100644 --- a/profcollectd/libprofcollectd/scheduler.rs +++ b/profcollectd/libprofcollectd/scheduler.rs @@ -189,7 +189,7 @@ fn check_space_limit(path: &Path, config: &Config) -> Result<bool> { }) }; - if dir_size(path)? > config.max_trace_limit { + if dir_size(path)? > config.max_trace_limit_mb * 1024 * 1024 { log::error!("trace storage exhausted."); return Ok(false); } diff --git a/profcollectd/libprofcollectd/simpleperf_etm_trace_provider.rs b/profcollectd/libprofcollectd/simpleperf_etm_trace_provider.rs index 2d36d0cb..8e6933e0 100644 --- a/profcollectd/libprofcollectd/simpleperf_etm_trace_provider.rs +++ b/profcollectd/libprofcollectd/simpleperf_etm_trace_provider.rs @@ -50,6 +50,7 @@ impl TraceProvider for SimpleperfEtmTraceProvider { event_name, "--duration", &duration, + "--decode-etm", "--exclude-perf", "--binary", binary_filter, |