Merge pull request #20636 from tchaikov/wip-23169

Revert "core: hint the dout()'s message crafting as a cold code."

Reviewed-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
This commit is contained in:
Kefu Chai 2018-02-28 21:50:46 +08:00 committed by GitHub
commit fa7222377a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 13 deletions

View File

@ -22,15 +22,9 @@
#ifdef __GNUC__
// GCC
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#define HINT_COLD_CODE __attribute__((cold))
#define HINT_NO_INLINE __attribute__((noinline))
#else
// some other compiler - just make it a no-op
#define WARN_UNUSED_RESULT
#define HINT_COLD_CODE
#define HINT_NO_INLINE
#endif
#endif

View File

@ -20,7 +20,6 @@
#include "global/global_context.h"
#include "common/config.h"
#include "common/compiler_extensions.h"
#include "common/likely.h"
#include "common/Clock.h"
#include "log/Log.h"
@ -83,8 +82,7 @@ struct is_dynamic<dynamic_marker_t<T>> : public std::true_type {};
} \
}(cct); \
\
if (unlikely(should_gather)) { \
[&]() HINT_NO_INLINE HINT_COLD_CODE { \
if (should_gather) { \
static size_t _log_exp_length = 80; \
ceph::logging::Entry *_dout_e = \
cct->_log->create_entry(v, sub, &_log_exp_length); \
@ -114,7 +112,6 @@ struct is_dynamic<dynamic_marker_t<T>> : public std::true_type {};
// /usr/include/assert.h clobbers our fancier version.
#define dendl_impl std::flush; \
_ASSERT_H->_log->submit_entry(_dout_e); \
}(); \
} \
} while (0)

View File

@ -18,7 +18,7 @@
/*
* Likely / Unlikely macros
*/
#define likely(x) __builtin_expect((const bool)(x),1)
#define unlikely(x) __builtin_expect((const bool)(x),0)
#define likely(x) __builtin_expect((x),1)
#define unlikely(x) __builtin_expect((x),0)
#endif