Profiler skeleton.

This commit is contained in:
Ben Vanik
2014-05-27 22:54:40 -07:00
parent f3f9d93017
commit 6486e0a48e
10 changed files with 249 additions and 0 deletions

View File

@@ -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

View File

@@ -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");