# HG changeset patch # User nkeynes # Date 1322547367 -36000 # Node ID 0a306d645e2c374c88aa0f26764e12843bd3620b # Parent 425d9de21c7889958db8c76d26b635cda659e238 Add the (hidden) -P option to turn on block profiling --- a/src/main.c Tue Nov 29 16:15:38 2011 +1000 +++ b/src/main.c Tue Nov 29 16:16:07 2011 +1000 @@ -45,7 +45,7 @@ #define GL_INFO_OPT 1 -char *option_list = "a:A:bc:e:dfg:G:hHl:m:npt:T:uvV:xX?"; +char *option_list = "a:A:bc:e:dfg:G:hHl:m:npPt:T:uvV:xX?"; struct option longopts[] = { { "aica", required_argument, NULL, 'a' }, { "audio", required_argument, NULL, 'A' }, @@ -67,6 +67,7 @@ { "unsafe", no_argument, NULL, 'u' }, { "video", no_argument, NULL, 'V' }, { "version", no_argument, NULL, 'v' }, + { "sh4-profile-blocks", no_argument, NULL, 'P' }, { NULL, 0, 0, 0 } }; char *aica_program = NULL; char *display_driver_name = NULL; @@ -131,7 +132,7 @@ int opt; double t; gboolean display_ok, have_disc = FALSE, have_save = FALSE, have_exec = FALSE; - gboolean print_glinfo = FALSE; + gboolean print_glinfo = FALSE, sh4_profile_blocks = FALSE; uint32_t time_secs, time_nanos; const char *exec_name = NULL; @@ -192,6 +193,9 @@ start_immediately = TRUE; no_start = FALSE; break; + case 'P': + sh4_profile_blocks = TRUE; + break; case 't': /* Time limit + auto quit */ t = strtod(optarg, NULL); time_secs = (uint32_t)t; @@ -355,6 +359,9 @@ } sh4_set_core( sh4_core ); + if( sh4_core == SH4_TRANSLATE ) { + sh4_translate_set_profile_blocks( sh4_profile_blocks ); + } /* If requested, start the gdb server immediately before we go into the main * loop.