Raptor trace file in output directory
This commit is contained in:
@@ -86,7 +86,6 @@ impl Executable {
|
||||
}
|
||||
|
||||
pub fn execute(&mut self) {
|
||||
TRACER.lock().unwrap().init(self);
|
||||
let Self {
|
||||
cpu,
|
||||
core_instructions,
|
||||
|
||||
@@ -3,7 +3,7 @@ mod disable;
|
||||
mod pretty_print;
|
||||
|
||||
#[cfg(feature = "tracing")]
|
||||
use std::fs::File;
|
||||
use std::{fs::File, path::{ PathBuf}};
|
||||
use std::sync::{LazyLock, Mutex};
|
||||
|
||||
use crate::Executable;
|
||||
@@ -21,12 +21,13 @@ impl Trace {
|
||||
}
|
||||
|
||||
|
||||
pub fn init(&mut self, executor : & Executable) {
|
||||
let cpu = executor.cpu();
|
||||
let num_core = cpu.num_core();
|
||||
pub fn init(&mut self, num_core : usize , mut path : PathBuf) {
|
||||
path.pop();
|
||||
for i in 0..num_core {
|
||||
let file = File::create(format!("TraceCore{}", i)).expect("Can not create file");
|
||||
path.push(format!("TraceCore{}", i));
|
||||
let file = File::create(&path).expect("Can not create file");
|
||||
self.out_files.push(file);
|
||||
path.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,7 +44,7 @@ impl Trace {
|
||||
}
|
||||
|
||||
|
||||
pub fn init(&mut self, executor : & Executable) {
|
||||
pub fn init(&mut self, num_core : usize, path : PathBuf ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user