"  -c, --cpu    cpu-set limit output to summary plus cpu-set:\n"
                "                 {core | package | j,k,l..m,n-p }\n"
                "  -d, --debug  displays usec, Time_Of_Day_Seconds and more debugging\n"
+               "               debug messages are printed to stderr\n"
                "  -D, --Dump   displays the raw counter values\n"
                "  -e, --enable [all | column]\n"
                "               shows all or the specified disabled column\n"
                        pinfo->scale = perf_scale;
 
                        if (debug)
-                               printf("Add perf/%s/%s cpu%d: %d\n",
+                               fprintf(stderr, "Add perf/%s/%s cpu%d: %d\n",
                                       pinfo->device, pinfo->event, cpu, pinfo->fd_perf_per_domain[next_domain]);
                }
 
 
        for (mp = head; mp; mp = mp->next) {
                if (debug)
-                       printf("%s: %s %s\n", __func__, name, mp->name);
+                       fprintf(stderr, "%s: %s %s\n", __func__, name, mp->name);
                if (!strncmp(name, mp->name, strlen(mp->name)))
                        return mp;
        }
                errx(1, "Requested MSR counter 0x%x, but in --no-msr mode", msr_num);
 
        if (debug)
-               printf("%s(msr%d, %s, %s, width%d, scope%d, type%d, format%d, flags%x, id%d)\n", __func__, msr_num,
-                      path, name, width, scope, type, format, flags, id);
+               fprintf(stderr, "%s(msr%d, %s, %s, width%d, scope%d, type%d, format%d, flags%x, id%d)\n",
+                       __func__, msr_num, path, name, width, scope, type, format, flags, id);
 
        switch (scope) {
 
                msrp = find_msrp_by_name(sys.tp, name);
                if (msrp) {
                        if (debug)
-                               printf("%s: %s FOUND\n", __func__, name);
+                               fprintf(stderr, "%s: %s FOUND\n", __func__, name);
                        break;
                }
                if (sys.added_thread_counters++ >= MAX_ADDED_THREAD_COUNTERS) {
                msrp = find_msrp_by_name(sys.cp, name);
                if (msrp) {
                        if (debug)
-                               printf("%s: %s FOUND\n", __func__, name);
+                               fprintf(stderr, "%s: %s FOUND\n", __func__, name);
                        break;
                }
                if (sys.added_core_counters++ >= MAX_ADDED_CORE_COUNTERS) {
                msrp = find_msrp_by_name(sys.pp, name);
                if (msrp) {
                        if (debug)
-                               printf("%s: %s FOUND\n", __func__, name);
+                               fprintf(stderr, "%s: %s FOUND\n", __func__, name);
                        break;
                }
                if (sys.added_package_counters++ >= MAX_ADDED_PACKAGE_COUNTERS) {
 
        // FIXME: we might not have debug here yet
        if (debug)
-               printf("%s: %s/%s, name: %s, scope%d\n",
+               fprintf(stderr, "%s: %s/%s, name: %s, scope%d\n",
                       __func__, pinfo->device, pinfo->event, pinfo->name, pinfo->scope);
 
        return 0;