Don't allow specifying event-set switching on overflow and timeout for the
same event-set.

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
@@ -1373,6 +1373,12 @@
                return EINVAL;
        }
 
+       if (switch_on_timeout && switch_on_overflow) {
+               LOG_ERROR("Cannot switch set %d (context %d) on both "
+                         "timeout and overflow.", event_set_id, ctx_id);
+               return EINVAL;
+       }
+
        evt = find_event_set(ctx, event_set_id);
        if (!evt) {
                evt = calloc(1, sizeof(*evt));
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to