Search
lxdream.org :: lxdream :: r1184:0a306d645e2c
lxdream 0.9.1
released Jun 29
Download Now
changeset1184:0a306d645e2c
parent1183:425d9de21c78
child1185:4f02196f68eb
authornkeynes
dateTue Nov 29 16:16:07 2011 +1000 (12 years ago)
Add the (hidden) -P option to turn on block profiling
src/main.c
1.1 --- a/src/main.c Tue Nov 29 16:15:38 2011 +1000
1.2 +++ b/src/main.c Tue Nov 29 16:16:07 2011 +1000
1.3 @@ -45,7 +45,7 @@
1.4
1.5 #define GL_INFO_OPT 1
1.6
1.7 -char *option_list = "a:A:bc:e:dfg:G:hHl:m:npt:T:uvV:xX?";
1.8 +char *option_list = "a:A:bc:e:dfg:G:hHl:m:npPt:T:uvV:xX?";
1.9 struct option longopts[] = {
1.10 { "aica", required_argument, NULL, 'a' },
1.11 { "audio", required_argument, NULL, 'A' },
1.12 @@ -67,6 +67,7 @@
1.13 { "unsafe", no_argument, NULL, 'u' },
1.14 { "video", no_argument, NULL, 'V' },
1.15 { "version", no_argument, NULL, 'v' },
1.16 + { "sh4-profile-blocks", no_argument, NULL, 'P' },
1.17 { NULL, 0, 0, 0 } };
1.18 char *aica_program = NULL;
1.19 char *display_driver_name = NULL;
1.20 @@ -131,7 +132,7 @@
1.21 int opt;
1.22 double t;
1.23 gboolean display_ok, have_disc = FALSE, have_save = FALSE, have_exec = FALSE;
1.24 - gboolean print_glinfo = FALSE;
1.25 + gboolean print_glinfo = FALSE, sh4_profile_blocks = FALSE;
1.26 uint32_t time_secs, time_nanos;
1.27 const char *exec_name = NULL;
1.28
1.29 @@ -192,6 +193,9 @@
1.30 start_immediately = TRUE;
1.31 no_start = FALSE;
1.32 break;
1.33 + case 'P':
1.34 + sh4_profile_blocks = TRUE;
1.35 + break;
1.36 case 't': /* Time limit + auto quit */
1.37 t = strtod(optarg, NULL);
1.38 time_secs = (uint32_t)t;
1.39 @@ -355,6 +359,9 @@
1.40 }
1.41
1.42 sh4_set_core( sh4_core );
1.43 + if( sh4_core == SH4_TRANSLATE ) {
1.44 + sh4_translate_set_profile_blocks( sh4_profile_blocks );
1.45 + }
1.46
1.47 /* If requested, start the gdb server immediately before we go into the main
1.48 * loop.
.