From f424afb434b4f57a2a3255340090b720ec0c2fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Wed, 25 Nov 2020 00:19:26 +0100 Subject: [PATCH] #1009: memory footprinting: do not use countBytes when | operator is available --- src/vt/topos/location/cache/cache.h | 5 ++--- src/vt/trace/trace_log.h | 8 ++++---- src/vt/utils/container/concurrent_deque_locked.h | 5 ++--- src/vt/utils/container/process_ready_buffer.h | 5 ++--- src/vt/worker/worker_group.h | 5 ++--- src/vt/worker/worker_group_omp.h | 5 ++--- 6 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/vt/topos/location/cache/cache.h b/src/vt/topos/location/cache/cache.h index 6fa6170098..7003095d23 100644 --- a/src/vt/topos/location/cache/cache.h +++ b/src/vt/topos/location/cache/cache.h @@ -78,9 +78,8 @@ struct LocationCache { template void serialize(Serializer& s) { s | cache_ - | max_size_; - - s.countBytes(lookup_); + | max_size_ + | lookup_; } private: diff --git a/src/vt/trace/trace_log.h b/src/vt/trace/trace_log.h index 5d5f15aca5..6c4c66be9e 100644 --- a/src/vt/trace/trace_log.h +++ b/src/vt/trace/trace_log.h @@ -189,10 +189,10 @@ struct Log final { reset(); } - template - void serialize(Serializer& s) { - s.countBytes(*this); - } + template + void serialize(Serializer& s) { + s.countBytes(*this); + } private: diff --git a/src/vt/utils/container/concurrent_deque_locked.h b/src/vt/utils/container/concurrent_deque_locked.h index 09952cbe74..e61c6d05e5 100644 --- a/src/vt/utils/container/concurrent_deque_locked.h +++ b/src/vt/utils/container/concurrent_deque_locked.h @@ -106,9 +106,8 @@ struct ConcurrentDequeLocked { template void serialize(Serializer& s) { s | needs_lock_ - | container_; - - s.countBytes(container_mutex_); + | container_ + | container_mutex_; } private: diff --git a/src/vt/utils/container/process_ready_buffer.h b/src/vt/utils/container/process_ready_buffer.h index 9f35d2b161..73453abe45 100644 --- a/src/vt/utils/container/process_ready_buffer.h +++ b/src/vt/utils/container/process_ready_buffer.h @@ -87,9 +87,8 @@ struct ProcessBuffer { s | buffer_ | needs_lock_ | worker_ - | process_fn_; - - s.countBytes(mutex_); + | process_fn_ + | mutex_; } private: diff --git a/src/vt/worker/worker_group.h b/src/vt/worker/worker_group.h index 6ce3ceee88..2833c3ba12 100644 --- a/src/vt/worker/worker_group.h +++ b/src/vt/worker/worker_group.h @@ -100,9 +100,8 @@ struct WorkerGroupAny void serialize(SerializerT& s) { s | finished_fn_ | initialized_ - | num_workers_; - - s.countBytes(workers_); + | num_workers_ + | workers_; } private: diff --git a/src/vt/worker/worker_group_omp.h b/src/vt/worker/worker_group_omp.h index d0445c830c..6fe1e41b7f 100644 --- a/src/vt/worker/worker_group_omp.h +++ b/src/vt/worker/worker_group_omp.h @@ -103,9 +103,8 @@ struct WorkerGroupOMP | ready_ | initialized_ | num_workers_ - | worker_state_; - - s.countBytes(enqueue_worker_mutex_); + | worker_state_ + | enqueue_worker_mutex_; } private: