[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161130161257.GA4353@redhat.com>
Date: Wed, 30 Nov 2016 14:12:57 -0200
From: Arnaldo Carvalho de Melo <acme@...hat.com>
To: Wang Nan <wangnan0@...wei.com>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>, ast@...com,
lizefan@...wei.com, hekuang@...wei.com,
linux-kernel@...r.kernel.org, pi3orama@....com, joe@....org,
Jiri Olsa <jolsa@...nel.org>, acme@...nel.org
Subject: Re: [PATCH v3 26/30] perf clang: Link BPF functions declaration into
perf
Em Sat, Nov 26, 2016 at 09:40:41AM -0800, Alexei Starovoitov escreveu:
> On Sat, Nov 26, 2016 at 07:03:50AM +0000, Wang Nan wrote:
> > + * } bpf_funcs[] = {
> > + * EOF
> > + * grep '^[[:space:]]BPF_FUNC_[^ ]*,' $KERNEL_DIR/include/uapi/linux/bpf.h | \
> > + * sed -e 's/.*BPF_FUNC_\([^,]*\),.*$/\1/g' | \
> > + * xargs -n 1 sh -c 'echo {.name = \"$1\", .id = BPF_FUNC_$1}, >> '"$MAIN" sh
> > + * cat << EOF >> $MAIN
>
> This is pretty fragile and already broken.
> Please just hardcode them as-is. There is no need to be so fancy.
>
> > +"static void *(*bpf_map_lookup_elem)(void *, void *) = (void *)1;\n"
> > +"static long (*bpf_map_update_elem)(void *, void *, void *, unsigned long) = (void *)2;\n"
> > +"static long (*bpf_map_delete_elem)(void *, void *) = (void *)3;\n"
>
> just hard code this way.
Wang, can you please resend this? I'm trying to process this patchkit,
but will take some time to get to this 26th patch.
- Arnaldo
Powered by blists - more mailing lists