Add support for simple profile benchmarks

One of the reasons that tiobench gets used a lot, is that you
simply have to run it. For "real" benchmarks, you usually
have to configure them first. This adds support for easy testing
by adding some predefined and included workloads. This commit
includes tiobench, to run a tiobench like workload you would
simply do:

$ fio --profile=tiobench

and that would be it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/options.c b/options.c
index 4544378..ff27765 100644
--- a/options.c
+++ b/options.c
@@ -1715,6 +1715,18 @@
 		.def	= "0",
 	},
 	{
+		.name	= "profile",
+		.type	= FIO_OPT_STR,
+		.off1	= td_var_offset(profile),
+		.posval = {
+			  { .ival = "tiobench",
+			    .oval = PROFILE_TIOBENCH,
+			    .help = "Perform tiobench like test",
+			  },
+		},
+		.help	= "Select a specific builtin performance test",
+	},
+	{
 		.name = NULL,
 	},
 };
@@ -1811,6 +1823,7 @@
 		return str;
 
 	tmp++;
+	memset(opt, 0, sizeof(opt));
 	strncpy(opt, str, tmp - str);
 
 	buf = malloc(128);
@@ -1879,7 +1892,7 @@
 			 * replace opt and free the old opt
 			 */
 			opt = new;
-			free(o_org);
+			//free(o_org);
 
 			/*
 			 * Check for potential math and invoke bc, if possible