lkml.org 
[lkml]   [2017]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 04/10] perf util: Add rbtree node_delete ops
On Mon, Nov 27, 2017 at 10:07:24PM +0800, Jin Yao wrote:

SNIP

> @@ -124,13 +137,25 @@ static struct saved_value *saved_value_lookup(struct perf_evsel *evsel,
> return NULL;
> }
>
> +void runtime_stat__init(struct runtime_stat *stat)
> +{
> + struct rblist *rblist = &stat->value_list;
> +
> + rblist__init(rblist);
> + rblist->node_cmp = saved_value_cmp;
> + rblist->node_new = saved_value_new;
> + rblist->node_delete = saved_value_delete;
> +}
> +
> +void runtime_stat__free(struct runtime_stat *stat)
> +{
> + rblist__reset(&stat->value_list);
> +}
> +
> void perf_stat__init_shadow_stats(void)
> {
> have_frontend_stalled = pmu_have_event("cpu", "stalled-cycles-frontend");
> - rblist__init(&runtime_saved_values);
> - runtime_saved_values.node_cmp = saved_value_cmp;
> - runtime_saved_values.node_new = saved_value_new;
> - /* No delete for now */

hum, you should you remove this at the switching point
to keep it bisectable.. now it crashes:

[jolsa@krava perf]$ sudo ./perf stat -M Summary --metric-only -a sleep 1
Segmentation fault


jirka

\
 
 \ /
  Last update: 2017-11-28 12:13    [W:0.076 / U:11.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site