lkml.org 
[lkml]   [2018]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2018-03-12 23:33    [W:0.057 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site