Remove the --switch-on-timeout and --explicit-next-set options from the
create_eventset command. Instead, if the --timeout option is given, just
force the switch-on-timeout option, and if the --next-set option is given,
just force the --explicit-next-set option, since that's most likely what
the user is expecting anyway.
Signed-off-by: Kevin Corry <[EMAIL PROTECTED]>
--- libpfm-a/examples/pfmsetup.c 24 Apr 2007 04:46:33 -0000
+++ libpfm-b/examples/pfmsetup.c 26 Apr 2007 19:27:12 -0000
@@ -121,8 +121,6 @@
* - options: --next-set <next_event_set_id>
* --timeout <nanoseconds>
* --switch-on-overflow
- * --switch-on-timeout
- * --explicit-next-set
* --exclude-idle
* - <context_id>: ID that you specified when creating the context.
* - <event_set_id>: specify an integer that you want to associate with
@@ -1295,8 +1293,6 @@
* Options: --next-set <next_event_set_id>
* --timeout <nanoseconds>
* --switch-on-overflow
- * --switch-on-timeout
- * --explicit-next-set
* --exclude-idle
**/
static int create_eventset(int argc, char **argv)
@@ -1316,9 +1312,7 @@
{"next-set", required_argument, NULL, 1},
{"timeout", required_argument, NULL, 2},
{"switch-on-overflow", no_argument, NULL, 3},
- {"switch-on-timeout", no_argument, NULL, 4},
- {"explicit-next-set", no_argument, NULL, 5},
- {"exclude-idle", no_argument, NULL, 6},
+ {"exclude-idle", no_argument, NULL, 4},
{NULL, 0, NULL, 0} };
memset(&set_arg, 0, sizeof(set_arg));
@@ -1335,6 +1329,7 @@
"positive integer.");
return EINVAL;
}
+ explicit_next_set = TRUE;
break;
case 2:
timeout = strtoul(optarg, NULL, 0);
@@ -1343,17 +1338,12 @@
"non-zero integer.");
return EINVAL;
}
+ switch_on_timeout = TRUE;
break;
case 3:
switch_on_overflow = TRUE;
break;
case 4:
- switch_on_timeout = TRUE;
- break;
- case 5:
- explicit_next_set = TRUE;
- break;
- case 6:
exclude_idle = TRUE;
break;
default:
@@ -1823,8 +1813,7 @@
{ "create_eventset", "ce",
"<context_id> <event_set_id> [--next-set <next_event_set_id>] "
- "[--timeout <nanoseconds>] [--switch-on-overflow] "
- "[--switch-on-timeout] [--explicit-next-set] [--exclude-idle]",
+ "[--timeout <nanoseconds>] [--switch-on-overflow] [--exclude-idle]",
create_eventset, 2 },
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/