Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbbLKSWG (ORCPT ); Fri, 11 Dec 2015 13:22:06 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:34758 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751032AbbLKSWE (ORCPT ); Fri, 11 Dec 2015 13:22:04 -0500 Date: Fri, 11 Dec 2015 10:21:58 -0800 From: Alexei Starovoitov To: pi3orama Cc: Arnaldo Carvalho de Melo , Wang Nan , namhyung@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, lizefan@huawei.com, Alexei Starovoitov , Masami Hiramatsu Subject: Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for BPF maps Message-ID: <20151211182157.GC59096@ast-mbp.thefacebook.com> References: <1449541544-67621-1-git-send-email-wangnan0@huawei.com> <1449541544-67621-10-git-send-email-wangnan0@huawei.com> <20151211121145.GP17996@kernel.org> <20151211121521.GQ17996@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1300 Lines: 30 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/