Skip to content

Commit

Permalink
Move some logging related files to logging/
Browse files Browse the repository at this point in the history
Summary: Many logging related source files are under util/. It will be more structured if they are together.

Test Plan: Run make and cmake

fix
  • Loading branch information
siying committed May 31, 2019
1 parent cae22c5 commit db487c2
Show file tree
Hide file tree
Showing 71 changed files with 96 additions and 94 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,9 @@ set(SOURCES
file/file_util.cc
file/filename.cc
file/sst_file_manager_impl.cc
logging/auto_roll_logger.cc
logging/event_logger.cc
logging/log_buffer.cc
memory/arena.cc
memory/concurrent_arena.cc
memory/jemalloc_nodump_allocator.cc
Expand Down Expand Up @@ -620,7 +623,6 @@ set(SOURCES
tools/ldb_tool.cc
tools/sst_dump_tool.cc
tools/trace_analyzer_tool.cc
util/auto_roll_logger.cc
util/bloom.cc
util/coding.cc
util/compaction_job_stats_impl.cc
Expand All @@ -629,11 +631,9 @@ set(SOURCES
util/concurrent_task_limiter_impl.cc
util/crc32c.cc
util/dynamic_bloom.cc
util/event_logger.cc
util/file_reader_writer.cc
util/filter_policy.cc
util/hash.cc
util/log_buffer.cc
util/murmurhash.cc
util/random.cc
util/rate_limiter.cc
Expand Down Expand Up @@ -939,6 +939,8 @@ if(WITH_TESTS)
env/env_test.cc
env/mock_env_test.cc
file/delete_scheduler_test.cc
logging/auto_roll_logger_test.cc
logging/event_logger_test.cc
memory/arena_test.cc
memtable/inlineskiplist_test.cc
memtable/skiplist_test.cc
Expand All @@ -963,13 +965,11 @@ if(WITH_TESTS)
tools/reduce_levels_test.cc
tools/sst_dump_test.cc
tools/trace_analyzer_test.cc
util/auto_roll_logger_test.cc
util/autovector_test.cc
util/bloom_test.cc
util/coding_test.cc
util/crc32c_test.cc
util/dynamic_bloom_test.cc
util/event_logger_test.cc
util/file_reader_writer_test.cc
util/filelock_test.cc
util/hash_test.cc
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ db_bench_tool_test: tools/db_bench_tool_test.o $(BENCHTOOLOBJECTS) $(TESTHARNESS
trace_analyzer_test: tools/trace_analyzer_test.o $(LIBOBJECTS) $(ANALYZETOOLOBJECTS) $(TESTHARNESS)
$(AM_LINK)

event_logger_test: util/event_logger_test.o $(LIBOBJECTS) $(TESTHARNESS)
event_logger_test: logging/event_logger_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)

timer_queue_test: util/timer_queue_test.o $(LIBOBJECTS) $(TESTHARNESS)
Expand All @@ -1519,7 +1519,7 @@ manual_compaction_test: db/manual_compaction_test.o $(LIBOBJECTS) $(TESTHARNESS)
filelock_test: util/filelock_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)

auto_roll_logger_test: util/auto_roll_logger_test.o $(LIBOBJECTS) $(TESTHARNESS)
auto_roll_logger_test: logging/auto_roll_logger_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)

memtable_list_test: db/memtable_list_test.o $(LIBOBJECTS) $(TESTHARNESS)
Expand Down
10 changes: 5 additions & 5 deletions TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ cpp_library(
"file/file_util.cc",
"file/filename.cc",
"file/sst_file_manager_impl.cc",
"logging/auto_roll_logger.cc",
"logging/event_logger.cc",
"logging/log_buffer.cc",
"memory/arena.cc",
"memory/concurrent_arena.cc",
"memory/jemalloc_nodump_allocator.cc",
Expand Down Expand Up @@ -218,7 +221,6 @@ cpp_library(
"tools/ldb_cmd.cc",
"tools/ldb_tool.cc",
"tools/sst_dump_tool.cc",
"util/auto_roll_logger.cc",
"util/bloom.cc",
"util/build_version.cc",
"util/coding.cc",
Expand All @@ -228,11 +230,9 @@ cpp_library(
"util/concurrent_task_limiter_impl.cc",
"util/crc32c.cc",
"util/dynamic_bloom.cc",
"util/event_logger.cc",
"util/file_reader_writer.cc",
"util/filter_policy.cc",
"util/hash.cc",
"util/log_buffer.cc",
"util/murmurhash.cc",
"util/random.cc",
"util/rate_limiter.cc",
Expand Down Expand Up @@ -359,7 +359,7 @@ ROCKS_TESTS = [
],
[
"auto_roll_logger_test",
"util/auto_roll_logger_test.cc",
"logging/auto_roll_logger_test.cc",
"serial",
],
[
Expand Down Expand Up @@ -699,7 +699,7 @@ ROCKS_TESTS = [
],
[
"event_logger_test",
"util/event_logger_test.cc",
"logging/event_logger_test.cc",
"serial",
],
[
Expand Down
2 changes: 1 addition & 1 deletion db/builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <vector>
#include "db/range_tombstone_fragmenter.h"
#include "db/table_properties_collector.h"
#include "logging/event_logger.h"
#include "options/cf_options.h"
#include "rocksdb/comparator.h"
#include "rocksdb/env.h"
Expand All @@ -20,7 +21,6 @@
#include "rocksdb/table_properties.h"
#include "rocksdb/types.h"
#include "table/scoped_arena_iterator.h"
#include "util/event_logger.h"

namespace rocksdb {

Expand Down
4 changes: 2 additions & 2 deletions db/compaction/compaction_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include "db/version_set.h"
#include "file/filename.h"
#include "file/sst_file_manager_impl.h"
#include "logging/log_buffer.h"
#include "logging/logging.h"
#include "monitoring/iostats_context_imp.h"
#include "monitoring/perf_context_imp.h"
#include "monitoring/thread_status_util.h"
Expand All @@ -56,8 +58,6 @@
#include "test_util/sync_point.h"
#include "util/coding.h"
#include "util/file_reader_writer.h"
#include "util/log_buffer.h"
#include "util/logging.h"
#include "util/mutexlock.h"
#include "util/random.h"
#include "util/stop_watch.h"
Expand Down
2 changes: 1 addition & 1 deletion db/compaction/compaction_job.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "db/version_edit.h"
#include "db/write_controller.h"
#include "db/write_thread.h"
#include "logging/event_logger.h"
#include "options/cf_options.h"
#include "options/db_options.h"
#include "port/port.h"
Expand All @@ -40,7 +41,6 @@
#include "rocksdb/transaction_log.h"
#include "table/scoped_arena_iterator.h"
#include "util/autovector.h"
#include "util/event_logger.h"
#include "util/stop_watch.h"
#include "util/thread_local.h"

Expand Down
2 changes: 1 addition & 1 deletion db/compaction/compaction_job_stats_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "db/write_batch_internal.h"
#include "env/mock_env.h"
#include "file/filename.h"
#include "logging/logging.h"
#include "memtable/hash_linklist_rep.h"
#include "monitoring/statistics.h"
#include "monitoring/thread_status_util.h"
Expand Down Expand Up @@ -57,7 +58,6 @@
#include "test_util/testutil.h"
#include "util/compression.h"
#include "util/hash.h"
#include "util/logging.h"
#include "util/mutexlock.h"
#include "util/rate_limiter.h"
#include "util/string_util.h"
Expand Down
2 changes: 1 addition & 1 deletion db/compaction/compaction_picker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include <vector>
#include "db/column_family.h"
#include "file/filename.h"
#include "logging/log_buffer.h"
#include "monitoring/statistics.h"
#include "test_util/sync_point.h"
#include "util/log_buffer.h"
#include "util/random.h"
#include "util/string_util.h"

Expand Down
2 changes: 1 addition & 1 deletion db/compaction/compaction_picker_fifo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <string>
#include <vector>
#include "db/column_family.h"
#include "util/log_buffer.h"
#include "logging/log_buffer.h"
#include "util/string_util.h"

namespace rocksdb {
Expand Down
2 changes: 1 addition & 1 deletion db/compaction/compaction_picker_level.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include <vector>

#include "db/compaction/compaction_picker_level.h"
#include "logging/log_buffer.h"
#include "test_util/sync_point.h"
#include "util/log_buffer.h"

namespace rocksdb {

Expand Down
2 changes: 1 addition & 1 deletion db/compaction/compaction_picker_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include "db/compaction/compaction_picker_level.h"
#include "db/compaction/compaction_picker_universal.h"

#include "logging/logging.h"
#include "test_util/testharness.h"
#include "test_util/testutil.h"
#include "util/logging.h"
#include "util/string_util.h"

namespace rocksdb {
Expand Down
2 changes: 1 addition & 1 deletion db/compaction/compaction_picker_universal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include <utility>
#include "db/column_family.h"
#include "file/filename.h"
#include "logging/log_buffer.h"
#include "monitoring/statistics.h"
#include "test_util/sync_point.h"
#include "util/log_buffer.h"
#include "util/random.h"
#include "util/string_util.h"

Expand Down
6 changes: 3 additions & 3 deletions db/db_impl/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
#include "file/file_util.h"
#include "file/filename.h"
#include "file/sst_file_manager_impl.h"
#include "logging/auto_roll_logger.h"
#include "logging/log_buffer.h"
#include "logging/logging.h"
#include "memtable/hash_linklist_rep.h"
#include "memtable/hash_skiplist_rep.h"
#include "monitoring/iostats_context_imp.h"
Expand Down Expand Up @@ -86,15 +89,12 @@
#include "table/two_level_iterator.h"
#include "test_util/sync_point.h"
#include "tools/sst_dump_tool_imp.h"
#include "util/auto_roll_logger.h"
#include "util/autovector.h"
#include "util/build_version.h"
#include "util/coding.h"
#include "util/compression.h"
#include "util/crc32c.h"
#include "util/file_reader_writer.h"
#include "util/log_buffer.h"
#include "util/logging.h"
#include "util/mutexlock.h"
#include "util/stop_watch.h"
#include "util/string_util.h"
Expand Down
3 changes: 2 additions & 1 deletion db/db_impl/db_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include "db/wal_manager.h"
#include "db/write_controller.h"
#include "db/write_thread.h"
#include "db/memtable_list.h"
#include "logging/event_logger.h"
#include "monitoring/instrumented_mutex.h"
#include "options/db_options.h"
#include "port/port.h"
Expand All @@ -52,7 +54,6 @@
#include "rocksdb/write_buffer_manager.h"
#include "table/scoped_arena_iterator.h"
#include "util/autovector.h"
#include "util/event_logger.h"
#include "util/hash.h"
#include "util/repeatable_thread.h"
#include "util/stop_watch.h"
Expand Down
2 changes: 1 addition & 1 deletion db/db_impl/db_impl_secondary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

#include "db/db_iter.h"
#include "db/merge_context.h"
#include "logging/auto_roll_logger.h"
#include "monitoring/perf_context_imp.h"
#include "util/auto_roll_logger.h"

namespace rocksdb {

Expand Down
2 changes: 1 addition & 1 deletion db/db_iter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "db/merge_helper.h"
#include "db/pinned_iterators_manager.h"
#include "file/filename.h"
#include "logging/logging.h"
#include "memory/arena.h"
#include "monitoring/perf_context_imp.h"
#include "rocksdb/env.h"
Expand All @@ -25,7 +26,6 @@
#include "rocksdb/options.h"
#include "table/internal_iterator.h"
#include "table/iterator_wrapper.h"
#include "util/logging.h"
#include "util/mutexlock.h"
#include "util/string_util.h"
#include "util/trace_replay.h"
Expand Down
2 changes: 1 addition & 1 deletion db/dbformat.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <utility>
#include "db/lookup_key.h"
#include "db/merge_context.h"
#include "logging/logging.h"
#include "monitoring/perf_context_imp.h"
#include "rocksdb/comparator.h"
#include "rocksdb/db.h"
Expand All @@ -23,7 +24,6 @@
#include "rocksdb/table.h"
#include "rocksdb/types.h"
#include "util/coding.h"
#include "util/logging.h"
#include "util/user_comparator_wrapper.h"

namespace rocksdb {
Expand Down
2 changes: 1 addition & 1 deletion db/dbformat_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "db/dbformat.h"
#include "logging/logging.h"
#include "test_util/testharness.h"
#include "util/logging.h"

namespace rocksdb {

Expand Down
2 changes: 1 addition & 1 deletion db/event_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

#include "db/column_family.h"
#include "db/version_edit.h"
#include "logging/event_logger.h"
#include "rocksdb/listener.h"
#include "rocksdb/table_properties.h"
#include "util/event_logger.h"

namespace rocksdb {

Expand Down
2 changes: 1 addition & 1 deletion db/fault_injection_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "db/version_set.h"
#include "env/mock_env.h"
#include "file/filename.h"
#include "logging/logging.h"
#include "rocksdb/cache.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h"
Expand All @@ -25,7 +26,6 @@
#include "test_util/sync_point.h"
#include "test_util/testharness.h"
#include "test_util/testutil.h"
#include "util/logging.h"
#include "util/mutexlock.h"

namespace rocksdb {
Expand Down
2 changes: 1 addition & 1 deletion db/filename_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#include "file/filename.h"

#include "db/dbformat.h"
#include "logging/logging.h"
#include "port/port.h"
#include "test_util/testharness.h"
#include "util/logging.h"

namespace rocksdb {

Expand Down
6 changes: 3 additions & 3 deletions db/flush_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include "db/version_set.h"
#include "file/file_util.h"
#include "file/filename.h"
#include "logging/event_logger.h"
#include "logging/log_buffer.h"
#include "logging/logging.h"
#include "monitoring/iostats_context_imp.h"
#include "monitoring/perf_context_imp.h"
#include "monitoring/thread_status_util.h"
Expand All @@ -47,9 +50,6 @@
#include "table/two_level_iterator.h"
#include "test_util/sync_point.h"
#include "util/coding.h"
#include "util/event_logger.h"
#include "util/log_buffer.h"
#include "util/logging.h"
#include "util/mutexlock.h"
#include "util/stop_watch.h"

Expand Down
Loading

0 comments on commit db487c2

Please sign in to comment.