made huge improvements to benchmark results, now unify using str (not bytearray)

parent 839090ef
......@@ -180,6 +180,10 @@ fn link_executable_internal(
}
// dylibs used for linux
if cfg!(target_os = "linux") {
// cc.arg("-g");
// cc.arg("-fprofile-instr-generate");
// cc.arg("-fcoverage-mapping");
// cc.arg("-lprofiler");
cc.arg("-pthread");
cc.arg("-ldl");
cc.arg("-lm");
......
......@@ -256,16 +256,16 @@ impl EMMRegion {
let _size = sys_get_aligned_size(_size, POINTER_SIZE);
let res = self.freeptr;
if self.has_enough_space(_size) {
trace_if!(
log_settings::MM_RTMU_TRACE,
"RALLOC: allocating {} bytes",
_size
);
// trace_if!(
// log_settings::MM_RTMU_TRACE,
// "RALLOC: allocating {} bytes",
// _size
// );
self.freeptr += _size as ByteOffset;
res
} else {
panic!("RALLOC: not enough free space in scope:\n {:#?}", self);
unsafe { Address::from_usize(0) }
// unsafe { Address::from_usize(0) }
}
}
......@@ -317,15 +317,19 @@ pub extern "C" fn muentry_delete_reg(regionref: Address) {
/// space
#[no_mangle]
pub extern "C" fn muentry_ralloc(regionref: Address, size: usize) -> Address {
trace_if!(log_settings::MM_RTMU_TRACE, "=== RALLOC ===");
trace_if!(log_settings::MM_RTMU_TRACE, "- size: -{}", size);
let mut emmregion = unsafe { regionref.to_ptr_mut() as *mut EMMRegion };
trace_if!(log_settings::MM_RTMU_TRACE, "- from region: {:?}", unsafe {
&(*emmregion)
});
let res = unsafe { (*emmregion).ralloc(size) };
trace_if!(log_settings::MM_RTMU_TRACE, "=== DONE RALLOC ===");
res
// trace_if!(log_settings::MM_RTMU_TRACE, "=== RALLOC ===");
// trace_if!(log_settings::MM_RTMU_TRACE, "- size: -{}", size);
// let mut emmregion = unsafe { regionref.to_ptr_mut() as *mut EMMRegion };
// trace_if!(log_settings::MM_RTMU_TRACE, "- from region: {:?}", unsafe {
// &(*emmregion)
// });
// let res = unsafe { (*emmregion).ralloc(size) };
// trace_if!(log_settings::MM_RTMU_TRACE, "=== DONE RALLOC ===");
// res
unsafe { (*(regionref.to_ptr_mut() as *mut EMMRegion)).ralloc(size) }
// let res = unsafe { (*emmregion).ralloc(size) };
// trace_if!(log_settings::MM_RTMU_TRACE, "=== DONE RALLOC ===");
// res
}
#[no_mangle]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment