Hi, Here are some short patches to get pfmsetup working correctly with perfmon contexts that have multiple event-sets.
1/8 The "timeout" value given to the create_eventset command is in nanoseconds, not microseconds. 2/8 Need to set optind to zero before calling getopt(). Otherwise we won't correctly parse multiple create_eventset commands. 3/8 The create_eventset command only has two required options, not three. 4/8 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. 5/8 Need to use optind and optind+1 to get the context ID and event-set ID, instead of assuming they are in the 1st and 2nd arguments. 6/8 The pfm_create_evtsets() system call allows modifying an existing event set as well as creating a new one. So allow the create_eventset command to take an existing event-set ID. Only allocate a new one if the specified ID is not found. 7/8 Don't allow specifying event-set switching on overflow and timeout for the same event-set. 8/8 The pfm_create_evtsets() system-call may modify the timeout value, so display the timeout value that the kernel is actually going to use. Thanks, -- Kevin Corry [EMAIL PROTECTED] http://www.ibm.com/linux/ _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
