From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by sourceware.org (Postfix) with ESMTPS id 49532385041D for ; Tue, 4 Aug 2020 15:32:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 49532385041D Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 074FI1dv140917; Tue, 4 Aug 2020 15:32:19 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 32n11n4yhj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 04 Aug 2020 15:32:19 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 074FHhbI131736; Tue, 4 Aug 2020 15:32:19 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 32njawtjcr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Aug 2020 15:32:18 +0000 Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 074FWHwo015691; Tue, 4 Aug 2020 15:32:18 GMT Received: from termi.oracle.com (/10.175.23.64) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Aug 2020 08:32:17 -0700 From: "Jose E. Marchesi" To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH V6 2/3] sim: eBPF simulator References: <20200803140237.14476-1-jose.marchesi@oracle.com> <20200803140237.14476-3-jose.marchesi@oracle.com> <20200804145029.GX853475@embecosm.com> Date: Tue, 04 Aug 2020 17:32:13 +0200 In-Reply-To: <20200804145029.GX853475@embecosm.com> (Andrew Burgess's message of "Tue, 4 Aug 2020 15:50:29 +0100") Message-ID: <877due8m0y.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9703 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 malwarescore=0 adultscore=0 suspectscore=9 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008040116 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9703 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 priorityscore=1501 impostorscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxscore=0 suspectscore=9 mlxlogscore=999 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008040116 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2020 15:32:23 -0000 >> 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 >> David Faust >> >> * 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 >> Jose E. Marchesi >> >> * 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!