[profiler] Remove support for the output=-FILENAME option.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Wed, 12 Jul 2017 13:21:22 +0000 (15:21 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Fri, 14 Jul 2017 10:59:27 +0000 (12:59 +0200)
mono/profiler/log.c
mono/profiler/ptestrunner.pl

index bd04c2ec24f0df96b0e110863c9df8a1852f7f57..bf821d28bb21860b463e9b2485a5149540d180ec 100644 (file)
@@ -4498,23 +4498,15 @@ static void
 create_profiler (const char *args, const char *filename, GPtrArray *filters)
 {
        char *nf;
-       int force_delete = 0;
 
        log_profiler = (MonoProfiler *) g_calloc (1, sizeof (MonoProfiler));
        log_profiler->args = pstrdup (args);
        log_profiler->command_port = command_port;
 
-       if (filename && *filename == '-') {
-               force_delete = 1;
-               filename++;
-               g_warning ("WARNING: the output:-FILENAME option is deprecated, the profiler now always overrides the output file\n");
-       }
-
        //If filename begin with +, append the pid at the end
        if (filename && *filename == '+')
                filename = g_strdup_printf ("%s.%d", filename + 1, getpid ());
 
-
        if (!filename) {
                if (do_report)
                        filename = "|mprof-report -";
@@ -4537,11 +4529,9 @@ create_profiler (const char *args, const char *filename, GPtrArray *filters)
        } else if (*nf == '#') {
                int fd = strtol (nf + 1, NULL, 10);
                log_profiler->file = fdopen (fd, "a");
-       } else {
-               if (force_delete)
-                       unlink (nf);
+       } else
                log_profiler->file = fopen (nf, "wb");
-       }
+
        if (!log_profiler->file) {
                fprintf (stderr, "Cannot create profiler output: %s\n", nf);
                exit (1);
index ab9cb1f663f7ec789d6de4f1b0aa126e27abe418..0f2f5edf5aae83383aa6a9ce5aaca50c682136d0 100755 (executable)
@@ -62,7 +62,7 @@ if ($report ne "missing binary") {
        report_errors ();
 }
 # test heapshot traces
-$report = run_test_sgen ("test-heapshot.exe", "heapshot,output=-traces.mlpd,legacy", "--traces traces.mlpd");
+$report = run_test_sgen ("test-heapshot.exe", "heapshot,output=traces.mlpd,legacy", "--traces traces.mlpd");
 if ($report ne "missing binary") {
        check_report_basics ($report);
        check_report_heapshot ($report, 0, {"T" => 5000});
@@ -76,7 +76,7 @@ if ($report ne "missing binary") {
        report_errors ();
 }
 # test traces
-$report = run_test ("test-traces.exe", "legacy,calls,alloc,output=-traces.mlpd", "--maxframes=7 --traces traces.mlpd");
+$report = run_test ("test-traces.exe", "legacy,calls,alloc,output=traces.mlpd", "--maxframes=7 --traces traces.mlpd");
 check_report_basics ($report);
 check_call_traces ($report,
        "T:level3 (int)" => [2020, "T:Main (string[])"],
@@ -92,7 +92,7 @@ check_alloc_traces ($report,
 );
 report_errors ();
 # test traces without enter/leave events
-$report = run_test ("test-traces.exe", "legacy,alloc,output=-traces.mlpd", "--traces traces.mlpd");
+$report = run_test ("test-traces.exe", "legacy,alloc,output=traces.mlpd", "--traces traces.mlpd");
 check_report_basics ($report);
 # this has been broken recently
 check_exception_traces ($report,