]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - tools/perf/util/stat.c
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / tools / perf / util / stat.c
index 2d065d065b676232eecbe8ea94348f4cf3a77f33..2d9d8306dbd3f97f3d1f9734ace17b25d9ed583a 100644 (file)
@@ -67,7 +67,7 @@ double rel_stddev_stats(double stddev, double avg)
 bool __perf_evsel_stat__is(struct perf_evsel *evsel,
                           enum perf_stat_evsel_id id)
 {
-       struct perf_stat *ps = evsel->priv;
+       struct perf_stat_evsel *ps = evsel->priv;
 
        return ps->id == id;
 }
@@ -84,7 +84,7 @@ static const char *id_str[PERF_STAT_EVSEL_ID__MAX] = {
 
 void perf_stat_evsel_id_init(struct perf_evsel *evsel)
 {
-       struct perf_stat *ps = evsel->priv;
+       struct perf_stat_evsel *ps = evsel->priv;
        int i;
 
        /* ps->id is 0 hence PERF_STAT_EVSEL_ID__NONE by default */
@@ -100,7 +100,7 @@ void perf_stat_evsel_id_init(struct perf_evsel *evsel)
 void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
 {
        int i;
-       struct perf_stat *ps = evsel->priv;
+       struct perf_stat_evsel *ps = evsel->priv;
 
        for (i = 0; i < 3; i++)
                init_stats(&ps->res_stats[i]);
@@ -110,7 +110,7 @@ void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
 
 int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
 {
-       evsel->priv = zalloc(sizeof(struct perf_stat));
+       evsel->priv = zalloc(sizeof(struct perf_stat_evsel));
        if (evsel->priv == NULL)
                return -ENOMEM;
        perf_evsel__reset_stat_priv(evsel);
@@ -230,7 +230,7 @@ static int check_per_pkg(struct perf_evsel *counter,
        if (!(vals->run && vals->ena))
                return 0;
 
-       s = cpu_map__get_socket(cpus, cpu);
+       s = cpu_map__get_socket(cpus, cpu, NULL);
        if (s < 0)
                return -1;
 
@@ -272,6 +272,7 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel
                        aggr->ena += count->ena;
                        aggr->run += count->run;
                }
+       case AGGR_UNSET:
        default:
                break;
        }
@@ -304,7 +305,7 @@ int perf_stat_process_counter(struct perf_stat_config *config,
                              struct perf_evsel *counter)
 {
        struct perf_counts_values *aggr = &counter->counts->aggr;
-       struct perf_stat *ps = counter->priv;
+       struct perf_stat_evsel *ps = counter->priv;
        u64 *count = counter->counts->aggr.values;
        int i, ret;