[PATCH] Add CoreMark Benchmark

Joel Sherrill joel at rtems.org
Fri Feb 21 18:18:00 UTC 2020


On Fri, Feb 21, 2020, 11:27 AM Hesham Almatary <hesham.almatary at cl.cam.ac.uk>
wrote:

> On Fri, 21 Feb 2020 at 17:11, Gedare Bloom <gedare at rtems.org> wrote:
> >
> > What is the difference between the CTSRD-CHERI fork and the upstream
> Coremark?
> >
> I submitted a pending PR to CoreMark/upstream to add RTEMS support
> [1]. I have more flexbility and control over the CTSRD-CHERI fork to
> push/use
> fixess/features more quickly. Furthermore, CHERI-related bits and
> another pending PR aren't upstream yet [2].
>
> Currently, I have no problem just using the upstream one once my PR is
> merged and later if we add CHERI support to RTEMS upstream, change the
> fork.
>
> [1] https://github.com/eembc/coremark/pull/21
> [2] https://github.com/eembc/coremark/pull/19
>
> > It should be made clear in the repo the license of the Coremark (APL
> > 1.0 I believe)
> >
> That's included in the coremark repo itself. Do you suggest adding a
> note in the commit message about the license?
>

That would be good but it should also be in the contents of the repo so a
tar release has the info.

>
> > On Fri, Feb 21, 2020 at 10:00 AM Hesham Almatary
> > <Hesham.Almatary at 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  | 48 ++++++++++++++++++++++++++++++++++++
> > >  benchmarks/wscript           |  2 ++
> > >  4 files changed, 54 insertions(+)
> > >  create mode 160000 benchmarks/coremark/coremark
> > >  create mode 100644 benchmarks/coremark/wscript
> > >
> > > diff --git a/.gitmodules b/.gitmodules
> > > index ae86e49..2bcba90 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 = git at github.com:CTSRD-CHERI/coremark.git
> > > diff --git a/benchmarks/coremark/coremark
> b/benchmarks/coremark/coremark
> > > new file mode 160000
> > > index 0000000..cdafe98
> > > --- /dev/null
> > > +++ b/benchmarks/coremark/coremark
> > > @@ -0,0 +1 @@
> > > +Subproject commit cdafe986865cf46a3222f7bf28be82fc8d96fa8f
> > > diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript
> > > new file mode 100644
> > > index 0000000..c2c225a
> > > --- /dev/null
> > > +++ b/benchmarks/coremark/wscript
> > > @@ -0,0 +1,48 @@
> > > +#-
> > > +# SPDX-License-Identifier: BSD-2-Clause
> > > +#
> > > +# Copyright (c) 2020 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/rtems',
> > > +        source = ['coremark/rtems/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..24db85b 100644
> > > --- a/benchmarks/wscript
> > > +++ b/benchmarks/wscript
> > > @@ -1,3 +1,4 @@
> > > +# Copyright 2020 Hesham Almatary (hesham.almatary at cl.cam.ac.uk)
> > >  # Copyright 2013 Gedare Bloom (gedare at rtems.org)
> > >  #
> > >  # This file's license is 2-clause BSD as in this distribution's
> LICENSE.2 file.
> > > @@ -7,4 +8,5 @@ import rtems_waf.rtems as rtems
> > >
> > >  def build(bld):
> > >      bld.recurse('nbench')
> > > +    bld.recurse('coremark')
> > >
> > > --
> > > 2.17.1
> > >
> > > _______________________________________________
> > > devel mailing list
> > > devel at rtems.org
> > > http://lists.rtems.org/mailman/listinfo/devel
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200221/7bc6005c/attachment-0001.html>


More information about the devel mailing list