]> Git Repo - linux.git/commitdiff
Merge branch 'perf/urgent' into perf/core, to pick up fixes
authorIngo Molnar <[email protected]>
Thu, 4 Feb 2016 07:57:44 +0000 (08:57 +0100)
committerIngo Molnar <[email protected]>
Thu, 4 Feb 2016 07:57:44 +0000 (08:57 +0100)
Signed-off-by: Ingo Molnar <[email protected]>
1  2 
tools/perf/util/stat.c

diff --combined tools/perf/util/stat.c
index beeed0bd3bee9d3ad6c67bbd14927f02c8af6f20,afb0c45eba34ba8db7a6cb6d258326f545f7aca1..4d9b481cf3b6edbb7d6161cbd238709241dedc5b
@@@ -97,7 -97,7 +97,7 @@@ void perf_stat_evsel_id_init(struct per
        }
  }
  
 -void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
 +static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
  {
        int i;
        struct perf_stat_evsel *ps = evsel->priv;
        perf_stat_evsel_id_init(evsel);
  }
  
 -int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
 +static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
  {
        evsel->priv = zalloc(sizeof(struct perf_stat_evsel));
        if (evsel->priv == NULL)
        return 0;
  }
  
 -void perf_evsel__free_stat_priv(struct perf_evsel *evsel)
 +static void perf_evsel__free_stat_priv(struct perf_evsel *evsel)
  {
        zfree(&evsel->priv);
  }
  
 -int perf_evsel__alloc_prev_raw_counts(struct perf_evsel *evsel,
 -                                    int ncpus, int nthreads)
 +static int perf_evsel__alloc_prev_raw_counts(struct perf_evsel *evsel,
 +                                           int ncpus, int nthreads)
  {
        struct perf_counts *counts;
  
        return counts ? 0 : -ENOMEM;
  }
  
 -void perf_evsel__free_prev_raw_counts(struct perf_evsel *evsel)
 +static void perf_evsel__free_prev_raw_counts(struct perf_evsel *evsel)
  {
        perf_counts__delete(evsel->prev_raw_counts);
        evsel->prev_raw_counts = NULL;
  }
  
 -int perf_evsel__alloc_stats(struct perf_evsel *evsel, bool alloc_raw)
 +static int perf_evsel__alloc_stats(struct perf_evsel *evsel, bool alloc_raw)
  {
        int ncpus = perf_evsel__nr_cpus(evsel);
        int nthreads = thread_map__nr(evsel->threads);
@@@ -311,6 -311,16 +311,16 @@@ int perf_stat_process_counter(struct pe
  
        aggr->val = aggr->ena = aggr->run = 0;
  
+       /*
+        * We calculate counter's data every interval,
+        * and the display code shows ps->res_stats
+        * avg value. We need to zero the stats for
+        * interval mode, otherwise overall avg running
+        * averages will be shown for each interval.
+        */
+       if (config->interval)
+               init_stats(ps->res_stats);
        if (counter->per_pkg)
                zero_per_pkg(counter);
  
This page took 0.079429 seconds and 4 git commands to generate.