perf beauty: Update copy of linux/socket.h with the kernel sources
[linux-2.6-microblaze.git] / tools / perf / builtin-stat.c
index 6343759..f6e87b7 100644 (file)
@@ -1996,7 +1996,7 @@ static int __cmd_record(int argc, const char **argv)
                return -1;
        }
 
-       session = perf_session__new(data, false, NULL);
+       session = perf_session__new(data, NULL);
        if (IS_ERR(session)) {
                pr_err("Perf session creation failed\n");
                return PTR_ERR(session);
@@ -2168,7 +2168,7 @@ static int __cmd_report(int argc, const char **argv)
        perf_stat.data.path = input_name;
        perf_stat.data.mode = PERF_DATA_MODE_READ;
 
-       session = perf_session__new(&perf_stat.data, false, &perf_stat.tool);
+       session = perf_session__new(&perf_stat.data, &perf_stat.tool);
        if (IS_ERR(session))
                return PTR_ERR(session);
 
@@ -2386,7 +2386,8 @@ int cmd_stat(int argc, const char **argv)
         * --per-thread is aggregated per thread, we dont mix it with cpu mode
         */
        if (((stat_config.aggr_mode != AGGR_GLOBAL &&
-             stat_config.aggr_mode != AGGR_THREAD) || nr_cgroups) &&
+             stat_config.aggr_mode != AGGR_THREAD) ||
+            (nr_cgroups || stat_config.cgroup_list)) &&
            !target__has_cpu(&target)) {
                fprintf(stderr, "both cgroup and no-aggregation "
                        "modes only available in system-wide mode\n");
@@ -2394,6 +2395,7 @@ int cmd_stat(int argc, const char **argv)
                parse_options_usage(stat_usage, stat_options, "G", 1);
                parse_options_usage(NULL, stat_options, "A", 1);
                parse_options_usage(NULL, stat_options, "a", 1);
+               parse_options_usage(NULL, stat_options, "for-each-cgroup", 0);
                goto out;
        }
 
@@ -2430,6 +2432,12 @@ int cmd_stat(int argc, const char **argv)
        if ((stat_config.aggr_mode == AGGR_THREAD) && (target.system_wide))
                target.per_thread = true;
 
+       if (evlist__fix_hybrid_cpus(evsel_list, target.cpu_list)) {
+               pr_err("failed to use cpu list %s\n", target.cpu_list);
+               goto out;
+       }
+
+       target.hybrid = perf_pmu__has_hybrid();
        if (evlist__create_maps(evsel_list, &target) < 0) {
                if (target__has_task(&target)) {
                        pr_err("Problems finding threads of monitor\n");