[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190312150024.GF4939@kernel.org>
Date: Tue, 12 Mar 2019 12:00:24 -0300
From: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To: Song Liu <songliubraving@...com>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
kernel-team@...com, peterz@...radead.org, acme@...hat.com,
jolsa@...nel.org, namhyung@...nel.org, sdf@...ichev.me
Subject: Re: [PATCH v9 perf,bpf 08/15] perf, bpf: save btf in a rbtree in
perf_env
Em Mon, Mar 11, 2019 at 10:30:44PM -0700, Song Liu escreveu:
> static void perf_env__purge_bpf(struct perf_env *env)
> {
> @@ -83,6 +135,19 @@ static void perf_env__purge_bpf(struct perf_env *env)
> rb_erase(&node->rb_node, root);
> free(node);
> }
> +
> + root = &env->bpf_progs.btfs;
> + next = rb_first(root);
> +
> + while (next) {
> + struct btf_node *node;
> +
> + node = rb_entry(next, struct btf_node, rb_node);
> + next = rb_next(&node->rb_node);
> + rb_erase(&node->rb_node, root);
> + free(node);
> + }
Added this as well:
env->bpf_progs.btfs_cnt = 0;
> +
> up_write(&env->bpf_progs.lock);
> }
Powered by blists - more mailing lists