]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: Remove redundant includes 15204/head
authorJos Collin <jcollin@redhat.com>
Mon, 22 May 2017 15:12:58 +0000 (20:42 +0530)
committerJos Collin <jcollin@redhat.com>
Mon, 22 May 2017 15:28:12 +0000 (20:58 +0530)
Fixes: http://tracker.ceph.com/issues/19883 (Partially)
Signed-off-by: Jos Collin <jcollin@redhat.com>
33 files changed:
src/common/EventTrace.h
src/common/Finisher.cc
src/common/Finisher.h
src/common/Formatter.cc
src/common/Formatter.h
src/common/Graylog.cc
src/common/Graylog.h
src/common/HTMLFormatter.cc
src/common/HTMLFormatter.h
src/common/HeartbeatMap.cc
src/common/HeartbeatMap.h
src/common/LogClient.cc
src/common/LogClient.h
src/common/LogEntry.cc
src/common/LogEntry.h
src/common/MemoryModel.cc
src/common/event_socket.h
src/common/fd.cc
src/common/function_signature.h
src/common/hex.cc
src/common/histogram.h
src/common/hobject.cc
src/common/hobject.h
src/common/hostname.cc
src/common/inline_variant.h
src/common/interval_map.h
src/common/io_priority.cc
src/common/ipaddr.cc
src/common/iso_8601.cc
src/common/iso_8601.h
src/common/lockdep.cc
src/common/lru_map.h
src/common/map_cacher.hpp

index 91d4d5b1273e9f368fba53a6067e6e5c6ebb7386..7be1ffcd973e88bf5abe3b2f63a0b69adf6622fb 100644 (file)
@@ -18,9 +18,7 @@
 #ifndef _EventTrace_h_
 #define _EventTrace_h_
 
-#include <string>
 #include "msg/Message.h"
-#include "common/ceph_context.h"
 
 #if defined(WITH_LTTNG) && defined(WITH_EVENTTRACE)
 
index d7220d10cd00bb93d3ee494d4a1c598551fa5bfa..5be9b04bb8836789a0c345293dfe9edd223b5d8a 100644 (file)
@@ -1,10 +1,8 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#include "common/config.h"
 #include "Finisher.h"
 
-#include "common/debug.h"
 #define dout_subsys ceph_subsys_finisher
 #undef dout_prefix
 #define dout_prefix *_dout << "finisher(" << this << ") "
index 1629d915d638d4e66982435fb21f0c740010fafb..effb3c4760cf5491d70e8498e479312f6d01f8ac 100644 (file)
 #ifndef CEPH_FINISHER_H
 #define CEPH_FINISHER_H
 
-#include "include/atomic.h"
-#include "common/Mutex.h"
 #include "common/Cond.h"
-#include "common/Thread.h"
 #include "common/perf_counters.h"
 
 class CephContext;
index 00a9b3849ca3ea125bfbecfe333e18714a622c7e..1a400aaa159bc27b7917cdeddba98d11a04b0b74 100644 (file)
 
 #define LARGE_SIZE 1024
 
-#include "assert.h"
-#include "Formatter.h"
 #include "HTMLFormatter.h"
 #include "common/escape.h"
 #include "include/buffer.h"
 
-#include <algorithm>
-#include <sstream>
-#include <stdarg.h>
-#include <stdio.h>
-#include <vector>
-#include <string>
 #include <set>
 #include <boost/format.hpp>
 
