aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/top.c')
-rw-r--r--tools/perf/util/top.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/top.c b/tools/perf/util/top.c
index 75cfe4d45119..a11f60735a18 100644
--- a/tools/perf/util/top.c
+++ b/tools/perf/util/top.c
@@ -171,7 +171,7 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root)
171{ 171{
172 struct sym_entry *syme, *n; 172 struct sym_entry *syme, *n;
173 float sum_ksamples = 0.0; 173 float sum_ksamples = 0.0;
174 int snap = !top->display_weighted ? top->sym_counter : 0, j; 174 int snap = !top->display_weighted ? top->sym_evsel->idx : 0, j;
175 175
176 /* Sort the active symbols */ 176 /* Sort the active symbols */
177 pthread_mutex_lock(&top->active_symbols_lock); 177 pthread_mutex_lock(&top->active_symbols_lock);
@@ -184,9 +184,9 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root)
184 if (syme->snap_count != 0) { 184 if (syme->snap_count != 0) {
185 185
186 if ((top->hide_user_symbols && 186 if ((top->hide_user_symbols &&
187 syme->origin == PERF_RECORD_MISC_USER) || 187 syme->map->dso->kernel == DSO_TYPE_USER) ||
188 (top->hide_kernel_symbols && 188 (top->hide_kernel_symbols &&
189 syme->origin == PERF_RECORD_MISC_KERNEL)) { 189 syme->map->dso->kernel == DSO_TYPE_KERNEL)) {
190 perf_top__remove_active_sym(top, syme); 190 perf_top__remove_active_sym(top, syme);
191 continue; 191 continue;
192 } 192 }