From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH V6 2/3] sim: eBPF simulator
Date: Tue, 04 Aug 2020 17:32:13 +0200 [thread overview]
Message-ID: <877due8m0y.fsf@oracle.com> (raw)
In-Reply-To: <20200804145029.GX853475@embecosm.com> (Andrew Burgess's message of "Tue, 4 Aug 2020 15:50:29 +0100")
>> This patch introduces the basics of an instruction-simulator for eBPF.
>> The simulator is based on CGEN.
>>
>> sim/ChangeLog:
>>
>> 2020-08-03 Jose E. Marchesi <jose.marchesi@oracle.com>
>> David Faust <david.faust@oracle.com>
>>
>> * configure.tgt (sim_arch): Add entry for bpf-*-*.
>> * configure: Regenerate.
>> * MAINTAINERS: Add maintainer for the BPF simulator.
>> * bpf/Makefile.in: New file.
>> * bpf/bpf-helpers.c: Likewise.
>> * bpf/bpf-helpers.def: Likewise.
>> * bpf/bpf-helpers.h: Likewise.
>> * bpf/bpf-sim.h: Likewise.
>> * bpf/bpf.c: Likewise.
>> * bpf/config.in: Likewise.
>> * bpf/configure.ac: Likewise.
>
> You need to regenerate bpf/configure and commit it.
I removed that thunk from the patch due to the size limit. It is in.
>> * bpf/decode.h: Likewise.
>> * bpf/eng.h: Likewise.
>> * bpf/mloop.in: Likewise.
>> * bpf/sim-if.c: Likewise.
>> * bpf/sim-main.h: Likewise.
>> * bpf/traps.c: Likewise.
>> * bpf/configure: Generate.
>> * bpf/aclocal.m4: Likewise.
>>
>> sim/testsuite/ChangeLog:
>>
>> 2020-08-03 David Faust <david.faust@oracle.com>
>> Jose E. Marchesi <jose.marchesi@oracle.com>
>>
>> * configure: Regenerate.
>> * sim/bpf/allinsn.exp: New file.
>> * sim/bpf/alu.s: Likewise.
>> * sim/bpf/alu32.s: Likewise.
>> * sim/bpf/endbe.s: Likewise.
>> * sim/bpf/endle.s: Likewise.
>> * sim/bpf/jmp.s: Likewise.
>> * sim/bpf/jmp32.s: Likewise.
>> * sim/bpf/ldabs.s: Likewise.
>> * sim/bpf/mem.s: Likewise.
>> * sim/bpf/mov.s: Likewise.
>> * sim/bpf/testutils.inc: Likewise.
>> * sim/bpf/xadd.s: Likewise.
>> ---
>> gdb/ChangeLog | 4 +
>> gdb/configure.tgt | 1 +
>
> Make sure you include the gdb/ChangeLog entry in the commit message.
Ok.
>> +# Note the following files are generated in objdir, not srcdir.
>> +
>> +stamp-mloop: stamp-mloop-le stamp-mloop-be
>> +
>> +stamp-mloop-le: $(srcdir)/../common/genmloop.sh mloop.in Makefile
>> + $(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
>> + -mono -scache -prefix bpfbf_ebpfle -cpu bpfbf \
>> + -infile $(srcdir)/mloop.in
>> + $(SHELL) $(srcroot)/move-if-change eng.hin eng-le.h
>> + $(SHELL) $(srcroot)/move-if-change mloop.cin mloop-le.c
>> + touch $@
>> +mloop-le.c eng-le.h: stamp-mloop-le
>> + @true
>> +
>> +stamp-mloop-be: $(srcdir)/../common/genmloop.sh mloop.in Makefile
>> + $(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
>> + -mono -scache -prefix bpfbf_ebpfbe -cpu bpfbf \
>> + -infile $(srcdir)/mloop.in
>> + $(SHELL) $(srcroot)/move-if-change eng.hin eng-be.h
>> + $(SHELL) $(srcroot)/move-if-change mloop.cin mloop-be.c
>> + touch $@
>> +mloop-be.c eng-be.h: stamp-mloop-be
>> + @true
>
> When testing the build I ran into issues here while trying to perform
> a parallel build as both these rules generate the files eng.hin and
> mloop.cin.
>
> I know this problem is not unique to this target, but it would be nice
> if we didn't introduce more places where the parallel build is broken.
>
> The _correct_ solution would be to update genmloop.sh so that the
> output files can be named. However, I'm aware that this is an
> unreasonable expectation, so could you at least combine the be and le
> generation into a single rule 'stamp-all-mloop' please, and add a
> comment explaining why. This at least will work around the problem
> for now.
Regarding genmloop.sh, I just noticed the script may be already
supporting this?
-outfile-suffix) shift ; outsuffix=$1 ;;
I'm using it now like this, and seems to work well with -j:
# Note the following files are generated in objdir, not srcdir.
stamp-mloop: stamp-mloop-le stamp-mloop-be
stamp-mloop-le: $(srcdir)/../common/genmloop.sh mloop.in Makefile
$(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
-mono -scache -prefix bpfbf_ebpfle -cpu bpfbf \
-infile $(srcdir)/mloop.in -outfile-suffix -le
$(SHELL) $(srcroot)/move-if-change eng-le.hin eng-le.h
$(SHELL) $(srcroot)/move-if-change mloop-le.cin mloop-le.c
touch $@
mloop-le.c eng-le.h: stamp-mloop-le
@true
stamp-mloop-be: $(srcdir)/../common/genmloop.sh mloop.in Makefile
$(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
-mono -scache -prefix bpfbf_ebpfbe -cpu bpfbf \
-infile $(srcdir)/mloop.in -outfile-suffix -be
$(SHELL) $(srcroot)/move-if-change eng-be.hin eng-be.h
$(SHELL) $(srcroot)/move-if-change mloop-be.cin mloop-be.c
touch $@
mloop-be.c eng-be.h: stamp-mloop-be
@true
> With these issues resolved I'm happy for this to go in.
Thanks!
next prev parent reply other threads:[~2020-08-04 15:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 14:02 [PATCH V6 0/3] eBPF support Jose E. Marchesi
2020-08-03 14:02 ` [PATCH V6 1/3] gdb: support for eBPF Jose E. Marchesi
2020-08-03 14:52 ` Eli Zaretskii
2020-08-03 15:04 ` Jose E. Marchesi
2020-08-03 14:55 ` Aktemur, Tankut Baris
2020-08-03 15:52 ` Jose E. Marchesi
2020-08-03 16:00 ` Simon Marchi
2020-08-03 16:46 ` Jose E. Marchesi
2020-08-04 13:41 ` Andrew Burgess
2020-08-04 14:57 ` Jose E. Marchesi
2020-08-04 16:29 ` Simon Marchi
2020-08-05 9:21 ` Andrew Burgess
2020-08-05 13:00 ` Simon Marchi
2020-08-03 14:02 ` [PATCH V6 2/3] sim: eBPF simulator Jose E. Marchesi
2020-08-04 14:50 ` Andrew Burgess
2020-08-04 15:32 ` Jose E. Marchesi [this message]
2020-08-03 14:02 ` [PATCH V6 3/3] sim: generated files for the " Jose E. Marchesi
2020-08-04 13:51 ` Andrew Burgess
2020-08-04 14:59 ` Jose E. Marchesi
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=877due8m0y.fsf@oracle.com \
--to=jose.marchesi@oracle.com \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox