From ef40f1cf1dae7fc1022ccfb4487255d1a93c45ef Mon Sep 17 00:00:00 2001 From: Nathaniel Filardo Date: Wed, 4 Dec 2019 16:36:55 +0000 Subject: [PATCH] Replace "AAL" type with "Aal" to parallel "Pal" --- src/aal/aal.h | 2 +- src/ds/flaglock.h | 2 +- src/ds/mpscq.h | 2 +- src/mem/allocstats.h | 4 ++-- src/mem/pagemap.h | 2 +- src/test/perf/contention/contention.cc | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/aal/aal.h b/src/aal/aal.h index f1f598d..6870378 100644 --- a/src/aal/aal.h +++ b/src/aal/aal.h @@ -63,7 +63,7 @@ namespace snmalloc namespace snmalloc { - using AAL = AAL_Generic; + using Aal = AAL_Generic; } // namespace snmalloc #if defined(_MSC_VER) && defined(SNMALLOC_VA_BITS_32) diff --git a/src/ds/flaglock.h b/src/ds/flaglock.h index 06d5337..9b2458d 100644 --- a/src/ds/flaglock.h +++ b/src/ds/flaglock.h @@ -13,7 +13,7 @@ namespace snmalloc FlagLock(std::atomic_flag& lock) : lock(lock) { while (lock.test_and_set(std::memory_order_acquire)) - AAL::pause(); + Aal::pause(); } ~FlagLock() diff --git a/src/ds/mpscq.h b/src/ds/mpscq.h index 9785ff9..8fd7b79 100644 --- a/src/ds/mpscq.h +++ b/src/ds/mpscq.h @@ -70,7 +70,7 @@ namespace snmalloc if (next != nullptr) { front = next; - AAL::prefetch(&(next->next)); + Aal::prefetch(&(next->next)); assert(front); std::atomic_thread_fence(std::memory_order_acquire); invariant(); diff --git a/src/mem/allocstats.h b/src/mem/allocstats.h index 19388f1..d7d038f 100644 --- a/src/mem/allocstats.h +++ b/src/mem/allocstats.h @@ -66,7 +66,7 @@ namespace snmalloc { CurrentMaxPair count; CurrentMaxPair slab_count; - uint64_t time = AAL::tick(); + uint64_t time = Aal::tick(); uint64_t ticks = 0; double online_average = 0; @@ -83,7 +83,7 @@ namespace snmalloc void addToRunningAverage() { - uint64_t now = AAL::tick(); + uint64_t now = Aal::tick(); if (slab_count.current != 0) { diff --git a/src/mem/pagemap.h b/src/mem/pagemap.h index ce2aa5e..f931ea0 100644 --- a/src/mem/pagemap.h +++ b/src/mem/pagemap.h @@ -162,7 +162,7 @@ namespace snmalloc while (address_cast(e->load(std::memory_order_relaxed)) == LOCKED_ENTRY) { - AAL::pause(); + Aal::pause(); } value = e->load(std::memory_order_acquire); } diff --git a/src/test/perf/contention/contention.cc b/src/test/perf/contention/contention.cc index b53ec12..845c4d2 100644 --- a/src/test/perf/contention/contention.cc +++ b/src/test/perf/contention/contention.cc @@ -31,18 +31,18 @@ private: auto prev = ready.fetch_add(1); if (prev + 1 == cores) { - start = AAL::tick(); + start = Aal::tick(); flag = true; } while (!flag) - AAL::pause(); + Aal::pause(); f(id); prev = complete.fetch_add(1); if (prev + 1 == cores) { - end = AAL::tick(); + end = Aal::tick(); } }