Skip to content

Commit 8dbd96b

Browse files
cooperleesfacebook-github-bot
authored andcommitted
Fix fbcode TARGETS for compiling with procfs 0.15.1
Summary: - Fix top level dirs: - frl_ee_infra - fbcode_devx - hermetic_infra - hphp/hack - remote_execution - service_capacity/projection_framework Going to need to lean on people to help test here once CI passes ... Reviewed By: aijayadams Differential Revision: D49899458 fbshipit-source-id: 4eaa7c3b07bfcf5d23c4ed71a9050ffa2b9ac777
1 parent 4eee23c commit 8dbd96b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

detcore/src/procmaps.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ fn display_pathname(p: &MMapPath) -> String {
2626
MMapPath::Other(s) => format!("[other: {}]", s),
2727
MMapPath::Anonymous => String::from("[annonymous]"),
2828
MMapPath::Path(s) => s.display().to_string(),
29+
MMapPath::Rollup => String::from("[rollup]"),
30+
MMapPath::Vsys(vsys) => vsys.to_string(),
2931
}
3032
}
3133

3234
pub fn display(map: &MemoryMap) -> String {
3335
format!(
34-
"{:#x}-{:#x} {} {:x} {:x}:{:x} {} {}",
36+
"{:#x}-{:#x} {:?} {:x} {:x}:{:x} {} {}",
3537
map.address.0,
3638
map.address.1,
3739
map.perms,
@@ -57,8 +59,8 @@ where
5759
match procfs::process::Process::new(pid.as_raw()) {
5860
Ok(process) => match process.maps() {
5961
Ok(mut maps) => {
60-
maps.retain(filter);
61-
Ok(maps)
62+
maps.memory_maps.retain(filter);
63+
Ok(maps.memory_maps)
6264
}
6365
Err(err) => Err(map_error(err)),
6466
},

detcore/src/syscalls/sysinfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl<T: RecordOrReplay> Detcore<T> {
6464

6565
fn free_ram<G: Guest<Self>>(&self, guest: &mut G, total_ram: u64) -> anyhow::Result<u64> {
6666
let process = Process::new(guest.pid().as_raw())?;
67-
let page_size = procfs::page_size()? as u64;
67+
let page_size = procfs::page_size();
6868
let statm = process.statm()?;
6969
let used_memory = statm.resident * page_size;
7070
if used_memory > total_ram {

0 commit comments

Comments
 (0)