MCPcopy Create free account
hub / github.com/ceph/ceph / should_gather

Method should_gather

src/log/SubsystemMap.h:74–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72
73 template <unsigned SubV, int LvlV>
74 bool should_gather() const {
75 static_assert(SubV < get_num(), "wrong subsystem ID");
76 static_assert(LvlV >= -1 && LvlV <= 200);
77
78 if constexpr (LvlV <= 0) {
79 // handle the -1 and 0 levels entirely at compile-time.
80 // Such debugs are intended to be gathered regardless even
81 // of the user configuration.
82 return true;
83 } else {
84 // we expect that setting level different than the default
85 // is rather unusual.
86 return expect(LvlV <= static_cast<int>(m_gather_levels[SubV]),
87 LvlV <= ceph_subsys_get_max_default_level(SubV));
88 }
89 }
90 bool should_gather(const unsigned sub, int level) const {
91 ceph_assert(sub < m_subsys.size());
92 return level <= static_cast<int>(m_gather_levels[sub]);

Callers 15

show_subtreesMethod · 0.80
handle_connectionFunction · 0.80
completeMethod · 0.80
set_attrMethod · 0.80
s3_expiration_headerFunction · 0.80
schedule_requestFunction · 0.80
eofMethod · 0.80
logMethod · 0.80
TESTFunction · 0.80

Calls 3

expectFunction · 0.50
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.64