Compare commits

...

7 Commits

Author SHA1 Message Date
ea2c3c64a2 Merge branch 'master' of https://github.com/GuillaumeDIDIER/dendrobates-t-azureus 2024-08-16 10:36:54 +02:00
Guillaume DIDIER
4ace7c8f7e Increase the size of the test area 2024-08-16 09:56:25 +02:00
Guillaume DIDIER
52ef3902f3 Fix forgotten debug print 2024-08-16 09:56:25 +02:00
Guillaume DIDIER
c99e244b71 Only print detailed information in debug mode 2024-08-16 09:56:25 +02:00
Guillaume DIDIER
35b3ec7143 u64 and usize are not the same type, sorry 2024-08-16 09:56:25 +02:00
Guillaume DIDIER
94af9a99cc Get the number of available CBox on Intel Core using MSR_UNC_CBO_CONFIG 2024-08-16 09:56:25 +02:00
Guillaume DIDIER
d3aa4d1317 Added debug information. 2024-08-16 09:56:25 +02:00
2 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,7 @@ pub fn main() {
let nb_cores = core_per_package(); let nb_cores = core_per_package();
println!("Found {} cores", nb_cores); println!("Found {} cores", nb_cores);
let target = vec![0x0123456789abcdefu64; 64]; let target = vec![0x0123456789abcdefu64; 1024];
let old = sched_getaffinity(Pid::from_raw(0)).unwrap(); let old = sched_getaffinity(Pid::from_raw(0)).unwrap();
let mut core_set = Vec::new(); let mut core_set = Vec::new();

View File

@ -113,6 +113,7 @@ fn monitor_core(addr: *const u8, cpu: u8) -> Result<Vec<u64>, Error> {
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
eprint!("Resetting counters..."); eprint!("Resetting counters...");
for i in 0..max_cbox { for i in 0..max_cbox {
#[cfg(debug_assertions)]
eprint!(" {i}"); eprint!(" {i}");
write_msr_on_cpu(performance_counters.msr_unc_cbo_per_ctr0[i], cpu, performance_counters.val_reset_ctrs)?; write_msr_on_cpu(performance_counters.msr_unc_cbo_per_ctr0[i], cpu, performance_counters.val_reset_ctrs)?;
} }