Start implementing profiling
This commit is contained in:
@@ -31,6 +31,9 @@ struct Args {
|
||||
/// Start a GDB/LLDB debug server on this port.
|
||||
#[arg(short, long)]
|
||||
debug_port: Option<u16>,
|
||||
/// Enable profiling a game
|
||||
#[arg(short, long)]
|
||||
profile: bool,
|
||||
}
|
||||
|
||||
fn init_logger() {
|
||||
@@ -106,6 +109,12 @@ fn main() -> Result<()> {
|
||||
}
|
||||
builder = builder.start_paused(true);
|
||||
}
|
||||
if args.profile {
|
||||
if args.rom.is_none() {
|
||||
bail!("to start profiling, please select a game.");
|
||||
}
|
||||
builder = builder.monitor_events(true)
|
||||
}
|
||||
|
||||
ThreadBuilder::default()
|
||||
.name("Emulator".to_owned())
|
||||
|
||||
Reference in New Issue
Block a user