Skip to content

Commit c8f1ca5

Browse files
committed
refactor: Remove unused 'velox_memory_pool_debug_enabled' flag
The 'velox_memory_pool_debug_enabled' flag is no longer used in the codebase. Memory pool debugging is now controlled through the `MemoryPool::DebugOptions` struct which allows for more granular control of debugging features per memory pool. This change completely removes its declaration from the code.
1 parent 7eaf45f commit c8f1ca5

File tree

4 files changed

+0
-11
lines changed

4 files changed

+0
-11
lines changed

velox/common/memory/Memory.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include "velox/common/memory/MemoryPool.h"
4242

4343
DECLARE_bool(velox_memory_leak_check_enabled);
44-
DECLARE_bool(velox_memory_pool_debug_enabled);
4544
DECLARE_bool(velox_enable_memory_usage_track_in_default_memory_pool);
4645

4746
namespace facebook::velox::memory {

velox/common/memory/MemoryPool.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "velox/common/memory/MemoryArbitrator.h"
3030

3131
DECLARE_bool(velox_memory_leak_check_enabled);
32-
DECLARE_bool(velox_memory_pool_debug_enabled);
3332
DECLARE_bool(velox_memory_pool_capacity_transfer_across_tasks);
3433

3534
namespace facebook::velox::exec {

velox/common/memory/tests/MemoryPoolTest.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include "velox/common/testutil/TestValue.h"
3232

3333
DECLARE_bool(velox_memory_leak_check_enabled);
34-
DECLARE_bool(velox_memory_pool_debug_enabled);
3534
DECLARE_int32(velox_memory_num_shared_leaf_pools);
3635

3736
using namespace ::testing;
@@ -2531,7 +2530,6 @@ TEST_P(MemoryPoolTest, concurrentUpdateToDifferentPools) {
25312530
}
25322531

25332532
TEST_P(MemoryPoolTest, concurrentUpdatesToTheSamePool) {
2534-
FLAGS_velox_memory_pool_debug_enabled = true;
25352533
if (!isLeafThreadSafe_) {
25362534
return;
25372535
}
@@ -2717,7 +2715,6 @@ TEST(MemoryPoolTest, visitChildren) {
27172715
}
27182716

27192717
TEST(MemoryPoolTest, debugMode) {
2720-
FLAGS_velox_memory_pool_debug_enabled = true;
27212718
constexpr int64_t kMaxMemory = 10 * GB;
27222719
constexpr int64_t kNumIterations = 100;
27232720
const std::vector<int64_t> kAllocSizes = {128, 8 * KB, 2 * MB};
@@ -2915,7 +2912,6 @@ TEST(MemoryPoolTest, debugModeWithFilter) {
29152912
}
29162913

29172914
TEST_P(MemoryPoolTest, debugModeWrapCapException) {
2918-
FLAGS_velox_memory_pool_debug_enabled = true;
29192915
const uint64_t kMaxCap = 128L * MB;
29202916
MemoryManager::Options options;
29212917
options.allocatorCapacity = kMaxCap;

velox/flag_definitions/flags.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,6 @@ DEFINE_bool(
100100
false,
101101
"If true, check fails on any memory leaks in memory pool and memory manager");
102102

103-
DEFINE_bool(
104-
velox_memory_pool_debug_enabled,
105-
false,
106-
"If true, 'MemoryPool' will be running in debug mode to track the allocation and free call sites to detect the source of memory leak for testing purpose");
107-
108103
// TODO: deprecate this after solves all the use cases that can cause
109104
// significant performance regression by memory usage tracking.
110105
DEFINE_bool(

0 commit comments

Comments
 (0)