-
 // -----------------------
 namespace ceph {
 
index a23266ac4adf75386613ca997d158acafa964cb7..aa695ba30f546e5ac54638de650e37a359f0a0e2 100644 (file)
@@ -4,20 +4,15 @@
 #define CEPH_FORMATTER_H
 
 #include "include/int_types.h"
+#include "include/buffer_fwd.h"
 
 #include <deque>
-#include <iosfwd>
 #include <list>
 #include <vector>
 #include <stdarg.h>
-#include <stddef.h>
-#include <utility>
 #include <sstream>
-#include <string>
 #include <map>
 
-#include "include/buffer_fwd.h"
-
 namespace ceph {
 
   struct FormatterAttrs {
index a8fd8a99d29ba9762440901787c28da4d48f6aea..936605172df31b3f9378298379201a514e25b05f 100644 (file)
@@ -2,14 +2,10 @@
 // vim: ts=8 sw=2 smarttab
 
 #include "Graylog.h"
-
-#include <iostream>
-
 #include "common/Formatter.h"
 #include "common/LogEntry.h"
 #include "log/Entry.h"
 #include "log/SubsystemMap.h"
-#include "include/uuid.h"
 
 namespace ceph {
 namespace logging {
index 5452866ffe43af46a8ee21b6a3755e85d18837f6..7e802a899572feb4f34aa2ebf461460ed95edad0 100644 (file)
@@ -4,9 +4,6 @@
 #ifndef __CEPH_LOG_GRAYLOG_H
 #define __CEPH_LOG_GRAYLOG_H
 
-
-#include <memory>
-
 #include <boost/asio.hpp>
 #include <boost/iostreams/filtering_stream.hpp>
 #include <boost/iostreams/filter/zlib.hpp>
index 11004cc4879e0df411907c6c780326611aef910a..02ef744c4cbc7f254d3200f760b3f4d81d64476d 100644 (file)
@@ -14,8 +14,8 @@
 
 #define LARGE_SIZE 1024
 
-#include "Formatter.h"
 #include "HTMLFormatter.h"
+#include "Formatter.h"
 
 #include <sstream>
 #include <stdarg.h>
index 19d056f76af8825f45589563d417bb61cebcc97b..c59296922478b0ebaae8133912e47cbdbe1e6d84 100644 (file)
@@ -3,10 +3,6 @@
 #ifndef CEPH_HTML_FORMATTER_H
 #define CEPH_HTML_FORMATTER_H
 
-#include <iosfwd>
-#include <stdarg.h>
-#include <string>
-
 #include "Formatter.h"
 
 namespace ceph {
index 9167ba67984664cf6ce70bb738b19b3bd93329eb..f9a3d7cce6a99b4d926762370e6572c837154a70 100644 (file)
  * 
  */
 
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <pthread.h>
 #include <signal.h>
 
 #include "HeartbeatMap.h"
 #include "ceph_context.h"
 #include "common/errno.h"
-#include "common/valgrind.h"
-
 #include "debug.h"
+
 #define dout_subsys ceph_subsys_heartbeatmap
 #undef dout_prefix
 #define dout_prefix *_dout << "heartbeat_map "
index 11efa9dd56cbbf2665a7640df89dca3ae67c34a4..542d692e93a248009e87e7ec57d270b64765ef51 100644 (file)
 #ifndef CEPH_HEARTBEATMAP_H
 #define CEPH_HEARTBEATMAP_H
 
-#include <pthread.h>
-
-#include <string>
 #include <list>
-#include <time.h>
 
 #include "include/atomic.h"
-
 #include "RWLock.h"
 
 class CephContext;
index b99a8a2462cc7debdd14c90f85cc85be8ab34b80..3dc77588e868ce1f43dcb8720f5b4ca6615e7956 100644 (file)
  * 
  */
 
-
-
-#include "include/types.h"
+#include "common/LogClient.h"
 #include "include/str_map.h"
-#include "include/uuid.h"
-
-#include "msg/Messenger.h"
-#include "msg/Message.h"
-
 #include "messages/MLog.h"
 #include "messages/MLogAck.h"
 #include "mon/MonMap.h"
-
-#include <iostream>
-#include <errno.h>
-#include <sys/stat.h>
-#include <syslog.h>
+#include "common/Graylog.h"
 
 #ifdef DARWIN
 #include <sys/param.h>
 #include <sys/mount.h>
 #endif // DARWIN
 
-#include "common/Graylog.h"
-// wipe the assert() introduced by boost headers included by Graylog.h
-#include "include/assert.h"
-#include "common/LogClient.h"
-
-#include "common/config.h"
-
 #define dout_subsys ceph_subsys_monc
 
 int parse_log_client_options(CephContext *cct,
index 843b9bff02fe885685f03f5e161f19abc190816a..59e96ac3920f9fc32ff8b6d3d7279e5de2d1abf6 100644 (file)
 #include "common/LogEntry.h"
 #include "common/Mutex.h"
 
-#include <iosfwd>
-#include <sstream>
-#include <atomic>
-
 class LogClient;
 class MLog;
 class MLogAck;
index bc887e1b3ad4df1a999ef7dcdd009b9549d9fa5f..218894a3c64635d37bda730bf27a8c619248c4f3 100644 (file)
@@ -1,11 +1,8 @@
-
 #include <syslog.h>
-
 #include <boost/algorithm/string/predicate.hpp>
 
 #include "LogEntry.h"
 #include "Formatter.h"
-
 #include "include/stringify.h"
 
 // ----
index c3b9d2305ca11d98c246424a453833b50eca5fd4..afe8533acd432af222ac4fa01ee88292a9ebfee5 100644 (file)
@@ -15,9 +15,7 @@
 #ifndef CEPH_LOGENTRY_H
 #define CEPH_LOGENTRY_H
 
-#include "include/types.h"
 #include "include/utime.h"
-#include "include/encoding.h"
 #include "msg/msg_types.h" // for entity_inst_t
 
 namespace ceph {
index fc14a04389bfedc9cf7b6790e44821ebb84c81a1..14d31cc9a76faf062309b669d85cc48ef793b8dd 100644 (file)
@@ -1,9 +1,5 @@
-
-#include "acconfig.h"
-#include "include/compat.h"
-#include "include/types.h"
 #include "MemoryModel.h"
-#include "common/config.h"
+#include "include/compat.h"
 #include "debug.h"
 #if defined(__linux__)
 #include <malloc.h>
index f38808ef5ee273d5200d8e1e8455bb760898b91d..1f1f2c2d10bf96560040095f11b8a68800fe87ef 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "include/event_type.h"
 #include <unistd.h>
-#include <errno.h>
 
 class EventSocket {
   int socket;
index 19f817daf48553fc851713cb3c357f9f2b1ef855..243b1ebfcc33d53fb69a7d447e80a652f5634ba7 100644 (file)
  */
 
 #include "include/compat.h"
-#include "fd.h"
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-
 #include "debug.h"
 #include "errno.h"
 
index 58b284ec85f51749bff1584dad304b48748e81d9..6d2a34ee65e381163dfa518ce36b221eb5d93d1a 100644 (file)
 
 #include <boost/mpl/pop_front.hpp>
 #include <boost/mpl/push_front.hpp>
-#include <boost/function_types/is_member_function_pointer.hpp>
 #include <boost/function_types/function_type.hpp>
 #include <boost/function_types/result_type.hpp>
 #include <boost/function_types/parameter_types.hpp>
 
-#include <boost/type_traits.hpp>
-
 template <typename F>
 struct signature_of_member
 {
index 24ba6724e87341c1ed82fe2aec8b2c87bf24b99d..4fcc2158dae608bf5dca97abd9abe323738ced1d 100644 (file)
  *
  */
 
-#include "common/debug.h"
 #include "common/hex.h"
 
-#include <stdio.h>
-#include <string>
-
 void hex2str(const char *s, int len, char *buf, int dest_len)
 {
   int pos = 0;
index 377e212624c0e373c2ec83875987002e01b4c17a..2b0ae5342c93e8dd1fafccedb748310ae38f92f7 100644 (file)
 #ifndef CEPH_HISTOGRAM_H
 #define CEPH_HISTOGRAM_H
 
-#include <vector>
 #include <list>
 
-#include "include/intarith.h"
 #include "include/encoding.h"
 
 namespace ceph {
index dffd471b7f95fc7421ff082874e78da588761f46..d3f554f7a5790d7e69969a6cb9575f56433134d0 100644 (file)
@@ -1,7 +1,6 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#include "include/types.h"
 #include "hobject.h"
 #include "common/Formatter.h"
 
index 66319e9eefe708cb7525c9a21c091b1bf3c79d10..258d6a3b42bedcbfcbe06c3b865c075974a64c9d 100644 (file)
@@ -15,9 +15,7 @@
 #ifndef __CEPH_OS_HOBJECT_H
 #define __CEPH_OS_HOBJECT_H
 
-#include <string.h>
 #include "include/types.h"
-#include "include/object.h"
 #include "include/cmp.h"
 
 #include "json_spirit/json_spirit_value.h"
index d3c2f6739f9d64db0844cc5abc4dc69395bea47a..32436534ea702b3a15d77cbe0cef8a5c93f88f2d 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "common/hostname.h"
 
-#include <string>
 #include <unistd.h>
 
 std::string ceph_get_hostname()
index 8c4ce35cdfe28042003a825c5e3861aced65e2f1..bd55a59116cda06fe69cf9bef28429b7a654cdf9 100644 (file)
@@ -8,31 +8,12 @@
 #ifndef INLINE_VARIANT_H
 #define INLINE_VARIANT_H
 
-#include <boost/utility/enable_if.hpp>
 #include <boost/function_types/function_arity.hpp>
-#include <boost/function_types/parameter_types.hpp>
-#include <boost/function_types/result_type.hpp>
-#include <boost/fusion/include/at_key.hpp>
-#include <boost/fusion/include/has_key.hpp>
-#include <boost/fusion/include/make_vector.hpp>
-#include <boost/fusion/include/map.hpp>
 #include <boost/fusion/algorithm/transformation/transform.hpp>
-#include <boost/move/move.hpp>
 #include <boost/mpl/contains.hpp>
-#include <boost/mpl/equal_to.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/pop_front.hpp>
 #include <boost/mpl/map.hpp>
-#include <boost/mpl/void.hpp>
-#include <boost/mpl/size.hpp>
-#include <boost/mpl/transform.hpp>
-#include <boost/mpl/unpack_args.hpp>
 #include <boost/mpl/vector.hpp>
 #include <boost/mpl/range_c.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/utility.hpp>
 
 #include "function_signature.h"
 
index 408a60eb267816de270f9976b1ee67799c68ebd4..5357dff9fee781133199f5e283a023027655860d 100644 (file)
 #ifndef INTERVAL_MAP_H
 #define INTERVAL_MAP_H
 
-#include <map>
-#include <vector>
-#include <utility>
-#include <boost/optional.hpp>
-#include <iostream>
 #include "include/interval_set.h"
 
 template <typename K, typename V, typename S>
index 687faa3bd7faf25d0993a92ad1ab1c125ba5b159..72ac637268f7f7f5820a9d264ef30f5d05494204 100644 (file)
  *
  */
 
+#include "io_priority.h"
+
 #include <unistd.h>
 #ifdef __linux__
 #include <sys/syscall.h>   /* For SYS_xxx definitions */
 #endif
 #include <algorithm>
-#include <errno.h>
-
-#include "io_priority.h"
 
 pid_t ceph_gettid(void)
 {
index 55ac722d66672d6c29ed31488a71d8bcc966a147..dcf5932345c023bf18fdd58fbe270c8ce5e31293 100644 (file)
@@ -1,13 +1,9 @@
 #include "include/ipaddr.h"
 
-#include <alloca.h>
 #include <arpa/inet.h>
 #include <ifaddrs.h>
-#include <netinet/in.h>
-#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/socket.h>
 
 static void netmask_ipv4(const struct in_addr *addr,
                         unsigned int prefix_len,
index 88828dac0cad29c244b6d502f345acf39765e65b..dcf43be9413658c11dbba2ca8e7498afac3129b5 100644 (file)
@@ -1,25 +1,15 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#include <cctype>
-#include <chrono>
-#include <ctime>
-#include <cstdint>
-#include <iostream>
-#include <stdexcept>
-#include <string>
-#include <sstream>
-#include <utility>
-
-#include "include/timegm.h"
 #include "iso_8601.h"
+#include "include/timegm.h"
 
+#include <sstream>
 
 namespace ceph {
 using std::chrono::duration_cast;
 using std::chrono::nanoseconds;
 using std::chrono::seconds;
-using std::setfill;
 using std::setw;
 using std::size_t;
 using std::stringstream;
index 5aa63983386941b082f0806a0d2228c2ff5a5a26..38de82848e7d21c82544b46fd47bf3012c485a1f 100644 (file)
@@ -4,7 +4,6 @@
 #ifndef CEPH_COMMON_ISO_8601_H
 #define CEPH_COMMON_ISO_8601_H
 
-#include <boost/optional.hpp>
 #include <boost/utility/string_ref.hpp>
 
 #include "common/ceph_time.h"
index 1f52e5656542730e28769aa2e6f90087c81143d2..5e4283e289eac62be16d7317ad4150258560cca8 100644 (file)
  * Foundation.  See file COPYING.
  *
  */
-#include "BackTrace.h"
-#include "Clock.h"
+#include "lockdep.h"
 #include "common/dout.h"
-#include "common/environment.h"
 #include "common/valgrind.h"
-#include "include/types.h"
-#include "lockdep.h"
-
-#include "include/unordered_map.h"
 
 #if defined(__FreeBSD__) && defined(__LP64__)  // On FreeBSD pthread_t is a pointer.
 namespace std {
index 1e1acc95f76de304abd7be5970c0627f8afbb471..35722fcd08ab1e14fe77f0f11b31691b50606a38 100644 (file)
@@ -1,11 +1,8 @@
 #ifndef CEPH_LRU_MAP_H
 #define CEPH_LRU_MAP_H
 
-#include <list>
-#include <map>
 #include "common/Mutex.h"
 
-
 template <class K, class V>
 class lru_map {
   struct entry {
index ba48c4ef99fbb1aa74de0d78ca709ae1f80a1091..b749460e21dd18f8692ad0424c139a33cef78497 100644 (file)
 #ifndef MAPCACHER_H
 #define MAPCACHER_H
 
-#include <boost/scoped_ptr.hpp>
-#include <boost/optional/optional_io.hpp>
-#include "include/memory.h"
-#include <set>
-#include <map>
-#include <utility>
-#include <string>
-#include <errno.h>
-
-#include "include/Context.h"
 #include "common/sharedptr_registry.hpp"
 
 namespace MapCacher {