[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5639625B.7020302@huawei.com>
Date: Wed, 4 Nov 2015 09:41:47 +0800
From: "Wangnan (F)" <wangnan0@...wei.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
CC: Namhyung Kim <namhyung@...nel.org>, <ast@...mgrid.com>,
<brendan.d.gregg@...il.com>, <a.p.zijlstra@...llo.nl>,
<daniel@...earbox.net>, <dsahern@...il.com>, <hekuang@...wei.com>,
<jolsa@...nel.org>, <lizefan@...wei.com>,
<masami.hiramatsu.pt@...achi.com>, <paulus@...ba.org>,
<linux-kernel@...r.kernel.org>, <pi3orama@....com>,
<xiakaixu@...wei.com>
Subject: Re: [PATCH 10/31] perf test: Enforce LLVM test for BPF test
On 2015/11/4 2:24, Arnaldo Carvalho de Melo wrote:
> Em Thu, Oct 15, 2015 at 07:58:38PM +0800, Wangnan (F) escreveu:
>>>> +void test__llvm_prepare(void)
>>>> +{
>>>> + p_test_llvm__bpf_result = mmap(NULL, SHARED_BUF_INIT_SIZE,
>>>> + PROT_READ | PROT_WRITE,
>>>> + MAP_SHARED | MAP_ANONYMOUS, -1, 0);
>>>> + if (!p_test_llvm__bpf_result)
>>> It should check MAP_FAILED instead.
>>>
>> Fixed by this way:
> Can you please try refreshing this patchset on top of what is now in
> acme/perf/core?
>
> Also why do we need those struct test->{prepare,cleanup} pointers? You
> introduced it and then, on the next patch that touches 'perf test' and
> uses test__llvm_{prepare,cleanup} you call them directly, which I think
> should be enough, i.e. keep them as functions to call from inside
> the test called from run_test(), right?
>
> - Arnaldo
>
This prepare/cleanup functions are introduced because I want BPF
test reuse the result of LLVM test, so it don't need to compile
those BPF scripts twice. This is the reason I use shared
memory. However, now I think compiling twice is acceptable and
can make things simpler.
I'll update this patchset in my next pull request.
Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists