summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-10-02 16:15:59 -0700
committerAndrea Canciani <ranma42@gmail.com>2011-11-12 20:49:08 +0100
commit6a0ba303035997fcd5f28bcd32297f9bc21bd45a (patch)
treead6dfc64e0bf363d3201c286554d983b1cad342d /perf
parent0e18cc6d27e59e42c6632b21c5502174c8a9eb08 (diff)
Sort option flags
Keep the option flags in alphabetical order. This makes it easier to check for collisions or missing handlers. Avoids an internal error when passing flags -c, -r or -v to cairo-analyse-trace.
Diffstat (limited to 'perf')
-rw-r--r--perf/cairo-analyse-trace.c2
-rw-r--r--perf/cairo-perf-micro.c12
-rw-r--r--perf/cairo-perf-trace.c24
3 files changed, 19 insertions, 19 deletions
diff --git a/perf/cairo-analyse-trace.c b/perf/cairo-analyse-trace.c
index ac2a4e7a..6cd77f67 100644
--- a/perf/cairo-analyse-trace.c
+++ b/perf/cairo-analyse-trace.c
@@ -330,7 +330,7 @@ parse_options (cairo_perf_t *perf,
perf->num_exclude_names = 0;
while (1) {
- c = _cairo_getopt (argc, argv, "i:x:lrvc");
+ c = _cairo_getopt (argc, argv, "i:lx:");
if (c == -1)
break;
diff --git a/perf/cairo-perf-micro.c b/perf/cairo-perf-micro.c
index 61ed55fc..63aad712 100644
--- a/perf/cairo-perf-micro.c
+++ b/perf/cairo-perf-micro.c
@@ -361,11 +361,16 @@ parse_options (cairo_perf_t *perf,
perf->summary = stdout;
while (1) {
- c = _cairo_getopt (argc, argv, "i:lrvf");
+ c = _cairo_getopt (argc, argv, "fi:lrv");
if (c == -1)
break;
switch (c) {
+ case 'f':
+ perf->fast_and_sloppy = TRUE;
+ if (ms == NULL)
+ perf->ms_per_iteration = CAIRO_PERF_ITERATION_MS_FAST;
+ break;
case 'i':
perf->exact_iterations = TRUE;
perf->iterations = strtoul (optarg, &end, 10);
@@ -382,11 +387,6 @@ parse_options (cairo_perf_t *perf,
perf->raw = TRUE;
perf->summary = NULL;
break;
- case 'f':
- perf->fast_and_sloppy = TRUE;
- if (ms == NULL)
- perf->ms_per_iteration = CAIRO_PERF_ITERATION_MS_FAST;
- break;
case 'v':
verbose = 1;
break;
diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
index 8e637a7d..3e5ba95a 100644
--- a/perf/cairo-perf-trace.c
+++ b/perf/cairo-perf-trace.c
@@ -445,11 +445,14 @@ parse_options (cairo_perf_t *perf,
perf->num_exclude_names = 0;
while (1) {
- c = _cairo_getopt (argc, argv, "t:i:x:lsrvc");
+ c = _cairo_getopt (argc, argv, "ci:lrst:vx:");
if (c == -1)
break;
switch (c) {
+ case 'c':
+ use_surface_cache = 1;
+ break;
case 'i':
perf->exact_iterations = TRUE;
perf->iterations = strtoul (optarg, &end, 10);
@@ -459,14 +462,6 @@ parse_options (cairo_perf_t *perf,
exit (1);
}
break;
- case 't':
- perf->tile_size = strtoul (optarg, &end, 10);
- if (*end != '\0') {
- fprintf (stderr, "Invalid argument for -t (not an integer): %s\n",
- optarg);
- exit (1);
- }
- break;
case 'l':
perf->list_only = TRUE;
break;
@@ -477,12 +472,17 @@ parse_options (cairo_perf_t *perf,
case 's':
perf->observe = TRUE;
break;
+ case 't':
+ perf->tile_size = strtoul (optarg, &end, 10);
+ if (*end != '\0') {
+ fprintf (stderr, "Invalid argument for -t (not an integer): %s\n",
+ optarg);
+ exit (1);
+ }
+ break;
case 'v':
verbose = 1;
break;
- case 'c':
- use_surface_cache = 1;
- break;
case 'x':
if (! read_excludes (perf, optarg)) {
fprintf (stderr, "Invalid argument for -x (not readable file): %s\n",