@@ -102,6 +102,9 @@ pub struct OrchestratorConfig {
102102 pub memory_track_physical : bool ,
103103 /// Do not set PYTHONMALLOC for simulation runs.
104104 pub disable_pythonmalloc_override : bool ,
105+ /// Capture allocation call stacks in memory mode, so allocations can be
106+ /// attributed to the code that made them.
107+ pub memory_capture_stack : bool ,
105108}
106109
107110/// Per-execution configuration passed to executors.
@@ -149,6 +152,12 @@ pub struct ExecutorConfig {
149152 pub memory_track_physical : bool ,
150153 /// Do not set PYTHONMALLOC for simulation runs.
151154 pub disable_pythonmalloc_override : bool ,
155+ /// Capture allocation call stacks in memory mode, so allocations can be
156+ /// attributed to the code that made them.
157+ ///
158+ /// Only read by the memory executor, which is Linux-only.
159+ #[ cfg_attr( not( target_os = "linux" ) , allow( dead_code) ) ]
160+ pub memory_capture_stack : bool ,
152161}
153162
154163#[ derive( Debug , Clone , PartialEq ) ]
@@ -223,6 +232,7 @@ impl OrchestratorConfig {
223232 simulation_track_subprocess : self . simulation_track_subprocess ,
224233 memory_track_physical : self . memory_track_physical ,
225234 disable_pythonmalloc_override : self . disable_pythonmalloc_override ,
235+ memory_capture_stack : self . memory_capture_stack ,
226236 }
227237 }
228238}
@@ -260,6 +270,7 @@ impl OrchestratorConfig {
260270 simulation_track_subprocess : false ,
261271 memory_track_physical : false ,
262272 disable_pythonmalloc_override : false ,
273+ memory_capture_stack : false ,
263274 }
264275 }
265276}
0 commit comments