Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-31349

To define CycleTimer for OS and CPU for s390x architecture

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Minor
    • None
    • 5.5.1
    • build
    • Linux s390x

    Description

      Couchbase build fails with error "#error You need to define CycleTimer for your OS and CPU" as CycleTimer is undefined and needs to be set for s390x architecture.

       

      Attached is the change required to set CyclerTimer for s390x.

      File couchbase/benchmark/src/cycleclock.h needs to be changes as below:

      @@ -82,6 +82,10 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
      uint64_t low, high;
      _asm_ volatile("rdtsc" : "=a"(low), "=d"(high));
      return (high << 32) | low;
      +#elif defined(_s390x_)
      + uint64_t res;
      + _asm_ volatile("stck %0" : "=m"(res));
      + return res;
      #elif defined(_powerpc) || defined(ppc_)
      // This returns a time-base, which is not always precisely a cycle-count.
      int64_t tbl, tbu0, tbu1;

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              build-team Couchbase Build Team
              Koumudini Bhute Koumudini
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty