[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180312223234.GB14525@krava>
Date: Mon, 12 Mar 2018 23:32:34 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>,
Jiri Olsa <jolsa@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
David Ahern <dsahern@...il.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Daniel Borkmann <daniel@...earbox.net>,
Wangnan <wangnan0@...wei.com>
Subject: Re: [PATCH 11/13] perf bpf: Add helper header files
On Mon, Mar 12, 2018 at 04:25:51PM -0300, Arnaldo Carvalho de Melo wrote:
SNIP
> >
> > right, I kept this way, because it was already there for kernel,
> > so it was fast to write ;-)
> >
> > but it's true we could leave it symbol based and have some sort of
> > dynamic loader behaviour.. but we'd need to sort out passing the
> > arguments in some generic form.. I'll check on that
>
> Does this answer it or am I missing something?
>
> Documentation/bpf/bpf_design_QA.txt
>
> Q: Is BPF a generic virtual machine ?
> A: NO.
>
> BPF is generic instruction set _with_ C calling convention.
>
> Q: Why C calling convention was chosen?
> A: Because BPF programs are designed to run in the linux kernel
> which is written in C, hence BPF defines instruction set compatible
> with two most used architectures x64 and arm64 (and takes into
> consideration important quirks of other architectures) and
> defines calling convention that is compatible with C calling
> convention of the linux kernel on those architectures.
hm right, but still we interpret the calls.. so we have to call
the function at the end
jirka
Powered by blists - more mailing lists