All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Alexei Starovoitov <ast@fb.com>
Cc: Martin KaFai Lau <kafai@fb.com>,
	netdev@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>,
	kernel-team@fb.com, Wang Nan <wangnan0@huawei.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format
Date: Thu, 14 Jun 2018 15:00:17 -0300	[thread overview]
Message-ID: <20180614180017.GJ30043@kernel.org> (raw)
In-Reply-To: <20180614174759.GI30043@kernel.org>

Em Thu, Jun 14, 2018 at 02:47:59PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Jun 14, 2018 at 10:21:30AM -0700, Alexei Starovoitov escreveu:
> > On 6/14/18 10:18 AM, Arnaldo Carvalho de Melo wrote:
> > > Just out of curiosity, is there any plan to have this as a clang option?
  
> > I think
> > clang ... -mllvm -mattr=dwarfris
> > should work.
 
> The message "(LLVM option parsing)" implies what you suggest, but didn't
> worked :-\
 
>   -mllvm <value>          Additional arguments to forward to LLVM's option processing
 
> Almost there tho :-\

So I thought that this -mattr=dwarfris would be available only after I
set the target, because I tried 'llc -mattr=help' and dwarfris wasn't
there:

[acme@jouet perf]$ llc -mattr=help |& grep dwarf
[acme@jouet perf]$

Only after I set the arch it appears:

[acme@jouet perf]$ llc -march=bpf -mattr=help |& grep dwarf
  dwarfris - Disable MCAsmInfo DwarfUsesRelocationsAcrossSections.
  dwarfris - Disable MCAsmInfo DwarfUsesRelocationsAcrossSections.
  dwarfris - Disable MCAsmInfo DwarfUsesRelocationsAcrossSections.
[acme@jouet perf]$ 

But even after moving the '-mllvm -mattr=dwarfris' to after '-target
bpf' it still can't grok it :-\

/usr/local/bin/clang -D__KERNEL__ -D__NR_CPUS__=4 -DLINUX_VERSION_CODE=0x41100 -g -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/7/include -I/home/acme/git/linux/arch/x86/include -I./arch/x86/include/generated  -I/home/acme/git/linux/include -I./include -I/home/acme/git/linux/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/home/acme/git/linux/include/uapi -I./include/generated/uapi -include /home/acme/git/linux/include/linux/kconfig.h  -I/home/acme/lib/include/perf/bpf -Wno-unused-value -Wno-pointer-sign -working-directory /lib/modules/4.17.0-rc5/build -c /home/acme/bpf/hello.c -target bpf -mllvm -mattr=dwarfris -O2 -o hello.o

So onlye with 'clang ... -target bpf -emit-llvm -O2 -o - | llc -march=bpf -mattr=dwarfris ...'
things work as we expect.

- Arnaldo

  reply	other threads:[~2018-06-14 18:00 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18 22:55 [PATCH bpf-next v5 00/10] BTF: BPF Type Format Martin KaFai Lau
2018-04-18 22:55 ` [PATCH bpf-next v5 01/10] bpf: btf: Introduce BPF Type Format (BTF) Martin KaFai Lau
2018-04-18 22:55 ` [PATCH bpf-next v5 02/10] bpf: btf: Validate type reference Martin KaFai Lau
2018-04-18 22:55 ` [PATCH bpf-next v5 03/10] bpf: btf: Check members of struct/union Martin KaFai Lau
2018-04-18 22:56 ` [PATCH bpf-next v5 04/10] bpf: btf: Add pretty print capability for data with BTF type info Martin KaFai Lau
2018-04-18 22:56 ` [PATCH bpf-next v5 05/10] bpf: btf: Add BPF_BTF_LOAD command Martin KaFai Lau
2018-04-18 22:56 ` [PATCH bpf-next v5 06/10] bpf: btf: Add BPF_OBJ_GET_INFO_BY_FD support to BTF fd Martin KaFai Lau
2018-04-18 22:56 ` [PATCH bpf-next v5 07/10] bpf: btf: Add pretty print support to the basic arraymap Martin KaFai Lau
2018-04-18 22:56 ` [PATCH bpf-next v5 08/10] bpf: btf: Sync bpf.h and btf.h to tools/ Martin KaFai Lau
2018-04-18 22:56 ` [PATCH bpf-next v5 09/10] bpf: btf: Add BTF support to libbpf Martin KaFai Lau
2018-05-09 22:17   ` libbpf backward compatibility (was: [PATCH bpf-next v5 09/10] bpf: btf: Add BTF support to libbpf) Jakub Kicinski
2018-05-09 22:20     ` Jakub Kicinski
2018-04-18 22:56 ` [PATCH bpf-next v5 10/10] bpf: btf: Add BTF tests Martin KaFai Lau
2018-04-19 19:40 ` [PATCH bpf-next v5 00/10] BTF: BPF Type Format Arnaldo Carvalho de Melo
2018-04-19 20:58   ` Martin KaFai Lau
2018-06-05 21:25   ` Martin KaFai Lau
2018-06-06 12:33     ` Arnaldo Carvalho de Melo
2018-06-07 13:54     ` Arnaldo Carvalho de Melo
2018-06-07 14:03       ` Arnaldo Carvalho de Melo
2018-06-07 19:05         ` Martin KaFai Lau
2018-06-07 19:30           ` Arnaldo Carvalho de Melo
2018-06-07 20:07             ` Martin KaFai Lau
2018-06-07 20:25               ` Arnaldo Carvalho de Melo
2018-06-12 20:31               ` Arnaldo Carvalho de Melo
2018-06-12 20:41                 ` Arnaldo Carvalho de Melo
2018-06-13 23:26                   ` Martin KaFai Lau
2018-06-14 15:03                     ` Arnaldo Carvalho de Melo
2018-06-14 16:22                       ` Martin KaFai Lau
2018-06-14 17:18                         ` Arnaldo Carvalho de Melo
2018-06-14 17:21                           ` Alexei Starovoitov
2018-06-14 17:41                             ` Arnaldo Carvalho de Melo
2018-06-14 17:47                             ` Arnaldo Carvalho de Melo
2018-06-14 18:00                               ` Arnaldo Carvalho de Melo [this message]
2018-06-15  4:56                                 ` Yonghong Song
2018-06-15 14:24                                   ` Arnaldo Carvalho de Melo
2018-06-15 16:06                                     ` Yonghong Song
2018-06-15 11:20             ` Bo YU
2018-04-19 23:57 ` Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180614180017.GJ30043@kernel.org \
    --to=acme@kernel.org \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=kernel-team@fb.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.