Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1289812

Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for BPF maps

From Alexei Starovoitov <alexei.starovoitov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for BPF maps
Date 2015-12-11 19:30 +0100
Message-ID <qEAC5-862-5@gated-at.bofh.it> (permalink)
References <qDgcp-4Bz-3@gated-at.bofh.it> <qDgcq-4Bz-31@gated-at.bofh.it> <qEuQ2-486-11@gated-at.bofh.it> <qEuQ3-486-31@gated-at.bofh.it> <qEvj4-4o4-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Dec 11, 2015 at 08:39:35PM +0800, pi3orama wrote:
> > static u64 (*bpf_ktime_get_ns)(void) =
> >     (void *)5;
> > static int (*bpf_trace_printk)(const char *fmt, int fmt_size, ...) =
> >     (void *)6;
> > static int (*bpf_get_smp_processor_id)(void) =
> >     (void *)8;
> > static int (*bpf_perf_event_output)(void *, struct bpf_map_def *, int,
> > void *, unsigned long) =
> >     (void *)23;
> > 
> > Where can I get this magical mistery table? Could this be hidden away in
> > some .h file automagically included in bpf scriptlets so that n00bies
> > like me don't have to be wtf'ing?
> > 
> 
> They are function numbers defined in bpf.h and bpf-common.h, but they are Linux
> headers. Directly include them causes many error for llvm. Also, the function
> prototypes are BPF specific and can't included in Linux source. We should have
> a place holds those indices and prototypes together.

wait, what kind of errors?
they are in uapi, so gets installed into /usr/include eventually
and I haven't seen any erros either with gcc or clang.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 00/16] perf tools: BPF related update and other improvements Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:30 +0100
  [PATCH v4 01/16] tools lib bpf: Check return value of strdup when reading map names Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:30 +0100
    [tip:perf/core] tools lib bpf:   Check return value of strdup when reading map names tip-bot for Wang Nan <tipbot@zytor.com> - 2015-12-14 09:40 +0100
  [PATCH v4 07/16] perf tools: Enable passing event to BPF object Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:30 +0100
  [PATCH v4 12/16] perf data: Support converting data from bpf_perf_event_output() Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:30 +0100
  [PATCH v4 14/16] perf record: Support custom vmlinux path Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:30 +0100
  [PATCH v4 09/16] perf tools: Enable indices setting syntax for BPF maps Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:30 +0100
    Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for  BPF maps Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-11 13:20 +0100
      Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for  BPF maps Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-11 13:20 +0100
        Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for  BPF maps Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-11 13:50 +0100
          Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for BPF maps pi3orama <pi3orama@163.com> - 2015-12-11 14:00 +0100
        Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for BPF maps pi3orama <pi3orama@163.com> - 2015-12-11 13:50 +0100
          Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for  BPF maps Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-12-11 19:30 +0100
            Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for  BPF maps "Wangnan (F)" <wangnan0@huawei.com> - 2015-12-14 04:30 +0100
              Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for  BPF maps Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-12-14 05:30 +0100
                Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for  BPF maps "Wangnan (F)" <wangnan0@huawei.com> - 2015-12-14 05:50 +0100
                Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for  BPF maps Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-12-14 07:00 +0100
  [PATCH v4 13/16] perf tools: Always give options even it not compiled Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:30 +0100
    Re: [PATCH v4 13/16] perf tools: Always give options even it not  compiled Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-11 13:50 +0100
  [PATCH v4 15/16] perf script: Add support for PERF_TYPE_BREAKPOINT Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:40 +0100
    [tip:perf/core] perf script: Add support for PERF_TYPE_BREAKPOINT tip-bot for Wang Nan <tipbot@zytor.com> - 2015-12-14 09:40 +0100
  [PATCH v4 06/16] perf tools: Support perf event alias name Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:40 +0100
    Re: [PATCH v4 06/16] perf tools: Support perf event alias name Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-11 13:10 +0100
      Re: [PATCH v4 06/16] perf tools: Support perf event alias name pi3orama <pi3orama@163.com> - 2015-12-11 13:20 +0100
  [PATCH v4 02/16] tools lib bpf: Fetch map names from correct strtab Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:40 +0100
    [tip:perf/core] tools lib bpf:   Fetch map names from correct strtab tip-bot for Wang Nan <tipbot@zytor.com> - 2015-12-14 09:40 +0100
  [PATCH v4 05/16] perf record: Apply config to BPF objects before recording Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:40 +0100
  [PATCH v4 04/16] perf tools: Enable BPF object configure syntax Wang Nan <wangnan0@huawei.com> - 2015-12-08 03:40 +0100

csiph-web