Profiler skeleton.
This commit is contained in:
@@ -24,6 +24,8 @@ using namespace xe::cpu;
|
||||
|
||||
|
||||
int alloy_sandbox(int argc, xechar_t** argv) {
|
||||
xe::Profiler::ThreadEnter("main");
|
||||
|
||||
XenonMemory* memory = new XenonMemory();
|
||||
|
||||
ExportResolver* export_resolver = new ExportResolver();
|
||||
@@ -57,6 +59,9 @@ int alloy_sandbox(int argc, xechar_t** argv) {
|
||||
delete runtime;
|
||||
delete memory;
|
||||
|
||||
xe::Profiler::Dump();
|
||||
xe::Profiler::ThreadExit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
// ehhh
|
||||
|
||||
@@ -22,6 +22,8 @@ DEFINE_string(target, "",
|
||||
int xenia_run(int argc, xechar_t** argv) {
|
||||
int result_code = 1;
|
||||
|
||||
Profiler::ThreadEnter("main");
|
||||
|
||||
Emulator* emulator = NULL;
|
||||
|
||||
// Grab path from the flag or unnamed argument.
|
||||
@@ -89,6 +91,8 @@ XECLEANUP:
|
||||
if (result_code) {
|
||||
XEFATAL("Failed to launch emulator: %d", result_code);
|
||||
}
|
||||
Profiler::Dump();
|
||||
Profiler::Shutdown();
|
||||
return result_code;
|
||||
}
|
||||
XE_MAIN_WINDOW_THUNK(xenia_run, XETEXT("xenia-run"), "xenia-run some.xex");
|
||||
|
||||
Reference in New Issue
Block a user