From 10de4e434e1c38add24d2bf6e8b0579174c74da1 Mon Sep 17 00:00:00 2001 From: Masha Basmanova Date: Fri, 24 Sep 2021 08:06:44 -0700 Subject: [PATCH] Remove unused Operator::memoryPool (#294) Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/294 Reviewed By: amitkdutta Differential Revision: D31170377 Pulled By: mbasmanova fbshipit-source-id: 0f67789fe7ed05ebf8573a6eea5782c60013cc16 --- velox/exec/Driver.h | 13 +------------ velox/exec/Operator.h | 11 +---------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/velox/exec/Driver.h b/velox/exec/Driver.h index 811ec0eee56d..6f2066ea2e76 100644 --- a/velox/exec/Driver.h +++ b/velox/exec/Driver.h @@ -82,22 +82,11 @@ struct DriverCtx { int _pipelineId, int32_t numDrivers); - velox::memory::MemoryPool* FOLLY_NONNULL addOperatorUserPool() { + velox::memory::MemoryPool* FOLLY_NONNULL addOperatorPool() { opMemPools_.push_back(execCtx->pool()->addScopedChild("operator_ctx")); return opMemPools_.back().get(); } - velox::memory::MemoryPool* FOLLY_NONNULL - addOperatorSystemPool(velox::memory::MemoryPool* FOLLY_NONNULL userPool) { - auto poolPtr = userPool->addScopedChild("operator_ctx"); - poolPtr->setMemoryUsageTracker( - userPool->getMemoryUsageTracker()->addChild(true)); - auto pool = poolPtr.get(); - opMemPools_.push_back(std::move(poolPtr)); - - return pool; - } - std::unique_ptr createConnectorQueryCtx( const std::string& connectorId) const; diff --git a/velox/exec/Operator.h b/velox/exec/Operator.h index 8869d90fe84a..4e6bbe0f17ce 100644 --- a/velox/exec/Operator.h +++ b/velox/exec/Operator.h @@ -154,19 +154,12 @@ struct OperatorStats { class OperatorCtx { public: explicit OperatorCtx(DriverCtx* driverCtx) - : driverCtx_(driverCtx), pool_(driverCtx_->addOperatorUserPool()) {} + : driverCtx_(driverCtx), pool_(driverCtx_->addOperatorPool()) {} velox::memory::MemoryPool* pool() const { return pool_; } - velox::memory::MemoryPool* systemPool() const { - if (!systemMemPool_) { - systemMemPool_ = driverCtx_->addOperatorSystemPool(pool_); - } - return systemMemPool_; - } - memory::MappedMemory* mappedMemory() const; const std::shared_ptr& task() const { @@ -196,9 +189,7 @@ class OperatorCtx { velox::memory::MemoryPool* pool_; // These members are created on demand. - mutable velox::memory::MemoryPool* systemMemPool_{nullptr}; mutable std::shared_ptr mappedMemory_; - mutable std::shared_ptr recoverableMappedMemory_; }; // Query operator