RE: [PATCH] rtems-examples: Add CoreMark Benchmark
Hesham* Sorry for the typo ! -Message d'origine- De : BAILLIEZ Damien Envoyé : mardi 4 mai 2021 10:16 À : 'Hesham Almatary' Cc : devel@rtems.org Objet : RE: [PATCH] rtems-examples: Add CoreMark Benchmark Hello Heshman, Yes I only use Make. -Message d'origine- De : H.M.K. Almatary De la part de Hesham Almatary Envoyé : vendredi 30 avril 2021 19:39 À : BAILLIEZ Damien Cc : devel@rtems.org Objet : Re: [PATCH] rtems-examples: Add CoreMark Benchmark Hello Damien, Glad to know you have an interest in it. Yes, we needed to add Make support for it, I just didn't get to work on that yet. Do you need to exclusively use Make and not waf though? On Fri, 30 Apr 2021 at 16:50, BAILLIEZ Damien wrote: > > Hi all, > > > > I’ve seen in the Archives that the discussion about adding the CoreMark > Benchmark ended a few weeks ago on the subject of Make support, which greatly > interests me. > > Does someone involved with this know if there has been any progress ? > > > > Regards, > > Damien > > > > > > > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
RE: [PATCH] rtems-examples: Add CoreMark Benchmark
Hello Heshman, Yes I only use Make. -Message d'origine- De : H.M.K. Almatary De la part de Hesham Almatary Envoyé : vendredi 30 avril 2021 19:39 À : BAILLIEZ Damien Cc : devel@rtems.org Objet : Re: [PATCH] rtems-examples: Add CoreMark Benchmark Hello Damien, Glad to know you have an interest in it. Yes, we needed to add Make support for it, I just didn't get to work on that yet. Do you need to exclusively use Make and not waf though? On Fri, 30 Apr 2021 at 16:50, BAILLIEZ Damien wrote: > > Hi all, > > > > I’ve seen in the Archives that the discussion about adding the CoreMark > Benchmark ended a few weeks ago on the subject of Make support, which greatly > interests me. > > Does someone involved with this know if there has been any progress ? > > > > Regards, > > Damien > > > > > > > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] rtems-examples: Add CoreMark Benchmark
Hello Damien, Glad to know you have an interest in it. Yes, we needed to add Make support for it, I just didn't get to work on that yet. Do you need to exclusively use Make and not waf though? On Fri, 30 Apr 2021 at 16:50, BAILLIEZ Damien wrote: > > Hi all, > > > > I’ve seen in the Archives that the discussion about adding the CoreMark > Benchmark ended a few weeks ago on the subject of Make support, which greatly > interests me. > > Does someone involved with this know if there has been any progress ? > > > > Regards, > > Damien > > > > > > > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] rtems-examples: Add CoreMark Benchmark
Hi all, I've seen in the Archives that the discussion about adding the CoreMark Benchmark ended a few weeks ago on the subject of Make support, which greatly interests me. Does someone involved with this know if there has been any progress ? Regards, Damien ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] rtems-examples: Add CoreMark Benchmark
On Mon, Mar 15, 2021 at 6:02 AM Joel Sherrill wrote: > > > > On Mon, Mar 15, 2021, 5:53 AM Hesham Almatary > wrote: >> >> Hello Gedare, >> >> Yeah adding Make support should be straightforward. I just assumed >> Make will be deprecated soon based on [1] and haven't bothered >> supporting it. >> >> [1] >> https://github.com/RTEMS/rtems-examples/blob/983926a7e519be85f630c620430e7e1ac3e0f4ea/README.Makefile#L32 > > > There are projects that use it. Although it is old and it would be nice to go > to something else, that something else isn't there. It's there.foenthe > foreseeable future. > Makefile will always be an option for users (application level) to compile, and we should continue to provide/test that in our examples repo. It would be best to show a variety of build systems in examples, but limited bandwidth means we should at least show make and waf approaches. > --joel > >> >> >> >> >> On Sun, 14 Mar 2021 at 18:47, Gedare Bloom wrote: >> > >> > Hi Hesham, >> > >> > Nice work getting this integrated in the upstream. I guess that the >> > git submodule instructions for building with waf will work for this, >> > but not Make. How hard would it be for you to integrate the submodule >> > with Make? >> > >> > This is fine with me as-is, I just want to know if we can keep it >> > supporting both build systems. >> > >> > On Sat, Mar 13, 2021 at 12:50 AM Hesham Almatary >> > wrote: >> > > >> > > CoreMark's primary goals are simplicity and providing a method for >> > > testing only a processor's core features. It is used primarily here as >> > > a performance benchmark. >> > > >> > > Built and tested for RISC-V rv64imafdc_medany on QEMU and HW >> > > --- >> > > .gitmodules | 3 +++ >> > > benchmarks/coremark/coremark | 1 + >> > > benchmarks/coremark/wscript | 50 >> > > benchmarks/wscript | 2 +- >> > > 4 files changed, 55 insertions(+), 1 deletion(-) >> > > create mode 16 benchmarks/coremark/coremark >> > > create mode 100644 benchmarks/coremark/wscript >> > > >> > > diff --git a/.gitmodules b/.gitmodules >> > > index ae86e49..d7e52b9 100644 >> > > --- a/.gitmodules >> > > +++ b/.gitmodules >> > > @@ -1,3 +1,6 @@ >> > > [submodule "rtems_waf"] >> > > path = rtems_waf >> > > url = git://git.rtems.org/rtems_waf.git >> > > +[submodule "benchmarks/coremark/coremark"] >> > > + path = benchmarks/coremark/coremark >> > > + url = g...@github.com:eembc/coremark.git >> > > diff --git a/benchmarks/coremark/coremark b/benchmarks/coremark/coremark >> > > new file mode 16 >> > > index 000..1541482 >> > > --- /dev/null >> > > +++ b/benchmarks/coremark/coremark >> > > @@ -0,0 +1 @@ >> > > +Subproject commit 1541482bf3e6ef7f5c69f5be76b14537b60833d0 >> > > diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript >> > > new file mode 100644 >> > > index 000..2ec5f1e >> > > --- /dev/null >> > > +++ b/benchmarks/coremark/wscript >> > > @@ -0,0 +1,50 @@ >> > > +#- >> > > +# SPDX-License-Identifier: BSD-2-Clause >> > > +# >> > > +# Copyright (c) 2021 Hesham Almatary >> > > +# >> > > +# This software was developed by SRI International and the University of >> > > +# Cambridge Computer Laboratory (Department of Computer Science and >> > > +# Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part >> > > of the >> > > +# DARPA SSITH research programme. >> > > +# >> > > +# Redistribution and use in source and binary forms, with or without >> > > +# modification, are permitted provided that the following conditions >> > > +# are met: >> > > +# 1. Redistributions of source code must retain the above copyright >> > > +#notice, this list of conditions and the following disclaimer. >> > > +# 2. Redistributions in binary form must reproduce the above copyright >> > > +#notice, this list of conditions and the following disclaimer in the >> > > +#documentation and/or other materials provided with the >> > > distribution. >> > > +# >> > > +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND >> > > +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >> > > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >> > > PURPOSE >> > > +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE >> > > LIABLE >> > > +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >> > > CONSEQUENTIAL >> > > +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE >> > > GOODS >> > > +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >> > > +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, >> > > STRICT >> > > +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY >> > > WAY >> > > +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >> > > +# SUCH DAMAGE. >> > > +# >> > > + >> > > +import rtems_waf.rtems as rtems >> > > + >> >
Re: [PATCH] rtems-examples: Add CoreMark Benchmark
On Mon, Mar 15, 2021, 5:53 AM Hesham Almatary wrote: > Hello Gedare, > > Yeah adding Make support should be straightforward. I just assumed > Make will be deprecated soon based on [1] and haven't bothered > supporting it. > > [1] > https://github.com/RTEMS/rtems-examples/blob/983926a7e519be85f630c620430e7e1ac3e0f4ea/README.Makefile#L32 There are projects that use it. Although it is old and it would be nice to go to something else, that something else isn't there. It's there.foenthe foreseeable future. --joel > > > > On Sun, 14 Mar 2021 at 18:47, Gedare Bloom wrote: > > > > Hi Hesham, > > > > Nice work getting this integrated in the upstream. I guess that the > > git submodule instructions for building with waf will work for this, > > but not Make. How hard would it be for you to integrate the submodule > > with Make? > > > > This is fine with me as-is, I just want to know if we can keep it > > supporting both build systems. > > > > On Sat, Mar 13, 2021 at 12:50 AM Hesham Almatary > > wrote: > > > > > > CoreMark's primary goals are simplicity and providing a method for > > > testing only a processor's core features. It is used primarily here as > > > a performance benchmark. > > > > > > Built and tested for RISC-V rv64imafdc_medany on QEMU and HW > > > --- > > > .gitmodules | 3 +++ > > > benchmarks/coremark/coremark | 1 + > > > benchmarks/coremark/wscript | 50 > > > benchmarks/wscript | 2 +- > > > 4 files changed, 55 insertions(+), 1 deletion(-) > > > create mode 16 benchmarks/coremark/coremark > > > create mode 100644 benchmarks/coremark/wscript > > > > > > diff --git a/.gitmodules b/.gitmodules > > > index ae86e49..d7e52b9 100644 > > > --- a/.gitmodules > > > +++ b/.gitmodules > > > @@ -1,3 +1,6 @@ > > > [submodule "rtems_waf"] > > > path = rtems_waf > > > url = git://git.rtems.org/rtems_waf.git > > > +[submodule "benchmarks/coremark/coremark"] > > > + path = benchmarks/coremark/coremark > > > + url = g...@github.com:eembc/coremark.git > > > diff --git a/benchmarks/coremark/coremark > b/benchmarks/coremark/coremark > > > new file mode 16 > > > index 000..1541482 > > > --- /dev/null > > > +++ b/benchmarks/coremark/coremark > > > @@ -0,0 +1 @@ > > > +Subproject commit 1541482bf3e6ef7f5c69f5be76b14537b60833d0 > > > diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript > > > new file mode 100644 > > > index 000..2ec5f1e > > > --- /dev/null > > > +++ b/benchmarks/coremark/wscript > > > @@ -0,0 +1,50 @@ > > > +#- > > > +# SPDX-License-Identifier: BSD-2-Clause > > > +# > > > +# Copyright (c) 2021 Hesham Almatary > > > +# > > > +# This software was developed by SRI International and the University > of > > > +# Cambridge Computer Laboratory (Department of Computer Science and > > > +# Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as > part of the > > > +# DARPA SSITH research programme. > > > +# > > > +# Redistribution and use in source and binary forms, with or without > > > +# modification, are permitted provided that the following conditions > > > +# are met: > > > +# 1. Redistributions of source code must retain the above copyright > > > +#notice, this list of conditions and the following disclaimer. > > > +# 2. Redistributions in binary form must reproduce the above copyright > > > +#notice, this list of conditions and the following disclaimer in > the > > > +#documentation and/or other materials provided with the > distribution. > > > +# > > > +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' > AND > > > +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, > THE > > > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > > > +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE > LIABLE > > > +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > > > +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > GOODS > > > +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > INTERRUPTION) > > > +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > > > +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN > ANY WAY > > > +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY > OF > > > +# SUCH DAMAGE. > > > +# > > > + > > > +import rtems_waf.rtems as rtems > > > + > > > +def build(bld): > > > +rtems.build(bld) > > > + > > > +bld(features = 'c cprogram', > > > +target = 'coremark.bin', > > > +includes = ['coremark/', 'coremark/posix/'], > > > +source = ['coremark/rtems/init.c', > 'coremark/posix/core_portme.c', > > > + 'coremark/core_list_join.c', 'coremark/core_main.c', > > > + 'coremark/core_matrix.c', 'coremark/core_state.c', > > > + 'coremark/core_util.c'], > > > + > > > +
Re: [PATCH] rtems-examples: Add CoreMark Benchmark
Hello Gedare, Yeah adding Make support should be straightforward. I just assumed Make will be deprecated soon based on [1] and haven't bothered supporting it. [1] https://github.com/RTEMS/rtems-examples/blob/983926a7e519be85f630c620430e7e1ac3e0f4ea/README.Makefile#L32 On Sun, 14 Mar 2021 at 18:47, Gedare Bloom wrote: > > Hi Hesham, > > Nice work getting this integrated in the upstream. I guess that the > git submodule instructions for building with waf will work for this, > but not Make. How hard would it be for you to integrate the submodule > with Make? > > This is fine with me as-is, I just want to know if we can keep it > supporting both build systems. > > On Sat, Mar 13, 2021 at 12:50 AM Hesham Almatary > wrote: > > > > CoreMark's primary goals are simplicity and providing a method for > > testing only a processor's core features. It is used primarily here as > > a performance benchmark. > > > > Built and tested for RISC-V rv64imafdc_medany on QEMU and HW > > --- > > .gitmodules | 3 +++ > > benchmarks/coremark/coremark | 1 + > > benchmarks/coremark/wscript | 50 > > benchmarks/wscript | 2 +- > > 4 files changed, 55 insertions(+), 1 deletion(-) > > create mode 16 benchmarks/coremark/coremark > > create mode 100644 benchmarks/coremark/wscript > > > > diff --git a/.gitmodules b/.gitmodules > > index ae86e49..d7e52b9 100644 > > --- a/.gitmodules > > +++ b/.gitmodules > > @@ -1,3 +1,6 @@ > > [submodule "rtems_waf"] > > path = rtems_waf > > url = git://git.rtems.org/rtems_waf.git > > +[submodule "benchmarks/coremark/coremark"] > > + path = benchmarks/coremark/coremark > > + url = g...@github.com:eembc/coremark.git > > diff --git a/benchmarks/coremark/coremark b/benchmarks/coremark/coremark > > new file mode 16 > > index 000..1541482 > > --- /dev/null > > +++ b/benchmarks/coremark/coremark > > @@ -0,0 +1 @@ > > +Subproject commit 1541482bf3e6ef7f5c69f5be76b14537b60833d0 > > diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript > > new file mode 100644 > > index 000..2ec5f1e > > --- /dev/null > > +++ b/benchmarks/coremark/wscript > > @@ -0,0 +1,50 @@ > > +#- > > +# SPDX-License-Identifier: BSD-2-Clause > > +# > > +# Copyright (c) 2021 Hesham Almatary > > +# > > +# This software was developed by SRI International and the University of > > +# Cambridge Computer Laboratory (Department of Computer Science and > > +# Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of > > the > > +# DARPA SSITH research programme. > > +# > > +# Redistribution and use in source and binary forms, with or without > > +# modification, are permitted provided that the following conditions > > +# are met: > > +# 1. Redistributions of source code must retain the above copyright > > +#notice, this list of conditions and the following disclaimer. > > +# 2. Redistributions in binary form must reproduce the above copyright > > +#notice, this list of conditions and the following disclaimer in the > > +#documentation and/or other materials provided with the distribution. > > +# > > +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > > +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > > PURPOSE > > +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > > +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > > CONSEQUENTIAL > > +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > > +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > > +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > > STRICT > > +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > > +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > > +# SUCH DAMAGE. > > +# > > + > > +import rtems_waf.rtems as rtems > > + > > +def build(bld): > > +rtems.build(bld) > > + > > +bld(features = 'c cprogram', > > +target = 'coremark.bin', > > +includes = ['coremark/', 'coremark/posix/'], > > +source = ['coremark/rtems/init.c', 'coremark/posix/core_portme.c', > > + 'coremark/core_list_join.c', 'coremark/core_main.c', > > + 'coremark/core_matrix.c', 'coremark/core_state.c', > > + 'coremark/core_util.c'], > > + > > +defines = [ > > +# FLAGS_STR is used within CoreMark to print the compiler flags > > used > > +'FLAGS_STR="'+' '.join([str(flag) for flag in bld.env.CFLAGS])+'"' > > +] > > +) > > diff --git a/benchmarks/wscript b/benchmarks/wscript > > index 12741e7..0947060 100644 > > --- a/benchmarks/wscript > > +++ b/benchmarks/wscript > > @@ -7,4 +7,4 @@ import rtems_waf.rtems as rtems > > > > def build(bld): > > bld.recurse('nbenc
Re: [PATCH] rtems-examples: Add CoreMark Benchmark
On Sat, 13 Mar 2021 at 23:38, Joel Sherrill wrote: > > I don't see any RTEMS specific instructions added. Especially > since I think you need them to deal with the submodule. > I relied on the existing README.waf which gives instructions to init and update submodules (including rtems-waf itself being a submodule) https://github.com/RTEMS/rtems-examples/blob/master/README.waf#L26 > What happens when you haven't dealt with the submodule? Is the > error reasonable? I would think a directory is missing and the waf > build will die. > > I am thrilled to see these added. Any advice for how we can use > these in the project. Compare architectures? RTEMS versions? > Yeah, we used it to measure CPU performance for baremetal applications between different processor implementations and compiler toolchains. It reports iterations/second as a final number for a particular operation. The benchmark is a bit configurable though; you can specify the number of iterations, threading, FPU support, memory locations, etc. That can be further customised in wscript or a header file, but I just submitted this patch with the minimum default changes. > --joel > > On Sat, Mar 13, 2021 at 1:50 AM Hesham Almatary > wrote: >> >> CoreMark's primary goals are simplicity and providing a method for >> testing only a processor's core features. It is used primarily here as >> a performance benchmark. >> >> Built and tested for RISC-V rv64imafdc_medany on QEMU and HW >> --- >> .gitmodules | 3 +++ >> benchmarks/coremark/coremark | 1 + >> benchmarks/coremark/wscript | 50 >> benchmarks/wscript | 2 +- >> 4 files changed, 55 insertions(+), 1 deletion(-) >> create mode 16 benchmarks/coremark/coremark >> create mode 100644 benchmarks/coremark/wscript >> >> diff --git a/.gitmodules b/.gitmodules >> index ae86e49..d7e52b9 100644 >> --- a/.gitmodules >> +++ b/.gitmodules >> @@ -1,3 +1,6 @@ >> [submodule "rtems_waf"] >> path = rtems_waf >> url = git://git.rtems.org/rtems_waf.git >> +[submodule "benchmarks/coremark/coremark"] >> + path = benchmarks/coremark/coremark >> + url = g...@github.com:eembc/coremark.git >> diff --git a/benchmarks/coremark/coremark b/benchmarks/coremark/coremark >> new file mode 16 >> index 000..1541482 >> --- /dev/null >> +++ b/benchmarks/coremark/coremark >> @@ -0,0 +1 @@ >> +Subproject commit 1541482bf3e6ef7f5c69f5be76b14537b60833d0 >> diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript >> new file mode 100644 >> index 000..2ec5f1e >> --- /dev/null >> +++ b/benchmarks/coremark/wscript >> @@ -0,0 +1,50 @@ >> +#- >> +# SPDX-License-Identifier: BSD-2-Clause >> +# >> +# Copyright (c) 2021 Hesham Almatary >> +# >> +# This software was developed by SRI International and the University of >> +# Cambridge Computer Laboratory (Department of Computer Science and >> +# Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of >> the >> +# DARPA SSITH research programme. >> +# >> +# Redistribution and use in source and binary forms, with or without >> +# modification, are permitted provided that the following conditions >> +# are met: >> +# 1. Redistributions of source code must retain the above copyright >> +#notice, this list of conditions and the following disclaimer. >> +# 2. Redistributions in binary form must reproduce the above copyright >> +#notice, this list of conditions and the following disclaimer in the >> +#documentation and/or other materials provided with the distribution. >> +# >> +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND >> +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE >> +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE >> +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >> +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS >> +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >> +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT >> +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY >> +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >> +# SUCH DAMAGE. >> +# >> + >> +import rtems_waf.rtems as rtems >> + >> +def build(bld): >> +rtems.build(bld) >> + >> +bld(features = 'c cprogram', >> +target = 'coremark.bin', >> +includes = ['coremark/', 'coremark/posix/'], >> +source = ['coremark/rtems/init.c', 'coremark/posix/core_portme.c', >> + 'coremark/core_list_join.c', 'coremark/core_main.c', >> + 'coremark/core_matrix.c', 'coremark/core_state.c', >> + 'coremark/core_util.c'], >> + >> +defines = [ >> +# FLAGS_STR is used within CoreMark to print the comp
Re: [PATCH] rtems-examples: Add CoreMark Benchmark
Hi Hesham, Nice work getting this integrated in the upstream. I guess that the git submodule instructions for building with waf will work for this, but not Make. How hard would it be for you to integrate the submodule with Make? This is fine with me as-is, I just want to know if we can keep it supporting both build systems. On Sat, Mar 13, 2021 at 12:50 AM Hesham Almatary wrote: > > CoreMark's primary goals are simplicity and providing a method for > testing only a processor's core features. It is used primarily here as > a performance benchmark. > > Built and tested for RISC-V rv64imafdc_medany on QEMU and HW > --- > .gitmodules | 3 +++ > benchmarks/coremark/coremark | 1 + > benchmarks/coremark/wscript | 50 > benchmarks/wscript | 2 +- > 4 files changed, 55 insertions(+), 1 deletion(-) > create mode 16 benchmarks/coremark/coremark > create mode 100644 benchmarks/coremark/wscript > > diff --git a/.gitmodules b/.gitmodules > index ae86e49..d7e52b9 100644 > --- a/.gitmodules > +++ b/.gitmodules > @@ -1,3 +1,6 @@ > [submodule "rtems_waf"] > path = rtems_waf > url = git://git.rtems.org/rtems_waf.git > +[submodule "benchmarks/coremark/coremark"] > + path = benchmarks/coremark/coremark > + url = g...@github.com:eembc/coremark.git > diff --git a/benchmarks/coremark/coremark b/benchmarks/coremark/coremark > new file mode 16 > index 000..1541482 > --- /dev/null > +++ b/benchmarks/coremark/coremark > @@ -0,0 +1 @@ > +Subproject commit 1541482bf3e6ef7f5c69f5be76b14537b60833d0 > diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript > new file mode 100644 > index 000..2ec5f1e > --- /dev/null > +++ b/benchmarks/coremark/wscript > @@ -0,0 +1,50 @@ > +#- > +# SPDX-License-Identifier: BSD-2-Clause > +# > +# Copyright (c) 2021 Hesham Almatary > +# > +# This software was developed by SRI International and the University of > +# Cambridge Computer Laboratory (Department of Computer Science and > +# Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the > +# DARPA SSITH research programme. > +# > +# Redistribution and use in source and binary forms, with or without > +# modification, are permitted provided that the following conditions > +# are met: > +# 1. Redistributions of source code must retain the above copyright > +#notice, this list of conditions and the following disclaimer. > +# 2. Redistributions in binary form must reproduce the above copyright > +#notice, this list of conditions and the following disclaimer in the > +#documentation and/or other materials provided with the distribution. > +# > +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +# SUCH DAMAGE. > +# > + > +import rtems_waf.rtems as rtems > + > +def build(bld): > +rtems.build(bld) > + > +bld(features = 'c cprogram', > +target = 'coremark.bin', > +includes = ['coremark/', 'coremark/posix/'], > +source = ['coremark/rtems/init.c', 'coremark/posix/core_portme.c', > + 'coremark/core_list_join.c', 'coremark/core_main.c', > + 'coremark/core_matrix.c', 'coremark/core_state.c', > + 'coremark/core_util.c'], > + > +defines = [ > +# FLAGS_STR is used within CoreMark to print the compiler flags used > +'FLAGS_STR="'+' '.join([str(flag) for flag in bld.env.CFLAGS])+'"' > +] > +) > diff --git a/benchmarks/wscript b/benchmarks/wscript > index 12741e7..0947060 100644 > --- a/benchmarks/wscript > +++ b/benchmarks/wscript > @@ -7,4 +7,4 @@ import rtems_waf.rtems as rtems > > def build(bld): > bld.recurse('nbench') > - > +bld.recurse('coremark') I think we usually keep the blank line at the end of the wscript file. Not a hard rule. > -- > 2.25.1 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] rtems-examples: Add CoreMark Benchmark
I don't see any RTEMS specific instructions added. Especially since I think you need them to deal with the submodule. What happens when you haven't dealt with the submodule? Is the error reasonable? I would think a directory is missing and the waf build will die. I am thrilled to see these added. Any advice for how we can use these in the project. Compare architectures? RTEMS versions? --joel On Sat, Mar 13, 2021 at 1:50 AM Hesham Almatary < hesham.almat...@cl.cam.ac.uk> wrote: > CoreMark's primary goals are simplicity and providing a method for > testing only a processor's core features. It is used primarily here as > a performance benchmark. > > Built and tested for RISC-V rv64imafdc_medany on QEMU and HW > --- > .gitmodules | 3 +++ > benchmarks/coremark/coremark | 1 + > benchmarks/coremark/wscript | 50 > benchmarks/wscript | 2 +- > 4 files changed, 55 insertions(+), 1 deletion(-) > create mode 16 benchmarks/coremark/coremark > create mode 100644 benchmarks/coremark/wscript > > diff --git a/.gitmodules b/.gitmodules > index ae86e49..d7e52b9 100644 > --- a/.gitmodules > +++ b/.gitmodules > @@ -1,3 +1,6 @@ > [submodule "rtems_waf"] > path = rtems_waf > url = git://git.rtems.org/rtems_waf.git > +[submodule "benchmarks/coremark/coremark"] > + path = benchmarks/coremark/coremark > + url = g...@github.com:eembc/coremark.git > diff --git a/benchmarks/coremark/coremark b/benchmarks/coremark/coremark > new file mode 16 > index 000..1541482 > --- /dev/null > +++ b/benchmarks/coremark/coremark > @@ -0,0 +1 @@ > +Subproject commit 1541482bf3e6ef7f5c69f5be76b14537b60833d0 > diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript > new file mode 100644 > index 000..2ec5f1e > --- /dev/null > +++ b/benchmarks/coremark/wscript > @@ -0,0 +1,50 @@ > +#- > +# SPDX-License-Identifier: BSD-2-Clause > +# > +# Copyright (c) 2021 Hesham Almatary > +# > +# This software was developed by SRI International and the University of > +# Cambridge Computer Laboratory (Department of Computer Science and > +# Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of > the > +# DARPA SSITH research programme. > +# > +# Redistribution and use in source and binary forms, with or without > +# modification, are permitted provided that the following conditions > +# are met: > +# 1. Redistributions of source code must retain the above copyright > +#notice, this list of conditions and the following disclaimer. > +# 2. Redistributions in binary form must reproduce the above copyright > +#notice, this list of conditions and the following disclaimer in the > +#documentation and/or other materials provided with the distribution. > +# > +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY > WAY > +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +# SUCH DAMAGE. > +# > + > +import rtems_waf.rtems as rtems > + > +def build(bld): > +rtems.build(bld) > + > +bld(features = 'c cprogram', > +target = 'coremark.bin', > +includes = ['coremark/', 'coremark/posix/'], > +source = ['coremark/rtems/init.c', 'coremark/posix/core_portme.c', > + 'coremark/core_list_join.c', 'coremark/core_main.c', > + 'coremark/core_matrix.c', 'coremark/core_state.c', > + 'coremark/core_util.c'], > + > +defines = [ > +# FLAGS_STR is used within CoreMark to print the compiler flags > used > +'FLAGS_STR="'+' '.join([str(flag) for flag in bld.env.CFLAGS])+'"' > +] > +) > diff --git a/benchmarks/wscript b/benchmarks/wscript > index 12741e7..0947060 100644 > --- a/benchmarks/wscript > +++ b/benchmarks/wscript > @@ -7,4 +7,4 @@ import rtems_waf.rtems as rtems > > def build(bld): > bld.recurse('nbench') > - > +bld.recurse('coremark') > -- > 2.25.1 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH] rtems-examples: Add CoreMark Benchmark
CoreMark's primary goals are simplicity and providing a method for testing only a processor's core features. It is used primarily here as a performance benchmark. Built and tested for RISC-V rv64imafdc_medany on QEMU and HW --- .gitmodules | 3 +++ benchmarks/coremark/coremark | 1 + benchmarks/coremark/wscript | 50 benchmarks/wscript | 2 +- 4 files changed, 55 insertions(+), 1 deletion(-) create mode 16 benchmarks/coremark/coremark create mode 100644 benchmarks/coremark/wscript diff --git a/.gitmodules b/.gitmodules index ae86e49..d7e52b9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "rtems_waf"] path = rtems_waf url = git://git.rtems.org/rtems_waf.git +[submodule "benchmarks/coremark/coremark"] + path = benchmarks/coremark/coremark + url = g...@github.com:eembc/coremark.git diff --git a/benchmarks/coremark/coremark b/benchmarks/coremark/coremark new file mode 16 index 000..1541482 --- /dev/null +++ b/benchmarks/coremark/coremark @@ -0,0 +1 @@ +Subproject commit 1541482bf3e6ef7f5c69f5be76b14537b60833d0 diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript new file mode 100644 index 000..2ec5f1e --- /dev/null +++ b/benchmarks/coremark/wscript @@ -0,0 +1,50 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2021 Hesham Almatary +# +# This software was developed by SRI International and the University of +# Cambridge Computer Laboratory (Department of Computer Science and +# Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the +# DARPA SSITH research programme. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +import rtems_waf.rtems as rtems + +def build(bld): +rtems.build(bld) + +bld(features = 'c cprogram', +target = 'coremark.bin', +includes = ['coremark/', 'coremark/posix/'], +source = ['coremark/rtems/init.c', 'coremark/posix/core_portme.c', + 'coremark/core_list_join.c', 'coremark/core_main.c', + 'coremark/core_matrix.c', 'coremark/core_state.c', + 'coremark/core_util.c'], + +defines = [ +# FLAGS_STR is used within CoreMark to print the compiler flags used +'FLAGS_STR="'+' '.join([str(flag) for flag in bld.env.CFLAGS])+'"' +] +) diff --git a/benchmarks/wscript b/benchmarks/wscript index 12741e7..0947060 100644 --- a/benchmarks/wscript +++ b/benchmarks/wscript @@ -7,4 +7,4 @@ import rtems_waf.rtems as rtems def build(bld): bld.recurse('nbench') - +bld.recurse('coremark') -- 2.25.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel