[profiler] Fix 'no' argument parsing.
[mono.git] / mono / profiler / log-args.c
index af647a0524179db38b1448997761cfbab346a3b0..53cf67ba6e72228c9a01ccf69e1b62609053732c 100644 (file)
@@ -141,8 +141,9 @@ parse_arg (const char *arg, ProfilerConfig *config)
                        if (!strcmp (arg, event_list [i].event_name)) {
                                config->enable_mask |= event_list [i].mask;
                                break;
-                       } else if (arg [0] == 'n' && arg [1] == 'o' && !strcmp (arg + 2, event_list [i].event_name)) {
+                       } else if (!strncmp (arg, "no", 2) && !strcmp (arg + 2, event_list [i].event_name)) {
                                config->disable_mask |= event_list [i].mask;
+                               break;
                        }
                }
                if (i == G_N_ELEMENTS (event_list)) {
@@ -314,6 +315,7 @@ usage (void)
        printf ("\tmaxframes=NUM        collect up to NUM stack frames\n");
        printf ("\tcalldepth=NUM        ignore method events for call chain depth bigger than NUM\n");
        printf ("\toutput=FILENAME      write the data to file FILENAME (The file is always overwriten)\n");
+       printf ("\toutput=+FILENAME     write the data to file FILENAME.pid (The file is always overwriten)\n");
        printf ("\toutput=|PROGRAM      write the data to the stdin of PROGRAM\n");
        printf ("\t                     %%t is subtituted with date and time, %%p with the pid\n");
        printf ("\treport               create a report instead of writing the raw data to a file\n");
@@ -404,4 +406,4 @@ mono_cpu_count (void)
        }
 
        return 1;
-}
\ No newline at end of file
+}