perf report: Treat an argument as a symbol filter
[linux-flexiantxendom0-3.2.10.git] / tools / perf / builtin-report.c
index 80fb907..c005458 100644 (file)
@@ -715,11 +715,16 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
        } else
                symbol_conf.exclude_other = false;
 
-       /*
-        * Any (unrecognized) arguments left?
-        */
-       if (argc)
-               usage_with_options(report_usage, options);
+       if (argc) {
+               /*
+                * Special case: if there's an argument left then assume that
+                * it's a symbol filter:
+                */
+               if (argc > 1)
+                       usage_with_options(report_usage, options);
+
+               report.symbol_filter_str = argv[0];
+       }
 
        sort_entry__setup_elide(&sort_comm, symbol_conf.comm_list, "comm", stdout);